changeresource

The changeresource tool allows to change a resource within a given context.

Parameters

-h,--helpPrints a help text
--environmentShow info about commandline environment
--nonlRemove all newlines (\n) from output
-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