Skip to content

Instantly share code, notes, and snippets.

@Kami
Created July 1, 2012 19:21
Show Gist options
  • Select an option

  • Save Kami/3029308 to your computer and use it in GitHub Desktop.

Select an option

Save Kami/3029308 to your computer and use it in GitHub Desktop.
Example responses for supported method and arguments discovery endpoints
GET /<api version>/compute/providers/<provider>
{
"name": "Rackspace",
"website": "http://www.rackspacecloud.com",
"supported_methods": {
"list_nodes": {
"name": "list_nodes",
"description": "Return a list of available nodes",
"arguments": []
},
"destroy_node": {
"name": "destroy_node",
"description": "Delete a node.",
"arguments": [
{
"name": "node_id",
"description": "Node ID",
"type": "string",
"required": true
}
]
},
"create_node": {
"name": "create_node",
"description": "Create a node.",
"arguments": [
{
"name": "name",
"description": "Node name",
"type": "string",
"required": true
},
{
"name": "image_id",
"description": "ID of the image which should be used",
"type": "string",
"required": true
},
{
"name": "size_id",
"description": "ID of the size which should be used",
"type": "string",
"required": true
},
{
"name": "location_id",
"description": "ID of the location which should be used",
"type": "string",
"required": false
},
{
"name": "ex_metadata",
"description": "Key/Value metadata to associate with a node",
"type": "dict",
"required": false
}
]
}
}
}
GET /<api version>/compute/providers/<provider>/supported_methods
{
"list_nodes": {
"name": "list_nodes",
"description": "Return a list of available nodes",
"arguments": []
},
"destroy_node": {
"name": "destroy_node",
"description": "Delete a node.",
"arguments": [
{
"name": "node_id",
"description": "Node ID",
"type": "string",
"required": true
}
]
},
"create_node": {
"name": "create_node",
"description": "Create a node.",
"arguments": [
{
"name": "name",
"description": "Node name",
"type": "string",
"required": true
},
{
"name": "image_id",
"description": "ID of the image which should be used",
"type": "string",
"required": true
},
{
"name": "size_id",
"description": "ID of the size which should be used",
"type": "string",
"required": true
},
{
"name": "location_id",
"description": "ID of the location which should be used",
"type": "string",
"required": false
},
{
"name": "ex_metadata",
"description": "Key/Value metadata to associate with a node",
"type": "dict",
"required": false
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment