Personalities APIs
APIs for managing Personalities
Table of Contents
1. Upload a Personality with RAW mode.
Used when the vSphere cluster image/personality is to be exported to LCM from non VCF deployed vCenter.
1.1. Prerequisites API
The following data is required:
vSphere exported software spec json file path
vSphere exported cluster settings json file path
vSphere exported cluster image zip file path
vSphere exported cluster image iso file path
Tip : Refer to: PersonalityUploadSpec.
1.2. Steps API
- Invoke the API. This API returns a task which can be polled and monitored.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/personalities' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '{
"uploadMode" : "RAW",
"uploadSpecRawMode" : {
"personalityInfoJSONFilePath" : "/home/vcf/personality/info.json",
"personalityJSONFilePath" : "/home/vcf/personality/spec.json",
"personalityZIPFilePath" : "/home/vcf/personality/offline.zip",
"personalityISOFilePath" : "/home/vcf/personality/bundle.iso"
},
"name" : "Sample Raw Personality"
}'
HTTP Request
POST /v1/personalities HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 366
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
{
"uploadMode" : "RAW",
"uploadSpecRawMode" : {
"personalityInfoJSONFilePath" : "/home/vcf/personality/info.json",
"personalityJSONFilePath" : "/home/vcf/personality/spec.json",
"personalityZIPFilePath" : "/home/vcf/personality/offline.zip",
"personalityISOFilePath" : "/home/vcf/personality/bundle.iso"
},
"name" : "Sample Raw Personality"
}
HTTP Response
HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/0c3132f2-84bd-4af8-b5bd-73ff66c59e76
Content-Length: 318
{
"id" : "0c3132f2-84bd-4af8-b5bd-73ff66c59e76",
"name" : "vSphere Lifecycle Manager Image Upload vSphere7.0-Dell-SystemAdmin",
"type" : "PERSONALITY_UPLOAD",
"status" : "IN_PROGRESS",
"creationTimestamp" : "2024-08-27T21:11:52.567Z",
"resources" : [ ],
"isCancellable" : false,
"isRetryable" : false
}
- Poll the status of the task using the task API with the ID from the response of the previous API.
Tip : Refer to: Get a Task.
1.3. Related APIs API
Upload a Personality with REFERRED mode. Get a cluster image/personality by Id Get a cluster image/personality by name Get all the Personalities/cluster images by base version [_gettasks] API [_gettask] API
2. Upload a Personality with REFERRED mode.
Used when the vSphere cluster image/personality is to be exported to LCM from VCF deployed vCenter.
2.1. Prerequisites API
The following data is required:
vCenter Id
Cluster Id
Name of the personality
Tip : Refer to: PersonalityUploadSpec.
2.2. Steps API
- Invoke the API. This API returns a task which can be polled and monitored.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/personalities' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '{
"uploadMode" : "REFERRED",
"uploadSpecReferredMode" : {
"vCenterId" : "306f2938-50d4-4a8a-ab8c-ca3e7bb16e56",
"clusterId" : "domain-c8"
},
"name" : "vSphere7.0-Dell-SystemAdmin"
}'
HTTP Request
POST /v1/personalities HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 197
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
{
"uploadMode" : "REFERRED",
"uploadSpecReferredMode" : {
"vCenterId" : "306f2938-50d4-4a8a-ab8c-ca3e7bb16e56",
"clusterId" : "domain-c8"
},
"name" : "vSphere7.0-Dell-SystemAdmin"
}
HTTP Response
HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/0c3132f2-84bd-4af8-b5bd-73ff66c59e76
Content-Length: 318
{
"id" : "0c3132f2-84bd-4af8-b5bd-73ff66c59e76",
"name" : "vSphere Lifecycle Manager Image Upload vSphere7.0-Dell-SystemAdmin",
"type" : "PERSONALITY_UPLOAD",
"status" : "IN_PROGRESS",
"creationTimestamp" : "2024-08-27T21:11:53.235Z",
"resources" : [ ],
"isCancellable" : false,
"isRetryable" : false
}
- Poll the status of the task using the task API with the ID from the response of the previous API.
Tip : Refer to: Get a Task.
2.3. Related APIs API
Upload a Personality with RAW mode. Get a cluster image/personality by Id Get a cluster image/personality by name Get all the Personalities/cluster images by base version
3. Get a cluster image/personality by name
- Get Personalities By Id API is used to get a specific vSphere cluster image by the name.
3.1. Prerequisites API
The following data is required:
- Name of the cluster image
3.2. Steps API
- Invoke the API.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/personalities?personalityName=esx-personality' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/personalities?personalityName=esx-personality HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 941
{
"elements" : [ {
"version" : "1",
"personalityId" : "bbd38966-8537-46f1-9a54-06fbfe7079c6",
"personalityName" : "test-display-name",
"description" : "test-desc",
"createdBy" : "USER",
"imageChecksum" : "test-checksum",
"vsphereExportedZipPath" : "https://sddc-manager.vrack.vsphere.local/vmware/vcf/personalities/personality/bbd38966-8537-46f1-9a54-06fbfe7079c6/pers.zip",
"vsphereExportedIsoPath" : "https://sddc-manager.vrack.vsphere.local/vmware/vcf/personalities/personality/bbd38966-8537-46f1-9a54-06fbfe7079c6/pers.iso",
"vsphereExportedJsonPath" : "https://sddc-manager.vrack.vsphere.local/vmware/vcf/personalities/personality/bbd38966-8537-46f1-9a54-06fbfe7079c6/pers.json",
"displayName" : "test-display-name",
"importTimestamp" : "2024-08-27T21:11:49.990Z",
"tags" : [ ],
"softwareInfo" : {
"baseImage" : {
"version" : "7.0.0-0.0.30340198"
}
}
} ]
}
3.3. Related APIs API
Upload a Personality with RAW mode. Upload a Personality with REFERRED mode. Get a cluster image/personality by Id Get all the Personalities/cluster images by base version
4. Get a cluster image/personality by Id
- Get Personalities By Id API is used to get a specific vSphere cluster image by the Id.
4.1. Prerequisites API
The following data is required:
- Id of the cluster image
4.2. Steps API
- Invoke the API.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/personalities/c6dbbf37-12f8-4179-820e-ab731996eb60' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/personalities/c6dbbf37-12f8-4179-820e-ab731996eb60 HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 882
{
"version" : "1",
"personalityId" : "bbd38966-8537-46f1-9a54-06fbfe7079c6",
"personalityName" : "test-display-name",
"description" : "test-desc",
"createdBy" : "USER",
"imageChecksum" : "test-checksum",
"vsphereExportedZipPath" : "https://sddc-manager.vrack.vsphere.local/vmware/vcf/personalities/personality/bbd38966-8537-46f1-9a54-06fbfe7079c6/pers.zip",
"vsphereExportedIsoPath" : "https://sddc-manager.vrack.vsphere.local/vmware/vcf/personalities/personality/bbd38966-8537-46f1-9a54-06fbfe7079c6/pers.iso",
"vsphereExportedJsonPath" : "https://sddc-manager.vrack.vsphere.local/vmware/vcf/personalities/personality/bbd38966-8537-46f1-9a54-06fbfe7079c6/pers.json",
"displayName" : "test-display-name",
"importTimestamp" : "2024-08-27T21:11:52.970Z",
"tags" : [ ],
"softwareInfo" : {
"baseImage" : {
"version" : "7.0.0-0.0.30340198"
}
}
}
4.3. Related APIs API
Upload a Personality with RAW mode. Upload a Personality with REFERRED mode. Get a cluster image/personality by name Get all the Personalities/cluster images by base version
5. Get all the Personalities/cluster images by base version
- Get the Personalities API is used to get all the personalities by the base version. Similarly the api can be used for filtering based on the other Personality attributes such as addOnName, addOnVendorName, componentName and componentVendorNames.
5.1. Prerequisites API
The following data is required:
- Base Version of the Personality
5.2. Steps API
- Invoke the API.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/personalities?baseOSVersion=6.7.0-15160138' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/personalities?baseOSVersion=6.7.0-15160138 HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 22
{
"elements" : [ ]
}
5.3. Related APIs API
Upload a Personality with RAW mode. Upload a Personality with REFERRED mode. Get a cluster image/personality by Id Get a cluster image/personality by name
Last updated 2024-08-27 16:13:54 -0700