diff options
| author | Ken Pepple <ken.pepple@gmail.com> | 2011-02-03 17:57:46 -0800 |
|---|---|---|
| committer | Ken Pepple <ken.pepple@gmail.com> | 2011-02-03 17:57:46 -0800 |
| commit | 9be0770208b0e75c7d93ba10165b82d5be11be27 (patch) | |
| tree | 4ddf682a513bdb8152a426760c33f930f1fc46df /nova/api | |
| parent | 563a77fd4aa80da9bddac5cf7f8f27ed2dedb39d (diff) | |
flagged all INSTANCE_TYPES usage with FIXME comment. Added basic usage to nova-manage (needs formatting). created api methods.
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/ec2/admin.py | 1 | ||||
| -rw-r--r-- | nova/api/openstack/flavors.py | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/nova/api/ec2/admin.py b/nova/api/ec2/admin.py index d7e899d12..55cca1041 100644 --- a/nova/api/ec2/admin.py +++ b/nova/api/ec2/admin.py @@ -79,6 +79,7 @@ class AdminController(object): def __str__(self): return 'AdminController' + # FIX-ME(kpepple) for dynamic flavors def describe_instance_types(self, _context, **_kwargs): return {'instanceTypeSet': [instance_dict(n, v) for n, v in instance_types.INSTANCE_TYPES.iteritems()]} diff --git a/nova/api/openstack/flavors.py b/nova/api/openstack/flavors.py index f620d4107..1f5185134 100644 --- a/nova/api/openstack/flavors.py +++ b/nova/api/openstack/flavors.py @@ -45,6 +45,7 @@ class Controller(wsgi.Controller): def show(self, req, id): """Return data about the given flavor id.""" + # FIX-ME(kpepple) for dynamic flavors for name, val in instance_types.INSTANCE_TYPES.iteritems(): if val['flavorid'] == int(id): item = dict(ram=val['memory_mb'], disk=val['local_gb'], @@ -54,4 +55,5 @@ class Controller(wsgi.Controller): def _all_ids(self): """Return the list of all flavorids.""" + # FIX-ME(kpepple) for dynamic flavors return [i['flavorid'] for i in instance_types.INSTANCE_TYPES.values()] |
