POST /users/{uid}/appliances/{aid}/pimages
Summary
- Method:
POST
- Response Code:
201
- Response Formats:
application/xml
application/json
- Since:
UForge 2.0
Request to publish (register) a generated machine image to a target cloud environment.
The response body is a publish image ticket
that provides the meta-data of the published machine image. The actual publication is done asynchronously. To poll the status of this publication, use machineImagePublishedStatus-getAll
.
This request is similar to applianceImage-publish
- Requires Authentication:
true
- Entitlements Required:
image_publish
uid
(required): the user name (login name) of theuser-object
aid
(required): the id of theappliance-object
A publishImage-object
object
curl "https://uforge.example.com/api/users/{uid}/appliances/{aid}/pimages" -X POST \
-u USER_LOGIN:PASSWORD -H "Accept: application/xml"-H "Content-type: application/xml" --data-binary "@representation.xml"
Example of representation.xml content (the request body):
<ns0:publishImage xmlns:ns0="http://www.usharesoft.com/uforge">
<xsi:type></xsi:type>
<applianceUri>users/root/appliances/4</applianceUri>
<credAccount>
<xsi:type></xsi:type>
<targetPlatform>
<name>openstack</name>
</targetPlatform>
<glanceUrl>http://ip:9292</glanceUrl>
<keystoneUrl>http://ip:5000</keystoneUrl>
<login>username</login>
<password>password</password>
<keystoneVersion>v2.0</keystoneVersion>
</credAccount>
<imageUri>users/root/appliances/4/images/7</imageUri>
<instances></instances>
<displayName>Machine Image Name Example</displayName>
<publicImage>false</publicImage>
<tenantName>mytenantname</tenantName>
</ns0:publishImage>
appliance-object
machineImageGeneration-cancel
machineImagePublish-cancel
machineImagePublishedStatus-get
machineImagePublishedStatus-getAll
machineImagePublished-delete
machineImagePublished-deleteAll
machineImagePublished-download
machineImagePublished-get
machineImagePublished-getAll
machineImageStatus-get
machineImageStatus-getAll
machineImage-delete
machineImage-deleteAll
machineImage-download
machineImage-downloadFile
machineImage-generate
machineImage-get
machineImage-getAll
machineImage-publish
machineImage-publish
machineImage-regenerate
publishimage-object