User Tools

Site Tools


promise:apis_b_release

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
promise:apis_b_release [2015/11/27 14:31]
Bertrand Souville
promise:apis_b_release [2016/02/01 11:06] (current)
Bertrand Souville
Line 5: Line 5:
  
 Request parameters Request parameters
-Parameters ​            Types            ​^ Description ​                                  ​^ ​          +Name                   Type             ^ Description ​                                  ​^ ​          
 | provider-type ​         | Enumeration ​     | Name of the resource provider ​                ​| ​ | provider-type ​         | Enumeration ​     | Name of the resource provider ​                ​| ​
 | endpoint ​              | URI              | Target URL endpoint for the resource provider |      | endpoint ​              | URI              | Target URL endpoint for the resource provider |     
Line 15: Line 15:
  
 Response parameters Response parameters
-Parameters ​            Types            ​^  Description ​                   ^       +Name                   Type             ^  Description ​                   ^       
 | provider-id ​           | String ​          | Id of the new resource provider | | provider-id ​           | String ​          | Id of the new resource provider |
 | result ​                | Enumeration ​     | Result info                     | | result ​                | Enumeration ​     | Result info                     |
Line 24: Line 24:
       "​provider-type":​ "​openstack",​       "​provider-type":​ "​openstack",​
       "​endpoint":​ "​http://​10.0.2.15:​5000/​v2.0/​tokens",​       "​endpoint":​ "​http://​10.0.2.15:​5000/​v2.0/​tokens",​
-      "​username":​ "admin",+      "​username":​ "promise_user",
       "​password":​ "​******",​       "​password":​ "​******",​
       "​tenant":​ {       "​tenant":​ {
-         "​id":​ "​0d36689a21e24a15a9c543ec8dd86510",​ +         "​name":​ "promise"
-         "​name":​ "admin"+
       }       }
     }     }
Line 35: Line 34:
  
     {     {
-      "​provider-id":​ "1bc96b9c-c316-4854-aa10-9d2bea35508f",+      "​provider-id":​ "f25ed9cb-de57-43d5-9b4a-a389a1397302",
       "​result":​ "​ok"​       "​result":​ "​ok"​
     }     }
Line 44: Line 43:
  
 Request parameters Request parameters
-Parameters ​            Types             ^ Description ​                                                   ^   +Name                   Type              ​^ Description ​                                                   ^   
 | zone                   | String ​           | Id to an availability zone                                      | | zone                   | String ​           | Id to an availability zone                                      |
 | start                  | DateTime ​         | Timestamp when the consumption of reserved resources can begin  | | start                  | DateTime ​         | Timestamp when the consumption of reserved resources can begin  |
Line 51: Line 50:
 | capacity.ram ​          | int32             | Amount of RAM to be reserved ​                                   | | capacity.ram ​          | int32             | Amount of RAM to be reserved ​                                   |
 | capacity.instances ​    | int16             | Amount of instances to be reserved ​                             | | capacity.instances ​    | int16             | Amount of instances to be reserved ​                             |
-| capacity.networks ​     | int16             | Amount of networks to be reserved ​                              | 
-| capacity.ports ​        | int16             | Amount of ports to be reserved ​                                 | 
-| capacity.routers ​      | int16             | Amount of routers to be reserved ​                               | 
-| capacity.subnets ​      | int16             | Amount of subnets to be reserved ​                               | 
 | capacity.addresses ​    | int32             | Amount of public IP addresses to be reserved ​                   | | capacity.addresses ​    | int32             | Amount of public IP addresses to be reserved ​                   |
-| capacity.gigabytes ​    | int32             | Amount of gigabytes to be reserved ​                             | 
-| capacity.snapshots ​    | int16             | Amount of snapshots to be reserved ​                             | 
-| capacity.volumes ​      | int16             | Amount of volumes to be reserved ​                               | 
 | elements ​              | ResourceElement ​  | List of pre-existing resource elements to be reserved ​          | | elements ​              | ResourceElement ​  | List of pre-existing resource elements to be reserved ​          |
  
 Response parameters Response parameters
-Parameters ​            Types             ^ Description ​          ​^ ​      +Name                   Type              ​^ Description ​          ​^ ​      
 | reservation-id ​        | String ​           | Id of the reservation | | reservation-id ​        | String ​           | Id of the reservation |
 | result ​                | Enumeration ​      | Result info           | | result ​                | Enumeration ​      | Result info           |
Line 72: Line 64:
        "​capacity":​ {        "​capacity":​ {
           "​cores":​ "​5",​           "​cores":​ "​5",​
-          "​ram": ​+          "​ram":​ "25600",
-          ​"instances": 0 +
-          "​networks":​ 0, +
-          "​ports":​ 0, +
-          "​routers":​ 0, +
-          "​subnets":​ 0,+
           "​addresses":​ "​3",​           "​addresses":​ "​3",​
-          "gigabytes": "10, +          "instances": "3"
-          ​"snapshots":​ 0, +
-          "​volumes":​ 0+
       },       },
-      "elements": ​[]+      "start": ​"​2016-02-02T00:​00:​00Z",​ 
 +      "​end":​ "​2016-02-03T00:​00:​00Z"​
     }     }
     ​     ​
Line 89: Line 75:
  
     {     {
-       "​reservation-id":​ "f6f7d56a-4740-48fe-b197-42a7001beb95",+       "​reservation-id":​ "269b2944-9efc-41e0-b067-6898221e8619",
        "​result":​ "​ok",​        "​result":​ "​ok",​
        "​message":​ "​reservation request accepted"​        "​message":​ "​reservation request accepted"​
Line 99: Line 85:
  
 Request parameters Request parameters
-Parameters ​        Types           ^ Description ​                                                           ^+Name               Type            ​^ Description ​                                                           ^
 | reservation-id ​    | String ​         | Id of the reservation to be updated ​                                    | | reservation-id ​    | String ​         | Id of the reservation to be updated ​                                    |
 | zone               | String ​         | Id to an availability zone                                              | | zone               | String ​         | Id to an availability zone                                              |
Line 107: Line 93:
 | capacity.ram ​      | int32           | Updated amount of RAM to be reserved ​                                   | | capacity.ram ​      | int32           | Updated amount of RAM to be reserved ​                                   |
 | capacity.instances | int16           | Updated amount of instances to be reserved ​                             | | capacity.instances | int16           | Updated amount of instances to be reserved ​                             |
-| capacity.networks ​ | int16           | Updated amount of networks to be reserved ​                              | 
-| capacity.ports ​    | int16           | Updated amount of ports to be reserved ​                                 | 
-| capacity.routers ​  | int16           | Updated amount of routers to be reserved ​                               | 
-| capacity.subnets ​  | int16           | Updated amount of subnets to be reserved ​                               | 
 | capacity.addresses | int32           | Updated amount of public IP addresses to be reserved ​                   | | capacity.addresses | int32           | Updated amount of public IP addresses to be reserved ​                   |
-| capacity.gigabytes | int32           | Updated amount of gigabytes to be reserved ​                             | 
-| capacity.snapshots | int16           | Updated amount of snapshots to be reserved ​                             | 
-| capacity.volumes ​  | int16           | Updated amount of volumes to be reserved ​                               | 
 | elements ​          | ResourceElement | Updated list of pre-existing resource elements to be reserved ​          | | elements ​          | ResourceElement | Updated list of pre-existing resource elements to be reserved ​          |
  
 Response parameters Response parameters
-Parameters ​            Types             ^ Description ​   ^       +Name                   Type              ​^ Description ​   ^       
 | result ​                | Enumeration ​      | Result info    | | result ​                | Enumeration ​      | Result info    |
 | message ​               | String ​           | Output message | | message ​               | String ​           | Output message |
Line 126: Line 105:
  
     {     {
-       "​reservation-id":​ "f6f7d56a-4740-48fe-b197-42a7001beb95",​ +       "​reservation-id":​ "269b2944-9efv-41e0-b067-6898221e8619",
-       "​end":​ "​2015-12-24T11:​37:​55.329Z",+
        "​capacity":​ {        "​capacity":​ {
-          "​cores":​ "3", +          "​cores":​ "1", 
-          ​... +          ​"​ram":​ "​5120",​ 
-       }+          "​addresses":​ "​1"​
-       ​"elements": ​[] +          "instances": ​"​1"​ 
 +       }
     }     }
     ​     ​
Line 147: Line 126:
  
 Request parameters Request parameters
-Parameters ​            Types             ^ Description ​                         ^+Name                   Type              ​^ Description ​                         ^
 | reservation-id ​        | String ​           | Id of the reservation to be canceled | | reservation-id ​        | String ​           | Id of the reservation to be canceled |
  
 Response parameters Response parameters
-Parameters ​            Types             ^ Description ​   ^       +Name                   Type              ​^ Description ​   ^       
 | result ​                | Enumeration ​      | Result info    | | result ​                | Enumeration ​      | Result info    |
 | message ​               | String ​           | Output message | | message ​               | String ​           | Output message |
Line 159: Line 138:
        
     {     {
-       "​reservation-id":​ "f6f7d56a-4740-48fe-b197-42a7001beb95"+      ​"​reservation-id":​ "269b2944-9efv-41e0-b067-6898221e8619"
     }     }
        
Line 174: Line 153:
  
 Request parameters Request parameters
-Parameters ​      Types              ​^ Description ​                                                         ^+Name             Type               ^ Description ​                                                         ^
 | zone             | String ​            | Id to an availability zone                                           | | zone             | String ​            | Id to an availability zone                                           |
 | show-utilization | Boolean ​           | Show capacity utilization ​                                           | | show-utilization | Boolean ​           | Show capacity utilization ​                                           |
Line 185: Line 164:
  
 Response parameters Response parameters
-Parameters ​            Types               ^ Description ​                   ^ +Name                   Type                ​^ Description ​                   ^ 
 | reservations ​          | ResourceReservation | List of matching reservations ​ | | reservations ​          | ResourceReservation | List of matching reservations ​ |
 | utilization ​           | CapacityUtilization | Capacity utilization over time | | utilization ​           | CapacityUtilization | Capacity utilization over time |
Line 194: Line 173:
    {    {
      "​show-utilization":​ false,      "​show-utilization":​ false,
-     "​without":​ [], 
-     "​elements":​ { 
-       "​some":​ [], 
-       "​every":​ [] 
-     }, 
      "​window":​ {      "​window":​ {
-        "​start":​ "2015-12-23T12:04:31.509Z", +        "​start":​ "2016-02-01T00:00:00Z", 
-        "scope": "inclusive"+        "end": "2016-02-04T00:​00:​00Z"
      }      }
    }    }
Line 210: Line 184:
     {     {
        "​reservations":​ [        "​reservations":​ [
-         "​f6f7d56a-4740-48fe-b197-42a7001beb95",​ +         "​269b2944-9efv-41e0-b067-6898221e8619"
-         "​e3ed0f9f-27b5-4b61-91cc-f4d541bcbadf"+
        ],        ],
        "​utilization":​ []        "​utilization":​ []
     }     }
     ​     ​
-**6. Create Instance ​(WIP)**+**6. Create Instance**
  
 Create an instance of specified resource(s) utilizing capacity from the pool. Create an instance of specified resource(s) utilizing capacity from the pool.
  
-**7. Destroy Instance ​(WIP)**+Request parameters 
 +^ Name             ^ Type      ^ Description ​                   ^ 
 +| provider-id ​     | String ​   | Id of the resource provider ​   | 
 +| reservation-id ​  | String ​   | Id of the resource reservation | 
 +| name             | String ​   | Name of the instance ​          | 
 +| image            | String ​   | Id of the image                | 
 +| networks ​        | Uuid      | List of network uuids          | 
 + 
 +Response parameters 
 +^ Name             ^ Type        ^ Description ​                   ^ 
 +| instance-id ​     | String ​     | Id of the instance ​            | 
 +| result ​          | Enumeration | Result info                    | 
 +| message ​         | String ​     | Output message ​                | 
 + 
 +**Example request**  
 +    
 +   { 
 +     "​provider-id":​ "​f25ed9cb-de57-43d5-9b4a-a389a1397302",​ 
 +     "​name":​ "​vm1",​ 
 +     "​image":​ "​ddffc6f5-5c86-4126-b0fb-2c71678633f8",​ 
 +     "​flavor":​ "​91bfdf57-863b-4b73-9d93-fc311894b902"​ 
 +   } 
 + 
 +**Example response** 
 + 
 +    { 
 +       "​instance-id":​ "​82572779-896b-493f-92f6-a63008868250",​ 
 +       "​result":​ "​ok",​ 
 +       "​message":​ "​created-instance request accepted"​ 
 +    } 
 + 
 +**7. Destroy Instance**
  
 Destroy an instance of resource utilization and release it back to the pool. Destroy an instance of resource utilization and release it back to the pool.
 +
 +Request parameters
 +^ Name             ^ Type      ^ Description ​                        ^
 +| instance-id ​     | String ​   | Id of the instance to be destroyed ​ |
 +
 +Response parameters
 +
 +^ Name             ^ Type        ^ Description ​                   ^
 +| result ​          | Enumeration | Result info                    |
 +| message ​         | String ​     | Output message ​                |
 +
 +**Example request** ​
 +   
 +   {
 +     "​instance-id":​ "​82572779-896b-493f-92f6-a63008868250"​
 +   }
 +
 +**Example response**
 +
 +    {
 +       "​result":​ "​ok",​
 +       "​message":​ "​instance destroyed and resource released back to pool"
 +    }
  
 **8. Decrease Capacity** **8. Decrease Capacity**
Line 229: Line 256:
  
 Request parameters Request parameters
-Parameters ​        Types            ​^ Description ​                                                       ^+Name               Type             ^ Description ​                                                       ^
 | source ​            | String ​          | Id of the resource container ​                                      | | source ​            | String ​          | Id of the resource container ​                                      |
 | start              | DateTime ​        | start/end defines the time window when total capacity is decreased | | start              | DateTime ​        | start/end defines the time window when total capacity is decreased |
Line 236: Line 263:
 | capacity.ram ​      | int32            | Decreased amount of RAM                                            | | capacity.ram ​      | int32            | Decreased amount of RAM                                            |
 | capacity.instances | int16            | Decreased amount of instances ​                                     | | capacity.instances | int16            | Decreased amount of instances ​                                     |
-| capacity.networks ​ | int16            | Decreased amount of networks ​                                      | 
-| capacity.ports ​    | int16            | Decreased amount of ports                                          | 
-| capacity.routers ​  | int16            | Decreased amount of routers ​                                       | 
-| capacity.subnets ​  | int16            | Decreased amount of subnets ​                                       | 
 | capacity.addresses | int32            | Decreased amount of public IP addresses ​                           | | capacity.addresses | int32            | Decreased amount of public IP addresses ​                           |
-| capacity.gigabytes | int32            | Decreased amount of gigabytes ​                                     | 
-| capacity.snapshots | int16            | Decreased amount of snapshots ​                                     | 
-| capacity.volumes ​  | int16            | Decreased amount of volumes ​                                       | 
-| elements ​          | ResourceElement ​ |                                                                    | 
  
  
 Response parameters Response parameters
-Parameters ​            Types               ^ Description ​             ^ +Name                   Type                ​^ Description ​             ^ 
 | pool-id ​               | String ​             | Id of the resource pool  | | pool-id ​               | String ​             | Id of the resource pool  |
 | result ​                | Enumeration ​        | Result info              | | result ​                | Enumeration ​        | Result info              |
Line 257: Line 276:
        
    {    {
-     "​source":​ "​ResourcePool:​6bb6ba9e-f577-4ade-b15e-4d11395fca3d",+     "​source":​ "​ResourcePool:​4085f0da-8030-4252-a0ff-c6f93870eb5f",
      "​capacity":​ {      "​capacity":​ {
           "​cores":​ "​3",​           "​cores":​ "​3",​
-          ​... +          ​"​ram":​ "​5120"​
-      }+          "addresses": ​"​1"​ 
-      "elements": ​[] +      }
    }    }
  
Line 269: Line 288:
  
     {     {
-       "​pool-id":​ "4085f0da-8030-4252-a0ff-c6f93870eb5f",+       "​pool-id":​ "c63b2a41-bcc6-42f6-8254-89d633e1bd0b",
        "​result":​ "​ok",​        "​result":​ "​ok",​
        "​message":​ "​capacity decrease successful"​        "​message":​ "​capacity decrease successful"​
Line 280: Line 299:
  
 Request parameters Request parameters
-Parameters ​         ​Types           ^ Description ​                                                       ^+Name                ​Type            ​^ Description ​                                                       ^
 | source ​             | String ​         | Id of the resource container ​                                      | | source ​             | String ​         | Id of the resource container ​                                      |
 | start               | DateTime ​       | start/end defines the time window when total capacity is increased | | start               | DateTime ​       | start/end defines the time window when total capacity is increased |
Line 287: Line 306:
 | capacity.ram ​       | int32           | Increased amount of RAM                                            | | capacity.ram ​       | int32           | Increased amount of RAM                                            |
 | capacity.instances ​ | int16           | Increased amount of instances ​                                     | | capacity.instances ​ | int16           | Increased amount of instances ​                                     |
-| capacity.networks ​  | int16           | Increased amount of networks ​                                      | 
-| capacity.ports ​     | int16           | Increased amount of ports                                          | 
-| capacity.routers ​   | int16           | Increased amount of routers ​                                       | 
-| capacity.subnets ​   | int16           | Increased amount of subnets ​                                       | 
 | capacity.addresses ​ | int32           | Increased amount of public IP addresses ​                           | | capacity.addresses ​ | int32           | Increased amount of public IP addresses ​                           |
-| capacity.gigabytes ​ | int32           | Increased amount of gigabytes ​                                     | 
-| capacity.snapshots ​ | int16           | Increased amount of snapshots ​                                     | 
-| capacity.volumes ​   | int16           | Increased amount of volumes ​                                       | 
-| elements ​           | ResourceElement |                                                                    | 
  
 Response parameters Response parameters
-Parameters ​            Types               ^ Description ​             ^ +Name                   Type                ​^ Description ​             ^ 
 | pool-id ​               | String ​             | Id of the resource pool  | | pool-id ​               | String ​             | Id of the resource pool  |
 | result ​                | Enumeration ​        | Result info              | | result ​                | Enumeration ​        | Result info              |
Line 307: Line 318:
        
    {    {
-     "​source":​ "ResourcePool:4085f0da-8030-4252-a0ff-c6f93870eb5f",+     "​source":​ "ResourceProvider:f6f13fe3-0126-4c6d-a84f-15f1ab685c4f",
      "​capacity":​ {      "​capacity":​ {
-          "​cores":​ "3", +          "​cores":​ "20", 
-          ​... +          ​"​ram":​ "​51200",​ 
-      }+          "​instances":​ "​10"​
-      "elements": ​[] +          "addresses": ​"​10"​ 
 +      }
    }    }
  
Line 319: Line 331:
  
     {     {
-       "​pool-id":​ "49d2b4f1-823c-4932-88ee-5f38839dc543",+       "​pool-id":​ "279217a4-7461-4176-bf9d-66770574ca6a",
        "​result":​ "​ok",​        "​result":​ "​ok",​
        "​message":​ "​capacity increase successful"​        "​message":​ "​capacity increase successful"​
Line 330: Line 342:
  
 Request parameters Request parameters
-Parameters ​      Types              ​^ Description ​                                                         ^+Name             Type               ^ Description ​                                                         ^
 | capacity ​        | Enumeration ​       | Return total or reserved or available or usage capacity information ​ | | capacity ​        | Enumeration ​       | Return total or reserved or available or usage capacity information ​ |
 | zone             | String ​            | Id to an availability zone                                           | | zone             | String ​            | Id to an availability zone                                           |
Line 342: Line 354:
  
 Response parameters Response parameters
-Parameters ​            Types               ^ Description ​                   ^ +Name                   Type                ​^ Description ​                   ^ 
 | collections ​           | ResourceCollection ​ | List of matching collections ​  | | collections ​           | ResourceCollection ​ | List of matching collections ​  |
 | utilization ​           | CapacityUtilization | Capacity utilization over time | | utilization ​           | CapacityUtilization | Capacity utilization over time |
Line 350: Line 362:
        
    {    {
-     "​capacity":​ "​available",​ +     "​show-utilization":​ false
-     "​show-utilization":​ false+
-     "​without":​ [], +
-     "​elements":​ { +
-       "​some":​ [], +
-       "​every":​ [] +
-     }, +
-     "​window":​ { +
-        "​scope":​ "​inclusive"​ +
-     }+
    }    }
  
Line 367: Line 370:
     {     {
        "​collections":​ [        "​collections":​ [
-         "​ResourcePool:​6bb6ba9e-f577-4ade-b15e-4d11395fca3d",​ +         "​ResourcePool:​279217a4-7461-4176-bf9d-66770574ca6a"
-         "​ResourcePool:​4085f0da-8030-4252-a0ff-c6f93870eb5f",​ +
-         "​ResourcePool:​49d2b4f1-823c-4932-88ee-5f38839dc543"+
        ],        ],
        "​utilization":​ []        "​utilization":​ []
     }     }
   ​   ​
promise/apis_b_release.1448634709.txt.gz · Last modified: 2015/11/27 14:31 by Bertrand Souville