Skip to content
Matt Wagner edited this page Oct 25, 2012 · 1 revision

Pool Families

{{toc}}

Create a new pool family

Request

Unlimited quota is given if a quota is not specified.\

curl -X POST --user admin:password --header "Content-Type: application/xml" \
--header "Accept: application/xml" -k  https://localhost/conductor/api/pool_families \
--data "<pool_family><name>family1name</name></pool_family>"

Response

Response showing unlimited quota.

<pool_family id="1" href="https://localhost/conductor/api/pool_families/1">
  <name>family1name</name>
  <quota maximum_running_instances='unlimited'></quota>
  <pools></pools>
  <provider_accounts></provider_accounts>
  <images></images>
</pool_family>

Request

An example where quota is specified. Here quota is set to a maximum of 100 running instances.\

curl -X POST --user admin:password --header "Content-Type: application/xml" \
--header "Accept: application/xml" -k  https://localhost/conductor/api/pool_families \
--data "<pool_family><name>family1name</name>
<quota maximum_running_instances='100'></quota></pool_family>" 

Response

Response showing the specified quota of 100.

<pool_family id="1" href="https://localhost/conductor/api/pool_families/1">
  <name>family1name</name>
  <quota maximum_running_instances='100'></quota>
  <pools></pools>
  <provider_accounts></provider_accounts>
  <images></images>
</pool_family>

List all pool families

Request

curl -X GET --user admin:password --header "Accept: application/xml" -k  https://localhost/conductor/api/pool_families

Response

<pool_families>
<pool_family href='https://localhost/conductor/api/pool_families/1' id='1'></pool_family>
<pool_family href='https://localhost/conductor/api/pool_families/3' id='3'></pool_family>
<pool_family href='https://localhost/conductor/api/pool_families/2' id='2'></pool_family>
</pool_families>

Show a single pool family’s details

Request

curl -X GET --user admin:password --header "Accept: application/xml" -k  https://localhost/conductor/api/pool_families/1

Response

<pool_family id="1" href="https://localhost/conductor/api/pool_families/1">
  <name>family1name</name>
  <quota maximum_running_instances='100'></quota>
  <pools>
    <pool id="1" href="https://localhost/conductor/api/pools/1"></pool>
    <pool id="2" href="https://localhost/conductor/api/pools/2"></pool>   
    <pool id="3" href="https://localhost/conductor/api/pools/3"></pool>
  </pools>
  <provider_accounts></provider_accounts>
  <images></images>
<pool_family>

Update a pool family

Request

curl -X PUT --user admin:password --header "Content-Type: application/xml" \
--header "Accept: application/xml" -k  https://localhost/conductor/api/pool_families/1 \
--data "<pool_family><name>updated-name</name>
<quota maximum_running_instances='200'></quota></pool_family>" 

Response

<pool_family id="1" href="https://localhost/conductor/api/pool_families/1">
  <name>updated-name</name>
  <quota maximum_running_instances='200'></quota>
  <pools>
    <pool id="1" href="https://localhost/conductor/api/pools/1"></pool>
    <pool id="2" href="https://localhost/conductor/api/pools/2"></pool>   
    <pool id="3" href="https://localhost/conductor/api/pools/3"></pool>
  </pools>
  <provider_accounts></provider_accounts>
  <images></images>
</pool_family>

Delete a pool family

Request

curl -X DELETE --user admin:password --header "Accept: application/xml" -k  https://localhost/conductor/api/pool_families/1

Response

If success,

<pool_family id="1">
 <status>DELETED</status>
</pool_family>

If failure,

<error>
  <codee>RecordNotFound</codee>
  <message>Couldn't find Pool Family with ID=1</message>
</error>

Map a provider account to pool family

Request

Associate provider account with id = 2 with pool family with id = 1.

curl -X PUT --user admin:password --header "Content-Type: application/xml"  --header "Accept: application/xml" \
-k  https://localhost/conductor/api/pool_families/1/provider_accounts/2 

Response

Returns status code 204 if successful.

Show provider accounts associated with a pool family

Request

curl -X PUT --user admin:password --header "Content-Type: application/xml"  --header "Accept: application/xml" \
-k  https://localhost/conductor/api/pool_families/1/provider_accounts

Response

  <provider_accounts>
    <provider_account id="2" href="https://localhost/conductor/api/provider_accounts/2"></provider_account>
  </provider_accounts>

Remove a provider account from pool family

Remove provider account with id = 2 from pool family with id = 1.

Request

curl -X DELETE --user admin:password --header "Content-Type: application/xml"  --header "Accept: application/xml" \
-k  https://localhost/conductor/api/pool_families/1/provider_accounts/2

Response

Returns status code of 204 if successful.

Clone this wiki locally