diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-04-22 21:29:08 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-04-22 21:29:08 +0000 |
commit | 9b6dcd13e5da2d0bb4533a1ab6e22357e3f3b684 (patch) | |
tree | eae1b2b80f8e153349fb8a54d94e42f6aa5ed46a /novaclient/v2 | |
parent | ac4390c3eae8a826d02ece3ddc1362ad0cfe5789 (diff) | |
parent | 098116d6a574b8dede101b257db2ff22d269c6c7 (diff) | |
download | python-novaclient-9b6dcd13e5da2d0bb4533a1ab6e22357e3f3b684.tar.gz |
Merge "Revert "nova flavor-show command is inconsistent""
Diffstat (limited to 'novaclient/v2')
-rw-r--r-- | novaclient/v2/shell.py | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/novaclient/v2/shell.py b/novaclient/v2/shell.py index f609d671..d25a9635 100644 --- a/novaclient/v2/shell.py +++ b/novaclient/v2/shell.py @@ -1898,17 +1898,6 @@ def _find_image(cs, image): def _find_flavor(cs, flavor): """Get a flavor by name, ID, or RAM size.""" try: - # isinstance() is being used to check if flavor is an instance of - # integer. It will help us to check if the user has entered flavor - # name or flavorid. If flavor name has been entered it is being - # converted to lowercase using lower(). Incase it is an ID the user - # has passed it will not go through the "flavor = flavor.lower()" - # code.The reason for checking if it is a flavor name or flavorid is - # that int has no lower() so it will give an error. - if isinstance(flavor, six.integer_types): - pass - else: - flavor = flavor.lower() return utils.find_resource(cs.flavors, flavor, is_public=None) except exceptions.NotFound: return cs.flavors.find(ram=flavor) |