summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorSandy Walsh <sandy.walsh@rackspace.com>2011-06-01 11:52:33 -0700
committerSandy Walsh <sandy.walsh@rackspace.com>2011-06-01 11:52:33 -0700
commit3bf3255f91aab28aa6915a2836dad77f17312e03 (patch)
tree2604f803c75a98d01ded6997e3e570815433be03 /nova/api
parentdb68508e1468e9d2d3469f2ea6a9ec577d1190bc (diff)
downloadnova-3bf3255f91aab28aa6915a2836dad77f17312e03.tar.gz
nova-3bf3255f91aab28aa6915a2836dad77f17312e03.tar.xz
nova-3bf3255f91aab28aa6915a2836dad77f17312e03.zip
basic reservation id support to GET /servers
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/servers.py34
-rw-r--r--nova/api/openstack/zones.py1
2 files changed, 5 insertions, 30 deletions
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py
index 67b3fd23f..2bfcbac81 100644
--- a/nova/api/openstack/servers.py
+++ b/nova/api/openstack/servers.py
@@ -87,7 +87,11 @@ class Controller(controller.OpenstackCreateInstanceController):
builder - the response model builder
"""
- instance_list = self.compute_api.get_all(req.environ['nova.context'])
+ reservation_id = req.str_GET.get('reservation_id')
+ LOG.exception(_(" ************* RESERVATION ID %s"), reservation_id)
+ instance_list = self.compute_api.get_all(
+ req.environ['nova.context'],
+ reservation_id=reservation_id)
limited_list = self._limit_items(instance_list, req)
builder = self._get_view_builder(req)
servers = [builder.build(inst, is_detail)['server']
@@ -132,34 +136,6 @@ class Controller(controller.OpenstackCreateInstanceController):
server['server']['adminPass'] = extra_values['password']
return server
- def _get_injected_files(self, personality):
- """
- Create a list of injected files from the personality attribute
-
- At this time, injected_files must be formatted as a list of
- (file_path, file_content) pairs for compatibility with the
- underlying compute service.
- """
- injected_files = []
-
- for item in personality:
- try:
- path = item['path']
- contents = item['contents']
- except KeyError as key:
- expl = _('Bad personality format: missing %s') % key
- raise exc.HTTPBadRequest(explanation=expl)
- except TypeError:
- expl = _('Bad personality format')
- raise exc.HTTPBadRequest(explanation=expl)
- try:
- contents = base64.b64decode(contents)
- except TypeError:
- expl = _('Personality content for %s cannot be decoded') % path
- raise exc.HTTPBadRequest(explanation=expl)
- injected_files.append((path, contents))
- return injected_files
-
@scheduler_api.redirect_handler
def update(self, req, id):
""" Updates the server name or password """
diff --git a/nova/api/openstack/zones.py b/nova/api/openstack/zones.py
index 687978b08..acd01a1ff 100644
--- a/nova/api/openstack/zones.py
+++ b/nova/api/openstack/zones.py
@@ -129,7 +129,6 @@ class Controller(controller.OpenstackCreateInstanceController):
Returns a reservation ID (a UUID).
"""
- print "************** IN ZONE BOOT"
extra_values, result = \
self.create_instance(req, self.compute_api.create_all_at_once)
if extra_values is None: