Skip to content
movitto edited this page Jan 15, 2013 · 3 revisions

Deployables

DRAFT

This version doesn’t take TIM into account.

Create a new deployable

Request

POSTing a full resource

curl -X POST --user admin:password--header “Content-Type: application/xml” --header “Accept: application/xml” -k https://localhost/conductor/api/deployable
--data "<deployable> 
 <name>deplname</name> 
 <description>some text</description> 
 <xml>\<![]([CDATA[ SOME VALID XML ]]></xml> 
  <xml_filename>fname</xml_filename> 
  <catalog id='1337' \>
</deployable>"

where SOME VALID XML is something like Redmine is a web-based project management application

which is the place where we run into a naming problem.

Response

<deployable id="1" href="https://localhost/conductor/api/deployable/1">
  <name>deplname</name>
  <description>some text</description>
  <xml><)]\></xml>
 <xml_filename> fname </xml_filename>
 <owner id="2"></owner>

<pool_family id="1" href="https://localhost/conductor/api/pool_families/1"></pool_family>
</deployable>

Creating from existing image

This follows current option in UI.

curl -X POST --user admin:password--header “Content-Type: application/xml”  --header “Accept: application/xml” -k https://localhost/conductor/api/deployable
--data “<deployable> 
 <name>deplname</name> 
 <description>some text</description> 
 <image id='313373' \>
 <hwp id='3000' \> 
 <catalog id='1337' \> 
</deployable>”

List all deployables

Request

curl -X GET --user admin:password--header “Accept: application/xml” -k https://localhost/conductor/api/deployables

Response

<deployables>
<deployable href='http://localhost:3000/api/deployables/1' id='1' />
<deployable href='http://localhost:3000/api/deployables/3' id='3' />
<deployable href='http://localhost:3000/api/deployables/2' id='2' />
</deployables>

Show a single deployable’s details

Request

curl -X GET --user admin:password--header “Accept: application/xml” -k https://localhost/conductor/api/deployables/1

Response

<deployable id="1" href="https://localhost/conductor/api/deployables/1">
 <name>delpname</name>
 <description>some text</description>

<pool_family id="1" href="https://localhost/conductor/api/pool_family/1" />
 <catalogs>
 <catalog id="1" href="https://localhost/conductor/api/catalogs/1" />
 </catalogs>
</deployable>

Update a deployable

Request

curl -X PUT --user admin:password--header “Content-Type: application/xml” 
--header “Accept: application/xml”-k https://localhost/conductor/api/deployables/1
--data "<deployable> 
<name>deplname</name> 
<description>some text</description> 
<xml>\<![]([CDATA[ SOME VALID XML ]]></xml> 
<xml_filename>fname</xml_filename> 
</deployable>"

Response

<deployable id="1" href="https://localhost/conductor/api/deployable/1">
  <name>deplname</name>
  <description>some text</description>
  <xml><)]\></xml>
 <xml_filename> fname </xml_filename>
 <owner id="2"></owner>
</deployable>

Delete a deployable

Request

curl -X DELETE --user admin:password--header “Accept: application/xml” -k https://localhost/conductor/api/deployable/1

Response

If success,

<deplyable id="1">
 <status>DELETED</status>
</deployable>

If failure,

<code>
<error>
  <code>RecordNotFound</code>
  <message>Couldn't find deployable with ID=1</message>
</error>
</code>
Clone this wiki locally