- def write(self, api, user_plauth):
- try:
- if self.was_added():
- api.plshell.AddSliceTag(user_plauth, self.slice_id,
- self.tagname, self.value, self.node_id)
- elif self.was_changed():
- api.plshell.UpdateSliceTag(user_plauth, self.id, self.value)
- elif self.was_deleted():
- api.plshell.DeleteSliceTag(user_plauth, self.id)
- except:
- raise InvalidRSpec("user cannot modify '%s' tag" % self.tagname)
-
+ def write(self, api):
+ if self.was_added():
+ api.plshell.AddSliceTag(api.plauth, self.slice_id,
+ self.tagname, self.value, self.node_id)
+ elif self.was_changed():
+ api.plshell.UpdateSliceTag(api.plauth, self.id, self.value)
+ elif self.was_deleted():
+ api.plshell.DeleteSliceTag(api.plauth, self.id)