diff --git a/tobiko/openstack/stacks/_centos.py b/tobiko/openstack/stacks/_centos.py index ece53b399..0ca2246f8 100644 --- a/tobiko/openstack/stacks/_centos.py +++ b/tobiko/openstack/stacks/_centos.py @@ -16,7 +16,6 @@ from __future__ import absolute_import import tobiko from tobiko import config from tobiko.openstack import glance -from tobiko.openstack import nova from tobiko.openstack.stacks import _nova @@ -50,10 +49,3 @@ class CentosServerStackFixture(_nova.ServerStackFixture): #: Flavor used to create a Nova server instance flavor_stack = tobiko.required_setup_fixture(CentosFlavorStackFixture) - - #: Install Python3 package by default - @property - def cloud_config(self): - return nova.cloud_config( - super(CentosServerStackFixture, self).cloud_config, - packages=['python3']) diff --git a/tobiko/tests/functional/openstack/stacks/test_centos.py b/tobiko/tests/functional/openstack/stacks/test_centos.py index 238e08bbe..b98ef0ef6 100644 --- a/tobiko/tests/functional/openstack/stacks/test_centos.py +++ b/tobiko/tests/functional/openstack/stacks/test_centos.py @@ -15,13 +15,9 @@ # under the License. from __future__ import absolute_import -import six -import yaml - import tobiko from tobiko.shell import sh from tobiko.openstack import keystone -from tobiko.openstack import nova from tobiko.openstack import stacks from tobiko.tests.functional.openstack.stacks import test_cirros @@ -33,26 +29,9 @@ class CentosServerStackTest(test_cirros.CirrosServerStackTest): #: Stack of resources with a server attached to a floating IP stack = tobiko.required_setup_fixture(stacks.CentosServerStackFixture) - def test_cloud_config(self): - cloud_config = self.stack.cloud_config - self.assertIn('python3', cloud_config['packages']) - - def test_user_data(self): - user_data = self.stack.user_data - self.assertIsInstance(user_data, six.string_types) - self.assertTrue(user_data.startswith('#cloud-config\n'), user_data) - self.assertEqual(self.stack.cloud_config, yaml.load(user_data)) - - def test_platform_python3(self): + def test_platform_python(self): python_version = sh.execute(['/usr/libexec/platform-python', '--version'], ssh_client=self.stack.ssh_client).stdout self.assertTrue(python_version.startswith('Python 3.'), python_version) - - def test_python3(self): - nova.wait_for_cloud_init_done(ssh_client=self.stack.ssh_client) - python_version = sh.execute(['python3', '--version'], - ssh_client=self.stack.ssh_client).stdout - self.assertTrue(python_version.startswith('Python 3.'), - python_version)