Difference between revisions of "AppSuite:Resource management"
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | |||
+ | == createresource == | ||
− | + | The '''<code>createresource</code>''' tool allows to create a new resource within a given context. | |
+ | === Parameters === | ||
− | + | {| border="1" | |
+ | |- | ||
+ | | -h, --help | ||
+ | |Prints a help text | ||
+ | |- | ||
+ | | --environment | ||
+ | |Show info about commandline environment | ||
+ | |- | ||
+ | | --nonl | ||
+ | |Removes all newlines (\n) from output | ||
+ | |- | ||
+ | | --responsetimeout <integer> | ||
+ | |response timeout in seconds for reading response from the backend (default 0s; infinite) '''Available with v7.8.0''' | ||
+ | |- | ||
+ | | -c, --contextid <string> | ||
+ | |The id of the context | ||
+ | |- | ||
+ | | -n, --name <string> | ||
+ | |The resource name | ||
+ | |- | ||
+ | | -d, --displayname <string> | ||
+ | |The resource display name | ||
+ | |- | ||
+ | | -a, --available <true/false> | ||
+ | |Toggle resource availability | ||
+ | |- | ||
+ | | -D, --description <string> | ||
+ | |Description of this resource | ||
+ | |- | ||
+ | | -e, --email <string> | ||
+ | |E-Mail of this resource | ||
+ | |} | ||
+ | === Extra parameters when authentication is enabled === | ||
− | + | {| border="1" | |
+ | |- | ||
+ | | -A, --adminuser <string> | ||
+ | |Context Admin user name | ||
+ | |- | ||
+ | | -P, --adminpass <string> | ||
+ | |Context Admin password | ||
+ | |} | ||
− | [[Category:AppSuite]] | + | === Return value === |
− | [[Category:AdminGuide]] | + | |
+ | <code>0</code> on success | ||
+ | |||
+ | <code>>0</code> on failure | ||
+ | |||
+ | === Mandatory parameters === | ||
+ | |||
+ | '''<code>contextid {adminuser adminpass} name displayname email</code>''' | ||
+ | |||
+ | === Command output === | ||
+ | |||
+ | On success: | ||
+ | |||
+ | <code>resource <resourceid> in context <contextid> created</code> | ||
+ | |||
+ | On failure: | ||
+ | |||
+ | <code>resource in context <contextid> could not be created: <reason from server></code> | ||
+ | |||
+ | === Example === | ||
+ | |||
+ | <code>root@oxhe~# </code>'''<code>/opt/open-xchange/sbin/createresource -c 123 -n "laptop" -d "Super laptop" -D "laptop for rent" -e "laptop@example.com"</code>''' | ||
+ | |||
+ | <code>resource 6 in context 123 created</code> | ||
+ | |||
+ | == deleteresource == | ||
+ | |||
+ | The '''<code>deleteresource</code>''' tool allows to delete a resource within a given context. | ||
+ | |||
+ | === Parameters === | ||
+ | |||
+ | {| border="1" | ||
+ | |- | ||
+ | | -h, --help | ||
+ | |Prints a help text | ||
+ | |- | ||
+ | | --environment | ||
+ | |Show info about commandline environment | ||
+ | |- | ||
+ | | --nonl | ||
+ | |Removes all newlines (\n) from output | ||
+ | |- | ||
+ | | --responsetimeout <integer> | ||
+ | |response timeout in seconds for reading response from the backend (default 0s; infinite) '''Available with v7.8.0''' | ||
+ | |- | ||
+ | | -c, --contextid <integer> | ||
+ | |The id of the context | ||
+ | |- | ||
+ | | -i, --resourceid <integer> | ||
+ | |Id of this resource | ||
+ | |- | ||
+ | | -n, --name <string> | ||
+ | |The resource name | ||
+ | |} | ||
+ | |||
+ | === Extra parameters when authentication is enabled === | ||
+ | |||
+ | {| border="1" | ||
+ | |- | ||
+ | | -A, --adminuser <string> | ||
+ | |Context Admin user name | ||
+ | |- | ||
+ | | -P, --adminpass <string> | ||
+ | |Context Admin password | ||
+ | |} | ||
+ | |||
+ | === Return value === | ||
+ | |||
+ | <code>0</code> on success | ||
+ | |||
+ | <code>>0</code> on failure | ||
+ | |||
+ | === Mandatory parameters === | ||
+ | |||
+ | '''<code>contextid {adminuser adminpass} (name or resourceid)</code>''' | ||
+ | |||
+ | === Command output === | ||
+ | |||
+ | On success: | ||
+ | |||
+ | <code>resource <resourceid> in context <contextid> deleted</code> | ||
+ | |||
+ | On failure: | ||
+ | |||
+ | <code>resource <resourceid> in context <contextid> could not be deleted: <reason from server></code> | ||
+ | |||
+ | === Example === | ||
+ | |||
+ | <code>root@oxhe~# </code>'''<code>/opt/open-xchange/sbin/deleteresource -c 123 -i 6</code>''' | ||
+ | |||
+ | <code>resource 6 in context 123 deleted</code> | ||
+ | |||
+ | == listresource == | ||
+ | |||
+ | The '''<code>listresource</code>''' tool allows to list and search for resources within a given context. | ||
+ | |||
+ | === Parameters === | ||
+ | |||
+ | {| border="1" | ||
+ | |- | ||
+ | | -h, --help | ||
+ | |Prints a help text | ||
+ | |- | ||
+ | | --environment | ||
+ | |Show info about commandline environment | ||
+ | |- | ||
+ | | --nonl | ||
+ | |Removes all newlines (\n) from output | ||
+ | |- | ||
+ | | --responsetimeout <integer> | ||
+ | |response timeout in seconds for reading response from the backend (default 0s; infinite) '''Available with v7.8.0''' | ||
+ | |- | ||
+ | | -c, --contextid <integer> | ||
+ | |The id of the context | ||
+ | |- | ||
+ | | --csv | ||
+ | |Format output as csv | ||
+ | |- | ||
+ | | -s, --searchpattern <string> | ||
+ | |The search pattern which is used for listing | ||
+ | |} | ||
+ | |||
+ | === Extra parameters when authentication is enabled === | ||
+ | |||
+ | {| border="1" | ||
+ | |- | ||
+ | | -A, --adminuser <string> | ||
+ | |Context Admin user name | ||
+ | |- | ||
+ | | -P, --adminpass <string> | ||
+ | |Context Admin password | ||
+ | |} | ||
+ | |||
+ | === Return value === | ||
+ | |||
+ | <code>0</code> on success | ||
+ | |||
+ | <code>>0</code> on failure | ||
+ | |||
+ | === Mandatory parameters === | ||
+ | |||
+ | '''<code>contextid {adminuser adminpass}</code>''' | ||
+ | |||
+ | === Command output === | ||
+ | |||
+ | Standard output: | ||
+ | |||
+ | {| border="1" | ||
+ | |- | ||
+ | |id | ||
+ | |name | ||
+ | |displayname | ||
+ | |description | ||
+ | |email | ||
+ | |available | ||
+ | |- | ||
+ | |6 | ||
+ | |laptop | ||
+ | |"Super Laptop" | ||
+ | |"laptop for rent" | ||
+ | |laptop@example.com | ||
+ | |true | ||
+ | |} | ||
+ | |||
+ | csv output: | ||
+ | id, name, displayname, email, available | ||
+ | |||
+ | === Example === | ||
+ | |||
+ | <code>root@oxhe~# </code>'''<code>/opt/open-xchange/sbin/listresource -c 123</code>''' | ||
+ | |||
+ | {| border="1" | ||
+ | |- | ||
+ | |id | ||
+ | |name | ||
+ | |displayname | ||
+ | |description | ||
+ | |email | ||
+ | |available | ||
+ | | | ||
+ | |- | ||
+ | |6 | ||
+ | |laptop | ||
+ | |"Super Laptop" | ||
+ | |"laptop for rent" | ||
+ | |laptop@example.com | ||
+ | |true | ||
+ | | | ||
+ | |} | ||
+ | |||
+ | == changeresource == | ||
+ | |||
+ | The '''<code>changeresource</code>''' tool allows to change a resource within a given context. | ||
+ | |||
+ | === Parameters === | ||
+ | |||
+ | {| border="1" | ||
+ | |- | ||
+ | | -h, --help | ||
+ | |Prints a help text | ||
+ | |- | ||
+ | | --environment | ||
+ | |Show info about commandline environment | ||
+ | |- | ||
+ | | --nonl | ||
+ | |Removes all newlines (\n) from output | ||
+ | |- | ||
+ | | --responsetimeout <integer> | ||
+ | |response timeout in seconds for reading response from the backend (default 0s; infinite) '''Available with v7.8.0''' | ||
+ | |- | ||
+ | | -c, --contextid <integer> | ||
+ | |The id of the context | ||
+ | |- | ||
+ | | -i, --resourceid <integer> | ||
+ | |Id of this resource | ||
+ | |- | ||
+ | | -n, --name <string> | ||
+ | |The resource name | ||
+ | |- | ||
+ | | -d, --displayname <string> | ||
+ | |The resource display name | ||
+ | |- | ||
+ | | -a, --available <true/false> | ||
+ | |Toggle resource availability | ||
+ | |- | ||
+ | | -D, --description <string> | ||
+ | |Description of this resource | ||
+ | |- | ||
+ | | -e, --email <string> | ||
+ | |Email of this resource | ||
+ | |} | ||
+ | |||
+ | === Extra parameters when authentication is enabled === | ||
+ | |||
+ | {| border="1" | ||
+ | |- | ||
+ | | -A, --adminuser <string> | ||
+ | |Context Admin user name | ||
+ | |- | ||
+ | | -P, --adminpass <string> | ||
+ | |Context Admin password | ||
+ | |} | ||
+ | |||
+ | === Return value === | ||
+ | |||
+ | <code>0</code> on success | ||
+ | |||
+ | <code>>0</code> on failure | ||
+ | |||
+ | === Mandatory parameters === | ||
+ | |||
+ | '''<code>contextid {adminuser adminpass} (resourceid or name ) and at least one attribute to change</code>''' | ||
+ | |||
+ | === Command output === | ||
+ | |||
+ | On success: | ||
+ | |||
+ | <code>resource <resourceid> in context <contextid> changed</code> | ||
+ | |||
+ | On failure: | ||
+ | |||
+ | <code>resource <resourceid> in context <contextid> could not be changed: <reason from server></code> | ||
+ | |||
+ | === Example === | ||
+ | |||
+ | <code>root@oxhe~# </code>'''<code>/opt/open-xchange/sbin/changeresource -c 123 -i 6 -D "old Laptop"</code>''' | ||
+ | |||
+ | <code>resource 6 in context 123 changed</code> | ||
+ | |||
+ | |||
+ | [[Category: Administrator]] | ||
+ | |||
+ | [[Category: AppSuite]] | ||
+ | [[Category: AdminGuide]] | ||
+ | [[Category: CommandLineTools]] |
Latest revision as of 13:49, 23 April 2015
createresource
The createresource
tool allows to create a new resource within a given context.
Parameters
-h, --help | Prints a help text |
--environment | Show info about commandline environment |
--nonl | Removes all newlines (\n) from output |
--responsetimeout <integer> | response timeout in seconds for reading response from the backend (default 0s; infinite) Available with v7.8.0 |
-c, --contextid <string> | The id of the context |
-n, --name <string> | The resource name |
-d, --displayname <string> | The resource display name |
-a, --available <true/false> | Toggle resource availability |
-D, --description <string> | Description of this resource |
-e, --email <string> | E-Mail of this resource |
Extra parameters when authentication is enabled
-A, --adminuser <string> | Context Admin user name |
-P, --adminpass <string> | Context Admin password |
Return value
0
on success
>0
on failure
Mandatory parameters
contextid {adminuser adminpass} name displayname email
Command output
On success:
resource <resourceid> in context <contextid> created
On failure:
resource in context <contextid> could not be created: <reason from server>
Example
root@oxhe~#
/opt/open-xchange/sbin/createresource -c 123 -n "laptop" -d "Super laptop" -D "laptop for rent" -e "laptop@example.com"
resource 6 in context 123 created
deleteresource
The deleteresource
tool allows to delete a resource within a given context.
Parameters
-h, --help | Prints a help text |
--environment | Show info about commandline environment |
--nonl | Removes all newlines (\n) from output |
--responsetimeout <integer> | response timeout in seconds for reading response from the backend (default 0s; infinite) Available with v7.8.0 |
-c, --contextid <integer> | The id of the context |
-i, --resourceid <integer> | Id of this resource |
-n, --name <string> | The resource name |
Extra parameters when authentication is enabled
-A, --adminuser <string> | Context Admin user name |
-P, --adminpass <string> | Context Admin password |
Return value
0
on success
>0
on failure
Mandatory parameters
contextid {adminuser adminpass} (name or resourceid)
Command output
On success:
resource <resourceid> in context <contextid> deleted
On failure:
resource <resourceid> in context <contextid> could not be deleted: <reason from server>
Example
root@oxhe~#
/opt/open-xchange/sbin/deleteresource -c 123 -i 6
resource 6 in context 123 deleted
listresource
The listresource
tool allows to list and search for resources within a given context.
Parameters
-h, --help | Prints a help text |
--environment | Show info about commandline environment |
--nonl | Removes all newlines (\n) from output |
--responsetimeout <integer> | response timeout in seconds for reading response from the backend (default 0s; infinite) Available with v7.8.0 |
-c, --contextid <integer> | The id of the context |
--csv | Format output as csv |
-s, --searchpattern <string> | The search pattern which is used for listing |
Extra parameters when authentication is enabled
-A, --adminuser <string> | Context Admin user name |
-P, --adminpass <string> | Context Admin password |
Return value
0
on success
>0
on failure
Mandatory parameters
contextid {adminuser adminpass}
Command output
Standard output:
id | name | displayname | description | available | |
6 | laptop | "Super Laptop" | "laptop for rent" | laptop@example.com | true |
csv output:
id, name, displayname, email, available
Example
root@oxhe~#
/opt/open-xchange/sbin/listresource -c 123
id | name | displayname | description | available | ||
6 | laptop | "Super Laptop" | "laptop for rent" | laptop@example.com | true |
changeresource
The changeresource
tool allows to change a resource within a given context.
Parameters
-h, --help | Prints a help text |
--environment | Show info about commandline environment |
--nonl | Removes all newlines (\n) from output |
--responsetimeout <integer> | response timeout in seconds for reading response from the backend (default 0s; infinite) Available with v7.8.0 |
-c, --contextid <integer> | The id of the context |
-i, --resourceid <integer> | Id of this resource |
-n, --name <string> | The resource name |
-d, --displayname <string> | The resource display name |
-a, --available <true/false> | Toggle resource availability |
-D, --description <string> | Description of this resource |
-e, --email <string> | Email of this resource |
Extra parameters when authentication is enabled
-A, --adminuser <string> | Context Admin user name |
-P, --adminpass <string> | Context Admin password |
Return value
0
on success
>0
on failure
Mandatory parameters
contextid {adminuser adminpass} (resourceid or name ) and at least one attribute to change
Command output
On success:
resource <resourceid> in context <contextid> changed
On failure:
resource <resourceid> in context <contextid> could not be changed: <reason from server>
Example
root@oxhe~#
/opt/open-xchange/sbin/changeresource -c 123 -i 6 -D "old Laptop"
resource 6 in context 123 changed