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