VMware vSphere Automation SDK Perl
The VMware vSphere Automation SDK for Perl supports the client-side vSphere Automation API for access to vSphere services and capabilities
 All Classes Files Functions
Classes | List of all members
Com::Vmware::Vcenter::Ovf::LibraryItem Class Reference
Inheritance diagram for Com::Vmware::Vcenter::Ovf::LibraryItem:
Com::Vmware::Vapi::Bindings::VapiInterface

Classes

class  CreateResult
 
class  CreateSpec
 
class  CreateTarget
 
class  DeployableIdentity
 
class  DeploymentResult
 
class  DeploymentTarget
 
class  OvfSummary
 
class  ResourcePoolDeploymentSpec
 
class  ResultInfo
 
class  StorageGroupMapping
 

Avaliable Methods

public method create ()
 
public method deploy ()
 
public method filter ()
 
public method new ()
 

Detailed Description

The Com::Vmware::Vcenter::Ovf::LibraryItem interface provides methods to deploy virtual machines and virtual appliances from library items containing Open Virtualization Format (OVF) packages in content library, as well as methods 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 class Com::Vmware::Vcenter::Ovf::LibraryItem::DeploymentTarget to specify the target deployment type and target deployment designation.
  2. Create a class Com::Vmware::Vcenter::Ovf::LibraryItem::ResourcePoolDeploymentSpec to specify the parameters for the target deployment.
  3. Use the deploy method with the created target and parameter specifications, along with the identifier of the specified source content library item. See :func:Com::Vmware::Vcenter::Ovf::LibraryItem.deploy .

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

  1. Create a class Com::Vmware::Vcenter::Ovf::LibraryItem::DeployableIdentity to specify the source virtual machine or virtual appliance to be used as the OVF template source.
  2. Create a class Com::Vmware::Vcenter::Ovf::LibraryItem::CreateTarget to specify the target library and library item.
  3. Create a class Com::Vmware::Vcenter::Ovf::LibraryItem::CreateSpec to specify the settings for the OVF package to be created.
  4. Use the create method with the created target and parameter specifications, along with the specified source entity. See :func:Com::Vmware::Vcenter::Ovf::LibraryItem.create .

Constant Array of String::DEPLOYABLE # The types of resources that can be created by deploying an OVF package and can be captured to create a library item using the Com::Vmware::Vcenter::Ovf::LibraryItem interface* .

Member Function Documentation

public method Com::Vmware::Vcenter::Ovf::LibraryItem::create ( )

Creates a library item in content library from a virtual machine or virtual appliance.

This method creates a library item in content library whose content is an OVF package derived from a source virtual machine or virtual appliance, using the supplied create specification. The OVF package may be stored as in a newly created library item or in an in an existing library item. For an existing library item whose content is updated by this method* , the original content is overwritten.

Parameters
client_token[OPTIONAL] Client-generated token used to retry a request if the client fails to get a response from the server. If the original request succeeded, the result of that request will be returned, otherwise the operation will be retried. If null , the server will create a token. . The value must be String or None.
source[REQUIRED] Identifier of the virtual machine or virtual appliance to use as the source. . The value must be Com::Vmware::Vcenter::Ovf::LibraryItem::DeployableIdentity.
target[REQUIRED] Specification of the target content library and library item. . The value must be Com::Vmware::Vcenter::Ovf::LibraryItem::CreateTarget.
create_spec[REQUIRED] Information used to create the OVF package from the source virtual machine or virtual appliance. . The value must be Com::Vmware::Vcenter::Ovf::LibraryItem::CreateSpec.
Return values
Informationabout the success or failure of the method , along with the details of the result or failure. The return type will be Com::Vmware::Vcenter::Ovf::LibraryItem::CreateResult
Exceptions
Com::Vmware::Vapi::Std::Errors::InvalidArgumentif create_spec contains invalid arguments.
Com::Vmware::Vapi::Std::Errors::InvalidArgumentif source describes an unexpected resource type.
Com::Vmware::Vapi::Std::Errors::NotFoundif the virtual machine or virtual appliance specified by source does not exist.
Com::Vmware::Vapi::Std::Errors::NotFoundif the library or library item specified by target does not exist.
Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentStateif the operation cannot be performed because of the specified virtual machine or virtual appliance's current state. For example, if the virtual machine configuration information is not available, or if the virtual appliance is running.
Com::Vmware::Vapi::Std::Errors::ResourceInaccessibleif there was an error accessing a file from the source virtual machine or virtual appliance.
Com::Vmware::Vapi::Std::Errors::ResourceBusyif the specified virtual machine or virtual appliance is busy.
Code:
click to view
public method Com::Vmware::Vcenter::Ovf::LibraryItem::deploy ( )

Deploys an OVF package stored in content library to a newly created virtual machine or virtual appliance.

This method deploys an OVF package which is stored in the library item specified by ovf_library_item_id . It uses the deployment specification in deployment_spec to deploy the OVF package to the location specified by target .

Parameters
client_token[OPTIONAL] Client-generated token used to retry a request if the client fails to get a response from the server. If the original request succeeded, the result of that request will be returned, otherwise the operation will be retried. If null , the server will create a token. . The value must be String or None.
ovf_library_item_id[REQUIRED] Identifier of the content library item containing the OVF package to be deployed. The value must be an identifier for the resource type getQualifiedName(com.vmware.content.library.Item). . The value must be str.
target[REQUIRED] Specification of the deployment target. . The value must be Com::Vmware::Vcenter::Ovf::LibraryItem::DeploymentTarget.
deployment_spec[REQUIRED] Specification of how the OVF package should be deployed to the target. . The value must be Com::Vmware::Vcenter::Ovf::LibraryItem::ResourcePoolDeploymentSpec.
Return values
Informationabout the success or failure of the method , along with the details of the result or failure. The return type will be Com::Vmware::Vcenter::Ovf::LibraryItem::DeploymentResult
Exceptions
Com::Vmware::Vapi::Std::Errors::InvalidArgumentif target contains invalid arguments.
Com::Vmware::Vapi::Std::Errors::InvalidArgumentif deployment_spec contains invalid arguments or has fields that are inconsistent with target .
Com::Vmware::Vapi::Std::Errors::NotFoundif the library item specified by ovf_library_item_id does not exist.
Com::Vmware::Vapi::Std::Errors::NotFoundif any resource specified by a field of the class Com::Vmware::Vcenter::Ovf::LibraryItem::DeploymentTarget class , specified by target , does not exist.
Com::Vmware::Vapi::Std::Errors::ResourceInaccessibleif there was an error accessing the OVF package stored in the library item specified by ovf_library_item_id .
Com::Vmware::Vapi::Std::Errors::Unauthorizedif you do not have all of the privileges described as follows :
  • Method execution requires VirtualMachine.Config.AddNewDisk if the OVF descriptor has a disk drive (type 17) section.
  • Method execution requires VirtualMachine.Config.AdvancedConfig if the OVF descriptor has an ExtraConfig section.
  • Method execution requires Extension.Register for specified resource group if the OVF descriptor has a vServiceDependency section.
  • Method execution requires Network.Assign for target network if specified.
  • Method execution requires Datastore.AllocateSpace for target datastore if specified.
Code:
click to view
public method Com::Vmware::Vcenter::Ovf::LibraryItem::filter ( )

Queries an OVF package stored in content library to retrieve information to use when deploying the package. See :func:Com::Vmware::Vcenter::Ovf::LibraryItem.deploy .

This method 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 method* can be used to populate the deployment specification (see class Com::Vmware::Vcenter::Ovf::LibraryItem::ResourcePoolDeploymentSpec when deploying the OVF package to the deployment target specified by target .

Parameters
ovf_library_item_id[REQUIRED] Identifier of the content library item containing the OVF package to query. The value must be an identifier for the resource type getQualifiedName(com.vmware.content.library.Item). . The value must be str.
target[REQUIRED] Specification of the deployment target. . The value must be Com::Vmware::Vcenter::Ovf::LibraryItem::DeploymentTarget.
Return values
Informationthat can be used to populate the deployment specification (see class Com::Vmware::Vcenter::Ovf::LibraryItem::ResourcePoolDeploymentSpec ) when deploying the OVF package to the deployment target specified by target . The return type will be Com::Vmware::Vcenter::Ovf::LibraryItem::OvfSummary
Exceptions
Com::Vmware::Vapi::Std::Errors::InvalidArgumentif target contains invalid arguments.
Com::Vmware::Vapi::Std::Errors::NotFoundif the library item specified by ovf_library_item_id does not exist.
Com::Vmware::Vapi::Std::Errors::NotFoundif any resource specified by a field of the class Com::Vmware::Vcenter::Ovf::LibraryItem::DeploymentTarget class , specified by target , does not exist.
Com::Vmware::Vapi::Std::Errors::ResourceInaccessibleif there was an error accessing the OVF package at the specified ovf_library_item_id .
Code:
click to view
public method Com::Vmware::Vcenter::Ovf::LibraryItem::new ( )

Constructor to initialize the object

Parameters
api_provider- protocol connection to use with stubs created by this factory
StubConfig- Stub's additional configuration
Return values
Blessedobject
Code:
click to view

The documentation for this class was generated from the following file: