raise PLCInvalidArgument, "No such node %r"%node_tag['node_id']
node = nodes[0]
- assert node_tag['node_tag_id'] in node['tag_ids']
+ assert node_tag['node_tag_id'] in node['node_tag_ids']
# check permission : it not admin, is the user affiliated with the right site
if 'admin' not in self.caller['roles']:
raise PLCInvalidArgument, "No such node %r"%node_tag['node_id']
node = nodes[0]
- assert node_tag['node_tag_id'] in node['tag_ids']
+ assert node_tag['node_tag_id'] in node['node_tag_ids']
# check permission : it not admin, is the user affiliated with the right site
if 'admin' not in self.caller['roles']:
'ports': Parameter([int], "List of PCU ports that this node is connected to"),
'peer_id': Parameter(int, "Peer to which this node belongs", nullok = True),
'peer_node_id': Parameter(int, "Foreign node identifier at peer", nullok = True),
- 'tag_ids' : Parameter ([int], "List of tags attached to this node"),
+ 'node_tag_ids' : Parameter ([int], "List of tags attached to this node"),
'nodegroup_ids': Parameter([int], "List of node groups that this node is in"),
}
related_fields = {
--------------------------------------------------------------------------------
CREATE OR REPLACE VIEW node_tags AS
SELECT node_id,
-array_accum(node_tag_id) AS tag_ids
+array_accum(node_tag_id) AS node_tag_ids
FROM node_tag
GROUP BY node_id;
COALESCE((SELECT conf_file_ids FROM node_conf_files
WHERE node_conf_files.node_id = nodes.node_id), '{}')
AS conf_file_ids,
-COALESCE((SELECT tag_ids FROM node_tags
+COALESCE((SELECT node_tag_ids FROM node_tags
WHERE node_tags.node_id = nodes.node_id), '{}')
-AS tag_ids,
+AS node_tag_ids,
node_session.session_id AS session
FROM nodes
LEFT JOIN peer_node USING (node_id)