X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FSliceNodesList.py;h=f7a739d8fa997e90617a16628250718fbfcfc6bf;hb=dcc6f482920ecb0762646729200323408cce436f;hp=590181a0b525092d6a313278082ab4da2bf0fe9a;hpb=f5cd72e35593c96b9996ab4e49674cccc7525c48;p=plcapi.git diff --git a/PLC/Methods/SliceNodesList.py b/PLC/Methods/SliceNodesList.py index 590181a..f7a739d 100644 --- a/PLC/Methods/SliceNodesList.py +++ b/PLC/Methods/SliceNodesList.py @@ -14,7 +14,7 @@ class SliceNodesList(GetSlices, GetNodes): Deprecated. Can be implemented with GetSlices and GetNodes. """ - + status = "deprecated" roles = ['admin', 'pi', 'user'] @@ -25,18 +25,18 @@ class SliceNodesList(GetSlices, GetNodes): ] returns = [Node.fields['hostname']] - + def call(self, auth, slice_name): - slices = GetSlices.call(self, auth, [slice_name]) - if not slices: - return [] - - slice = slices[0] - nodes = GetNodes.call(self, auth, slice['node_ids']) - if not nodes: - return [] - - node_hostnames = [node['hostname'] for node in nodes] - + slices = GetSlices.call(self, auth, [slice_name]) + if not slices: + return [] + + slice = slices[0] + nodes = GetNodes.call(self, auth, slice['node_ids']) + if not nodes: + return [] + + node_hostnames = [node['hostname'] for node in nodes] + return node_hostnames