X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FRebootNode.py;h=7efefd25a496b5ae3e1218a232b0cab55610b403;hb=d910a6190fec258ddbf0e26d01539839ac3fdc76;hp=bea6b89422aa76e1aebb506de9aab4ff0285a266;hpb=bad15080f628863dd7d37fd98fad688491b6fe66;p=plcapi.git diff --git a/PLC/Methods/RebootNode.py b/PLC/Methods/RebootNode.py index bea6b89..7efefd2 100644 --- a/PLC/Methods/RebootNode.py +++ b/PLC/Methods/RebootNode.py @@ -4,7 +4,7 @@ from PLC.Faults import * from PLC.Method import Method from PLC.Parameter import Parameter, Mixed from PLC.Nodes import Node, Nodes -from PLC.NodeNetworks import NodeNetwork, NodeNetworks +from PLC.Interfaces import Interface, Interfaces from PLC.Auth import Auth from PLC.POD import udp_pod @@ -55,10 +55,10 @@ class RebootNode(Method): # Only use the hostname as a backup, try to use the primary ID # address instead. host = node['hostname'] - nodenetworks = NodeNetworks(self.api, node['nodenetwork_ids']) - for nodenetwork in nodenetworks: - if nodenetwork['is_primary'] == 1: - host = nodenetwork['ip'] + interfaces = Interfaces(self.api, node['interface_ids']) + for interface in interfaces: + if interface['is_primary'] == 1: + host = interface['ip'] break try: