Chapter 4. Resource management

Table of Contents

createresource
Parameters
Extra parameters when authentication is enabled
Return value
Mandatory parameters
Command output
Example
deleteresource
Parameters
Extra parameters when authentication is enabled
Return value
Mandatory parameters
Command output
Example
listresource
Parameters
Extra parameters when authentication is enabled
Return value
Mandatory parameters
Command output
Example
changeresource
Parameters
Extra parameters when authentication is enabled
Return value
Mandatory parameters
Command output
Example

createresource

The createresource tool allows to create a new resource within a given context.

Parameters

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