+
+ def update_slice(self, slice_hrn, rspec, attributes):
+ """
+ Update the specified slice.
+ """
+ # Get slice info
+ slicename = self.hrn_to_plcslicename(slice_hrn)
+ slices = self.shell.GetSlices(self.auth, [slicename], ['node_ids'])
+ if not slice:
+ raise RecordNotFound(slice_hrn)
+ slice = slices[0]
+
+ # find out where this slice is currently running
+ nodes = self.shell.GetNodes(self.auth, slice['node_ids'], ['hostname'])
+ hostnames = [node['hostname'] for node in nodes]
+
+ # get netspec details
+ #spec = Rspec(rspec)
+ #nodespec = spec['networks']['nodes']
+ #nodes = [nspec['name'] for nspec in nodespec]
+
+ # remove nodes not in rspec
+ #delete_nodes = set(hostnames).difference(nodes)
+ # add nodes from rspec
+ #added_nodes = set(nodes).difference(hostnames)
+
+ #shell.AddSliceToNodes(self.auth, slicename, added_nodes)
+ #shell.DeleteSliceFromNodes(self.auth, slicename, deleted_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)