php/methods.py requires that the class in each of these Methods/* files matches the...
authorMarc Fiuczynski <mef@cs.princeton.edu>
Tue, 26 May 2009 17:19:00 +0000 (17:19 +0000)
committerMarc Fiuczynski <mef@cs.princeton.edu>
Tue, 26 May 2009 17:19:00 +0000 (17:19 +0000)
PLC/Methods/GetNodes.py
PLC/Methods/GetSlices.py
PLC/Methods/GetSlivers.py

index 89812ac..9e07b97 100644 (file)
@@ -88,15 +88,8 @@ node_fields['nodenetwork_ids']=Parameter([int], "Legacy version of interface_ids
 
 class v42GetNodes(v43GetNodes):
     """
-    Returns an array of structs containing details about nodes. If
-    node_filter is specified and is an array of node identifiers or
-    hostnames, or a struct of node attributes, only nodes matching the
-    filter will be returned. If return_fields is specified, only the
-    specified details will be returned.
-
-    Some fields may only be viewed by admins.
+    Legacy wrapper for v43GetNodes.
     """
-
     accepts = [
         Auth(),
         Mixed([Mixed(Node.fields['node_id'],
@@ -121,5 +114,15 @@ class v42GetNodes(v43GetNodes):
                 node['nodenetwork_ids']=node['interface_ids']
         return nodes
 
-GetNodes = v42GetNodes
+class GetNodes(v42GetNodes):
+    """
+    Returns an array of structs containing details about nodes. If
+    node_filter is specified and is an array of node identifiers or
+    hostnames, or a struct of node attributes, only nodes matching the
+    filter will be returned. If return_fields is specified, only the
+    specified details will be returned.
+
+    Some fields may only be viewed by admins.
+    """
 
+    pass
index f41dde3..f496356 100644 (file)
@@ -77,16 +77,7 @@ class v43GetSlices(Method):
 
 class v42GetSlices(v43GetSlices):
     """
-    Returns an array of structs containing details about slices. If
-    slice_filter is specified and is an array of slice identifiers or
-    slice names, or a struct of slice attributes, only slices matching
-    the filter will be returned. If return_fields is specified, only the
-    specified details will be returned.
-
-    Users may only query slices of which they are members. PIs may
-    query any of the slices at their sites. Admins and nodes may query
-    any slice. If a slice that cannot be queried is specified in
-    slice_filter, details about that slice will not be returned.
+    Legacy wrapper for v43GetSlices.
     """
 
     def call(self, auth, slice_filter = None, return_fields = None):
@@ -102,4 +93,18 @@ class v42GetSlices(v43GetSlices):
                 slice['slice_attribute_ids']=slice['slice_tag_ids']
         return slices
 
-GetSlices=v42GetSlices
+class GetSlices(v42GetSlices):
+    """
+    Returns an array of structs containing details about slices. If
+    slice_filter is specified and is an array of slice identifiers or
+    slice names, or a struct of slice attributes, only slices matching
+    the filter will be returned. If return_fields is specified, only the
+    specified details will be returned.
+
+    Users may only query slices of which they are members. PIs may
+    query any of the slices at their sites. Admins and nodes may query
+    any slice. If a slice that cannot be queried is specified in
+    slice_filter, details about that slice will not be returned.
+    """
+
+    pass
index 5405d5f..9fc24ea 100644 (file)
@@ -229,14 +229,7 @@ class v43GetSlivers(Method):
 
 class v42GetSlivers(v43GetSlivers):
     """
-    Returns a struct containing information about the specified node
-    (or calling node, if called by a node and node_id_or_hostname is
-    not specified), including the current set of slivers bound to the
-    node.
-
-    All of the information returned by this call can be gathered from
-    other calls, e.g. GetNodes, GetInterfaces, GetSlices, etc. This
-    function exists almost solely for the benefit of Node Manager.
+    Legacy wrapper for v43GetSlivers.
     """
 
     def call(self, auth, node_id_or_hostname = None):
@@ -254,4 +247,16 @@ class v42GetSlivers(v43GetSlivers):
         result['networks']=networks
         return result
 
-GetSlivers = v42GetSlivers
+class GetSlivers(v42GetSlivers):
+    """
+    Returns a struct containing information about the specified node
+    (or calling node, if called by a node and node_id_or_hostname is
+    not specified), including the current set of slivers bound to the
+    node.
+
+    All of the information returned by this call can be gathered from
+    other calls, e.g. GetNodes, GetInterfaces, GetSlices, etc. This
+    function exists almost solely for the benefit of Node Manager.
+    """
+
+    pass