From: Tony Mack Date: Fri, 19 Jan 2007 17:43:08 +0000 (+0000) Subject: - - added logging variable 'object_type' X-Git-Tag: pycurl-7_13_1~68 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=d22aea71d8cd39db72394cad0b8943b387fc3b4b;p=plcapi.git - - added logging variable 'object_type' --- diff --git a/PLC/Methods/AddConfFileToNode.py b/PLC/Methods/AddConfFileToNode.py index 3fa9c57..4290cf8 100644 --- a/PLC/Methods/AddConfFileToNode.py +++ b/PLC/Methods/AddConfFileToNode.py @@ -24,6 +24,8 @@ class AddConfFileToNode(Method): returns = Parameter(int, '1 if successful') + object_type = 'Node' + def call(self, auth, conf_file_id, node_id_or_hostname): # Get configuration file diff --git a/PLC/Methods/AddNode.py b/PLC/Methods/AddNode.py index 485667b..e355dca 100644 --- a/PLC/Methods/AddNode.py +++ b/PLC/Methods/AddNode.py @@ -33,6 +33,8 @@ class AddNode(Method): returns = Parameter(int, 'New node_id (> 0) if successful') + object_type = 'Node' + def call(self, auth, site_id_or_login_base, node_fields): node_fields = dict(filter(can_update, node_fields.items())) diff --git a/PLC/Methods/AddNodeToPCU.py b/PLC/Methods/AddNodeToPCU.py index ff40541..f1c1961 100644 --- a/PLC/Methods/AddNodeToPCU.py +++ b/PLC/Methods/AddNodeToPCU.py @@ -27,6 +27,8 @@ class AddNodeToPCU(Method): returns = Parameter(int, '1 if successful') + object_type = 'Node' + def call(self, auth, node_id_or_hostname, pcu_id, port): # Get node nodes = Nodes(self.api, [node_id_or_hostname]) diff --git a/PLC/Methods/AddSliceToNodes.py b/PLC/Methods/AddSliceToNodes.py index 04e5d3b..c57cfb2 100644 --- a/PLC/Methods/AddSliceToNodes.py +++ b/PLC/Methods/AddSliceToNodes.py @@ -28,6 +28,8 @@ class AddSliceToNodes(Method): returns = Parameter(int, '1 if successful') + object_type = 'Node' + def call(self, auth, slice_id_or_name, node_id_or_hostname_list): # Get slice information diff --git a/PLC/Methods/BootUpdateNode.py b/PLC/Methods/BootUpdateNode.py index 271da9f..5c1762a 100644 --- a/PLC/Methods/BootUpdateNode.py +++ b/PLC/Methods/BootUpdateNode.py @@ -30,6 +30,8 @@ class BootUpdateNode(Method): returns = Parameter(int, '1 if successful') + object_type = 'Node' + def call(self, auth, node_fields): # Update node state if node_fields.has_key('boot_state'): diff --git a/PLC/Methods/DeleteConfFileFromNode.py b/PLC/Methods/DeleteConfFileFromNode.py index c8eba25..0c30cf9 100644 --- a/PLC/Methods/DeleteConfFileFromNode.py +++ b/PLC/Methods/DeleteConfFileFromNode.py @@ -24,6 +24,8 @@ class DeleteConfFileFromNode(Method): returns = Parameter(int, '1 if successful') + object_type = 'Node' + def call(self, auth, conf_file_id, node_id_or_hostname): # Get configuration file diff --git a/PLC/Methods/DeleteNode.py b/PLC/Methods/DeleteNode.py index 48bff2e..d0bf3a5 100644 --- a/PLC/Methods/DeleteNode.py +++ b/PLC/Methods/DeleteNode.py @@ -24,6 +24,8 @@ class DeleteNode(Method): returns = Parameter(int, '1 if successful') + object_type = 'Node' + def call(self, auth, node_id_or_hostname): # Get account information diff --git a/PLC/Methods/DeleteNodeFromPCU.py b/PLC/Methods/DeleteNodeFromPCU.py index 0cf0845..cf7f93f 100644 --- a/PLC/Methods/DeleteNodeFromPCU.py +++ b/PLC/Methods/DeleteNodeFromPCU.py @@ -25,6 +25,8 @@ class DeleteNodeFromPCU(Method): returns = Parameter(int, '1 if successful') + object_type = 'Node' + def call(self, auth, node_id_or_hostname, pcu_id): # Get node diff --git a/PLC/Methods/DeleteSliceFromNodes.py b/PLC/Methods/DeleteSliceFromNodes.py index 75c7276..87e2e07 100644 --- a/PLC/Methods/DeleteSliceFromNodes.py +++ b/PLC/Methods/DeleteSliceFromNodes.py @@ -25,6 +25,8 @@ class DeleteSliceFromNodes(Method): returns = Parameter(int, '1 if successful') + object_type = 'Node' + def call(self, auth, slice_id_or_name, node_id_or_hostname_list): # Get slice information diff --git a/PLC/Methods/RebootNode.py b/PLC/Methods/RebootNode.py index a3796d2..bffa3da 100644 --- a/PLC/Methods/RebootNode.py +++ b/PLC/Methods/RebootNode.py @@ -30,6 +30,8 @@ class RebootNode(Method): returns = Parameter(int, '1 if successful') + object_type = 'Node' + def call(self, auth, node_id_or_hostname): # Get account information nodes = Nodes(self.api, [node_id_or_hostname]) diff --git a/PLC/Methods/SliceNodesAdd.py b/PLC/Methods/SliceNodesAdd.py index c4aba6e..e99ee52 100644 --- a/PLC/Methods/SliceNodesAdd.py +++ b/PLC/Methods/SliceNodesAdd.py @@ -24,6 +24,8 @@ class SliceNodesAdd(AddSliceToNodes): returns = Parameter(int, '1 if successful') + object_type = 'Node' + def call(self, auth, slice_name, nodes_list): diff --git a/PLC/Methods/SliceNodesDel.py b/PLC/Methods/SliceNodesDel.py index 0650922..8f2a395 100644 --- a/PLC/Methods/SliceNodesDel.py +++ b/PLC/Methods/SliceNodesDel.py @@ -24,6 +24,8 @@ class SliceNodesDel(DeleteSliceFromNodes): returns = Parameter(int, '1 if successful') + object_type = 'Node' + def call(self, auth, slice_name, nodes_list): diff --git a/PLC/Methods/UpdateNode.py b/PLC/Methods/UpdateNode.py index 5440307..b82325e 100644 --- a/PLC/Methods/UpdateNode.py +++ b/PLC/Methods/UpdateNode.py @@ -32,6 +32,8 @@ class UpdateNode(Method): returns = Parameter(int, '1 if successful') + object_type = 'Node' + def call(self, auth, node_id_or_hostname, node_fields): node_fields = dict(filter(can_update, node_fields.items()))