Import Software Spec Clusters Software Drafts
Imports the desired software specification as a new draft. If a desired document is missing, then this operation will create an empty draft except when the source type is of either LATEST_RECOMMENDATION or CURRENT_SERIES_RECOMMENDATION, then NotFound error is reported. In addition, the exisiting draft will be overwritten when the source type is of either LATEST_RECOMMENDATION or CURRENT_SERIES_RECOMMENDATION. if you do not have all of the privileges described as follows: - Operation execution requires VcIntegrity.lifecycleSoftwareSpecification.Write. - The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.lifecycleSoftwareSpecification.Write.
Request
URLURL
Path Parameters
Path Parameters
Identifier of the cluster. The parameter must be an identifier for the resource type: ClusterComputeResource.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
Specification to import desired software specification.
{
"source_type": "PULL"
}
The Drafts.SourceType enumerated type defines possible values of sources to import software specification.
PULL : Content is pulled from the URL location. The URL scheme of the value in {@link #pullLocation) can be http, https or file.
PUSH : Content was previously uploaded using the file upload enpoint present on vCenter appliance. This endpoint is present at https://VCENTERFQDN:9087/vum-fileupload URL.
JSON_STRING : The string representing the content of the software specfication.
LATEST_RECOMMENDATION : Content is from recommended image specification based on latest base image version. Recommendations can be generated using {@link: com.vmware.esx.settings.clusters.software.Recommendations#generate}.
CURRENT_SERIES_RECOMMENDATION : Content is from recommended image specification based on latest base image patch or update of the current series. For example, a cluster’s current desired base image is 7.0. Recommendation engine will look into any recommendable image specification with 7.0 series base images available at depot manager and try to recommend the highest version within 7.0 series if possible. Let’s say in this example, depot manager has 7.0 patch a and 7.0 update 1 base images. Recommendation engine would first validate all possible images based on 7.0 update 1. If it finds a valid one, it will store the recommended content with that series. This enum value will point to that stored recommended image content. Recommendations can be generated using {@link: com.vmware.esx.settings.clusters.software.Recommendations#generate}.
SPECIFIED_BASE_IMAGE_RECOMMENDATION : Content is from recommended image specification based on a specified base image version. Recommendations can be generated using {@link: com.vmware.esx.settings.clusters.software.Recommendations#generate}.
Possible values are: PULL , PUSH , JSON_STRING , LATEST_RECOMMENDATION , CURRENT_SERIES_RECOMMENDATION
File identifier returned by the file upload endpoint after file is uploaded. This field is optional and it is only relevant when the value of Drafts.ImportSpec.source-type is PUSH.
Location of the software specification file to be imported. This field is optional and it is only relevant when the value of Drafts.ImportSpec.source-type is PULL.
The JSON string representing the desired software specification. This field is optional and it is only relevant when the value of Drafts.ImportSpec.source-type is JSON_STRING.
Authentication
Response
Response BodyResponse Body
Identifier of the software draft. The result will be an identifier for the resource type: com.vmware.esx.settings.draft.
Errors
com.vmware.vapi.std.errors.not_found : If there is no cluster associated with cluster in the system or if the source type of import specification is of either LATEST_RECOMMENDATION or CURRENT_SERIES_RECOMMENDATION, and a recommendation does not exist for the cluster. It was either never generated or deleted due to changes in cluster state such as a new desired image spec being committed.
com.vmware.vapi.std.errors.error : If there is unknown internal error. The accompanying error message will give more details about the failure.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
PowerCLI Client SDK All Parameters Example
cURL Command
Vendor Extensions
x-vmw-doc-operation: import_software_spec