wiki:Internal/Infrastructure/OMF/GridServicesApi

Version 22 (modified by sswami, 18 years ago) ( diff )

Using ORBIT Web based services

ORBIT support services have web based XML interfaces. They all use the same framework and, therefore, have like syntax. The services are accessed using either of the following schemes:

http://<serviceGroup name>:5012/<serviceGroup name>/<service name>?<1st arg>=<arg_1_value>&<2nd_arg>=<arg_2_value>

For instance, to turn on node1-1 using the CMC (from the console of one of the sandboxes 
or the grid), you would issue the following:

wget -O - "http://cmc:5012/cmc/nodeSetOn?nodes=[1,1]"

OR

http://<serviceGroup name>:5012/<serviceGroup name>/<service name>?<domain>=<domain name>&<1st_arg>=<arg_1_value>&<2nd_arg>=<arg_2_value>

Currently the valid domain name scheme is <grid/sb1..sb>.orbit-lab.org. For instance, to turn on node1-1 using the CMC (from the console of one of the sandboxes 
or the grid), you would issue the following:

wget -O - "http://cmc:5012/cmc/nodeSetOn?domain=sb8.orbit-lab.org&nodes=[1,1..5]"

For instance, to turn on node1-1 on a sandbox using the CMC (from any of the internal machines), you would issue the following:

wget -O - "http://sb8.orbit-lab.org:5012/cmc/nodeSetOn?domain=sb8.orbit-lab.org&nodes=[1,1..5]"

The services are location aware and will manipulate the resources for that specific location. For instance, querying the CMC to turn on node1-1 from the console on sb1 will turn on node1-1 on sb1 and not any other resource. Also, it is impossible for users in one location to issue commands for another. For example, it is impossible to turn on nodes on the grid from the console of sb1. One of the obvious advantages of this is experiment scripts/applications need only mention the service name to be portable.

Below is a list of available services and their corresponding arguments.

CMC

Access Control Policy

1.) Access is granted to ON (on, allOn, nodeSetOn), OFF (off, offHard, allOffHard, 
    nodeSetOffHard, offSoft, nodeSetOffSoft, allOffSoft) and RESET (reset, nodeSetReset, 
    allReset) services if you are in the same subdomain as the resource you are trying to 
    control. For this case, the domain name need not be specified.

2.) Access is granted to all pages if you are on the same subnet as the primary CMC 
    interface. The domain name needs to be specified in this case

3.) Access is granted to status pages from everywhere. The domain name needs to be 
    specified in this case.
<serviceGroup name="cmc">
          <info>Controls nodes through their attached CMs</info>
          <service name="on">
            <info>Switch on a node at a specific coordinate</info>
            <args><arg name="x" value="x_coord"/></args>
            <args><arg name="y" value="y_coord"/></args>
          </service>
          <service name="nodeSetOn">
            <info>Switch on a specified set of nodes</info>
            <args><arg name="nodes" value="set_of_nodes"/></args>
          </service>
          <service name="allOn">
            <info>Switch all nodes on</info>
          </service>
          <service name="off">
            <info>Switch on a node at a specific coordinate</info>
            <args><arg name="x" value="x_coord"/></args>
            <args><arg name="y" value="y_coord"/></args>
          </service>
          <service name="offHard">
            <info>Switch off hard a node at a specific coordinate</info>
            <args><arg name="x" value="x_coord"/></args>
            <args><arg name="y" value="y_coord"/></args>
          </service>
          <service name="allOffHard">
            <info>Switch all nodes off</info>
          </service>
          <service name="nodeSetOffHard">
            <info>Switch Off Hard a specified set of nodes</info>
            <args><arg name="nodes" value="set_of_nodes"/></args>
          </service>
          <service name="offSoft">
            <info>Switch off soft a node at a specific coordinate</info>
            <args><arg name="x" value="x_coord"/></args>
            <args><arg name="y" value="y_coord"/></args>
          </service>
          <service name="allOffSoft">
            <info>Switch all nodes off</info>
          </service>
          <service name="nodeSetOffSoft">
            <info>Switch Off Soft a specified set of nodes</info>
            <args><arg name="nodes" value="set_of_nodes"/></args>
          </service>
          <service name="reset">
            <info>Reset a node at a specific coordinate</info>
            <args><arg name="x" value="x_coord"/></args>
            <args><arg name="y" value="y_coord"/></args>
          </service>
          <service name="allReset">
            <info>Reset all nodes</info>
          </service>
          <service name="nodeSetReset">
            <info>Reset a specified set of nodes</info>
            <args><arg name="nodes" value="set_of_nodes"/></args>
          </service>
          <service name="identify">
            <info>Identify a node at a specific coordinate</info>
            <args><arg name="x" value="x_coord"/></args>
            <args><arg name="y" value="y_coord"/></args>
          </service>
          <service name="allIdentify">
            <info>Identify all nodes</info>
          </service>
          <service name="nodeSetIdentify">
            <info>Identify a specified set of nodes</info>
            <args><arg name="nodes" value="set_of_nodes"/></args>
          </service>
          <service name="updateEnable">
            <info>UpdateEnable a node at a specific coordinate</info>
            <args><arg name="x" value="x_coord"/></args>
            <args><arg name="y" value="y_coord"/></args>
          </service>
          <service name="nodeSetUpdateEnable">
            <info>Update Enable a specified set of nodes</info>
            <args><arg name="nodes" value="set_of_nodes"/></args>
          </service>
          <service name="updateDisable">
            <info>UpdateDisable a node at a specific coordinate</info>
            <args><arg name="x" value="x_coord"/></args>
            <args><arg name="y" value="y_coord"/></args>
          </service>
          <service name="nodeSetUpdateDisable">
            <info>Update Disable a specified set of nodes</info>
            <args><arg name="nodes" value="set_of_nodes"/></args>
          </service>
          <service name="hostEnroll">
            <info>Host Enroll a node at a specific coordinate</info>
            <args><arg name="x" value="x_coord"/></args>
            <args><arg name="y" value="y_coord"/></args>
          </service>
          <service name="allHostEnroll">
            <info>Host Enroll all nodes</info>
          </service>
          <service name="nodeSetHostEnroll">
            <info>Host Enroll a specified set of nodes</info>
            <args><arg name="nodes" value="set_of_nodes"/></args>
          </service>
          <service name="nodeStatus">
            <info>Return the status of a  node at a specific coordinate</info>
            <args><arg name="x" value="x_coord"/></args>
            <args><arg name="y" value="y_coord"/></args>
          </service>
          <service name="setNodeInactive">
            <info>Set Inactive a Node from the Testbed</info>
            <args><arg name="x" value="x_coord"/></args>
            <args><arg name="y" value="y_coord"/></args>
          </service>
          <service name="nodeSetNodeInactive">
            <info>Set Inactive a specified set of nodes</info>
            <args><arg name="nodes" value="set_of_nodes"/></args>
          </service>
          <service name="setNodeActive">
            <info>Set Active a Node from the Testbed</info>
            <args><arg name="x" value="x_coord"/></args>
            <args><arg name="y" value="y_coord"/></args>
          </service>
          <service name="nodeSetNodeActive">
            <info>Set Active a specified set of nodes</info>
            <args><arg name="nodes" value="set_of_nodes"/></args>
          </service>
          <service name="allStatus">
            <info>Returns the status of the entire Testbed</info>
          </service>
          <service name="getActiveNodes">
            <info>Get List of all Active Nodes from the Testbed</info>
          </service>
          <service name="getNodes">
            <info>Get all Nodes for a specified domain</info>
            <args><arg name="nodes" value="set_of_nodes"/></args>
          </service>
          <service name="getAllNodes">
            <info>Get List of all Nodes in the Testbed</info>
          </service>
        </serviceGroup>

Frisbee

<serviceGroup name="frisbee">
          <info>Serve node images via a frisbee server</info>
          <service name="getAddress">
            <info>Get the port number of a frisbee server serving a specified image</info>
            <args><arg name="img" value="imageName"/></args>
          </service>
          <service name="stop">
            <info>Stop serving a specified image</info>
            <args><arg name="img" value="imageName"/></args>
          </service>
          <service name="status">
            <info>Returns the status of either a specific daemon, or all of them</info>
            <args><arg name="img" value="imageName" optional="true"/></args>
          </service>
        </serviceGroup>

PXE

<serviceGroup name="pxe">
          <info>Serve node images via a pxe server</info>
          <service name="setBootImage">
            <info>Configure PXE to boot a node with a specific ip address into a specifif image</info>
            <args><arg name="img" value="imageName"/></args>
            <args><arg name="node" value="nodeName"/></args>
            <args><arg name="ip" value="ipAddress"/></args>
          </service>
          <service name="clearBootImage">
            <info>Configure PXE to boot a node into the image on its disk</info>
            <args><arg name="node" value="nodeName"/></args>
            <args><arg name="ip" value="ipAddress"/></args>
          </service>
          <service name="removeAllBootImages">
            <info>Configure PXE to boot all nodes into the image on their disks</info>
          </service>
          <service name="status">
            <info>Returns a list of IP addresses and their associated boot image</info>
          </service>
        </serviceGroup>

OML Collection Service

<serviceGroup name="oml">
          <info>Interface to OML collection server</info>
          <service name="start">
            <info>
              Start a collection server. The config information is expected
              to be in the body.
            </info>
          </service>
          <service name="stop">
            <info>Stop a specific collection service</info>
            <args><arg name="id" value="idReturnedByStart"/></args>
          </service>
          <service name="log">
            <info>Return the log file of the named service</info>
            <args><arg name="id" value="idReturnedByStart"/></args>
          </service>
          <service name="status">
            <info>Returning the status of the service</info>
          </service>
        </serviceGroup>
Note: See TracWiki for help on using the wiki.