Cells: Add cells API extension
Enables cells-related functionality such as adding neighbor cells, listing neighbor cells, and showing the capabilities of the local cell. Implements blueprint nova-compute-cells DocImpact Change-Id: Iacc1e68721a7867aeaf233903cbe6d18f09ad96e
This commit is contained in:
@@ -1056,11 +1056,11 @@ class CellCommands(object):
|
||||
ctxt = context.get_admin_context()
|
||||
db.cell_create(ctxt, values)
|
||||
|
||||
@args('--cell_id', dest='cell_id', metavar='<cell_id>',
|
||||
help='ID of the cell to delete')
|
||||
def delete(self, cell_id):
|
||||
@args('--cell_name', dest='cell_name', metavar='<cell_name>',
|
||||
help='Name of the cell to delete')
|
||||
def delete(self, cell_name):
|
||||
ctxt = context.get_admin_context()
|
||||
db.cell_delete(ctxt, cell_id)
|
||||
db.cell_delete(ctxt, cell_name)
|
||||
|
||||
def list(self):
|
||||
ctxt = context.get_admin_context()
|
||||
|
@@ -88,6 +88,14 @@
|
||||
"namespace": "http://docs.openstack.org/compute/ext/availabilityzone/api/v1.1",
|
||||
"updated": "2012-08-09T00:00:00+00:00"
|
||||
},
|
||||
{
|
||||
"alias": "os-cells",
|
||||
"description": "Enables cells-related functionality such as adding neighbor cells,\n listing neighbor cells, and getting the capabilities of the local cell.\n ",
|
||||
"links": [],
|
||||
"name": "Cells",
|
||||
"namespace": "http://docs.openstack.org/compute/ext/cells/api/v1.1",
|
||||
"updated": "2011-09-21T00:00:00+00:00"
|
||||
},
|
||||
{
|
||||
"alias": "os-certificates",
|
||||
"description": "Certificates support.",
|
||||
|
@@ -37,6 +37,12 @@
|
||||
<extension alias="os-availability-zone" updated="2012-08-09T00:00:00+00:00" namespace="http://docs.openstack.org/compute/ext/availabilityzone/api/v1.1" name="AvailabilityZone">
|
||||
<description>Add availability_zone to the Create Server v1.1 API.</description>
|
||||
</extension>
|
||||
<extension alias="os-cells" updated="2011-09-21T00:00:00+00:00" namespace="http://docs.openstack.org/compute/ext/cells/api/v1.1" name="Cells">
|
||||
<description>Enables cells-related functionality such as adding child cells,
|
||||
listing child cells, getting the capabilities of the local cell,
|
||||
and returning build plans to parent cells' schedulers
|
||||
</description>
|
||||
</extension>
|
||||
<extension alias="os-certificates" updated="2012-01-19T00:00:00+00:00" namespace="http://docs.openstack.org/compute/ext/certificates/api/v1.1" name="Certificates">
|
||||
<description>Certificates support.</description>
|
||||
</extension>
|
||||
|
9
doc/api_samples/os-cells/cells-get-resp.json
Normal file
9
doc/api_samples/os-cells/cells-get-resp.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"cell": {
|
||||
"name": "cell3",
|
||||
"rpc_host": null,
|
||||
"rpc_port": null,
|
||||
"type": "child",
|
||||
"username": "username3"
|
||||
}
|
||||
}
|
2
doc/api_samples/os-cells/cells-get-resp.xml
Normal file
2
doc/api_samples/os-cells/cells-get-resp.xml
Normal file
@@ -0,0 +1,2 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<cell xmlns="http://docs.rackspacecloud.com/servers/api/v1.0" username="username3" rpc_host="None" type="child" name="cell3" rpc_port="None"/>
|
3
doc/api_samples/os-cells/cells-list-empty-resp.json
Normal file
3
doc/api_samples/os-cells/cells-list-empty-resp.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"cells": []
|
||||
}
|
2
doc/api_samples/os-cells/cells-list-empty-resp.xml
Normal file
2
doc/api_samples/os-cells/cells-list-empty-resp.xml
Normal file
@@ -0,0 +1,2 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<cells xmlns="http://docs.rackspacecloud.com/servers/api/v1.0"/>
|
39
doc/api_samples/os-cells/cells-list-resp.json
Normal file
39
doc/api_samples/os-cells/cells-list-resp.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"name": "cell1",
|
||||
"rpc_host": null,
|
||||
"rpc_port": null,
|
||||
"type": "child",
|
||||
"username": "username1"
|
||||
},
|
||||
{
|
||||
"name": "cell3",
|
||||
"rpc_host": null,
|
||||
"rpc_port": null,
|
||||
"type": "child",
|
||||
"username": "username3"
|
||||
},
|
||||
{
|
||||
"name": "cell5",
|
||||
"rpc_host": null,
|
||||
"rpc_port": null,
|
||||
"type": "child",
|
||||
"username": "username5"
|
||||
},
|
||||
{
|
||||
"name": "cell2",
|
||||
"rpc_host": null,
|
||||
"rpc_port": null,
|
||||
"type": "parent",
|
||||
"username": "username2"
|
||||
},
|
||||
{
|
||||
"name": "cell4",
|
||||
"rpc_host": null,
|
||||
"rpc_port": null,
|
||||
"type": "parent",
|
||||
"username": "username4"
|
||||
}
|
||||
]
|
||||
}
|
8
doc/api_samples/os-cells/cells-list-resp.xml
Normal file
8
doc/api_samples/os-cells/cells-list-resp.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<cells xmlns="http://docs.rackspacecloud.com/servers/api/v1.0">
|
||||
<cell username="username1" rpc_host="None" type="child" name="cell1" rpc_port="None"/>
|
||||
<cell username="username3" rpc_host="None" type="child" name="cell3" rpc_port="None"/>
|
||||
<cell username="username5" rpc_host="None" type="child" name="cell5" rpc_port="None"/>
|
||||
<cell username="username2" rpc_host="None" type="parent" name="cell2" rpc_port="None"/>
|
||||
<cell username="username4" rpc_host="None" type="parent" name="cell4" rpc_port="None"/>
|
||||
</cells>
|
@@ -24,6 +24,11 @@
|
||||
"host_name": "6e48bfe1a3304b7b86154326328750ae",
|
||||
"service": "conductor",
|
||||
"zone": "internal"
|
||||
},
|
||||
{
|
||||
"host_name": "39f55087a1024d1380755951c945ca69",
|
||||
"service": "cells",
|
||||
"zone": "internal"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -5,4 +5,5 @@
|
||||
<host host_name="2d1bdd671b5d41fd89dec74be5770c63" service="network"/>
|
||||
<host host_name="7c2dd5ecb7494dd1bf4240b7f7f9bf3a" service="scheduler"/>
|
||||
<host host_name="f9c273d8e03141a2a01def0ad18e5be4" service="conductor"/>
|
||||
</hosts>
|
||||
<host host_name="2b893569cd824b979bd80a2c94570a1f" service="cells"/>
|
||||
</hosts>
|
||||
|
@@ -768,7 +768,7 @@ class FlavorAccessNotFound(NotFound):
|
||||
|
||||
|
||||
class CellNotFound(NotFound):
|
||||
message = _("Cell %(cell_id)s could not be found.")
|
||||
message = _("Cell %(cell_name)s doesn't exist.")
|
||||
|
||||
|
||||
class CellRoutingInconsistency(NovaException):
|
||||
|
Reference in New Issue
Block a user