Chapter 4. Resource Management

Table of Contents

4.1 createresource
4.1.1 Parameters
4.1.2 Extra parameters when authentication is enabled
4.1.3 Return value
4.1.4 Mandatory parameters
4.1.5 Command output
4.1.6 Example
4.2 deleteresource
4.2.1 Parameters
4.2.2 Extra parameters when authentication is enabled
4.2.3 Return value
4.2.4 Mandatory parameters
4.2.5 Command output
4.2.6 Example
4.3 listresource
4.3.1 Parameters
4.3.2 Extra parameters when authentication is enabled
4.3.3 Return value
4.3.4 Mandatory parameters
4.3.5 Command output
4.3.6 Example
4.4 changeresource
4.4.1 Parameters
4.4.2 Extra parameters when authentication is enabled
4.4.3 Return value
4.4.4 Mandatory parameters
4.4.5 Command output
4.4.6 Example

4.1. createresource

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

4.1.1. 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

4.1.2. Extra parameters when authentication is enabled

-A,--adminuser <string>Context Admin user name
-P,--adminpass <string>Context Admin password

4.1.3. Return value

0 on success

>0 on failure

4.1.4. Mandatory parameters

contextid {adminuser adminpass} name displayname email

4.1.5. Command output

On success:

resource <resourceid> in context <contextid> created

On failure:

resource in context <contextid> could not be created: <reason from server>

4.1.6. 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