did some minor changes for the output of examples; adjusted the resource order in the auto generated doc

This commit is contained in:
daniceexi 2014-04-10 10:15:28 -04:00
parent 7845eef34d
commit 207388d424
2 changed files with 39 additions and 39 deletions

View File

@ -19,37 +19,6 @@ my @apigroups = (
'updating','filesyncing','software_maintenance','postscript', 'nodeshell', 'nodecopy',
]
},
{
groupname => 'groups',
header => "Group Resources",
desc => "The URI list which can be used to create, query, change and manage group objects.",
resources => ['all_groups','group_allattr','group_attr',
]
},
{
groupname => 'services',
header => "Services Resources",
desc => "The URI list which can be used to manage the dns and dhcp services on xCAT MN.",
resources => ['dns','dhcp','host', 'slpnodes', 'specific_slpnodes',]
},
{
groupname => 'policy',
header => "Policy Resources",
desc => "The URI list which can be used to create, query, change and manage policy entries.",
resources => ['policy', 'policy_allattr', 'policy_attr']
},
{
groupname => 'globalconf',
header => "Global Configuration Resources",
desc => "The URI list which can be used to create, query, change global configuration.",
resources => ['all_site', 'site']
},
{
groupname => 'table',
header => "Table Resources",
desc => "URI list which can be used to create, query, change global configuration.",
resources => ['table_nodes', 'table_rows']
},
{
groupname => 'osimages',
header => "Osimage resources",
@ -63,6 +32,37 @@ my @apigroups = (
resources => ['allnetwork', 'network_allattr','network_attr']
},
{
groupname => 'policy',
header => "Policy Resources",
desc => "The URI list which can be used to create, query, change and manage policy entries.",
resources => ['policy', 'policy_allattr', 'policy_attr']
},
{
groupname => 'groups',
header => "Group Resources",
desc => "The URI list which can be used to create, query, change and manage group objects.",
resources => ['all_groups','group_allattr','group_attr',
]
},
{
groupname => 'globalconf',
header => "Global Configuration Resources",
desc => "The URI list which can be used to create, query, change global configuration.",
resources => ['all_site', 'site']
},
{
groupname => 'services',
header => "Service Resources",
desc => "The URI list which can be used to manage the dns and dhcp services on xCAT MN.",
resources => ['dns','dhcp','host', 'slpnodes', 'specific_slpnodes',]
},
{
groupname => 'table',
header => "Table Resources",
desc => "URI list which can be used to create, query, change global configuration.",
resources => ['table_nodes', 'table_rows']
},
);
my %formathdl = (

View File

@ -356,7 +356,7 @@ my %URIdef = (
},
},
inventoryattr => {
desc => "[URI:/nodes/{nodename}/inventory/{pci;model...}] - The specific inventory attributes for the node {nodename}",
desc => "[URI:/nodes/{nodename}/inventory/{pci|model...}] - The specific inventory attributes for the node {nodename}",
matcher => '^/nodes/[^/]*/inventory/\S+$',
GET => {
desc => "Get the specific inventory attibutes.",
@ -809,12 +809,12 @@ my %URIdef = (
},
},
osimage_attr => {
desc => "[URI:/osimages/{imgname}/attrs/attr1;attr2;attr3 ...] - The attributes resource for the osimage {imgname}",
desc => "[URI:/osimages/{imgname}/attrs/attr1,attr2,attr3 ...] - The attributes resource for the osimage {imgname}",
matcher => '^\/osimages\/[^\/]*/attrs/\S+$',
GET => {
desc => "Get the specific attributes for the osimage {imgname}.",
usage => "||Json format: An array of attr:value pairs for the specified osimage.|",
example => "|Get the specified attributes.|GET|/osimages/sles11.2-ppc64-install-compute/attrs/imagetype;osarch;osname;provmethod|{\n \"sles11.2-ppc64-install-compute\":{\n \"provmethod\":\"install\",\n \"osname\":\"Linux\",\n \"osarch\":\"ppc64\",\n \"imagetype\":\"linux\"\n }\n}|",
example => "|Get the specified attributes.|GET|/osimages/sles11.2-ppc64-install-compute/attrs/imagetype,osarch,osname,provmethod|{\n \"sles11.2-ppc64-install-compute\":{\n \"provmethod\":\"install\",\n \"osname\":\"Linux\",\n \"osarch\":\"ppc64\",\n \"imagetype\":\"linux\"\n }\n}|",
cmd => "lsdef",
fhandler => \&defhdl,
outhdler => \&defout,
@ -861,7 +861,7 @@ my %URIdef = (
matcher => '^\/policy$',
GET => {
desc => "Get all the policies in xCAT.",
desc1 => "It will dislplay all the policie resource.",
desc1 => "It will dislplay all the policy resource.",
usage => "||$usagemsg{objreturn}|",
example => "|Get all the policy objects.|GET|/policy|[\n \"1\",\n \"1.2\",\n \"2\",\n \"4.8\"\n]|",
cmd => "lsdef",
@ -876,7 +876,7 @@ my %URIdef = (
desc => "Get all the attibutes for a policy {policy_priority}.",
desc1 => "It will display all the policy attributes for one policy resource.",
usage => "||$usagemsg{objreturn}|",
example => "|Get all the attribute for policy 1.|GET|/policy/1|[\n \"1\":{\n \"name\":\"root\",\n \"rule\":\"allow\"\n }\n]|",
example => "|Get all the attribute for policy 1.|GET|/policy/1|{\n \"1\":{\n \"name\":\"root\",\n \"rule\":\"allow\"\n }\n}|",
cmd => "lsdef",
fhandler => \&defhdl,
outhdler => \&defout,
@ -916,7 +916,7 @@ my %URIdef = (
desc => "Get the specific attributes for the policy {policy_priority}.",
desc1 => "It will get one or more attributes of a policy.",
usage => "||$usagemsg{objreturn}|",
example => "|Get the name and rule attributes for policy 1.|GET|/policy/1/attrs/name,rule|[\n \"1\":{\n \"name\":\"root\",\n \"rule\":\"allow\"\n }\n]|",
example => "|Get the name and rule attributes for policy 1.|GET|/policy/1/attrs/name,rule|{\n \"1\":{\n \"name\":\"root\",\n \"rule\":\"allow\"\n }\n}|",
cmd => "lsdef",
fhandler => \&defhdl,
outhdler => \&defout,
@ -933,7 +933,7 @@ my %URIdef = (
desc => "Get all the xCAT global configuration.",
desc1=> "It will display all the global attributes.",
usage => "||$usagemsg{objreturn}|",
example => "|Get all the global configuration|GET|/globalconf|{\n \"clustersite\":{\n \"xcatconfdir\":\"/etc/xcat\",\n \"tftpdir\":\"/tftpboot\",\n ...\n }\n]|",
example => "|Get all the global configuration|GET|/globalconf|{\n \"clustersite\":{\n \"xcatconfdir\":\"/etc/xcat\",\n \"tftpdir\":\"/tftpboot\",\n ...\n }\n}|",
cmd => "lsdef",
fhandler => \&sitehdl,
outhdler => \&defout,
@ -954,7 +954,7 @@ my %URIdef = (
desc => "Get the specific configuration in global.",
desc1 => "It will display one or more global attributes.",
usage => "||$usagemsg{objreturn}|",
example => "|Get the \'master\' and \'domain\' configuration.|GET|/globalconf/attrs/master,domain|[\n \"clustersite\":{\n \"master\":\"192.168.1.1\",\n \"domain\":\"cluster.com\",\n }\n|",
example => "|Get the \'master\' and \'domain\' configuration.|GET|/globalconf/attrs/master,domain|{\n \"clustersite\":{\n \"domain\":\"cluster.com\",\n \"master\":\"192.168.1.15\"\n }\n}|",
cmd => "lsdef",
fhandler => \&sitehdl,
outhdler => \&defout,