address.sync()
# Logging variables
- self.object_ids = [address['address_id']]
+ self.event_objects = {'Address': [address['address_id']]}
self.message = 'Address %d updated: %s' % \
(address['address_id'], ", ".join(address_fields.keys()))
address_type.update(address_type_fields)
address_type.sync()
- self.object_ids = [address_type['address_type_id']]
+ self.event_objects = {'AddressType': [address_type['address_type_id']]}
return 1
conf_file = conf_files[0]
conf_file.update(conf_file_fields)
conf_file.sync()
- self.object_ids = [conf_file['conf_file_id']]
+ self.event_objects = {'ConfFile': [conf_file['conf_file_id']]}
return 1
key.sync()
# Logging variables
- self.object_ids = [key['key_id']]
+ self.event_objects = {'Key': [key['key_id']]}
self.message = 'key %d updated: %s' % \
(key['key_id'], ", ".join(key_fields.keys()))
return 1
message.update(message_fields)
message.sync()
- self.object_ids = [message['message_id']]
+ self.event_objects = {'Message': [message['message_id']]}
return 1
returns = Parameter(int, '1 if successful')
- object_type = 'Node'
-
def call(self, auth, node_id_or_hostname, node_fields):
node_fields = dict(filter(can_update, node_fields.items()))
node.sync()
# Logging variables
- self.object_ids = [node['node_id']]
+ self.event_objects = {'Node': [node['node_id']]}
self.message = 'Node %d updated: %s.' % \
(node['node_id'], ", ".join(node_fields.keys()))
if 'boot_state' in node_fields.keys():
nodegroup.sync()
# Logging variables
- self.object_ids = [nodegroup['nodegroup_id']]
+ self.event_objects = {'NodeGroup': [nodegroup['nodegroup_id']]}
self.message = 'Node group %d updated: %s' % \
(nodegroup['nodegroup_id'], ", ".join(nodegroup_fields.keys()))
return 1
nodenetwork.update(nodenetwork_fields)
nodenetwork.sync()
- self.object_ids = [nodenetwork['nodenetwork_id']]
+ self.event_objects = {'NodeNetwork': [nodenetwork['nodenetwork_id']]}
self.message = "Node network %d updated: %s " % \
(nodenetwork['nodenetwork_id'], ", ".join(nodenetwork_fields.keys()))
pcu.sync()
# Logging variables
- self.object_ids = [pcu['pcu_id']]
+ self.event_objects = {'PCU': [pcu['pcu_id']]}
self.message = 'PCU %d updated: %s' % \
(pcu['pcu_id'], ", ".join(pcu_fields.keys()))
return 1
peer.sync()
# Log affected objects
- self.object_ids = [peer['peer_id']]
+ self.event_objects = {'Peer': [peer['peer_id']]}
return 1
returns = Parameter(int, '1 if successful')
- object_type = 'Person'
-
def call(self, auth, person_id_or_email, person_fields):
person_fields = dict(filter(can_update, person_fields.items()))
person.sync()
# Logging variables
- self.object_ids = [person['person_id']]
+ self.event_objects = {'Person': [person['person_id']]}
# Redact password
if 'password' in person_fields:
returns = Parameter(int, '1 if successful')
- object_type = 'Site'
-
def call(self, auth, site_id_or_login_base, site_fields):
site_fields = dict(filter(can_update, site_fields.items()))
site.sync()
# Logging variables
- self.object_ids = [site['site_id']]
+ self.event_objects = {'Site': [site['site_id']]}
self.message = 'Site %d updated: %s' % \
(site['site_id'], ", ".join(site_fields.keys()))
returns = Parameter(int, '1 if successful')
- object_type = 'Slice'
-
def call(self, auth, slice_id_or_name, slice_fields):
slice_fields = dict(filter(can_update, slice_fields.items()))
raise PLCInvalidArgument, "Cannot renew a slice with an empty description or URL"
slice.sync()
- self.object_ids = [slice['slice_id']]
+ self.event_objects = {'Slice': [slice['slice_id']]}
return 1
returns = Parameter(int, '1 if successful')
- object_type = 'Slice'
-
def call(self, auth, slice_attribute_id, value):
slice_attributes = SliceAttributes(self.api, [slice_attribute_id])
if not slice_attributes:
slice_attribute['value'] = value
slice_attribute.sync()
- self.object_ids = [slice_attribute['slice_attribute_id']]
+ self.event_objects = {'SliceAttribute': [slice_attribute['slice_attribute_id']]}
return 1
attribute_type.update(attribute_type_fields)
attribute_type.sync()
- self.object_ids = [attribute_type['attribute_type_id']]
+ self.event_objects = {'AttributeType': [attribute_type['attribute_type_id']]}
return 1
print >> log, "Warning: No message template '%s'" % message_id
# Logging variables
- self.object_ids = [person['person_id']]
+ self.event_objects = {'Person': [person['person_id']]}
self.message = message_id
if verification_key is not None and person['verification_expires'] and \