23116160 Upgrade novaclient to 3.3.1
authorLaszlo Peter <laszlo.peter@oracle.com>
Wed, 07 Sep 2016 14:48:37 -0700
changeset 6829 ba8d48abe5da
parent 6828 92d993615297
child 6830 d33ee3b41806
23116160 Upgrade novaclient to 3.3.1
components/python/novaclient/Makefile
components/python/novaclient/novaclient-PYVER.p5m
components/python/novaclient/novaclient.license
components/python/novaclient/patches/02-requirements.patch
components/python/novaclient/patches/03-launchpad-1446850.patch
--- a/components/python/novaclient/Makefile	Wed Sep 07 14:48:37 2016 -0700
+++ b/components/python/novaclient/Makefile	Wed Sep 07 14:48:37 2016 -0700
@@ -26,16 +26,16 @@
 include ../../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		python-novaclient
-COMPONENT_VERSION=	2.23.2
+COMPONENT_VERSION=	3.3.1
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
 COMPONENT_ARCHIVE_HASH=	\
-    sha256:730cb006395b2df336bbfd75aa2f459375594726a50fe3b9126212ed487fcf98
+    sha256:4ce2e69270cdea96af20a8a4bb5bb47eecb7a700c3eb04213f432bcf92c8317c
 COMPONENT_ARCHIVE_URL=	$(call pypi_url)
-COMPONENT_PROJECT_URL=	http://launchpad.net/python-novaclient
+COMPONENT_PROJECT_URL=	http://docs.openstack.org/developer/python-novaclient/
 COMPONENT_BUGDB=	service/nova
 
-TPNO=			25756
+TPNO=			28577
 
 include $(WS_MAKE_RULES)/prep.mk
 include $(WS_MAKE_RULES)/setup.py.mk
@@ -44,7 +44,7 @@
 ASLR_MODE = $(ASLR_NOT_APPLICABLE)
 
 COMPONENT_POST_INSTALL_ACTION = \
-	(cd $(PROTO_DIR)/usr/bin ; $(MV) -f nova nova-$(PYTHON_VERSION))
+    (cd $(PROTO_DIR)/usr/bin ; $(MV) -f nova nova-$(PYTHON_VERSION))
 
 # common targets
 build:		$(BUILD_NO_ARCH)
@@ -53,4 +53,4 @@
 
 test:		$(NO_TESTS)
 
-system-test:    $(NO_TESTS)
+system-test:	$(NO_TESTS)
--- a/components/python/novaclient/novaclient-PYVER.p5m	Wed Sep 07 14:48:37 2016 -0700
+++ b/components/python/novaclient/novaclient-PYVER.p5m	Wed Sep 07 14:48:37 2016 -0700
@@ -20,16 +20,20 @@
 #
 
 #
-# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 
 #
 # As an earlier Python 3 version of novaclient was published, we continue
 # to do so for now by dropping the dependency on the corresponding
-# keystoneclient & oslo.utils as the latter are not Python 3 ready.
+# keystoneauth1, oslo.serialization & oslo.utils as the latter are not
+# Python 3 ready.
 #
-<transform depend fmri=library/python/keystoneclient-3\d type=require -> drop>
+<transform depend fmri=library/python/keystoneauth1-3\d type=require -> drop>
+<transform depend fmri=library/python/oslo.serialization-3\d type=require \
+    -> drop>
 <transform depend fmri=library/python/oslo.utils-3\d type=require -> drop>
+#
 set name=pkg.fmri \
     value=pkg:/library/python/novaclient-$(PYV)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
 set name=pkg.summary \
@@ -53,6 +57,7 @@
     mediator-version=$(PYVER)
 file path=usr/bin/nova-$(PYVER)
 file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/__init__.py
+file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/api_versions.py
 file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/auth_plugin.py
 file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/base.py
 file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/client.py
@@ -62,20 +67,10 @@
 file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/i18n.py
 file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/openstack/__init__.py
 file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/openstack/common/__init__.py
-file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/openstack/common/_i18n.py
-file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/openstack/common/apiclient/__init__.py
-file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/openstack/common/apiclient/auth.py
-file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/openstack/common/apiclient/base.py
-file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/openstack/common/apiclient/client.py
-file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/openstack/common/apiclient/exceptions.py
-file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/openstack/common/apiclient/fake_client.py
-file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/openstack/common/apiclient/utils.py
 file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/openstack/common/cliutils.py
-file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/openstack/common/uuidutils.py
 file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/service_catalog.py
 file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/shell.py
 file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/utils.py
-file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/v1_1/__init__.py
 file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/v2/__init__.py
 file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/v2/agents.py
 file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/v2/aggregates.py
@@ -117,6 +112,7 @@
 file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/v2/security_group_rules.py
 file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/v2/security_groups.py
 file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/v2/server_groups.py
+file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/v2/server_migrations.py
 file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/v2/servers.py
 file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/v2/services.py
 file path=usr/lib/python$(PYVER)/vendor-packages/novaclient/v2/shell.py
@@ -137,31 +133,21 @@
 #
 license novaclient.license license="Apache v2.0"
 
-# force a group dependency on the optional anyjson; pkgdepend work is needed to
-# flush this out.
-depend type=group fmri=library/python/anyjson-$(PYV)
-
-# force a group dependency on the optional simplejson; pkgdepend work is needed
-# to flush this out.
-depend type=group fmri=library/python/simplejson-$(PYV)
-
-# force a dependency on argparse; pkgdepend work is needed to flush this out.
-depend type=require fmri=library/python/argparse-$(PYV)
-
-# force a dependency on babel; pkgdepend work is needed to flush this out.
-depend type=require fmri=library/python/babel-$(PYV)
-
-# force a dependency on iso8601; pkgdepend work is needed to flush this out.
-depend type=require fmri=library/python/iso8601-$(PYV)
-
-# force a dependency on keystoneclient; pkgdepend work is needed to flush this
+# force a dependency on keystoneauth1; pkgdepend work is needed to flush this
 # out.
-depend type=require fmri=library/python/keystoneclient-$(PYV)
+depend type=require fmri=library/python/keystoneauth1-$(PYV)
 
 # force a dependency on the novaclient package
 depend type=require \
     fmri=library/python/novaclient@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
 
+# force a dependency on oslo.i18n; pkgdepend work is needed to flush this out.
+depend type=require fmri=library/python/oslo.i18n-$(PYV)
+
+# force a dependency on oslo.serialization; pkgdepend work is needed to flush
+# this out.
+depend type=require fmri=library/python/oslo.serialization-$(PYV)
+
 # force a dependency on oslo.utils; pkgdepend work is needed to flush this out.
 depend type=require fmri=library/python/oslo.utils-$(PYV)
 
@@ -179,6 +165,3 @@
 
 # force a dependency on six; pkgdepend work is needed to flush this out.
 depend type=require fmri=library/python/six-$(PYV)
-
-# force a dependency on stevedore; pkgdepend work is needed to flush this out.
-depend type=require fmri=library/python/stevedore-$(PYV)
--- a/components/python/novaclient/novaclient.license	Wed Sep 07 14:48:37 2016 -0700
+++ b/components/python/novaclient/novaclient.license	Wed Sep 07 14:48:37 2016 -0700
@@ -12,7 +12,8 @@
 Copyright (c) 2011 Rackspace - OpenStack extensions (>= v2.1)
 All rights reserved.
 
-		                 Apache License
+
+                                 Apache License
                            Version 2.0, January 2004
                         http://www.apache.org/licenses/
 
@@ -187,29 +188,31 @@
       incurred by, or claims asserted against, such Contributor by reason
       of your accepting any such warranty or additional liability.
 
-   END OF TERMS AND CONDITIONS
+--- License for python-novaclient versions prior to 2.1 ---
 
-   APPENDIX: How to apply the Apache License to your work.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
 
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
+    1. Redistributions of source code must retain the above copyright notice,
+       this list of conditions and the following disclaimer.
+
+    2. Redistributions in binary form must reproduce the above copyright
+       notice, this list of conditions and the following disclaimer in the
+       documentation and/or other materials provided with the distribution.
 
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
+    3. Neither the name of this project nor the names of its contributors may
+    be used to endorse or promote products derived from this software without
+    specific prior written permission.
 
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--- a/components/python/novaclient/patches/02-requirements.patch	Wed Sep 07 14:48:37 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-In-house patch to remove the dependency on argparse.  Since we use
-Python 2.7 only for OpenStack, argparse is already included.  If this
-line is present, stevedore will fail to find the pip package for it,
-causing a cascade of failures to other tools.
-
---- python-novaclient-2.23.2/requirements.txt.orig	2015-10-19 23:15:22.452732631 -0400
-+++ python-novaclient-2.23.2/requirements.txt	2015-10-19 23:15:58.711612267 -0400
-@@ -2,7 +2,6 @@
- # of appearance. Changing the order has an impact on the overall integration
- # process, which may cause wedges in the gate later.
- pbr!=0.7,<1.0,>=0.6
--argparse
- iso8601>=0.1.9
- oslo.i18n<1.6.0,>=1.5.0 # Apache-2.0
- oslo.serialization<1.5.0,>=1.4.0 # Apache-2.0
---- python-novaclient-2.23.2/python_novaclient.egg-info/requires.txt.orig	2015-10-19 23:15:45.468573818 -0400
-+++ python-novaclient-2.23.2/python_novaclient.egg-info/requires.txt	2015-10-19 23:16:07.167364902 -0400
-@@ -1,5 +1,4 @@
- pbr!=0.7,<1.0,>=0.6
--argparse
- iso8601>=0.1.9
- oslo.i18n<1.6.0,>=1.5.0 # Apache-2.0
- oslo.serialization<1.5.0,>=1.4.0 # Apache-2.0
--- a/components/python/novaclient/patches/03-launchpad-1446850.patch	Wed Sep 07 14:48:37 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,216 +0,0 @@
-This upstream patch has been addressed in Liberty but has not yet been
-addressed in Kilo.
-
-From 098116d6a574b8dede101b257db2ff22d269c6c7 Mon Sep 17 00:00:00 2001
-From: melanie witt <[email protected]>
-Date: Tue, 21 Apr 2015 21:32:33 +0000
-Subject: Revert "nova flavor-show command is inconsistent"
-
-This reverts commit 4e79285b45ec1490c8e923f724cbaf4d42fe81c4.
-
-The aforementioned commit broke flavor-show for mixed case flavorids.
-The reason is a bit complex. On the nova api side, there is caching of
-db items for flavors, keyed off the flavorid retrieved from the db,
-case sensitive, unlike the db query itself. Attempts to flavor-show
-a flavor with flavorid composed of letters will fail with a 400 if
-the capitalization doesn't match.
-
-For the flavor names, they work in lowercase because the find_resource
-function falls back on a search by "human_id" after failing every other
-attempt to find the flavor, because "human_id" is a oslo-slugified
-string (all lowercase, non-word characters removed, spaces converted
-to hyphens).
-
-Closes-Bug: #1446850
-
-Change-Id: I73247b50f5a6918167c071ccc13cd676aa2c7fec
----
- novaclient/tests/unit/test_base.py       |  2 +-
- novaclient/tests/unit/v2/fakes.py        | 20 ++++++++++----------
- novaclient/tests/unit/v2/test_flavors.py |  4 ++--
- novaclient/tests/unit/v2/test_shell.py   | 16 ++++++++--------
- novaclient/v2/shell.py                   | 11 -----------
- 5 files changed, 21 insertions(+), 32 deletions(-)
-
-diff --git a/novaclient/tests/unit/test_base.py b/novaclient/tests/unit/test_base.py
-index 1ba1d32..b7bceb7 100644
---- a/novaclient/tests/unit/test_base.py
-+++ b/novaclient/tests/unit/test_base.py
-@@ -36,7 +36,7 @@ class BaseTest(utils.TestCase):
- 
-     def test_resource_lazy_getattr(self):
-         f = flavors.Flavor(cs.flavors, {'id': 1})
--        self.assertEqual('256 mb server', f.name)
-+        self.assertEqual('256 MB Server', f.name)
-         cs.assert_called('GET', '/flavors/1')
- 
-         # Missing stuff still fails after a second get
-diff --git a/novaclient/tests/unit/v2/fakes.py b/novaclient/tests/unit/v2/fakes.py
-index 343c421..40cd471 100644
---- a/novaclient/tests/unit/v2/fakes.py
-+++ b/novaclient/tests/unit/v2/fakes.py
-@@ -258,7 +258,7 @@ class FakeHTTPClient(base_client.HTTPClient):
-                 },
-                 "flavor": {
-                     "id": 1,
--                    "name": "256 mb server",
-+                    "name": "256 MB Server",
-                 },
-                 "hostId": "e4d909c290d0fb1ca068ffaddf22cbd0",
-                 "status": "BUILD",
-@@ -299,7 +299,7 @@ class FakeHTTPClient(base_client.HTTPClient):
-                 },
-                 "flavor": {
-                     "id": 1,
--                    "name": "256 mb server",
-+                    "name": "256 MB Server",
-                 },
-                 "hostId": "9e107d9d372bb6826bd81d3542a419d6",
-                 "status": "ACTIVE",
-@@ -340,7 +340,7 @@ class FakeHTTPClient(base_client.HTTPClient):
-                 "image": "",
-                 "flavor": {
-                     "id": 1,
--                    "name": "256 mb server",
-+                    "name": "256 MB Server",
-                 },
-                 "hostId": "9e107d9d372bb6826bd81d3542a419d6",
-                 "status": "ACTIVE",
-@@ -672,19 +672,19 @@ class FakeHTTPClient(base_client.HTTPClient):
- 
-     def get_flavors_detail(self, **kw):
-         flavors = {'flavors': [
--            {'id': 1, 'name': '256 mb server', 'ram': 256, 'disk': 10,
-+            {'id': 1, 'name': '256 MB Server', 'ram': 256, 'disk': 10,
-              'OS-FLV-EXT-DATA:ephemeral': 10,
-              'os-flavor-access:is_public': True,
-              'links': {}},
--            {'id': 2, 'name': '512 mb server', 'ram': 512, 'disk': 20,
-+            {'id': 2, 'name': '512 MB Server', 'ram': 512, 'disk': 20,
-              'OS-FLV-EXT-DATA:ephemeral': 20,
-              'os-flavor-access:is_public': False,
-              'links': {}},
--            {'id': 4, 'name': '1024 mb server', 'ram': 1024, 'disk': 10,
-+            {'id': 4, 'name': '1024 MB Server', 'ram': 1024, 'disk': 10,
-              'OS-FLV-EXT-DATA:ephemeral': 10,
-              'os-flavor-access:is_public': True,
-              'links': {}},
--            {'id': 'aa1', 'name': '128 mb server', 'ram': 128, 'disk': 0,
-+            {'id': 'aa1', 'name': '128 MB Server', 'ram': 128, 'disk': 0,
-              'OS-FLV-EXT-DATA:ephemeral': 0,
-              'os-flavor-access:is_public': True,
-              'links': {}}
-@@ -736,16 +736,16 @@ class FakeHTTPClient(base_client.HTTPClient):
-             {},
-             {'flavor': {
-                 'id': 3,
--                'name': '256 mb server',
-+                'name': '256 MB Server',
-                 'ram': 256,
-                 'disk': 10,
-             }},
-         )
- 
--    def get_flavors_512_mb_server(self, **kw):
-+    def get_flavors_512_MB_Server(self, **kw):
-         raise exceptions.NotFound('404')
- 
--    def get_flavors_128_mb_server(self, **kw):
-+    def get_flavors_128_MB_Server(self, **kw):
-         raise exceptions.NotFound('404')
- 
-     def get_flavors_aa1(self, **kw):
-diff --git a/novaclient/tests/unit/v2/test_flavors.py b/novaclient/tests/unit/v2/test_flavors.py
-index 5045902..4fe43c1 100644
---- a/novaclient/tests/unit/v2/test_flavors.py
-+++ b/novaclient/tests/unit/v2/test_flavors.py
-@@ -93,10 +93,10 @@ class FlavorsTest(utils.TestCase):
-     def test_find(self):
-         f = self.cs.flavors.find(ram=256)
-         self.cs.assert_called('GET', '/flavors/detail')
--        self.assertEqual('256 mb server', f.name)
-+        self.assertEqual('256 MB Server', f.name)
- 
-         f = self.cs.flavors.find(disk=0)
--        self.assertEqual('128 mb server', f.name)
-+        self.assertEqual('128 MB Server', f.name)
- 
-         self.assertRaises(exceptions.NotFound, self.cs.flavors.find,
-                           disk=12345)
-diff --git a/novaclient/tests/unit/v2/test_shell.py b/novaclient/tests/unit/v2/test_shell.py
-index b1b9b80..3e7462c 100644
---- a/novaclient/tests/unit/v2/test_shell.py
-+++ b/novaclient/tests/unit/v2/test_shell.py
-@@ -668,10 +668,10 @@ class ShellTest(utils.TestCase):
- 
-     def test_boot_named_flavor(self):
-         self.run_command(["boot", "--image", "1",
--                          "--flavor", "512 mb server",
-+                          "--flavor", "512 MB Server",
-                           "--max-count", "3", "server"])
-         self.assert_called('GET', '/images/1', pos=0)
--        self.assert_called('GET', '/flavors/512 mb server', pos=1)
-+        self.assert_called('GET', '/flavors/512 MB Server', pos=1)
-         self.assert_called('GET', '/flavors?is_public=None', pos=2)
-         self.assert_called('GET', '/flavors/2', pos=3)
-         self.assert_called(
-@@ -708,15 +708,15 @@ class ShellTest(utils.TestCase):
-         self.assert_called_anytime('GET', '/flavors/aa1')
- 
-     def test_flavor_show_by_name(self):
--        self.run_command(['flavor-show', '128 mb server'])
--        self.assert_called('GET', '/flavors/128 mb server', pos=0)
-+        self.run_command(['flavor-show', '128 MB Server'])
-+        self.assert_called('GET', '/flavors/128 MB Server', pos=0)
-         self.assert_called('GET', '/flavors?is_public=None', pos=1)
-         self.assert_called('GET', '/flavors/aa1', pos=2)
-         self.assert_called('GET', '/flavors/aa1/os-extra_specs', pos=3)
- 
-     def test_flavor_show_by_name_priv(self):
--        self.run_command(['flavor-show', '512 mb server'])
--        self.assert_called('GET', '/flavors/512 mb server', pos=0)
-+        self.run_command(['flavor-show', '512 MB Server'])
-+        self.assert_called('GET', '/flavors/512 MB Server', pos=0)
-         self.assert_called('GET', '/flavors?is_public=None', pos=1)
-         self.assert_called('GET', '/flavors/2', pos=2)
-         self.assert_called('GET', '/flavors/2/os-extra_specs', pos=3)
-@@ -753,7 +753,7 @@ class ShellTest(utils.TestCase):
-                            {'addTenantAccess': {'tenant': 'proj2'}})
- 
-     def test_flavor_access_add_by_name(self):
--        self.run_command(['flavor-access-add', '512 mb server', 'proj2'])
-+        self.run_command(['flavor-access-add', '512 MB Server', 'proj2'])
-         self.assert_called('POST', '/flavors/2/action',
-                            {'addTenantAccess': {'tenant': 'proj2'}})
- 
-@@ -763,7 +763,7 @@ class ShellTest(utils.TestCase):
-                            {'removeTenantAccess': {'tenant': 'proj2'}})
- 
-     def test_flavor_access_remove_by_name(self):
--        self.run_command(['flavor-access-remove', '512 mb server', 'proj2'])
-+        self.run_command(['flavor-access-remove', '512 MB Server', 'proj2'])
-         self.assert_called('POST', '/flavors/2/action',
-                            {'removeTenantAccess': {'tenant': 'proj2'}})
- 
-diff --git a/novaclient/v2/shell.py b/novaclient/v2/shell.py
-index 33653a1..f8b1a10 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)