|
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
|
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 () |
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:
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:
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* .
| 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.
| 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. |
| Information | about 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 |
| Com::Vmware::Vapi::Std::Errors::InvalidArgument | if create_spec contains invalid arguments. |
| Com::Vmware::Vapi::Std::Errors::InvalidArgument | if source describes an unexpected resource type. |
| Com::Vmware::Vapi::Std::Errors::NotFound | if the virtual machine or virtual appliance specified by source does not exist. |
| Com::Vmware::Vapi::Std::Errors::NotFound | if the library or library item specified by target does not exist. |
| Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentState | if 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::ResourceInaccessible | if there was an error accessing a file from the source virtual machine or virtual appliance. |
| Com::Vmware::Vapi::Std::Errors::ResourceBusy | if the specified virtual machine or virtual appliance is busy. |
Code:
| 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 .
| 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. |
| Information | about 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 |
| Com::Vmware::Vapi::Std::Errors::InvalidArgument | if target contains invalid arguments. |
| Com::Vmware::Vapi::Std::Errors::InvalidArgument | if deployment_spec contains invalid arguments or has fields that are inconsistent with target . |
| Com::Vmware::Vapi::Std::Errors::NotFound | if the library item specified by ovf_library_item_id does not exist. |
| Com::Vmware::Vapi::Std::Errors::NotFound | if 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::ResourceInaccessible | if there was an error accessing the OVF package stored in the library item specified by ovf_library_item_id . |
| Com::Vmware::Vapi::Std::Errors::Unauthorized | if you do not have all of the privileges described as follows :
|
Code:
| 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 .
| 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. |
| Information | that 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 |
| Com::Vmware::Vapi::Std::Errors::InvalidArgument | if target contains invalid arguments. |
| Com::Vmware::Vapi::Std::Errors::NotFound | if the library item specified by ovf_library_item_id does not exist. |
| Com::Vmware::Vapi::Std::Errors::NotFound | if 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::ResourceInaccessible | if there was an error accessing the OVF package at the specified ovf_library_item_id . |
Code:
| public method Com::Vmware::Vcenter::Ovf::LibraryItem::new | ( | ) |
Constructor to initialize the object
| api_provider | - protocol connection to use with stubs created by this factory |
| StubConfig | - Stub's additional configuration |
| Blessed | object |
Code: