Merge "Adding information about Image Registry api"

This commit is contained in:
Jenkins 2015-03-29 20:28:04 +00:00 committed by Gerrit Code Review
commit 54072c3be3
10 changed files with 373 additions and 1 deletions

View File

@ -10,7 +10,7 @@
<title>Data Processing API (CURRENT)</title>
<para>Produce data processing operations.</para>
<section xml:id="v1.1datasources">
<title>Image Registry</title>
<title>Data Sources</title>
<para>
A Data Source object provides the location of input or output for
MapReduce jobs and may reference different types of storage.
@ -76,4 +76,20 @@
</wadl:resource>
</wadl:resources>
</section>
<section xml:id="v1.1imageregistry">
<title>Image Registry</title>
<para>
The Image Registry is a tool for managing images. Each plugin
provides a list of required tags an image should have. Sahara also
requires a username to login into an instances OS for remote
operations execution.
</para>
<para>
The Image Registry provides an ability to add/remove tags to images
and define the OS username.
</para>
<wadl:resources
href="../wadls/dataprocessing-api/src/v1.1/wadl/image-registry.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</section>
</chapter>

View File

@ -0,0 +1,7 @@
{
"tags": [
"vanilla",
"2.6.0",
"some_other_tag"
]
}

View File

@ -0,0 +1,27 @@
{
"image": {
"updated": "2015-03-24T10:18:33Z",
"metadata": {
"_sahara_tag_vanilla": "True",
"_sahara_description": "Ubuntu image for Hadoop 2.6.0",
"_sahara_username": "ubuntu",
"_sahara_tag_some_other_tag": "True",
"_sahara_tag_2.6.0": "True"
},
"id": "bb8d12b5-f9bb-49f0-aecb-739b8a9bec89",
"minDisk": 0,
"status": "ACTIVE",
"tags": [
"vanilla",
"some_other_tag",
"2.6.0"
],
"minRam": 0,
"progress": 100,
"username": "ubuntu",
"created": "2015-02-03T10:28:39Z",
"name": "sahara-vanilla-2.6.0-ubuntu-14.04",
"description": "Ubuntu image for Hadoop 2.6.0",
"OS-EXT-IMG-SIZE:size": 1101856768
}
}

View File

@ -0,0 +1,5 @@
{
"tags": [
"some_other_tag"
]
}

View File

@ -0,0 +1,25 @@
{
"image": {
"updated": "2015-03-24T10:19:28Z",
"metadata": {
"_sahara_description": "Ubuntu image for Hadoop 2.6.0",
"_sahara_username": "ubuntu",
"_sahara_tag_vanilla": "True",
"_sahara_tag_2.6.0": "True"
},
"id": "bb8d12b5-f9bb-49f0-aecb-739b8a9bec89",
"minDisk": 0,
"status": "ACTIVE",
"tags": [
"vanilla",
"2.6.0"
],
"minRam": 0,
"progress": 100,
"username": "ubuntu",
"created": "2015-02-03T10:28:39Z",
"name": "sahara-vanilla-2.6.0-ubuntu-14.04",
"description": "Ubuntu image for Hadoop 2.6.0",
"OS-EXT-IMG-SIZE:size": 1101856768
}
}

View File

@ -0,0 +1,24 @@
{
"image": {
"updated": "2015-02-03T10:29:32Z",
"metadata": {
"_sahara_username": "ubuntu",
"_sahara_tag_vanilla": "True",
"_sahara_tag_2.6.0": "True"
},
"id": "bb8d12b5-f9bb-49f0-aecb-739b8a9bec89",
"minDisk": 0,
"status": "ACTIVE",
"tags": [
"vanilla",
"2.6.0"
],
"minRam": 0,
"progress": 100,
"username": "ubuntu",
"created": "2015-02-03T10:28:39Z",
"name": "sahara-vanilla-2.6.0-ubuntu-14.04",
"description": null,
"OS-EXT-IMG-SIZE:size": 1101856768
}
}

View File

@ -0,0 +1,48 @@
{
"images": [
{
"updated": "2015-02-03T10:29:32Z",
"metadata": {
"_sahara_username": "ubuntu",
"_sahara_tag_vanilla": "True",
"_sahara_tag_2.6.0": "True"
},
"id": "bb8d12b5-f9bb-49f0-aecb-739b8a9bec89",
"minDisk": 0,
"status": "ACTIVE",
"tags": [
"vanilla",
"2.6.0"
],
"minRam": 0,
"progress": 100,
"username": "ubuntu",
"created": "2015-02-03T10:28:39Z",
"name": "sahara-vanilla-2.6.0-ubuntu-14.04",
"description": null,
"OS-EXT-IMG-SIZE:size": 1101856768
},
{
"updated": "2015-01-30T11:10:59Z",
"metadata": {
"_sahara_tag_spark": "True",
"_sahara_tag_1.0.0": "True",
"_sahara_username": "ubuntu"
},
"id": "e6a6c5da-67be-4017-a7d2-81f466efe67e",
"minDisk": 0,
"status": "ACTIVE",
"tags": [
"spark",
"1.0.0"
],
"minRam": 0,
"progress": 100,
"username": "ubuntu",
"created": "2015-01-30T11:04:15Z",
"name": "sahara-juno-spark-1.0.0-ubuntu-14.04",
"description": null,
"OS-EXT-IMG-SIZE:size": 761856000
}
]
}

View File

@ -0,0 +1,4 @@
{
"username": "ubuntu",
"description": "Ubuntu image for Hadoop 2.6.0"
}

View File

@ -0,0 +1,25 @@
{
"image": {
"updated": "2015-03-24T10:05:10Z",
"metadata": {
"_sahara_description": "Ubuntu image for Hadoop 2.6.0",
"_sahara_username": "ubuntu",
"_sahara_tag_vanilla": "True",
"_sahara_tag_2.6.0": "True"
},
"id": "bb8d12b5-f9bb-49f0-aecb-739b8a9bec89",
"minDisk": 0,
"status": "ACTIVE",
"tags": [
"vanilla",
"2.6.0"
],
"minRam": 0,
"progress": 100,
"username": "ubuntu",
"created": "2015-02-03T10:28:39Z",
"name": "sahara-vanilla-2.6.0-ubuntu-14.04",
"description": "Ubuntu image for Hadoop 2.6.0",
"OS-EXT-IMG-SIZE:size": 1101856768
}
}

View File

@ -0,0 +1,191 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- (C) 2015 OpenStack Foundation, All Rights Reserved -->
<application xmlns="http://wadl.dev.java.net/2009/02"
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:db="http://docbook.org/ns/docbook"
xmlns:common="http://docs.openstack.org/common/api/v1.0"
xmlns:csapi="http://docs.openstack.org/compute/api/v2">
<resources base="https://servers.api.openstack.com"
xml:id="image-registry-v1.1">
<resource id="v1.1" path="//v1.1">
<resource id="tenant_id" path="{tenant_id}">
<param name="tenant_id" style="template" type="csapi:UUID">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>The unique identifier of the tenant or account.</para>
</wadl:doc>
</param>
<resource id="images" path="images">
<method href="#imageslist"/>
<resource id="imageId" path="{image_id}">
<param name="image_id" style="template" type="csapi:UUID">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>The unique identifier of the image.</para>
</wadl:doc>
</param>
<method href="#imageInfo"/>
<method href="#imageReg"/>
<method href="#imageUnreg"/>
<resource id="imageTag" path="tag">
<method href="#addTags"/>
</resource>
<resource id="imageUntag" path="untag">
<method href="#removeTags"/>
</resource>
</resource>
</resource>
</resource>
</resource>
</resources>
<!-- *******************************************************-->
<!-- Image Registry -->
<!--*******************************************************-->
<method name="GET" id="imageslist">
<wadl:doc xml:lang="EN" title="List Images"
xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Lists all images registered in Image Registry.</para>
</wadl:doc>
<request>
<param name="tags" style="plain" type="csapi:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>
Lists images only with specific tag.
Can be used multiple times.
</para>
</wadl:doc>
</param>
</request>
<response status="200">
<representation mediaType="application/json">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="../samples/image-registry/images-list-resp.json"
/>
</wadl:doc>
</representation>
</response>
</method>
<method name="GET" id="imageInfo">
<wadl:doc xml:lang="EN" title="Show image information"
xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Shows information about specified Image.</para>
</wadl:doc>
<response status="200">
<representation mediaType="application/json">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="../samples/image-registry/images-get-resp.json"
/>
</wadl:doc>
</representation>
</response>
</method>
<method name="POST" id="imageReg">
<wadl:doc xml:lang="EN" title="Register Image"
xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Registers specified Image in Image Registry.</para>
</wadl:doc>
<request>
<representation mediaType="application/json">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="../samples/image-registry/images-set-req.json"
/>
</wadl:doc>
<param name="username" style="plain" type="csapi:string" required="true">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>Username to login into an instances OS for
remote operations execution.</para>
</wadl:doc>
</param>
<param name="description" style="plain" type="csapi:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>Description of the image.</para>
</wadl:doc>
</param>
</representation>
</request>
<response status="202">
<representation mediaType="application/json">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="../samples/image-registry/images-set-resp.json"
/>
</wadl:doc>
</representation>
</response>
</method>
<method name="DELETE" id="imageUnreg">
<wadl:doc xml:lang="EN" title="Unregister Image"
xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Removes specified Image from Image Registry.</para>
</wadl:doc>
<response status="204"/>
</method>
<method name="POST" id="addTags">
<wadl:doc xml:lang="EN" title="Add tags"
xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Adds tags to specified Image.</para>
</wadl:doc>
<request>
<representation mediaType="application/json">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="../samples/image-registry/image-tags-add-req.json"
/>
</wadl:doc>
<param name="tags" style="plain" type="csapi:string" required="true">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>List of tags to be added.</para>
</wadl:doc>
</param>
</representation>
</request>
<response status="202">
<representation mediaType="application/json">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="../samples/image-registry/image-tags-add-resp.json"
/>
</wadl:doc>
</representation>
</response>
</method>
<method name="POST" id="removeTags">
<wadl:doc xml:lang="EN" title="Remove tags"
xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Removes tags for specified Image.</para>
</wadl:doc>
<request>
<representation mediaType="application/json">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="../samples/image-registry/image-tags-delete-req.json"
/>
</wadl:doc>
<param name="tags" style="plain" type="csapi:string" required="true">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>List of tags to be added.</para>
</wadl:doc>
</param>
</representation>
</request>
<response status="202">
<representation mediaType="application/json">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="../samples/image-registry/image-tags-add-resp.json"
/>
</wadl:doc>
</representation>
</response>
</method>
</application>