com.vmware.vcenter.ovf.library_item

The library_item service provides operations to deploy virtual machines and virtual appliances from library items containing Open Virtualization Format (OVF) packages in content library, as well as operations to create library items in content library from virtual machines and virtual appliances.

To deploy a virtual machine or a virtual appliance from a library item:

  1. Create a com.vmware.vcenter.ovf.library_item.deployment_target to specify the target deployment type and target deployment designation.
  2. Create a com.vmware.vcenter.ovf.library_item.resource_pool_deployment_spec to specify the parameters for the target deployment.
  3. Use the deploy operation with the created target and parameter specifications, along with the identifier of the specified source content library item. See deploy.

To create a library item in content library from a virtual machine or virtual appliance:

  1. Create a com.vmware.vcenter.ovf.library_item.deployable_identity to specify the source virtual machine or virtual appliance to be used as the OVF template source.
  2. Create a com.vmware.vcenter.ovf.library_item.create_target to specify the target library and library item.
  3. Create a com.vmware.vcenter.ovf.library_item.create_spec to specify the settings for the OVF package to be created.
  4. Use the create operation with the created target and parameter specifications, along with the specified source entity. See create.

filter

POST /com/vmware/vcenter/ovf/library-item/id:{ovf_library_item_id}?~action=filter
POST /com/vmware/vcenter/ovf/library-item?~action=filter

Queries an OVF package stored in content library to retrieve information to use when deploying the package. See deploy.

This operation retrieves information from the descriptor of the OVF package stored in the library item specified by ovf_library_item_id. The information returned by the operation can be used to populate the deployment specification (see com.vmware.vcenter.ovf.library_item.resource_pool_deployment_spec when deploying the OVF package to the deployment target specified by target.

Request:
Representations:
{
    "ovf_library_item_id""obj-103",
    "target"{
        "folder_id""obj-103",
        "host_id""obj-103",
        "resource_pool_id""obj-103"
    }
}
<?xml version="1.0" ?>
<ns0:Filter-Input xmlns:ns0="http://vmware.com/vcenter/ovf/library_item" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <target>
    <folder_id>obj-103</folder_id>
    <host_id>obj-103</host_id>
    <resource_pool_id>obj-103</resource_pool_id>
  </target>
  <ovf_library_item_id>obj-103</ovf_library_item_id>
</ns0:Filter-Input>
POST /com/vmware/vcenter/ovf/library-item?~action=filter
&target.folder_id=obj-103
&target.host_id=obj-103
&target.resource_pool_id=obj-103
&ovf_library_item_id=obj-103

Parameters:
Name Type Required Description
ovf_library_item_id
 *
ID Yes Identifier of the content library item containing the OVF package to query. Id of type com.vmware.content.library.Item.
target
 *
deployment_target Yes Specification of the deployment target.

Response:
Representations:
{
    "value"{
        "EULAs"[
            "string",
            "string"
        ],
        "additional_params"[
            {
                "@class""com.vmware.vcenter.ovf.ovf_params",
                "type""string"
            },
            {
                "@class""com.vmware.vcenter.ovf.ovf_params",
                "type""string"
            }
        ],
        "annotation""string",
        "name""string",
        "networks"[
            "string",
            "string"
        ],
        "storage_groups"[
            "string",
            "string"
        ]
    }
}
<?xml version="1.0" ?>
<ns0:Filter-Result xmlns:ns0="http://vmware.com/vcenter/ovf/library_item" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <value>
    <networks-array>
      <array-item>string</array-item>
      <array-item>string</array-item>
    </networks-array>
    <annotation>string</annotation>
    <storage_groups-array>
      <array-item>string</array-item>
      <array-item>string</array-item>
    </storage_groups-array>
    <additional_params-array>
      <array-item class="com.vmware.vcenter.ovf.ovf_params">
        <type>string</type>
      </array-item>
      <array-item class="com.vmware.vcenter.ovf.ovf_params">
        <type>string</type>
      </array-item>
    </additional_params-array>
    <name>string</name>
    <EULAs-array>
      <array-item>string</array-item>
      <array-item>string</array-item>
    </EULAs-array>
  </value>
</ns0:Filter-Result>

Parameters:
Name Type Required Description
result ovf_summary Yes Information that can be used to populate the deployment specification (see com.vmware.vcenter.ovf.library_item.resource_pool_deployment_spec) when deploying the OVF package to the deployment target specified by target.

Errors:
Type Description HTTP Status Code
invalid_argument if target contains invalid arguments. 400
not_found if the library item specified by ovf_library_item_id does not exist. 404
resource_inaccessible if there was an error accessing the OVF package at the specified ovf_library_item_id. 400

Copyright © 2014. All Rights Reserved.