Previous Topic: ha ObjectNext Topic: job Object


util Object

Use this object to access wincfg, iso2class, image2class, and hvm2pv utilities on a VDC.

Method

Description

wincfg_passwd

Change administrator password of a Windows appliance

wincfg_comp_name

Change computer name of a Windows appliance

cloudstore_list

Display products that may be downloaded from Cloud Commons

couldstore_get

Download a product from Cloud Commons

wincfg

Apply the changes requested to the Windows appliance

hvm2pv

Convert unmanaged HVM appliance to a managed appliance

image2class

Import virtual machine images as appliance classes

wincfg_passwd Method (util Object)
Description

Change administrator password of a Windows appliance

Syntax
/api/v2/util/wincfg_passwd?app=application&comp=component&admin_pw=passwd&vdc=controller-name 
Arguments
app

Name of the application

comp

Name of the Windows component

admin_pw

New administrator password

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Change password for test:main.WIN03S.

GET http://192.168.123.200/api/v2/util/wincfg_passwd?app=test&comp=main.WIN03S&admin_pw=password&vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job> 
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
} 

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.4

Missing required arguments (component). - Argument comp=component missing in the request.

400.4

Missing required arguments (app). - Argument app=app missing in the request.

400.4

Missing required arguments (admin_pw). - Argument admin_pw=password missing in the request.

Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.

wincfg_comp_name Method (util Object)
Description

Change computer name of a Windows appliance

Syntax
/api/v2/util/wincfg_passwd?app=application&comp=component&comp_name=new-name&vdc=controller-name 
Arguments
app

Name of the application

comp

Name of the Windows component

comp_name

New computer name

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Change computer name for test:main.WIN03S.

GET http://192.168.123.200/api/v2/util/wincfg_comp_name?app=test&comp=main.WIN03S&comp_name=WIN03TST&vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job> 
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
} 

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.4

Missing required arguments (component). - Argument comp=component missing in the request.

400.4

Missing required arguments (app). - Argument app=app missing in the request.

400.4

Missing required arguments (comp_name). - Argument comp_name=component missing in the request.

Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.

cloudstore_list Method (util Object)
Description

Display products that may be downloaded from Cloud Commons

Syntax
/api/v2/util/cloudstore_list?vdc=controller-name 
Arguments
user_name

Cloud Commons user name

user_password

Cloud Commons password

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

List products.

GET http://192.168.123.200/api/v2/util/cloudstore_list?&user_name=username&user_password=password&vdc=mygrid 
HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

cloudstore_get Method (util Object)
Description

Download a product from the Cloud Commons

Syntax
/api/v2/util/cloudstore_get?order_id=order-id&user_name=username&user_password=password&vdc=controller-name 
Arguments
order_id

Cloud Commons order ID

user_name

Cloud Commons user name

user_password

Cloud Commons user password

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Get a product with ID=123321.

GET http://192.168.123.200/api/v2/util/cloudstore_get?order_id=123321&user_name=test@CA.com&user_password=password&vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job> 
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
} 

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.4

Missing required arguments (product_id). - Argument product_id=product_id missing in the request.

400.4

Missing required arguments (user_name). - Argument user_name=user_name missing in the request.

400.4

Missing required arguments (user_password). - Argument user_password=component missing in the request.

Notes

To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.

wincfg Method (util Object)
Description

Apply the changes requested to the Windows appliance

Syntax
/api/v2/util/wincfg?app=application&comp=component&vdc=controller-name 
Arguments
app

Name of the application

comp

Name of the windows component

pwd

Marketplace user password

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Change admin password of a windows based appliance

GET
http://192.168.123.200/api/v2/util/wincfg?app=WINAPP&component=main.WIN08S&admin_pw=password&vdc=mygrid

Change computer name of a windows based appliance

GET
http://192.168.123.200/api/v2/util/wincfg?app=WINAPP&component=main.WIN08S&computer_name=WINTST&vdc=mygrid
 
Sample Output
JSON:

{
   "job" : "3f8c7462-eab5-48e7-94c1-ed5fc5b9cb97"
}

XML:

<job>358fd142-acba-42b2-bfde-d7deb0ebe03e</job>
 

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.4

Missing required arguments (app)

- Argument app=app missing

Missing required arguments (comp)

- Argument app=app missing

Notes

This API is available with WS_API_r6-1.0.6-1 and above.

To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.

hvm2pv Method (util Object)
Description

Convert unmanaged HVM appliance to a managed appliance (running as HVM, PV or both)

Syntax
/api/v2/util/hvm2pv?app=application&comp=component&vdc=controller-name 
Arguments
app

Name of the application

comp

Name of the windows component

vdc

Name of the target virtual data center

Transaction Type

Asynchronous

Request Type

GET

Examples

Convert unmanaged ISO2CLASS singleton to a managed appliance running in PV mode GET

http://192.168.123.200/api/v2/util/hvm2pv?app=centos-hvm&component=main.iso2class&virt_mode=xen_pv&os=rh&arch=32&vdc=mygrid
Sample Output
JSON:

{
   "job" : "3f8c7462-eab5-48e7-94c1-ed5fc5b9cb97"
}

XML:

<job>358fd142-acba-42b2-bfde-d7deb0ebe03e</job>
HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.4

Missing required arguments (app)

- Argument app=app missing

Missing required arguments (comp)

- Argument app=app missing

Notes

Before using this object, bind the grid to the Marketplace using the appstore_bind object.

To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.

image2class Method (util Object)
Description

Import virtual machine images as AppLogic appliance classes.

Syntax
/api/v2/util/image2class?class=class&image=image&vdc=controller-name 
Arguments
class

Name of the AppLogic appliance class that will be created

image

The image or volumes to be imported.

Transaction Type

Asynchronous

Request Type

GET

Examples

Import an OVA image from the grid's impex volume as an unmanaged singleton class

 GET
http://192.168.123.200/api/v2/util/image2class?class=myapp:TOMCAT&image=tomcat.ova&unmanaged&vdc=mygrid

Import an OVA image from a URL, creating a managed catalog class, overriding resources specified in the .ovf descriptor

GET
http://192.168.123.200/api/v2/util/image2class?class=/proto:TOMCAT&image=http%3A%2F%2Fexample.com%2Ftomcat.ova&user=user&pwd=password&managed&cpu=2&mem=512M&os=linux&vdc=mygrid

Upgrade a managed catalog class by replacing its volumes with those from an OVA image

GET
http://192.168.123.200/api/v2/util/image2class?class=/proto:TOMCAT&image=tomcat.ova&upgrade&vdc=mygrid

Sample Output
JSON:

{
   "job" : "3f8c7462-eab5-48e7-94c1-ed5fc5b9cb97"
}

XML:

<job>358fd142-acba-42b2-bfde-d7deb0ebe03e</job>

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.4

Missing required arguments (class)

- Argument class=class missing

Missing required arguments (image)

- Argument image=image missing

Notes

Before using this object, bind the grid to the Marketplace using the appstore_bind object.

To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.