Version 20 (modified by 17 years ago) ( diff ) | ,
---|
CMC APIs, Access Control Policy
http://www.orbit-lab.org/wiki/Documentation/APIs
Initial CMC Config File
The cmc config file is /etc/gridservices/cmc.yaml. The Orbit administrator creates this file. Once created, only the 'node_alias' and the 'inactive_list' fields are dynamically updated by the CMC. At creation, the administrator can set a list of nodes to INACTIVE by specifying the node coordinates in the 'inactive_list' of the testbed.
communicators: default: port: 9030 ip: 10.1.200.1 primaryIF: "10.0" testbeds: sb1: baseIP: 10.1.101. ip_block: lambda {|x,y| "10.1.101.#{x * 16 + y}"} x_max: 1 y_max: 2 node_alias: [] inactive_list: "[[1,1], [1,3]]" 12vStatus: 0.064 5vStatus: 0.032 3vStatus: 0.016 sb2: baseIP: 10.1.102. ip_block: lambda {|x,y| "10.1.102.#{x * 16 + y}"} x_max: 1 y_max: 2 node_alias: [] inactive_list: "[]" 12vStatus: 0.064 5vStatus: 0.032 3vStatus: 0.016 sb3: baseIP: 10.1.103. ip_block: lambda {|x,y| "10.1.103.#{x * 16 + y}"} x_max: 1 y_max: 2 node_alias: [] inactive_list: "[]" 12vStatus: 0.064 5vStatus: 0.032 3vStatus: 0.016 sb4: baseIP: 10.1.104. ip_block: lambda {|x,y| "10.1.104.#{x * 16 + y}"} x_max: 1 y_max: 2 node_alias: [] inactive_list: "[]" 12vStatus: 0.064 5vStatus: 0.032 3vStatus: 0.016 sb5: baseIP: 10.1.105. ip_block: lambda {|x,y| "10.1.105.#{x * 16 + y}"} x_max: 1 y_max: 2 node_alias: [] inactive_list: "[]" 12vStatus: 0.064 5vStatus: 0.032 3vStatus: 0.016 sb6: baseIP: 10.1.106. ip_block: lambda {|x,y| "10.1.106.#{x * 16 + y}"} x_max: 1 y_max: 2 node_alias: [] inactive_list: "[]" 12vStatus: 0.064 5vStatus: 0.032 3vStatus: 0.016 sb7: baseIP: 10.1.107. ip_block: lambda {|x,y| "10.1.107.#{x * 16 + y}"} x_max: 1 y_max: 2 node_alias: [] inactive_list: "[]" 12vStatus: 0.064 5vStatus: 0.032 3vStatus: 0.016 sb8: baseIP: 10.1.108. ip_block: lambda {|x,y| "10.1.108.#{x * 16 + y}"} x_max: 1 y_max: 2 node_alias: [] inactive_list: "[]" 12vStatus: 0.064 5vStatus: 0.032 3vStatus: 0.016 grid: baseIP: 10.1. ip_block: lambda {|x,y| "10.1.#{x}.#{y}"} x_max: 20 y_max: 20 node_alias: [] inactive_list: "[]" 12vStatus: 0.064 5vStatus: 0.032 3vStatus: 0.016 sb9: baseIP: 10.1.109. ip_block: lambda {|x,y| "10.1.109.#{x * 16 + y}"} x_max: 8 y_max: 8 node_alias: [] inactive_list: "[]" 12vStatus: 0.064 5vStatus: 0.032 3vStatus: 0.016
Config File Updates
On startup, CMC will dynamically update the 'node_alias' field of this config file based on the existing interfaces specified in the inventory database. If there are no nodes for an interface, then "NONE" is specified for that interface.
node_alias: - "Atheros 802.11a/b/g: [[13,14], [20,20], [1,17], [17,11], [11,6]]" - "Intel 802.11a/b/g: NONE" - "Belkin Bluetooth USB: NONE" - "Crossbow Telos Rev.B MOTE: NONE" - "GNURadio USRP: NONE" - "Marvell 88E8001 Gigabit Ethernet Controller: NONE" - "Intel Corporation 82540EM Gigabit Ethernet Controller: NONE" - "Intel 802.11a/b/g: [[11,1], [20,4], [15,15], [20,18], [20,8]]"
The 'inactive_list' field will be dynamically updated for whenever the user sets a node to ACTIVE/INACTIVE. When a node (that is currently ACTIVE) is set to INACTIVE, the node coordinates are added to this field. Again when a node that is currently INACTIVE is set to ACTIVE, the coordinates for that node are removed from the 'inactive_list'.
Example
A) inactive_list: "[]" B) wget -O - "http://cmc:5012/cmc/nodeSetNodeInactive?domain=grid.orbit-lab.org&nodes=[1,1..2]" inactive_list: "[[1,1], [1,2]]" C) wget -O - "http://cmc:5012/cmc/nodeSetNodeActive?domain=grid.orbit-lab.org&nodes=[1,1..2]" inactive_list: "[]"