From 1bb8f5c90032c3fba7e71be5152bd18c06443da8 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Sun, 31 Dec 2017 23:59:59 +0000 Subject: [PATCH] Remove trailing spaces in file docs/source/advanced/restapi/restapi_resource/restapi_reference.rst --- .../restapi_resource/restapi_reference.rst | 392 +++++++++--------- 1 file changed, 196 insertions(+), 196 deletions(-) diff --git a/docs/source/advanced/restapi/restapi_resource/restapi_reference.rst b/docs/source/advanced/restapi/restapi_resource/restapi_reference.rst index 1d5c37fb5..42c849d72 100644 --- a/docs/source/advanced/restapi/restapi_resource/restapi_reference.rst +++ b/docs/source/advanced/restapi/restapi_resource/restapi_reference.rst @@ -13,9 +13,9 @@ POST - Create a token. * An array of all the global configuration list. -**Example:** +**Example:** -Acquire a token for user 'root'. :: +Acquire a token for user 'root'. :: curl -X POST -k 'https://127.0.0.1/xcatws/tokens?userName=root&userPW=cluster&pretty=1' -H Content-Type:application/json --data '{"userName":"root","userPW":"cluster"}' @@ -47,9 +47,9 @@ Refer to the man page: :doc:`lsdef : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get all the attributes for node 'node1'. :: +Get all the attributes for node 'node1'. :: curl -X GET -k 'https://127.0.0.1/xcatws/nodes/node1?userName=root&userPW=cluster&pretty=1' @@ -103,9 +103,9 @@ Refer to the man page: :doc:`chdef : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get the attributes {groups,mgt,netboot} for node node1 :: +Get the attributes {groups,mgt,netboot} for node node1 :: curl -X GET -k 'https://127.0.0.1/xcatws/nodes/node1/attrs/groups,mgt,netboot?userName=root&userPW=cluster&pretty=1' @@ -183,9 +183,9 @@ Refer to the man page: :doc:`makehosts : { nodestat : } -**Example:** +**Example:** -Get the running status for node node1 :: +Get the running status for node node1 :: curl -X GET -k 'https://127.0.0.1/xcatws/nodes/node1/nodestat?userName=root&userPW=cluster&pretty=1' @@ -293,9 +293,9 @@ Refer to the man page: :doc:`nodels : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get all the children nodes for node 'node1'. :: +Get all the children nodes for node 'node1'. :: curl -X GET -k 'https://127.0.0.1/xcatws/nodes/node1/subnodes?userName=root&userPW=cluster&pretty=1' @@ -354,9 +354,9 @@ Refer to the man page: :doc:`rpower : { power : } -**Example:** +**Example:** -Get the power status. :: +Get the power status. :: curl -X GET -k 'https://127.0.0.1/xcatws/nodes/node1/power?userName=root&userPW=cluster&pretty=1' @@ -379,9 +379,9 @@ Refer to the man page: :doc:`rpower : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get all the energy attributes. :: +Get all the energy attributes. :: curl -X GET -k 'https://127.0.0.1/xcatws/nodes/node1/energy?userName=root&userPW=cluster&pretty=1' @@ -424,9 +424,9 @@ Refer to the man page: :doc:`renergy : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get the energy attributes which are specified in the URI. :: +Get the energy attributes which are specified in the URI. :: curl -X GET -k 'https://127.0.0.1/xcatws/nodes/node1/energy/cappingmaxmin,cappingstatus?userName=root&userPW=cluster&pretty=1' @@ -467,9 +467,9 @@ Refer to the man page: :doc:`rspconfig : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get the snmp community for the service processor of node1. :: +Get the snmp community for the service processor of node1. :: curl -X GET -k 'https://127.0.0.1/xcatws/nodes/node1/sp/community?userName=root&userPW=cluster&pretty=1' @@ -479,7 +479,7 @@ Get the snmp community for the service processor of node1. :: } } -PUT - Change the specific attributes for the service processor resource. +PUT - Change the specific attributes for the service processor resource. ````````````````````````````````````````````````````````````````````````` Refer to the man page: :doc:`rspconfig ` @@ -492,9 +492,9 @@ Refer to the man page: :doc:`rspconfig : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get the bootorder for the next boot. (It's only valid after setting.) :: +Get the bootorder for the next boot. (It's only valid after setting.) :: curl -X GET -k 'https://127.0.0.1/xcatws/nodes/node1/nextboot?userName=root&userPW=cluster&pretty=1' @@ -522,7 +522,7 @@ Get the bootorder for the next boot. (It's only valid after setting.) :: } } -PUT - Change the next boot order. +PUT - Change the next boot order. `````````````````````````````````` Refer to the man page: :doc:`rsetboot ` @@ -535,9 +535,9 @@ Refer to the man page: :doc:`rsetboot : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get the next boot state for the node1. :: +Get the next boot state for the node1. :: curl -X GET -k 'https://127.0.0.1/xcatws/nodes/node1/bootstate?userName=root&userPW=cluster&pretty=1' @@ -578,9 +578,9 @@ Refer to the man page: :doc:`nodeset : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get all the vitails attributes for the node1. :: +Get all the vitails attributes for the node1. :: curl -X GET -k 'https://127.0.0.1/xcatws/nodes/node1/vitals?userName=root&userPW=cluster&pretty=1' @@ -627,9 +627,9 @@ Refer to the man page: :doc:`rvitals : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get the 'fanspeed' vitals attribute. :: +Get the 'fanspeed' vitals attribute. :: curl -X GET -k 'https://127.0.0.1/xcatws/nodes/node1/vitals/fanspeed?userName=root&userPW=cluster&pretty=1' @@ -658,9 +658,9 @@ Refer to the man page: :doc:`rinv ` * Json format: An object which includes multiple ' : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get all the inventory attributes for node1. :: +Get all the inventory attributes for node1. :: curl -X GET -k 'https://127.0.0.1/xcatws/nodes/node1/inventory?userName=root&userPW=cluster&pretty=1' @@ -689,9 +689,9 @@ Refer to the man page: :doc:`rinv ` * Json format: An object which includes multiple ' : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get the 'model' inventory attribute for node1. :: +Get the 'model' inventory attribute for node1. :: curl -X GET -k 'https://127.0.0.1/xcatws/nodes/node1/inventory/model?userName=root&userPW=cluster&pretty=1' @@ -714,9 +714,9 @@ Refer to the man page: :doc:`reventlog : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get all the eventlog for node1. :: +Get all the eventlog for node1. :: curl -X GET -k 'https://127.0.0.1/xcatws/nodes/node1/eventlog?userName=root&userPW=cluster&pretty=1' @@ -737,9 +737,9 @@ Refer to the man page: :doc:`reventlog : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get beacon for node1. :: +Get beacon for node1. :: curl -X GET -k 'https://127.0.0.1/xcatws/nodes/node1/beacon?userName=root&userPW=cluster&pretty=1' @@ -791,9 +791,9 @@ Refer to the man page: :doc:`rbeacon : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Initiate an software maintenance process. :: +Initiate an software maintenance process. :: curl -X POST -k 'https://127.0.0.1/xcatws/nodes/node2/sw?userName=root&userPW=cluster&pretty=1' @@ -891,9 +891,9 @@ Refer to the man page: :doc:`updatenode : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Initiate an updatenode process. :: +Initiate an updatenode process. :: curl -X POST -k 'https://127.0.0.1/xcatws/nodes/node2/postscript?userName=root&userPW=cluster&pretty=1' -H Content-Type:application/json --data '{"scripts":["syslog","remoteshell"]}' @@ -927,9 +927,9 @@ Refer to the man page: :doc:`xdsh ` * Json format: An object which includes multiple ' : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Run the 'date' command on the node2. :: +Run the 'date' command on the node2. :: curl -X POST -k 'https://127.0.0.1/xcatws/nodes/node2/nodeshell?userName=root&userPW=cluster&pretty=1' -H Content-Type:application/json --data '{"command":["date","ls"]}' @@ -957,9 +957,9 @@ Refer to the man page: :doc:`xdcp ` * No output when execution is successful. Otherwise output the error information in the Standard Error Format: {error:[msg1,msg2...],errocode:errornum}. -**Example:** +**Example:** -Copy files /tmp/f1 and /tmp/f2 from xCAT MN to the node2:/tmp. :: +Copy files /tmp/f1 and /tmp/f2 from xCAT MN to the node2:/tmp. :: curl -X POST -k 'https://127.0.0.1/xcatws/nodes/node2/nodecopy?userName=root&userPW=cluster&pretty=1' -H Content-Type:application/json --data '{"src":["/tmp/f1","/tmp/f2"],"target":"/tmp"}' @@ -977,7 +977,7 @@ Refer to the man page: :doc:`chvm ` **Parameters:** -* Json format: An object which includes multiple 'att:value' pairs. DataBody: +* Json format: An object which includes multiple 'att:value' pairs. DataBody: Set memory size - {"memorysize":"sizeofmemory(MB)"} Add new disk - {"adddisk":"sizeofdisk1(GB),sizeofdisk2(GB)"} Purge disk - {"purgedisk":"scsi_id1,scsi_id2"} @@ -986,21 +986,21 @@ Refer to the man page: :doc:`chvm ` * No output when execution is successful. Otherwise output the error information in the Standard Error Format: {error:[msg1,msg2...],errocode:errornum}. -**Example1:** +**Example1:** -Set memory to 3000MB. :: +Set memory to 3000MB. :: curl -X PUT -k 'https://127.0.0.1/xcatws/nodes/node1/vm?userName=root&userPW=cluster&pretty=1' -H Content-Type:application/json --data '{"memorysize":"3000"}' -**Example2:** +**Example2:** -Add a new 20G disk. :: +Add a new 20G disk. :: curl -X PUT -k 'https://127.0.0.1/xcatws/nodes/node1/vm?userName=root&userPW=cluster&pretty=1' -H Content-Type:application/json --data '{"adddisk":"20G"}' -**Example3:** +**Example3:** -Purge the disk 'hdb'. :: +Purge the disk 'hdb'. :: curl -X PUT -k 'https://127.0.0.1/xcatws/nodes/node1/vm?userName=root&userPW=cluster&pretty=1' -H Content-Type:application/json --data '{"purgedisk":"hdb"}' @@ -1011,7 +1011,7 @@ Refer to the man page: :doc:`mkvm ` **Parameters:** -* Json format: An object which includes multiple 'att:value' pairs. DataBody: +* Json format: An object which includes multiple 'att:value' pairs. DataBody: Set CPU count - {"cpucount":"numberofcpu"} Set memory size - {"memorysize":"sizeofmemory(MB)"} Set disk size - {"disksize":"sizeofdisk"} @@ -1021,9 +1021,9 @@ Refer to the man page: :doc:`mkvm ` * No output when execution is successful. Otherwise output the error information in the Standard Error Format: {error:[msg1,msg2...],errocode:errornum}. -**Example:** +**Example:** -Create the vm node1 with a 30G disk, 2048M memory and 2 cpus. :: +Create the vm node1 with a 30G disk, 2048M memory and 2 cpus. :: curl -X POST -k 'https://127.0.0.1/xcatws/nodes/node1/vm?userName=root&userPW=cluster&pretty=1' -H Content-Type:application/json --data '{"disksize":"30G","memorysize":"2048","cpucount":"2"}' @@ -1034,7 +1034,7 @@ Refer to the man page: :doc:`rmvm ` **Parameters:** -* Json format: An object which includes multiple 'att:value' pairs. DataBody: +* Json format: An object which includes multiple 'att:value' pairs. DataBody: Purge disk - {"purge":"yes"} Do it by force - {"force":"yes"} @@ -1042,9 +1042,9 @@ Refer to the man page: :doc:`rmvm ` * No output when execution is successful. Otherwise output the error information in the Standard Error Format: {error:[msg1,msg2...],errocode:errornum}. -**Example:** +**Example:** -Remove the vm node1 by force and purge the disk. :: +Remove the vm node1 by force and purge the disk. :: curl -X DELETE -k 'https://127.0.0.1/xcatws/nodes/node1/vm?userName=root&userPW=cluster&pretty=1' -H Content-Type:application/json --data '{"force":"yes","purge":"yes"}' @@ -1060,7 +1060,7 @@ Refer to the man page: :doc:`clonevm : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get the attributes for the specified osimage. :: +Get the attributes for the specified osimage. :: curl -X GET -k 'https://127.0.0.1/xcatws/osimages/sles11.2-x86_64-install-compute?userName=root&userPW=cluster&pretty=1' @@ -1212,9 +1212,9 @@ Refer to the man page: :doc:`chdef ` * No output when execution is successful. Otherwise output the error information in the Standard Error Format: {error:[msg1,msg2...],errocode:errornum}. -**Example1:** +**Example1:** -Generates a stateless image based on the specified osimage :: +Generates a stateless image based on the specified osimage :: curl -X POST -k 'https://127.0.0.1/xcatws/osimages/sles11.2-x86_64-install-compute/instance?userName=root&userPW=cluster&pretty=1' -H Content-Type:application/json --data '{"action":"gen"}' -**Example2:** +**Example2:** -Packs the stateless image from the chroot file system based on the specified osimage :: +Packs the stateless image from the chroot file system based on the specified osimage :: curl -X POST -k 'https://127.0.0.1/xcatws/osimages/sles11.2-x86_64-install-compute/instance?userName=root&userPW=cluster&pretty=1' -H Content-Type:application/json --data '{"action":"pack"}' -**Example3:** +**Example3:** -Exports an xCAT image based on the specified osimage :: +Exports an xCAT image based on the specified osimage :: curl -X POST -k 'https://127.0.0.1/xcatws/osimages/sles11.2-x86_64-install-compute/instance?userName=root&userPW=cluster&pretty=1' -H Content-Type:application/json --data '{"action":"export"}' @@ -1324,9 +1324,9 @@ Refer to the man page: :doc:`rmimage : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get all the attributes for network 'network1'. :: +Get all the attributes for network 'network1'. :: curl -X GET -k 'https://127.0.0.1/xcatws/networks/network1?userName=root&userPW=cluster&pretty=1' @@ -1426,9 +1426,9 @@ Refer to the man page: :doc:`chdef : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get the attributes {groups,mgt,netboot} for network network1 :: +Get the attributes {groups,mgt,netboot} for network network1 :: curl -X GET -k 'https://127.0.0.1/xcatws/networks/network1/attrs/gateway,mask,mgtifname,net,tftpserver?userName=root&userPW=cluster&pretty=1' @@ -1512,9 +1512,9 @@ Refer to the man page: :doc:`lsdef : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get all the policy objects. :: +Get all the policy objects. :: curl -X GET -k 'https://127.0.0.1/xcatws/policy?userName=root&userPW=cluster&pretty=1' @@ -1541,9 +1541,9 @@ Refer to the man page: :doc:`lsdef : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get all the attribute for policy 1. :: +Get all the attribute for policy 1. :: curl -X GET -k 'https://127.0.0.1/xcatws/policy/1?userName=root&userPW=cluster&pretty=1' @@ -1569,9 +1569,9 @@ Refer to the man page: :doc:`chdef : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get the name and rule attributes for policy 1. :: +Get the name and rule attributes for policy 1. :: curl -X GET -k 'https://127.0.0.1/xcatws/policy/1/attrs/name,rule?userName=root&userPW=cluster&pretty=1' @@ -1663,9 +1663,9 @@ Refer to the man page: :doc:`lsdef : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get all the attributes for group 'all'. :: +Get all the attributes for group 'all'. :: curl -X GET -k 'https://127.0.0.1/xcatws/groups/all?userName=root&userPW=cluster&pretty=1' @@ -1714,9 +1714,9 @@ Refer to the man page: :doc:`chdef : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get the attributes {mgt,netboot} for group all :: +Get the attributes {mgt,netboot} for group all :: curl -X GET -k 'https://127.0.0.1/xcatws/groups/all/attrs/mgt,netboot?userName=root&userPW=cluster&pretty=1' @@ -1766,9 +1766,9 @@ Refer to the man page: :doc:`lsdef : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get all the global configuration :: +Get all the global configuration :: curl -X GET -k 'https://127.0.0.1/xcatws/globalconf?userName=root&userPW=cluster&pretty=1' @@ -1794,9 +1794,9 @@ Refer to the man page: :doc:`lsdef : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get the 'master' and 'domain' configuration. :: +Get the 'master' and 'domain' configuration. :: curl -X GET -k 'https://127.0.0.1/xcatws/globalconf/attrs/master,domain?userName=root&userPW=cluster&pretty=1' @@ -1822,9 +1822,9 @@ Refer to the man page: :doc:`chdef : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get all the nodes which support slp in the network. :: +Get all the nodes which support slp in the network. :: curl -X GET -k 'https://127.0.0.1/xcatws/services/slpnodes?userName=root&userPW=cluster&pretty=1' @@ -1952,9 +1952,9 @@ Refer to the man page: :doc:`lsslp : {att:value, attr:value ...}' pairs. -**Example:** +**Example:** -Get all the CMM nodes which support slp in the network. :: +Get all the CMM nodes which support slp in the network. :: curl -X GET -k 'https://127.0.0.1/xcatws/services/slpnodes/CMM?userName=root&userPW=cluster&pretty=1' @@ -2006,9 +2006,9 @@ GET - Get attributes of tables for a noderange. * An object containing each table. Within each table object is an array of node objects containing the attributes. -**Example1:** +**Example1:** -Get all the columns from table nodetype for node1 and node2. :: +Get all the columns from table nodetype for node1 and node2. :: curl -X GET -k 'https://127.0.0.1/xcatws/tables/nodetype/nodes/node1,node2?userName=root&userPW=cluster&pretty=1' @@ -2031,9 +2031,9 @@ Get all the columns from table nodetype for node1 and node2. :: ] } -**Example2:** +**Example2:** -Get all the columns from tables nodetype and noderes for node1 and node2. :: +Get all the columns from tables nodetype and noderes for node1 and node2. :: curl -X GET -k 'https://127.0.0.1/xcatws/tables/nodetype,noderes/nodes/node1,node2?userName=root&userPW=cluster&pretty=1' @@ -2081,9 +2081,9 @@ PUT - Change the node table attributes for {noderange}. * No output when execution is successful. Otherwise output the error information in the Standard Error Format: {error:[msg1,msg2...],errocode:errornum}. -**Example:** +**Example:** -Change the nodetype.arch and noderes.netboot attributes for nodes node1,node2. :: +Change the nodetype.arch and noderes.netboot attributes for nodes node1,node2. :: curl -X PUT -k 'https://127.0.0.1/xcatws/tables/nodetype,noderes/nodes/node1,node2?userName=root&userPW=cluster&pretty=1' -H Content-Type:application/json --data '{"nodetype":{"arch":"x86_64"},"noderes":{"netboot":"xnba"}}' @@ -2099,9 +2099,9 @@ GET - Get table attributes for a noderange. * An object containing each table. Within each table object is an array of node objects containing the attributes. -**Example:** +**Example:** -Get OS and ARCH attributes from nodetype table for node1 and node2. :: +Get OS and ARCH attributes from nodetype table for node1 and node2. :: curl -X GET -k 'https://127.0.0.1/xcatws/tables/nodetype/nodes/node1,node2/os,arch?userName=root&userPW=cluster&pretty=1' @@ -2132,9 +2132,9 @@ GET - Get all rows from non-node tables. * An object containing each table. Within each table object is an array of row objects containing the attributes. -**Example:** +**Example:** -Get all rows from networks table. :: +Get all rows from networks table. :: curl -X GET -k 'https://127.0.0.1/xcatws/tables/networks/rows?userName=root&userPW=cluster&pretty=1' @@ -2171,9 +2171,9 @@ GET - Get attributes for rows from non-node tables. * An object containing each table. Within each table object is an array of row objects containing the attributes. -**Example:** +**Example:** -Get rows from networks table where net=192.168.1.0,mask=255.255.255.0. :: +Get rows from networks table where net=192.168.1.0,mask=255.255.255.0. :: curl -X GET -k 'https://127.0.0.1/xcatws/tables/networks/rows/net=192.168.1.0,mask=255.255.255.0?userName=root&userPW=cluster&pretty=1' @@ -2202,9 +2202,9 @@ PUT - Change the non-node table attributes for the row that matches the {keys}. * No output when execution is successful. Otherwise output the error information in the Standard Error Format: {error:[msg1,msg2...],errocode:errornum}. -**Example:** +**Example:** -Create a route row in the routes table. :: +Create a route row in the routes table. :: curl -X PUT -k 'https://127.0.0.1/xcatws/tables/routes/rows/routename=privnet?userName=root&userPW=cluster&pretty=1' -H Content-Type:application/json --data '{"net":"10.0.1.0","mask":"255.255.255.0","gateway":"10.0.1.254","ifname":"eth1"}' @@ -2215,9 +2215,9 @@ DELETE - Delete rows from a non-node table that have the attribute values specif * No output when execution is successful. Otherwise output the error information in the Standard Error Format: {error:[msg1,msg2...],errocode:errornum}. -**Example:** +**Example:** -Delete rows from routes table where routename=privnet. :: +Delete rows from routes table where routename=privnet. :: curl -X DELETE -k 'https://127.0.0.1/xcatws/tables/routes/rows/routename=privnet?userName=root&userPW=cluster&pretty=1' @@ -2233,9 +2233,9 @@ GET - Get specific attributes for rows from non-node tables. * An object containing each table. Within each table object is an array of row objects containing the attributes. -**Example:** +**Example:** -Get attributes mgtifname and tftpserver from networks table for each row where net=192.168.1.0,mask=255.255.255.0. :: +Get attributes mgtifname and tftpserver from networks table for each row where net=192.168.1.0,mask=255.255.255.0. :: curl -X GET -k 'https://127.0.0.1/xcatws/tables/networks/rows/net=192.168.1.0,mask=255.255.255.0/mgtifname,tftpserver?userName=root&userPW=cluster&pretty=1'