2 from PLC.Method import Method
3 from PLC.Parameter import Parameter, Mixed
4 from PLC.Filter import Filter
5 from PLC.Auth import Auth
6 from PLC.Slices import Slice, Slices
7 from PLC.Nodes import Node, Nodes
8 from PLC.Methods.GetSlices import GetSlices
9 from PLC.Methods.GetNodes import GetNodes
11 class SliceNodesList(GetSlices, GetNodes):
13 Deprecated. Can be implemented with GetSlices and GetNodes.
19 roles = ['admin', 'pi', 'user']
26 returns = [Node.fields['hostname']]
29 def call(self, auth, slice_name):
30 slices = GetSlices.call(self, auth, [slice_name])
35 nodes = GetNodes.call(self, auth, slice['node_ids'])
39 node_hostnames = [node['hostname'] for node in nodes]