Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def vcls(self, service_id, version):
return VCL.list(self.conn, service_id=service_id, version=version)
def vcl(self, service_id, version, name):
return VCL.find(self.conn, service_id=service_id, version=version, name=name)
def vcl(self, name, content):
""" Create a new VCL under this version. """
vcl = VCL()
vcl.conn = self.conn
vcl.attrs = {
# Parent params
'service_id': self.attrs['service_id'],
'version': self.attrs['number'],
# New instance params
'name': name,
'content': content,
}
vcl.save()
return vcl