X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FBootGetNodeDetails.py;h=c376f45790a819e227bbba4926bfaee3687a9f6c;hb=19faf41bfcf949a1848d8646e852f862308b4af8;hp=0e8f71041582e5998bd00d8ac18e3600851ad35b;hpb=e347fc823bbba9d88a3fddf07d5c21024dfd1e55;p=plcapi.git diff --git a/PLC/Methods/BootGetNodeDetails.py b/PLC/Methods/BootGetNodeDetails.py index 0e8f710..c376f45 100644 --- a/PLC/Methods/BootGetNodeDetails.py +++ b/PLC/Methods/BootGetNodeDetails.py @@ -1,8 +1,10 @@ +# $Id$ +# $URL$ from PLC.Method import Method from PLC.Parameter import Parameter, Mixed from PLC.Auth import BootAuth from PLC.Nodes import Node, Nodes -from PLC.NodeNetworks import NodeNetwork, NodeNetworks +from PLC.Interfaces import Interface, Interfaces from PLC.Sessions import Session, Sessions class BootGetNodeDetails(Method): @@ -19,7 +21,7 @@ class BootGetNodeDetails(Method): 'hostname': Node.fields['hostname'], 'boot_state': Node.fields['boot_state'], 'model': Node.fields['model'], - 'networks': [NodeNetwork.fields], + 'networks': [Interface.fields], 'session': Session.fields['session_id'], } @@ -38,8 +40,8 @@ class BootGetNodeDetails(Method): details['session'] = session['session_id'] - if self.caller['nodenetwork_ids']: - details['networks'] = NodeNetworks(self.api, self.caller['nodenetwork_ids']) + if self.caller['interface_ids']: + details['networks'] = Interfaces(self.api, self.caller['interface_ids']) # XXX Boot Manager cannot unmarshal None for network in details['networks']: for field in network: @@ -49,5 +51,6 @@ class BootGetNodeDetails(Method): else: network[field] = "" + self.message = "Node request boot_state (%s) and networks" % \ + (details['boot_state']) return details -