]
returns = Parameter(int, '1 if successful')
+
+ event_type = 'Delete'
+ object_type = 'Address'
def call(self, auth, address_id):
# Get associated address details
raise PLCPermissionDenied, "Address must be associated with one of your sites"
address.delete()
+ self.object_ids = [address['address_id']]
return 1
returns = Parameter(int, '1 if successful')
+ event_type = 'Delete'
+ object_type = 'AddressType'
+
def call(self, auth, address_type_id_or_name):
address_types = AddressTypes(self.api, [address_type_id_or_name])
if not address_types:
raise PLCInvalidArgument, "No such address type"
address_type = address_types[0]
-
address_type.delete()
+ self.object_ids = [address_type['address_type_id']]
return 1
]
returns = Parameter(int, '1 if successful')
+
+ event_type = 'DeleteFrom'
+ object_type = 'Address'
def call(self, auth, address_type_id_or_name, address_id):
address_types = AddressTypes(self.api, [address_type_id_or_name])
raise PLCPermissionDenied, "Address must be associated with one of your sites"
address.remove_address_type(address_type)
+ self.object_ids = [address['address_id']]
return 1
returns = Parameter(int, '1 if successful')
+ event_type = 'Delete'
+ object_type = 'BootState'
+
def call(self, auth, name):
boot_states = BootStates(self.api, [name])
if not boot_states:
boot_state = boot_states[0]
boot_state.delete()
-
+
return 1
]
returns = Parameter(int, '1 if successful')
+
+ event_type = 'Delete'
+ object_type = 'ConfFile'
def call(self, auth, conf_file_id):
conf_files = ConfFiles(self.api, [conf_file_id])
conf_file = conf_files[0]
conf_file.delete()
+ self.object_ids = [conf_file['conf_file_id']]
return 1
event_type = 'DeleteFrom'
object_type = 'ConfFile'
- object_ids = []
def call(self, auth, conf_file_id, node_id_or_hostname):
# Get configuration file
event_type = 'DeleteFrom'
object_type = 'ConfFile'
- object_ids = []
def call(self, auth, conf_file_id, nodegroup_id_or_name):
# Get configuration file
returns = Parameter(int, '1 if successful')
+ event_type = 'Delete'
+ object_type = 'Key'
+
def call(self, auth, key_id):
# Get associated key details
keys = Keys(self.api, [key_id])
raise PLCPermissionDenied, "Key must be associated with your account"
key.delete()
+ self.object_ids = [key['key_id']]
return 1
]
returns = Parameter(int, '1 if successful')
-
+
+ event_type = 'Delete'
+ object_type = 'KeyType'
+
def call(self, auth, name):
key_types = KeyTypes(self.api, [name])
if not key_types:
]
returns = Parameter(int, '1 if successful')
+
+ event_type = 'Delete'
+ object_type = 'Message'
def call(self, auth, message_id):
# Get message information
message = messages[0]
message.delete()
+ self.object_ids = [message['message_id']]
return 1
]
returns = Parameter(int, '1 if successful')
+
+ event_type = 'Delete'
+ object_type = 'NetworkMethod'
def call(self, auth, name):
network_methods = NetworkMethods(self.api, [name])
]
returns = Parameter(int, '1 if successful')
+
+ event_type = 'Delete'
+ object_type = 'NetworkType'
def call(self, auth, name):
network_types = NetworkTypes(self.api, [name])
returns = Parameter(int, '1 if successful')
+ event_type = 'Delete'
+ object_type = 'Node'
+
def call(self, auth, node_id_or_hostname):
# Get account information
nodes = Nodes(self.api, [node_id_or_hostname])
raise PLCPermissionDenied, "Not allowed to delete nodes from specified site"
node.delete()
+ self.object_ids = [node['node_id']]
return 1
returns = Parameter(int, '1 if successful')
+ event_type = 'DeleteFrom'
+ object_type = 'NodeGroup'
+
def call(self, auth, node_id_or_hostname, nodegroup_id_or_name):
# Get node info
nodes = Nodes(self.api, [node_id_or_hostname])
# Remove node from nodegroup
if node['node_id'] in nodegroup['node_ids']:
nodegroup.remove_node(node)
+
+ self.object_ids = [nodegroup['nodegroup_id']]
return 1
returns = Parameter(int, '1 if successful')
+ event_type = 'DeleteFrom'
+ object_type = 'PCU'
+
def call(self, auth, node_id_or_hostname, pcu_id):
# Get node
nodes = Nodes(self.api, [node_id_or_hostname])
if node['node_id'] in pcu['node_ids']:
pcu.remove_node(node)
- return 1
+ self.object_ids = [pcu['pcu_id']]
+
+ return 1
returns = Parameter(int, '1 if successful')
+ event_type = 'Delete'
+ object_type = 'NodeGroup'
+
def call(self, auth, node_group_id_or_name):
# Get account information
nodegroups = NodeGroups(self.api, [node_group_id_or_name])
nodegroup = nodegroups[0]
nodegroup.delete()
+ self.object_ids = [nodegroup['nodegroup_id']]
return 1
returns = Parameter(int, '1 if successful')
+ event_type = 'Delete'
+ object_type = 'NodeNetwork'
+
def call(self, auth, nodenetwork_id):
+
# Get node network information
nodenetworks = NodeNetworks(self.api, [nodenetwork_id])
if not nodenetworks:
raise PLCPermissionDenied, "Not allowed to delete this node network"
nodenetwork.delete()
+ self.object_ids = [nodenetwork['nodenetwork_id']]
return 1
returns = Parameter(int, '1 if successful')
+ event_type = 'Delete'
+ object_type = 'PCU'
+
def call(self, auth, pcu_id):
# Get associated PCU details
pcus = PCUs(self.api, [pcu_id])
raise PLCPermissionDenied, "Not allowed to update that PCU"
pcu.delete()
+ self.object_ids = [pcu['pcu_id']]
return 1
returns = Parameter(int, '1 if successful')
+ event_type = 'Delete'
+ object_type = 'Person'
+
def call(self, auth, person_id_or_email):
# Get account information
persons = Persons(self.api, [person_id_or_email])
raise PLCPermissionDenied, "Not allowed to delete specified account"
person.delete()
+ self.object_ids = [person['person_id']]
return 1
]
returns = Parameter(int, '1 if successful')
+
+ event_type = 'DeleteFrom'
+ object_type = 'Site'
def call(self, auth, person_id_or_email, site_id_or_login_base):
# Get account information
if site['site_id'] in person['site_ids']:
site.remove_person(person)
+ self.object_ids = [site['site_id']]
+
return 1
returns = Parameter(int, '1 if successful')
+ event_type = 'DeleteFrom'
+ object_type = 'Slice'
+
def call(self, auth, person_id_or_email, slice_id_or_name):
# Get account information
persons = Persons(self.api, [person_id_or_email])
if slice['slice_id'] in person['slice_ids']:
slice.remove_person(person)
+
+ self.object_ids = [slice['slice_id']]
return 1
returns = Parameter(int, '1 if successful')
+ event_type = 'Delete'
+ object_type = 'Role'
+
def call(self, auth, role_id_or_name):
roles = Roles(self.api, [role_id_or_name])
if not roles:
role = roles[0]
role.delete()
+ self.object_ids = [role['role_id']]
return 1
returns = Parameter(int, '1 if successful')
+ event_type = 'DeleteFrom'
+ object_type = 'Person'
+
def call(self, auth, role_id_or_name, person_id_or_email):
# Get all roles
roles = {}
if role_id in person['role_ids']:
person.remove_role(role_id)
+
+ self.object_ids = [person['person_id']]
return 1
accepts = [SessionAuth()]
returns = Parameter(int, '1 if successful')
+ event_type = 'Delete'
+ object_type = 'Session'
+
def call(self, auth):
assert auth.has_key('session')
returns = Parameter(int, '1 if successful')
+ event_type = 'Delete'
+ object_type = 'Site'
+
def call(self, auth, site_id_or_login_base):
# Get account information
sites = Sites(self.api, [site_id_or_login_base])
site = sites[0]
site.delete()
+ self.object_ids = [site['site_id']]
return 1
returns = Parameter(int, '1 if successful')
+ event_type = 'Delete'
+ object_type = 'Slice'
+
def call(self, auth, slice_id_or_name):
slices = Slices(self.api, [slice_id_or_name])
if not slices:
raise PLCPermissionDenied, "Specified slice not associated with any of your sites"
slice.delete()
+ self.object_ids = [slice['slice_id']]
return 1
returns = Parameter(int, '1 if successful')
+ event_type = 'Delete'
+ object_type = 'SliceAttribute'
+
def call(self, auth, slice_attribute_id):
slice_attributes = SliceAttributes(self.api, [slice_attribute_id])
if not slice_attributes:
if slice_attribute['min_role_id'] is not None and \
min(self.caller['role_ids']) > slice_attribute['min_role_id']:
- raise PLCPermissionDenied, "Not allowed to delete the specified attribute"
+ raise PLCPermissioinDenied, "Not allowed to delete the specified attribute"
slice_attribute.delete()
+ self.object_ids = [slice_attribute['slice_attribute_id']]
return 1
returns = Parameter(int, '1 if successful')
+ event_type = 'Delete'
+ object_type = 'SliceAttributeType'
+
def call(self, auth, attribute_type_id_or_name):
attribute_types = SliceAttributeTypes(self.api, [attribute_type_id_or_name])
if not attribute_types:
attribute_type = attribute_types[0]
attribute_type.delete()
+ self.object_ids = [attribute_type['attribute_type_id']]
return 1
returns = Parameter(int, '1 if successful')
+ event_type = 'DeleteFrom'
+ object_type = 'Node'
+
def call(self, auth, slice_id_or_name, node_id_or_hostname_list):
# Get slice information
slices = Slices(self.api, [slice_id_or_name])
for node in nodes:
if slice['slice_id'] in node['slice_ids']:
slice.remove_node(node)
+
+ self.object_ids = [node['node_id'] for node in nodes]
return 1
returns = Parameter(int, '1 if successful')
+ event_type = 'Delete'
+ object_type = 'SliceInstantiation'
+
def call(self, auth, instantiation):
slice_instantiations = SliceInstantiations(self.api, [instantiation])
if not slice_instantiations: