79ebe5d089c797bd8767c2df2e26e626aced9c49
[plcapi.git] / PLC / Legacy / AddSliceAttribute.py
1 # $Id: $
2 from PLC.v42Legacy import patch
3 from PLC.v42LegacySliceAttributes import v42rename, v43rename
4 from PLC.Methods.AddSliceTag import AddSliceTag
5 class AddSliceAttribute(AddSliceTag):
6     """ Legacy version of AddSliceTag. """
7     status = "deprecated"
8     def call(self, auth, slice_id_or_name, tag_type_id_or_name, value, node_id_or_hostname = None, nodegroup_id_or_name = None):
9         slice_id_or_name=patch(slice_id_or_name,v42rename)
10         tag_type_id_or_name=patch(tag_type_id_or_name,v42rename)
11         value=patch(value,v42rename)
12         node_id_or_hostname=patch(node_id_or_hostname,v42rename)
13         nodegroup_id_or_name=patch(nodegroup_id_or_name,v42rename)
14         result=AddSliceTag.call(self,auth,slice_id_or_name,tag_type_id_or_name,value,node_id_or_hostname,nodegroup_id_or_name)
15         return patch(result,v43rename)