-
Notifications
You must be signed in to change notification settings - Fork 27
Pool Families
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>family1name</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>
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>
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>
<pool_family>
Pools are read-only and changing them results in an error.
Provider accounts can be added to and removed from the pool family through the provider_accounts field.
In the example below, we change the pool family’s name, quota, and provider accounts.
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>
<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_account id='1' href='https://localhost/conductor/api/provider_accounts/1'></pool>
</provider_accounts>
</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_account id='1' href='https://localhost/conductor/api/provider_accounts/1'></pool>
</provider_accounts>
<images></images>
</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>