summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorJosh Kearney <josh.kearney@rackspace.com>2011-02-17 10:50:49 -0600
committerJosh Kearney <josh.kearney@rackspace.com>2011-02-17 10:50:49 -0600
commit9d056b6fadcefed9ef9573bd89125b00af5e2726 (patch)
tree1b10c663479f5bf5d4b828d4b835ee46408ee15b /nova/api
parent434b0f9c3998e4849f8576266051e672406a3f78 (diff)
More testing
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/__init__.py1
-rw-r--r--nova/api/openstack/flavors.py14
2 files changed, 13 insertions, 2 deletions
diff --git a/nova/api/openstack/__init__.py b/nova/api/openstack/__init__.py
index 056c7dd27..1fafebe37 100644
--- a/nova/api/openstack/__init__.py
+++ b/nova/api/openstack/__init__.py
@@ -73,6 +73,7 @@ class APIRouter(wsgi.Router):
server_members = {'action': 'POST'}
if FLAGS.allow_admin_api:
LOG.debug(_("Including admin operations in API."))
+
server_members['pause'] = 'POST'
server_members['unpause'] = 'POST'
server_members["diagnostics"] = "GET"
diff --git a/nova/api/openstack/flavors.py b/nova/api/openstack/flavors.py
index 215f0b8a6..a3a664506 100644
--- a/nova/api/openstack/flavors.py
+++ b/nova/api/openstack/flavors.py
@@ -58,11 +58,21 @@ class Controller(wsgi.Controller):
def create(self, req):
"""Create a flavor."""
+ instance_types.create(
+ name,
+ memory,
+ vcpus,
+ local_gb,
+ flavor_id,
+ swap,
+ rxtx_quota,
+ rxtx_cap)
print "CREATE! %s" % req
- def delete(self, req, id):
+ def delete(self, req, name):
"""Delete a flavor."""
- print "DELETE! %s %s" % (req, id)
+ instance_type.destroy(name)
+ print "DELETE! %s %s" % (req, name)
def _all_ids(self):
"""Return the list of all flavorids."""