3 from PLC.Method import Method
4 from PLC.Parameter import Parameter, Mixed
5 from PLC.Filter import Filter
6 from PLC.Auth import Auth
7 from PLC.Slices import Slice, Slices
8 from PLC.Nodes import Node, Nodes
9 from PLC.Methods.GetSlices import GetSlices
10 from PLC.Methods.GetNodes import GetNodes
12 class SliceNodesList(GetSlices, GetNodes):
14 Deprecated. Can be implemented with GetSlices and GetNodes.
20 roles = ['admin', 'pi', 'user']
27 returns = [Node.fields['hostname']]
30 def call(self, auth, slice_name):
31 slices = GetSlices.call(self, auth, [slice_name])
36 nodes = GetNodes.call(self, auth, slice['node_ids'])
40 node_hostnames = [node['hostname'] for node in nodes]