diff options
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-rally/remove-ironic-support.patch | 87 | ||||
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-rally_git.bb | 1 |
2 files changed, 88 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-rally/remove-ironic-support.patch b/meta-openstack/recipes-devtools/python/python-rally/remove-ironic-support.patch new file mode 100644 index 0000000..10df953 --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-rally/remove-ironic-support.patch | |||
| @@ -0,0 +1,87 @@ | |||
| 1 | remove ironic support | ||
| 2 | |||
| 3 | OpenStack ironic is not currently supported, so remove | ||
| 4 | any code in rally that invokes ironicclient. | ||
| 5 | |||
| 6 | Signed-off-by: Vu Tran <vu.tran@windriver.com> | ||
| 7 | |||
| 8 | diff --git a/rally/benchmark/context/images.py b/rally/benchmark/context/images.py | ||
| 9 | index 9642af4..92abbf6 100644 | ||
| 10 | --- a/rally/benchmark/context/images.py | ||
| 11 | +++ b/rally/benchmark/context/images.py | ||
| 12 | @@ -21,6 +21,7 @@ from rally import exceptions | ||
| 13 | from rally.openstack.common import log as logging | ||
| 14 | from rally import osclients | ||
| 15 | from rally import utils as rutils | ||
| 16 | +from rally.openstack.common.gettextutils import _ | ||
| 17 | |||
| 18 | |||
| 19 | LOG = logging.getLogger(__name__) | ||
| 20 | diff --git a/rally/osclients.py b/rally/osclients.py | ||
| 21 | index af916b9..66522cd 100644 | ||
| 22 | --- a/rally/osclients.py | ||
| 23 | +++ b/rally/osclients.py | ||
| 24 | @@ -19,7 +19,6 @@ from ceilometerclient import client as ceilometer | ||
| 25 | from cinderclient import client as cinder | ||
| 26 | import glanceclient as glance | ||
| 27 | from heatclient import client as heat | ||
| 28 | -from ironicclient import client as ironic | ||
| 29 | from keystoneclient import exceptions as keystone_exceptions | ||
| 30 | from keystoneclient.v2_0 import client as keystone | ||
| 31 | from neutronclient.neutron import client as neutron | ||
| 32 | @@ -204,16 +203,3 @@ class Clients(object): | ||
| 33 | insecure=CONF.https_insecure, | ||
| 34 | cacert=CONF.https_cacert) | ||
| 35 | return client | ||
| 36 | - | ||
| 37 | - @memoize('ironic') | ||
| 38 | - def ironic(self, version='1.0'): | ||
| 39 | - """Returns Ironic client.""" | ||
| 40 | - client = ironic.Client(version, | ||
| 41 | - username=self.endpoint.username, | ||
| 42 | - password=self.endpoint.password, | ||
| 43 | - tenant_name=self.endpoint.tenant_name, | ||
| 44 | - auth_url=self.endpoint.auth_url, | ||
| 45 | - timeout=CONF.openstack_client_http_timeout, | ||
| 46 | - insecure=CONF.https_insecure, | ||
| 47 | - cacert=CONF.https_cacert) | ||
| 48 | - return client | ||
| 49 | diff --git a/requirements.txt b/requirements.txt | ||
| 50 | index 9ab2e61..318bcfe 100644 | ||
| 51 | --- a/requirements.txt | ||
| 52 | +++ b/requirements.txt | ||
| 53 | @@ -17,7 +17,6 @@ python-neutronclient>=2.3.5,<3 | ||
| 54 | python-cinderclient>=1.0.6 | ||
| 55 | python-heatclient>=0.2.9 | ||
| 56 | python-ceilometerclient>=1.0.6 | ||
| 57 | -python-ironicclient | ||
| 58 | python-subunit>=0.0.18 | ||
| 59 | requests>=1.1 | ||
| 60 | SQLAlchemy>=0.7.8,!=0.9.5,<=0.9.99 | ||
| 61 | diff --git a/tests/test_osclients.py b/tests/test_osclients.py | ||
| 62 | index 49cecb8..6ca03f4 100644 | ||
| 63 | --- a/tests/test_osclients.py | ||
| 64 | +++ b/tests/test_osclients.py | ||
| 65 | @@ -161,22 +161,3 @@ class OSClientsTestCase(test.TestCase): | ||
| 66 | mock_ceilometer.Client.assert_called_once_with("2", **kw) | ||
| 67 | self.assertEqual(self.clients.cache["ceilometer"], | ||
| 68 | fake_ceilometer) | ||
| 69 | - | ||
| 70 | - @mock.patch("rally.osclients.ironic") | ||
| 71 | - def test_ironic(self, mock_ironic): | ||
| 72 | - fake_ironic = fakes.FakeIronicClient() | ||
| 73 | - mock_ironic.Client = mock.MagicMock(return_value=fake_ironic) | ||
| 74 | - self.assertTrue("ironic" not in self.clients.cache) | ||
| 75 | - client = self.clients.ironic() | ||
| 76 | - self.assertEqual(client, fake_ironic) | ||
| 77 | - kw = { | ||
| 78 | - "username": self.endpoint.username, | ||
| 79 | - "password": self.endpoint.password, | ||
| 80 | - "tenant_name": self.endpoint.tenant_name, | ||
| 81 | - "auth_url": self.endpoint.auth_url, | ||
| 82 | - "timeout": cfg.CONF.openstack_client_http_timeout, | ||
| 83 | - "insecure": cfg.CONF.https_insecure, | ||
| 84 | - "cacert": cfg.CONF.https_cacert | ||
| 85 | - } | ||
| 86 | - mock_ironic.Client.assert_called_once_with("1.0", **kw) | ||
| 87 | - self.assertEqual(self.clients.cache["ironic"], fake_ironic) | ||
diff --git a/meta-openstack/recipes-devtools/python/python-rally_git.bb b/meta-openstack/recipes-devtools/python/python-rally_git.bb index 811fd07..77c140a 100644 --- a/meta-openstack/recipes-devtools/python/python-rally_git.bb +++ b/meta-openstack/recipes-devtools/python/python-rally_git.bb | |||
| @@ -14,6 +14,7 @@ SRC_URI = "git://github.com/stackforge/${SRCNAME}.git;branch=master \ | |||
| 14 | file://rally.conf \ | 14 | file://rally.conf \ |
| 15 | file://task-example.json \ | 15 | file://task-example.json \ |
| 16 | file://deployment-existing.json \ | 16 | file://deployment-existing.json \ |
| 17 | file://remove-ironic-support.patch \ | ||
| 17 | " | 18 | " |
| 18 | 19 | ||
| 19 | SRCREV="b297cf00750f263b8b5bdeb71f6952f672e87f5a" | 20 | SRCREV="b297cf00750f263b8b5bdeb71f6952f672e87f5a" |
