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 [2016/01/11 16:23]
Bertrand Souville
promise:apis_b_release [2016/02/01 11:06] (current)
Bertrand Souville
Line 65: Line 65:
           "​cores":​ "​5",​           "​cores":​ "​5",​
           "​ram":​ "​25600",​           "​ram":​ "​25600",​
-          "​addresses":​ "​3"​+          "​addresses": "​3",​ 
 +          "​instances": "​3"​
       },       },
       "​start":​ "​2016-02-02T00:​00:​00Z",​       "​start":​ "​2016-02-02T00:​00:​00Z",​
Line 108: Line 109:
           "​cores":​ "​1",​           "​cores":​ "​1",​
           "​ram":​ "​5120",​           "​ram":​ "​5120",​
-          "​addresses":​ "​1"​+          "​addresses": "​1",​ 
 +          "​instances": "​1"​
        }        }
     }     }
Line 187: Line 189:
     }     }
     ​     ​
-**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 262: Line 318:
        
    {    {
-     "​source":​ "ResourcePool:4085f0da-8030-4252-a0ff-c6f93870eb5f",+     "​source":​ "ResourceProvider:f6f13fe3-0126-4c6d-a84f-15f1ab685c4f",
      "​capacity":​ {      "​capacity":​ {
           "​cores":​ "​20",​           "​cores":​ "​20",​
promise/apis_b_release.1452529419.txt.gz · Last modified: 2016/01/11 16:23 by Bertrand Souville