Implement initial draft of a Pecan-based API.

This commit is contained in:
Devananda van der Veen 2013-05-06 20:07:49 -07:00
parent 1997c3ade7
commit f07ce83226
5 changed files with 41 additions and 5 deletions

28
ironic/doc/api/v1.rst Normal file
View File

@ -0,0 +1,28 @@
GET / - information about this API
GET /node - list all nodes
GET /node/<id> - get node info
POST /node - insert a new node
DELETE /node/<id> - delete a node (and any associated interfaces)
GET /iface - list all interfaces
GET /iface/<id> - information about the interface
GET /iface/node/<id> - list interfaces for this node
POST /iface - insert a new interface
DELETE /iface/<id> - delete an interface
GET /node/image/<id> - get deployment driver info
PUT /node/image/<id> - set deployment driver info
GET /node/image/pxe/<id> - get PXE info
PUT /node/image/pxe/<id> - set PXE info
GET /node/power/<id> - get power driver info
PUT /node/power/<id> - set power driver info
GET /node/power/ipmi/<id> - get IPMI info (sanitised pw)
PUT /node/power/ipmi/<id> - set IPMI info
GET /node/power/state/<id> - get the power state
PUT /node/power/state/<id> - set the power state
GET /find/node - search for node based on query string
GET /find/iface - search for iface based on query string

View File

@ -297,5 +297,11 @@ def _get_impl():
"""Delay import of rpc_backend until configuration is loaded."""
global _RPCIMPL
if _RPCIMPL is None:
_RPCIMPL = importutils.import_module(CONF.rpc_backend)
try:
_RPCIMPL = importutils.import_module(CONF.rpc_backend)
except ImportError:
# For backwards compatibility with older nova config.
impl = CONF.rpc_backend.replace('nova.rpc',
'nova.openstack.common.rpc')
_RPCIMPL = importutils.import_module(impl)
return _RPCIMPL

View File

@ -1,6 +1,4 @@
[DEFAULT]
# The list of modules to copy from oslo-incubator.git
module=cliutils
module=context
module=db

View File

@ -22,6 +22,7 @@ pyasn1
Babel>=0.9.6
iso8601>=0.1.4
httplib2
setuptools_git>=0.4
python-cinderclient>=1.0.1
python-quantumclient>=2.2.0,<3.0.0
python-glanceclient>=0.5.0,<2
@ -29,3 +30,6 @@ python-keystoneclient>=0.2.0
stevedore>=0.7
websockify<0.4
oslo.config>=1.1.0
Flask==0.9
pecan>=0.2.0
wsme>=0.5b1

View File

@ -28,8 +28,8 @@ packages =
[entry_points]
console_scripts =
ironic-baremetal-deploy-helper = ironic.cmd.baremetal_deploy_helper:main
ironic-baremetal-manage = ironic.cmd.baremetal_manage:main
ironic-api = ironic.cmd.api:main
ironic-manager = ironic.cmd.manager:main
[build_sphinx]
all_files = 1