Merge branch 'master' of github.com:rackspace/python-novaclient
This commit is contained in:
commit
f216dbd2e4
@ -45,9 +45,9 @@ copyright = u'Rackspace, based on work by Jacob Kaplan-Moss'
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '2.4.1'
|
||||
version = '2.4'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '2.4.1'
|
||||
release = '2.4.2'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
@ -301,9 +301,19 @@ class OpenStackShell(object):
|
||||
metadata, files)
|
||||
print_dict(server._info)
|
||||
|
||||
def _translate_flavor_keys(self, collection):
|
||||
convert = [('ram', 'memory_mb'), ('disk', 'local_gb')]
|
||||
for item in collection:
|
||||
keys = item.__dict__.keys()
|
||||
for from_key, to_key in convert:
|
||||
if from_key in keys and to_key not in keys:
|
||||
setattr(item, to_key, item._info[from_key])
|
||||
|
||||
def do_flavor_list(self, args):
|
||||
"""Print a list of available 'flavors' (sizes of servers)."""
|
||||
print_list(self.cs.flavors.list(), [
|
||||
flavors = self.cs.flavors.list()
|
||||
self._translate_flavor_keys(flavors)
|
||||
print_list(flavors, [
|
||||
'ID',
|
||||
'Name',
|
||||
'Memory_MB',
|
||||
|
2
setup.py
2
setup.py
@ -11,7 +11,7 @@ if sys.version_info < (2,6):
|
||||
|
||||
setup(
|
||||
name = "python-novaclient",
|
||||
version = "2.4.1",
|
||||
version = "2.4.2",
|
||||
description = "Client library for OpenStack Nova API",
|
||||
long_description = read('README.rst'),
|
||||
url = 'https://github.com/rackspace/python-novaclient',
|
||||
|
Loading…
x
Reference in New Issue
Block a user