AppSuite:Resource management: Difference between revisions

From Open-Xchange
(Created page with "<div class="sect1" lang="en-EN"><div class="titlepage"><div><div><h2 class="title" style="clear: both">createresource</h2></div></div></div><p>The <strong class="userinput"><c...")
 
No edit summary
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
<div class="sect1" lang="en-EN"><div class="titlepage"><div><div><h2 class="title" style="clear: both">createresource</h2></div></div></div><p>The <strong class="userinput"><code>createresource</code></strong> tool allows to create a new resource within a given context.</p><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Parameters</h3></div></div></div><div class="informaltable"><table border="0"><tr><td align="left">-h,--help</td><td align="left">Prints a help text</td></tr><tr><td align="left">    --environment</td><td align="left">Show info about commandline environment</td></tr><tr><td align="left">    --nonl</td><td align="left">Remove all newlines (\n) from output</td></tr><tr><td align="left">-c,--contextid &lt;string&gt;</td><td align="left">The id of the context</td></tr><tr><td align="left">-n,--name &lt;string&gt;</td><td align="left">The resource name</td></tr><tr><td align="left">-d,--displayname &lt;string&gt;</td><td align="left">The resource display name</td></tr><tr><td align="left">-a,--available &lt;true/false&gt;</td><td align="left">Toggle resource availability</td></tr><tr><td align="left">-D,--description &lt;string&gt;</td><td align="left">Description of this resource</td></tr><tr><td align="left">-e,--email &lt;string&gt;</td><td align="left">E-Mail of this resource</td></tr></table></div></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Extra parameters when authentication is enabled</h3></div></div></div><div class="informaltable"><table border="0"><tr><td align="left">-A,--adminuser &lt;string&gt;</td><td align="left">Context Admin user name</td></tr><tr><td align="left">-P,--adminpass &lt;string&gt;</td><td align="left">Context Admin password</td></tr></table></div></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Return value</h3></div></div></div><p><code class="computeroutput">0</code> on success</p><p><code class="computeroutput">&gt;0</code> on failure</p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Mandatory parameters</h3></div></div></div><p><strong class="userinput"><code>contextid {adminuser adminpass} name displayname email</code></strong></p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Command output</h3></div></div></div><p>On success:</p><p><code class="computeroutput">resource &lt;resourceid&gt; in context &lt;contextid&gt; created</code></p><p>On failure:</p><p><code class="computeroutput">resource in context &lt;contextid&gt; could not be created: &lt;reason from server&gt;</code></p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Example</h3></div></div></div><p><code class="computeroutput">root@oxhe~# </code><strong class="userinput"><code>/opt/open-xchange/sbin/createresource -c 123 -n "laptop" -d "Super laptop" -D "laptop for rent" -e "laptop@example.com"</code></strong></p><p><code class="computeroutput">resource 6 in context 123 created</code></p></div></div>


== createresource ==


<div class="sect1" lang="en-EN"><div class="titlepage"><div><div><h2 class="title" style="clear: both">deleteresource</h2></div></div></div><p>The <strong class="userinput"><code>deleteresource</code></strong> tool allows to delete a resource within a given context.</p><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Parameters</h3></div></div></div><div class="informaltable"><table border="0"><tr><td align="left">-h,--help</td><td align="left">Prints a help text</td></tr><tr><td align="left">    --environment</td><td align="left">Show info about commandline environment</td></tr><tr><td align="left">    --nonl</td><td align="left">Remove all newlines (\n) from output</td></tr><tr><td align="left">-c,--contextid &lt;integer&gt;</td><td align="left">The id of the context</td></tr><tr><td align="left">-i,--resourceid &lt;integer&gt;</td><td align="left">Id of this resource</td></tr><tr><td align="left">-n,--name &lt;string&gt;</td><td align="left">The resource name</td></tr></table></div></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Extra parameters when authentication is enabled</h3></div></div></div><div class="informaltable"><table border="0"><tr><td align="left">-A,--adminuser &lt;string&gt;</td><td align="left">Context Admin user name</td></tr><tr><td align="left">-P,--adminpass &lt;string&gt;</td><td align="left">Context Admin password</td></tr></table></div></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Return value</h3></div></div></div><p><code class="computeroutput">0</code> on success</p><p><code class="computeroutput">&gt;0</code> on failure</p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Mandatory parameters</h3></div></div></div><p><strong class="userinput"><code>contextid {adminuser adminpass} (name or resourceid)</code></strong></p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Command output</h3></div></div></div><p>On success:</p><p><code class="computeroutput">resource &lt;resourceid&gt; in context &lt;contextid&gt; deleted</code></p><p>On failure:</p><p><code class="computeroutput">resource &lt;resourceid&gt; in context &lt;contextid&gt; could not be deleted: &lt;reason from server&gt;</code></p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Example</h3></div></div></div><p><code class="computeroutput">root@oxhe~# </code><strong class="userinput"><code>/opt/open-xchange/sbin/deleteresource -c 123 -i 6</code></strong></p><p><code class="computeroutput">resource 6 in context 123 deleted</code></p></div></div>
The '''<code>createresource</code>''' tool allows to create a new resource within a given context.


=== Parameters ===


<div class="sect1" lang="en-EN"><div class="titlepage"><div><div><h2 class="title" style="clear: both">listresource</h2></div></div></div><p>The <strong class="userinput"><code>listresource</code></strong> tool allows to list and search for resources within a given context.</p><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Parameters</h3></div></div></div><div class="informaltable"><table border="0"><tr><td align="left">-h,--help</td><td align="left">Prints a help text</td></tr><tr><td align="left">   --environment</td><td align="left">Show info about commandline environment</td></tr><tr><td align="left">   --nonl</td><td align="left">Remove all newlines (\n) from output</td></tr><tr><td align="left">-c,--contextid &lt;integer&gt;</td><td align="left">The id of the context</td></tr><tr><td align="left">  --csv</td><td align="left">Format output as csv</td></tr><tr><td align="left">-s,--searchpattern &lt;string&gt;</td><td align="left">The search pattern which is used for listing</td></tr></table></div></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Extra parameters when authentication is enabled</h3></div></div></div><div class="informaltable"><table border="0"><colgroup><col><col></colgroup><tr><td align="left">-A,--adminuser &lt;string&gt;</td><td align="left">Context Admin user name</td></tr><tr><td align="left">-P,--adminpass &lt;string&gt;</td><td align="left">Context Admin password</td></tr></table></div></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Return value</h3></div></div></div><p><code class="computeroutput">0</code> on success</p><p><code class="computeroutput">&gt;0</code> on failure</p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Mandatory parameters</h3></div></div></div><p><strong class="userinput"><code>contextid {adminuser adminpass}</code></strong></p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Command output</h3></div></div></div><p>Standard output:</p><div class="informaltable"><table border="0"><colgroup><col><col><col><col><col></colgroup><tr><td align="left">id</td><td align="left">name</td><td align="left">displayname</td><td align="left">description</td><td align="left">email</td><td align="left">available</td></tr><tr><td align="left">6</td><td align="left">laptop</td><td align="left">"Super Laptop"</td><td align="left">"laptop for rent"</td><td align="left">laptop@example.com</td><td align="left">true</td></tr></table></div><p>csv output:</p><p>id,name,displayname,email,available<code class="computeroutput"></code></p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Example</h3></div></div></div><p><code class="computeroutput">root@oxhe~# </code><strong class="userinput"><code>/opt/open-xchange/sbin/listresource -c 123</code></strong></p><div class="informaltable"><table border="0"><tr><td align="left">id</td><td align="left">name</td><td align="left">displayname</td><td align="left">description</td><td align="left">email</td><td align="left">available</td><td class="auto-generated">&nbsp;</td></tr><tr><td align="left">6</td><td align="left">laptop</td><td align="left">"Super Laptop"</td><td align="left">"laptop for rent"</td><td align="left">laptop@example.com</td><td align="left">true</td><td class="auto-generated">&nbsp;</td></tr></table></div></div></div>
{| border="1"
|-
| -h, --help
|Prints a help text
|-
|   --environment
|Show info about commandline environment
|-
|   --nonl
|Removes all newlines (\n) from output
|-
| --responsetimeout &lt;integer&gt;
|response timeout in seconds for reading response from the backend (default 0s; infinite) '''Available with v7.8.0'''
|-
| -c, --contextid &lt;string&gt;
|The id of the context
|-
| -n, --name &lt;string&gt;
|The resource name
|-
| -d, --displayname &lt;string&gt;
|The resource display name
|-
| -a, --available &lt;true/false&gt;
|Toggle resource availability
|-
| -D, --description &lt;string&gt;
|Description of this resource
|-
| -e, --email &lt;string&gt;
|E-Mail of this resource
|}


=== Extra parameters when authentication is enabled ===


<div class="sect1" lang="en-EN"><div class="titlepage"><div><div><h2 class="title" style="clear: both">changeresource</h2></div></div></div><p>The <strong class="userinput"><code>changeresource</code></strong> tool allows to change a resource within a given context.</p><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Parameters</h3></div></div></div><div class="informaltable"><table border="0"><tr><td align="left">-h,--help</td><td align="left">Prints a help text</td></tr><tr><td align="left">    --environment</td><td align="left">Show info about commandline environment</td></tr><tr><td align="left">    --nonl</td><td align="left">Remove all newlines (\n) from output</td></tr><tr><td align="left">-c,--contextid &lt;integer&gt;</td><td align="left">The id of the context</td></tr><tr><td align="left">-i,--resourceid &lt;integer&gt;</td><td align="left">Id of this resource</td></tr><tr><td align="left">-n,--name &lt;string&gt;</td><td align="left">The resource name</td></tr><tr><td align="left">-d,--displayname &lt;string&gt;</td><td align="left">The resource display name</td></tr><tr><td align="left">-a,--available &lt;true/false&gt;</td><td align="left">Toggle resource availability</td></tr><tr><td align="left">-D,--description &lt;string&gt;</td><td align="left">Description of this resource</td></tr><tr><td align="left">-e,--email &lt;string&gt;</td><td align="left">Email of this resource</td></tr></table></div></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Extra parameters when authentication is enabled</h3></div></div></div><div class="informaltable"><table border="0"><tr><td align="left">-A,--adminuser &lt;string&gt;</td><td align="left">Context Admin user name</td></tr><tr><td align="left">-P,--adminpass &lt;string&gt;</td><td align="left">Context Admin password</td></tr></table></div></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Return value</h3></div></div></div><p><code class="computeroutput">0</code> on success</p><p><code class="computeroutput">&gt;0</code> on failure</p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Mandatory parameters</h3></div></div></div><p><strong class="userinput"><code>contextid {adminuser adminpass} (resourceid or name ) and at least one attribute to change</code></strong></p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Command output</h3></div></div></div><p>On success:</p><p><code class="computeroutput">resource &lt;resourceid&gt; in context &lt;contextid&gt; changed</code></p><p>On failure:</p><p><code class="computeroutput">resource &lt;resourceid&gt; in context &lt;contextid&gt; could not be changed: &lt;reason from server&gt;</code></p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Example</h3></div></div></div><p><code class="computeroutput">root@oxhe~# </code><strong class="userinput"><code>/opt/open-xchange/sbin/changeresource -c 123 -i 6 -D "old Laptop"</code></strong></p><p><code class="computeroutput">resource 6 in context 123 changed</code></p></div></div>
{| border="1"
|-
| -A, --adminuser &lt;string&gt;
|Context Admin user name
|-
| -P, --adminpass &lt;string&gt;
|Context Admin password
|}


=== Return value ===


<code>0</code> on success


<code>&gt;0</code> on failure


[[Category:AdminGuide]]
=== Mandatory parameters ===
 
'''<code>contextid {adminuser adminpass} name displayname email</code>'''
 
=== Command output ===
 
On success:
 
<code>resource &lt;resourceid&gt; in context &lt;contextid&gt; created</code>
 
On failure:
 
<code>resource in context &lt;contextid&gt; could not be created: &lt;reason from server&gt;</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 &lt;integer&gt;
|response timeout in seconds for reading response from the backend (default 0s; infinite) '''Available with v7.8.0'''
|-
| -c, --contextid &lt;integer&gt;
|The id of the context
|-
| -i, --resourceid &lt;integer&gt;
|Id of this resource
|-
| -n, --name &lt;string&gt;
|The resource name
|}
 
=== Extra parameters when authentication is enabled ===
 
{| border="1"
|-
| -A, --adminuser &lt;string&gt;
|Context Admin user name
|-
| -P, --adminpass &lt;string&gt;
|Context Admin password
|}
 
=== Return value ===
 
<code>0</code> on success
 
<code>&gt;0</code> on failure
 
=== Mandatory parameters ===
 
'''<code>contextid {adminuser adminpass} (name or resourceid)</code>'''
 
=== Command output ===
 
On success:
 
<code>resource &lt;resourceid&gt; in context &lt;contextid&gt; deleted</code>
 
On failure:
 
<code>resource &lt;resourceid&gt; in context &lt;contextid&gt; could not be deleted: &lt;reason from server&gt;</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 &lt;integer&gt;
|response timeout in seconds for reading response from the backend (default 0s; infinite) '''Available with v7.8.0'''
|-
| -c, --contextid &lt;integer&gt;
|The id of the context
|-
|  --csv
|Format output as csv
|-
| -s, --searchpattern &lt;string&gt;
|The search pattern which is used for listing
|}
 
=== Extra parameters when authentication is enabled ===
 
{| border="1"
|-
| -A, --adminuser &lt;string&gt;
|Context Admin user name
|-
| -P, --adminpass &lt;string&gt;
|Context Admin password
|}
 
=== Return value ===
 
<code>0</code> on success
 
<code>&gt;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 &lt;integer&gt;
|response timeout in seconds for reading response from the backend (default 0s; infinite) '''Available with v7.8.0'''
|-
| -c, --contextid &lt;integer&gt;
|The id of the context
|-
| -i, --resourceid &lt;integer&gt;
|Id of this resource
|-
| -n, --name &lt;string&gt;
|The resource name
|-
| -d, --displayname &lt;string&gt;
|The resource display name
|-
| -a, --available &lt;true/false&gt;
|Toggle resource availability
|-
| -D, --description &lt;string&gt;
|Description of this resource
|-
| -e, --email &lt;string&gt;
|Email of this resource
|}
 
=== Extra parameters when authentication is enabled ===
 
{| border="1"
|-
| -A, --adminuser &lt;string&gt;
|Context Admin user name
|-
| -P, --adminpass &lt;string&gt;
|Context Admin password
|}
 
=== Return value ===
 
<code>0</code> on success
 
<code>&gt;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 &lt;resourceid&gt; in context &lt;contextid&gt; changed</code>
 
On failure:
 
<code>resource &lt;resourceid&gt; in context &lt;contextid&gt; could not be changed: &lt;reason from server&gt;</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 email 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 email 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