-
- # extract node list from rspec
- slicename = self.hrn_to_plcslicename(slice_hrn)
- spec = Rspec(rspec)
- nodespecs = spec.getDictsByTagName('NodeSpec')
- nodes = [nodespec['name'] for nodespec in nodespecs]
-
- # add slice to nodes at plc
- self.shell.AddSliceToNodes(self.auth, slicename, nodes)
- for attribute in attributes:
- type, value, node, nodegroup = attribute['type'], attribute['value'], attribute['node'], attribute['nodegroup']
- shell.AddSliceAttribute(self.auth, slicename, type, value, node, nodegroup)
-
- # XX contact the registry to get the list of users on this slice and
- # their keys.
- #slice_record = self.registry.resolve(slice_hrn)
- #person_records = slice_record['users']
- # for person in person_record:
- # email = person['email']
- # self.shell.AddPersonToSlice(self.auth, email, slicename)
-
-
- return 1
-
- def update_slice(self, slice_hrn, rspec, attributes = []):
- """
- Update the specified slice.
- """