PLC information associated with the record. The Geni fields (name, type,
GID) are fixed.
- The record is expected to have the pl_info field filled in with the data
- that should be updated.
-
- TODO: The geni_info member of the record should be parsed and the pl_info
- adjusted as necessary (add/remove users from a slice, etc)
-
@param cred credential string specifying rights of the caller
@param record a record dictionary to be updated
# update the PLC information that was specified with the record
- if (type == "sa") or (type == "ma"):
- self.api.plshell.UpdateSite(self.api.plauth, pointer, record.get_pl_info())
+ if (type == "authority"):
+ self.api.plshell.UpdateSite(self.api.plauth, pointer, record)
elif type == "slice":
- self.api.plshell.UpdateSlice(self.api.plauth, pointer, record.get_pl_info())
+ hrn=record.get_name()
+ pl_record=self.api.geni_fields_to_pl_fields(type, hrn, record)
+ self.api.plshell.UpdateSlice(self.api.plauth, pointer, pl_record)
elif type == "user":
# SMBAKER: UpdatePerson only allows a limited set of fields to be
# updated. Ideally we should have a more generic way of doing
# this. I copied the field names from UpdatePerson.py...
update_fields = {}
- all_fields = record.get_pl_info()
+ all_fields = record
for key in all_fields.keys():
if key in ['first_name', 'last_name', 'title', 'email',
'password', 'phone', 'url', 'bio', 'accepted_aup',
self.api.plshell.UpdatePerson(self.api.plauth, pointer, update_fields)
elif type == "node":
- self.api.plshell.UpdateNode(self.api.plauth, pointer, record.get_pl_info())
+ self.api.plshell.UpdateNode(self.api.plauth, pointer, record)
else:
raise UnknownGeniType(type)
- # update membership for researchers, pis, owners, operators^M
+ # update membership for researchers, pis, owners, operators
self.api.update_membership(existing_record, record)
- return 1
+ return 1