More complete handling of 4.2 calls mapped to 4.3 calls.
[plcapi.git] / PLC / Methods / AddSliceAttribute.py
diff --git a/PLC/Methods/AddSliceAttribute.py b/PLC/Methods/AddSliceAttribute.py
new file mode 100644 (file)
index 0000000..150be9c
--- /dev/null
@@ -0,0 +1,13 @@
+
+from PLC.v42Legacy import patch
+from PLC.v42LegacySliceAttributes import v42rename, v43rename
+from PLC.Methods.AddSliceTag import AddSliceTag
+class AddSliceAttribute(AddSliceTag):
+    """ Legacy version of AddSliceTag. """
+    skip_typecheck = True
+    status = "deprecated"
+    def call(self, auth, *args, **kwds):
+        newargs=[patch(x,v42rename) for x in args]
+        newkwds=dict ( [ (k,patch(v,v42rename)) for (k,v) in kwds.iteritems() ] )
+        results = AddSliceTag.call(self,auth,*newargs,**newkwds)
+        return patch(results,v43rename)