# Thierry Parmentelat - INRIA
-# $Id: Accessors_site.py 14587 2009-07-19 13:18:50Z thierry $
-# $URL: http://svn.planet-lab.org/svn/PLCAPI/tags/PLCAPI-4.3-29/PLC/Accessors/Accessors_site.py $
#
methods=[]
from PLC.Nodes import Node
from PLC.Interfaces import Interface
from PLC.Slices import Slice
-#from PLC.Ilinks import Ilink
from PLC.Accessors.Factory import define_accessors, all_roles, tech_roles
current_module = sys.modules[__name__]
#### example 1 : attach vlan ids on interfaces
-# The third argument expose_in_api is a boolean flag that tells whether this tag may be handled
+# The third argument expose_in_api is a boolean flag that tells whether this tag may be handled
# through the Add/Get/Update methods as a native field
-#
+#
#define_accessors(current_module, Interface, "Vlan", "vlan",
# "interface/general", "tag for setting VLAN id",
# get_roles=all_roles, set_roles=tech_roles)
#################### MySlice tags
define_accessors(current_module, Node, "Reliability", "reliability",
# category
- "node/monitor/ui/header=R/type=int/rank=ad",
+ "node/monitor/ui/header=R/type=int/rank=ad",
# description : used to add a footnote to the table if header is set in category
"average reliability (% uptime) over the last week",
- get_roles=all_roles, set_roles=tech_roles, expose_in_api=True)
+ set_roles=tech_roles, expose_in_api=True)
define_accessors(current_module, Node, "Load", "load",
- "node/monitor/ui/header=l/type=sortAlphaNumericBottom",
+ "node/monitor/ui/header=l/type=sortAlphaNumericBottom",
"average load (% CPU utilization) over the last week",
- get_roles=all_roles, set_roles=tech_roles, expose_in_api=True)
+ set_roles=tech_roles, expose_in_api=True)
define_accessors(current_module, Node, "ASNumber", "asnumber",
- "node/location/ui/header=AS/type=sortAlphaNumericBottom/rank=z",
+ "node/location/ui/header=AS/type=sortAlphaNumericBottom/rank=z",
"Autonomous System id",
- get_roles=all_roles, set_roles=tech_roles, expose_in_api=True)
+ set_roles=tech_roles, expose_in_api=True)