2 # Thierry Parmentelat - INRIA
6 from PLC.Faults import *
7 from PLC.Method import Method
8 from PLC.Parameter import Parameter, Mixed
9 from PLC.Filter import Filter
10 from PLC.Auth import Auth
12 from PLC.NodeTags import NodeTag, NodeTags
13 from PLC.Sites import Site, Sites
14 from PLC.Nodes import Node, Nodes
16 class GetNodeTags(Method):
18 Returns an array of structs containing details about
19 nodes and related tags.
21 If node_tag_filter is specified and is an array of
22 node tag identifiers, only node tags matching
23 the filter will be returned. If return_fields is specified, only
24 the specified details will be returned.
27 roles = ['admin', 'pi', 'user', 'node']
31 Mixed([NodeTag.fields['node_tag_id']],
32 Parameter(int,"Node tag id"),
33 Filter(NodeTag.fields)),
34 Parameter([str], "List of fields to return", nullok = True)
37 returns = [NodeTag.fields]
40 def call(self, auth, node_tag_filter = None, return_fields = None):
42 node_tags = NodeTags(self.api, node_tag_filter, return_fields)