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