More complete handling of 4.2 calls mapped to 4.3 calls.
authorMarc Fiuczynski <mef@cs.princeton.edu>
Fri, 22 May 2009 04:43:11 +0000 (04:43 +0000)
committerMarc Fiuczynski <mef@cs.princeton.edu>
Fri, 22 May 2009 04:43:11 +0000 (04:43 +0000)
17 files changed:
PLC/Methods/AddNodeNetworkSettingType.py
PLC/Methods/AddSliceAttribute.py [new file with mode: 0644]
PLC/Methods/AddSliceAttributeType.py
PLC/Methods/DeleteNodeNetworkSettingType.py
PLC/Methods/DeleteSliceAttribute.py [new file with mode: 0644]
PLC/Methods/DeleteSliceAttributeType.py
PLC/Methods/GetNodeNetworkSettingTypes.py
PLC/Methods/GetSliceAttributeTypes.py
PLC/Methods/GetSliceAttributes.py [new file with mode: 0644]
PLC/Methods/UpdateNodeNetworkSettingType.py
PLC/Methods/UpdateSliceAttribute.py [new file with mode: 0644]
PLC/Methods/UpdateSliceAttributeType.py
PLC/Methods/__init__.py
PLC/__init__.py
PLC/v42LegacyNodeNetworkSettingTypes.py [new file with mode: 0644]
PLC/v42LegacySliceAttributeTypes.py [new file with mode: 0644]
PLC/v42LegacySliceAttributes.py [moved from PLC/v42LegacyTypes.py with 70% similarity]

index a230606..9b3585f 100644 (file)
@@ -1,6 +1,6 @@
 
 from PLC.v42Legacy import patch
-from PLC.v42LegacyTypes import v42rename, v43rename
+from PLC.v42LegacyNodeNetworkSettingTypes import v42rename, v43rename
 from PLC.Methods.AddTagType import AddTagType
 class AddNodeNetworkSettingType(AddTagType):
     """ Legacy version of AddTagType. """
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)
index 8a4c50f..d2c830f 100644 (file)
@@ -1,6 +1,6 @@
 
 from PLC.v42Legacy import patch
-from PLC.v42LegacyTypes import v42rename, v43rename
+from PLC.v42LegacyAttributeTypes import v42rename, v43rename
 from PLC.Methods.AddTagType import AddTagType
 class AddSliceAttributeType(AddTagType):
     """ Legacy version of AddTagType. """
index 2947830..f06c5a1 100644 (file)
@@ -1,6 +1,6 @@
 
 from PLC.v42Legacy import patch
-from PLC.v42LegacyTypes import v42rename, v43rename
+from PLC.v42LegacyNodeNetworkSettingTypes import v42rename, v43rename
 from PLC.Methods.DeleteTagType import DeleteTagType
 class DeleteNodeNetworkSettingType(DeleteTagType):
     """ Legacy version of DeleteTagType. """
diff --git a/PLC/Methods/DeleteSliceAttribute.py b/PLC/Methods/DeleteSliceAttribute.py
new file mode 100644 (file)
index 0000000..733fe78
--- /dev/null
@@ -0,0 +1,13 @@
+
+from PLC.v42Legacy import patch
+from PLC.v42LegacySliceAttributes import v42rename, v43rename
+from PLC.Methods.DeleteSliceTag import DeleteSliceTag
+class DeleteSliceAttribute(DeleteSliceTag):
+    """ Legacy version of DeleteSliceTag. """
+    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 = DeleteSliceTag.call(self,auth,*newargs,**newkwds)
+        return patch(results,v43rename)
index 1ea63ed..818f178 100644 (file)
@@ -1,6 +1,6 @@
 
 from PLC.v42Legacy import patch
-from PLC.v42LegacyTypes import v42rename, v43rename
+from PLC.v42LegacyAttributeTypes import v42rename, v43rename
 from PLC.Methods.DeleteTagType import DeleteTagType
 class DeleteSliceAttributeType(DeleteTagType):
     """ Legacy version of DeleteTagType. """
index 9e432ee..9d6026d 100644 (file)
@@ -1,6 +1,6 @@
 
 from PLC.v42Legacy import patch
-from PLC.v42LegacyTypes import v42rename, v43rename
+from PLC.v42LegacyNodeNetworkSettingTypes import v42rename, v43rename
 from PLC.Methods.GetTagTypes import GetTagTypes
 class GetNodeNetworkSettingTypes(GetTagTypes):
     """ Legacy version of GetTagTypes. """
index 1c05e44..278cf70 100644 (file)
@@ -1,6 +1,6 @@
 
 from PLC.v42Legacy import patch
-from PLC.v42LegacyTypes import v42rename, v43rename
+from PLC.v42LegacyAttributeTypes import v42rename, v43rename
 from PLC.Methods.GetTagTypes import GetTagTypes
 class GetSliceAttributeTypes(GetTagTypes):
     """ Legacy version of GetTagTypes. """
diff --git a/PLC/Methods/GetSliceAttributes.py b/PLC/Methods/GetSliceAttributes.py
new file mode 100644 (file)
index 0000000..be10198
--- /dev/null
@@ -0,0 +1,13 @@
+
+from PLC.v42Legacy import patch
+from PLC.v42LegacySliceAttributes import v42rename, v43rename
+from PLC.Methods.GetSliceTags import GetSliceTags
+class GetSliceAttributes(GetSliceTags):
+    """ Legacy version of GetSliceTags. """
+    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 = GetSliceTags.call(self,auth,*newargs,**newkwds)
+        return patch(results,v43rename)
index 611f131..503fba1 100644 (file)
@@ -1,6 +1,6 @@
 
 from PLC.v42Legacy import patch
-from PLC.v42LegacyTypes import v42rename, v43rename
+from PLC.v42LegacyNodeNetworkSettingTypes import v42rename, v43rename
 from PLC.Methods.UpdateTagType import UpdateTagType
 class UpdateNodeNetworkSettingType(UpdateTagType):
     """ Legacy version of UpdateTagType. """
diff --git a/PLC/Methods/UpdateSliceAttribute.py b/PLC/Methods/UpdateSliceAttribute.py
new file mode 100644 (file)
index 0000000..1fe3e93
--- /dev/null
@@ -0,0 +1,13 @@
+
+from PLC.v42Legacy import patch
+from PLC.v42LegacySliceAttributes import v42rename, v43rename
+from PLC.Methods.UpdateSliceTag import UpdateSliceTag
+class UpdateSliceAttribute(UpdateSliceTag):
+    """ Legacy version of UpdateSliceTag. """
+    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 = UpdateSliceTag.call(self,auth,*newargs,**newkwds)
+        return patch(results,v43rename)
index a4a0870..3b63cbd 100644 (file)
@@ -1,6 +1,6 @@
 
 from PLC.v42Legacy import patch
-from PLC.v42LegacyTypes import v42rename, v43rename
+from PLC.v42LegacyAttributeTypes import v42rename, v43rename
 from PLC.Methods.UpdateTagType import UpdateTagType
 class UpdateSliceAttributeType(UpdateTagType):
     """ Legacy version of UpdateTagType. """
index 939c4ee..c7ea6dc 100644 (file)
@@ -36,6 +36,7 @@ AddRoleToPerson
 AddSession
 AddSiteAddress
 AddSite
+AddSliceAttribute
 AddSliceAttributeType
 AddSliceInstantiation
 AddSlice
@@ -86,6 +87,7 @@ DeleteRoleFromPerson
 DeleteRole
 DeleteSession
 DeleteSite
+DeleteSliceAttribute
 DeleteSliceAttributeType
 DeleteSliceFromNodes
 DeleteSliceFromNodesWhitelist
@@ -131,6 +133,7 @@ GetRoles
 GetSession
 GetSessions
 GetSites
+GetSliceAttributes
 GetSliceAttributeTypes
 GetSliceInstantiations
 GetSliceKeys
@@ -191,6 +194,7 @@ UpdatePCUType
 UpdatePeer
 UpdatePerson
 UpdateSite
+UpdateSliceAttribute
 UpdateSliceAttributeType
 UpdateSlice
 UpdateSliceTag
index 7102749..6096fb2 100644 (file)
@@ -48,7 +48,9 @@ SliceTags
 Table
 TagTypes
 v42LegacyNodeNetworkSettings
+v42LegacyNodeNetworkSettingTypes
 v42LegacyNodeNetworks
 v42Legacy
-v42LegacyTypes
+v42LegacySliceAttributes
+v42LegacySliceAttributeTypes
 """.split()
diff --git a/PLC/v42LegacyNodeNetworkSettingTypes.py b/PLC/v42LegacyNodeNetworkSettingTypes.py
new file mode 100644 (file)
index 0000000..ede330b
--- /dev/null
@@ -0,0 +1,10 @@
+# $Id: $
+
+# mapping of argument/return names for *NodeNetworkSettingType*
+v42_to_v43_argmap = { "name":"tagname",
+                      "nodenetwork_setting_type_id": "tag_type_id",
+                      }
+v43_to_v42_argmap = dict([ (v,k) for k,v in v42_to_v43_argmap.iteritems()])
+
+def v42rename (x): return v42_to_v43_argmap.get(x,x)
+def v43rename (x): return v43_to_v42_argmap.get(x,x)
diff --git a/PLC/v42LegacySliceAttributeTypes.py b/PLC/v42LegacySliceAttributeTypes.py
new file mode 100644 (file)
index 0000000..8978362
--- /dev/null
@@ -0,0 +1,12 @@
+# $Id: $
+
+# mapping of argument/return names for *SliceAttributeType* calls
+
+v42_to_v43_argmap = { "name":"tagname",
+                      "slice_attribute_id":"slice_tag_id",
+                      "attribute_type_id":"tag_type_id",
+                      }
+v43_to_v42_argmap = dict([ (v,k) for k,v in v42_to_v43_argmap.iteritems()])
+
+def v42rename (x): return v42_to_v43_argmap.get(x,x)
+def v43rename (x): return v43_to_v42_argmap.get(x,x)
similarity index 70%
rename from PLC/v42LegacyTypes.py
rename to PLC/v42LegacySliceAttributes.py
index e6fd697..c887aee 100644 (file)
@@ -1,7 +1,10 @@
 # $Id: $
 
 # mapping of argument/return names for *{SliceAttribute,NetworkSetting}Type* and *TagType* calls
-v42_to_v43_argmap = { "name":"tagname" }
+
+v42_to_v43_argmap = { "name":"tagname",
+                      "slice_attribute_id":"slice_tag_id",
+                      }
 v43_to_v42_argmap = dict([ (v,k) for k,v in v42_to_v43_argmap.iteritems()])
 
 def v42rename (x): return v42_to_v43_argmap.get(x,x)