@exit 1
else
+$(RSYNC) plcsh PLC planetlab5.sql migrations $(SSHURL)/usr/share/plc_api/
+ +$(RSYNC) db-config.d/ $(SSHURL)/etc/planetlab/db-config.d/
$(SSHCOMMAND) exec apachectl graceful
endif
define_accessors(current_module, Node, "Extensions", "extensions",
"node/config", "space-separated list of extensions to install",
get_roles=all_roles, set_roles=["admin"],expose_in_api=True)
-# access HRN
+# access HRN - this is the ideal definition of roles, even if AddNodeTag cannot handle this
define_accessors(current_module, Node, "Hrn","hrn",
"node/sfa", "SFA human readable name",
- get_roles=all_roles, set_roles=["admin"], expose_in_api=True)
+ get_roles=all_roles, set_roles=["admin","pi","tech"], expose_in_api=True)
# test nodes perform their installation from an uncompressed bootstrapfs
define_accessors(current_module, Node, "PlainBootstrapfs", "plain-bootstrapfs",
# since hostname was specified lets add the 'hrn' node tag
root_auth = self.api.config.PLC_HRN_ROOT
- # sub auth is the login base of this node's site
- sites = Sites(self.api, node['site_id'], ['login_base'])
- site = sites[0]
login_base = site['login_base']
tags['hrn'] = hostname_to_hrn(root_auth, login_base, node['hostname'])
required_min_role = tag_type ['min_role_id']
if required_min_role is not None and \
min(self.caller['role_ids']) > required_min_role:
- raise PLCPermissionDenied, "Not allowed to modify the specified node tag, requires role %d",required_min_role
+ raise PLCPermissionDenied, "Not allowed to modify the specified node tag, requires role %d"%required_min_role
node_tag = NodeTag(self.api)
node_tag['node_id'] = node['node_id']
{'tagname': 'hrn',
'description': 'SFA human readable name',
'category' : 'node/sfa',
- 'min_role_id': 10},
+ 'min_role_id': 40},
]
for nodetag_type in nodetag_types: