machineImage_publish

POST /users/{uid}/appliances/{aid}/pimages

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

Security Summary

  • Requires Authentication: true
  • Entitlements Required: image_publish

URI Parameters

  • uid (required): the user name (login name) of the user
  • aid (required): the id of the appliance

HTTP Request Body Parameters

A publishImage object

Example Request

curl "https://uforge.example.com/api/users/{uid}/appliances/{aid}/pimages" -X POST \
-u USER_LOGIN:PASSWORD -H "Accept: 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>v3</keystoneVersion>
        </credAccount>
        <imageUri>users/root/appliances/4/images/7</imageUri>
        <keystoneDomain>Keystone Domain Example</keystoneDomain>
        <keystoneProject>Keystone Project Example</keystoneProject>
        <displayName>Machine Image Name Example</displayName>
        <publicImage>true</publicImage>
</ns0:publishImage>