Browse Source

Rename rdomanager_oscplugin to tripleoclient

Change-Id: I4593a5248160204645d567d7f2fa3a396629082b
changes/20/221320/1
Brad P. Crochet 7 years ago
parent
commit
12edde8a53
  1. 52
      setup.cfg
  2. 2
      tripleoclient/__init__.py
  3. 0
      tripleoclient/exceptions.py
  4. 10
      tripleoclient/plugin.py
  5. 0
      tripleoclient/tests/__init__.py
  6. 2
      tripleoclient/tests/base.py
  7. 0
      tripleoclient/tests/fakes.py
  8. 6
      tripleoclient/tests/test_rdomanager_oscplugin.py
  9. 10
      tripleoclient/tests/test_utils.py
  10. 0
      tripleoclient/tests/v1/__init__.py
  11. 0
      tripleoclient/tests/v1/baremetal/__init__.py
  12. 2
      tripleoclient/tests/v1/baremetal/fakes.py
  13. 90
      tripleoclient/tests/v1/baremetal/test_baremetal.py
  14. 0
      tripleoclient/tests/v1/overcloud_deploy/__init__.py
  15. 2
      tripleoclient/tests/v1/overcloud_deploy/fakes.py
  16. 166
      tripleoclient/tests/v1/overcloud_deploy/test_overcloud_deploy.py
  17. 8
      tripleoclient/tests/v1/overcloud_deploy/test_overcloud_deploy_validators.py
  18. 0
      tripleoclient/tests/v1/overcloud_image/__init__.py
  19. 4
      tripleoclient/tests/v1/overcloud_image/test_overcloud_image.py
  20. 0
      tripleoclient/tests/v1/overcloud_netenv_validate/__init__.py
  21. 0
      tripleoclient/tests/v1/overcloud_netenv_validate/fakes.py
  22. 4
      tripleoclient/tests/v1/overcloud_netenv_validate/test_overcloud_netenv_validate.py
  23. 0
      tripleoclient/tests/v1/overcloud_node/__init__.py
  24. 2
      tripleoclient/tests/v1/overcloud_node/fakes.py
  25. 4
      tripleoclient/tests/v1/overcloud_node/test_overcloud_node.py
  26. 0
      tripleoclient/tests/v1/overcloud_update/__init__.py
  27. 2
      tripleoclient/tests/v1/overcloud_update/fakes.py
  28. 4
      tripleoclient/tests/v1/overcloud_update/test_overcloud_update.py
  29. 10
      tripleoclient/tests/v1/test_plugin.py
  30. 4
      tripleoclient/tests/v1/undercloud/test_undercloud.py
  31. 0
      tripleoclient/tests/v1/utils.py
  32. 2
      tripleoclient/utils.py
  33. 0
      tripleoclient/v1/__init__.py
  34. 18
      tripleoclient/v1/baremetal.py
  35. 18
      tripleoclient/v1/overcloud_deploy.py
  36. 2
      tripleoclient/v1/overcloud_image.py
  37. 0
      tripleoclient/v1/overcloud_netenv_validate.py
  38. 2
      tripleoclient/v1/overcloud_node.py
  39. 2
      tripleoclient/v1/overcloud_update.py
  40. 0
      tripleoclient/v1/undercloud.py

52
setup.cfg

@ -1,12 +1,12 @@
[metadata]
name = python-rdomanager-oscplugin
summary = RDO Manager OSC plugin lib
name = python-tripleoclient
summary = TripleO client
description-file =
README.rst
license = Apache License, Version 2.0
author = Brad P. Crochet
author-email = brad@redhat.com
home-page = http://github.com/rdo-management/python-rdomanager-oscplugin.git
home-page = https://github.com/openstack/python-tripleoclient
classifier =
Environment :: Console
Environment :: OpenStack
@ -24,7 +24,7 @@ classifier =
[files]
packages =
rdomanager_oscplugin
tripleoclient
[build_sphinx]
source-dir = doc/source
@ -38,35 +38,35 @@ upload-dir = doc/build/html
universal = 1
[compile_catalog]
directory = rdomanager_oscplugin/locale
domain = rdomanager-oscplugin
directory = tripleoclient/locale
domain = tripleoclient
[update_catalog]
domain = rdomanager-oscplugin
output_dir = rdomanager_oscplugin/locale
input_file = rdomanager_oscplugin/locale/rdomanager-oscplugin.pot
domain = tripleoclient
output_dir = tripleoclient/locale
input_file = tripleoclient/locale/tripleoclient.pot
[extract_messages]
keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg
output_file = rdomanager_oscplugin/locale/rdomanager-oscplugin.pot
output_file = tripleoclient/locale/tripleoclient.pot
[entry_points]
openstack.cli.extension =
rdomanager_oscplugin = rdomanager_oscplugin.plugin
tripleoclient = tripleoclient.plugin
openstack.rdomanager_oscplugin.v1 =
baremetal_instackenv_validate = rdomanager_oscplugin.v1.baremetal:ValidateInstackEnv
baremetal_import = rdomanager_oscplugin.v1.baremetal:ImportBaremetal
baremetal_introspection_bulk_start = rdomanager_oscplugin.v1.baremetal:StartBaremetalIntrospectionBulk
baremetal_show_capabilities = rdomanager_oscplugin.v1.baremetal:ShowNodeCapabilities
baremetal_introspection_bulk_status = rdomanager_oscplugin.v1.baremetal:StatusBaremetalIntrospectionBulk
baremetal_configure_ready_state = rdomanager_oscplugin.v1.baremetal:ConfigureReadyState
baremetal_configure_boot = rdomanager_oscplugin.v1.baremetal:ConfigureBaremetalBoot
overcloud_netenv_validate = rdomanager_oscplugin.v1.overcloud_netenv_validate:ValidateOvercloudNetenv
overcloud_deploy = rdomanager_oscplugin.v1.overcloud_deploy:DeployOvercloud
overcloud_image_build = rdomanager_oscplugin.v1.overcloud_image:BuildOvercloudImage
overcloud_image_upload = rdomanager_oscplugin.v1.overcloud_image:UploadOvercloudImage
overcloud_node_delete = rdomanager_oscplugin.v1.overcloud_node:DeleteNode
overcloud_update_stack = rdomanager_oscplugin.v1.overcloud_update:UpdateOvercloud
undercloud_install = rdomanager_oscplugin.v1.undercloud:InstallPlugin
openstack.tripleoclient.v1 =
baremetal_instackenv_validate = tripleoclient.v1.baremetal:ValidateInstackEnv
baremetal_import = tripleoclient.v1.baremetal:ImportBaremetal
baremetal_introspection_bulk_start = tripleoclient.v1.baremetal:StartBaremetalIntrospectionBulk
baremetal_show_capabilities = tripleoclient.v1.baremetal:ShowNodeCapabilities
baremetal_introspection_bulk_status = tripleoclient.v1.baremetal:StatusBaremetalIntrospectionBulk
baremetal_configure_ready_state = tripleoclient.v1.baremetal:ConfigureReadyState
baremetal_configure_boot = tripleoclient.v1.baremetal:ConfigureBaremetalBoot
overcloud_netenv_validate = tripleoclient.v1.overcloud_netenv_validate:ValidateOvercloudNetenv
overcloud_deploy = tripleoclient.v1.overcloud_deploy:DeployOvercloud
overcloud_image_build = tripleoclient.v1.overcloud_image:BuildOvercloudImage
overcloud_image_upload = tripleoclient.v1.overcloud_image:UploadOvercloudImage
overcloud_node_delete = tripleoclient.v1.overcloud_node:DeleteNode
overcloud_update_stack = tripleoclient.v1.overcloud_update:UpdateOvercloud
undercloud_install = tripleoclient.v1.undercloud:InstallPlugin

2
rdomanager_oscplugin/__init__.py → tripleoclient/__init__.py

@ -16,4 +16,4 @@ import pbr.version
__version__ = pbr.version.VersionInfo(
'python-rdomanager-oscplugin').version_string()
'python-tripleoclient').version_string()

0
rdomanager_oscplugin/exceptions.py → tripleoclient/exceptions.py

10
rdomanager_oscplugin/plugin.py → tripleoclient/plugin.py

@ -27,10 +27,10 @@ LOG = logging.getLogger(__name__)
DEFAULT_RDOMANAGER_OSCPLUGIN_API_VERSION = '1'
# Required by the OSC plugin interface
API_NAME = 'rdomanager_oscplugin'
API_VERSION_OPTION = 'os_rdomanager_oscplugin_api_version'
API_NAME = 'tripleoclient'
API_VERSION_OPTION = 'os_tripleoclient_api_version'
API_VERSIONS = {
'1': 'rdomanager_oscplugin.plugin'
'1': 'tripleoclient.plugin'
}
@ -50,8 +50,8 @@ def build_option_parser(parser):
initialized by OpenStackShell.
"""
parser.add_argument(
'--os-rdomanager-oscplugin-api-version',
metavar='<rdomanager-oscplugin-api-version>',
'--os-tripleoclient-api-version',
metavar='<tripleoclient-api-version>',
default=utils.env(
'OS_RDOMANAGER_OSCPLUGIN_API_VERSION',
default=DEFAULT_RDOMANAGER_OSCPLUGIN_API_VERSION),

0
rdomanager_oscplugin/tests/__init__.py → tripleoclient/tests/__init__.py

2
rdomanager_oscplugin/tests/base.py → tripleoclient/tests/base.py

@ -21,7 +21,7 @@ import os
import fixtures
import testtools
from rdomanager_oscplugin.tests import fakes
from tripleoclient.tests import fakes
_TRUE_VALUES = ('true', '1', 'yes')

0
rdomanager_oscplugin/tests/fakes.py → tripleoclient/tests/fakes.py

6
rdomanager_oscplugin/tests/test_rdomanager_oscplugin.py → tripleoclient/tests/test_rdomanager_oscplugin.py

@ -13,13 +13,13 @@
# under the License.
"""
test_rdomanager_oscplugin
test_tripleoclient
----------------------------------
Tests for `rdomanager_oscplugin` module.
Tests for `tripleoclient` module.
"""
from rdomanager_oscplugin.tests import base
from tripleoclient.tests import base
class TestRdomanagerOscplugin(base.TestCase):

10
rdomanager_oscplugin/tests/test_utils.py → tripleoclient/tests/test_utils.py

@ -16,15 +16,15 @@
import mock
import os.path
from rdomanager_oscplugin import exceptions
from rdomanager_oscplugin import utils
from tripleoclient import exceptions
from tripleoclient import utils
from unittest import TestCase
class TestPasswordsUtil(TestCase):
@mock.patch("os.path.isfile", return_value=False)
@mock.patch("rdomanager_oscplugin.utils._generate_password",
@mock.patch("tripleoclient.utils._generate_password",
return_value="PASSWORD")
def test_generate_passwords(self, generate_password_mock, isfile_mock):
@ -53,7 +53,7 @@ class TestPasswordsUtil(TestCase):
self.assertEqual(len(passwords), 13)
@mock.patch("os.path.isfile", return_value=True)
@mock.patch("rdomanager_oscplugin.utils._generate_password",
@mock.patch("tripleoclient.utils._generate_password",
return_value="PASSWORD")
def test_load_passwords(self, generate_password_mock, isfile_mock):
PASSWORDS = [
@ -241,7 +241,7 @@ class TestWaitForDiscovery(TestCase):
mock_open().write.assert_called_with('JSON')
@mock.patch('rdomanager_oscplugin.utils.wait_for_provision_state')
@mock.patch('tripleoclient.utils.wait_for_provision_state')
def test_set_nodes_state(self, wait_for_state_mock):
wait_for_state_mock.return_value = True

0
rdomanager_oscplugin/tests/v1/__init__.py → tripleoclient/tests/v1/__init__.py

0
rdomanager_oscplugin/tests/v1/baremetal/__init__.py → tripleoclient/tests/v1/baremetal/__init__.py

2
rdomanager_oscplugin/tests/v1/baremetal/fakes.py → tripleoclient/tests/v1/baremetal/fakes.py

@ -33,5 +33,5 @@ class TestBaremetal(utils.TestCommand):
super(TestBaremetal, self).setUp()
self.app.client_manager.auth_ref = mock.Mock(auth_token="TOKEN")
self.app.client_manager.rdomanager_oscplugin = FakeClientWrapper()
self.app.client_manager.tripleoclient = FakeClientWrapper()
self.app.client_manager.image = mock.Mock()

90
rdomanager_oscplugin/tests/v1/baremetal/test_baremetal.py → tripleoclient/tests/v1/baremetal/test_baremetal.py

@ -21,9 +21,9 @@ import os
from ironic_discoverd import client as discoverd_client
from rdomanager_oscplugin import exceptions
from rdomanager_oscplugin.tests.v1.baremetal import fakes
from rdomanager_oscplugin.v1 import baremetal
from tripleoclient import exceptions
from tripleoclient.tests.v1.baremetal import fakes
from tripleoclient.v1 import baremetal
class TestValidateInstackEnv(fakes.TestBaremetal):
@ -198,7 +198,7 @@ class TestValidateInstackEnv(fakes.TestBaremetal):
self.assertEqual(1, self.cmd.error_count)
@mock.patch('rdomanager_oscplugin.utils.run_shell')
@mock.patch('tripleoclient.utils.run_shell')
def test_ipmitool_success(self, mock_run_shell):
mock_run_shell.return_value = 0
self.mock_instackenv_json({
@ -219,7 +219,7 @@ class TestValidateInstackEnv(fakes.TestBaremetal):
self.assertEqual(0, self.cmd.error_count)
@mock.patch('rdomanager_oscplugin.utils.run_shell')
@mock.patch('tripleoclient.utils.run_shell')
def test_ipmitool_failure(self, mock_run_shell):
mock_run_shell.return_value = 1
self.mock_instackenv_json({
@ -240,7 +240,7 @@ class TestValidateInstackEnv(fakes.TestBaremetal):
self.assertEqual(1, self.cmd.error_count)
@mock.patch('rdomanager_oscplugin.utils.run_shell')
@mock.patch('tripleoclient.utils.run_shell')
def test_duplicated_baremetal_ip(self, mock_run_shell):
mock_run_shell.return_value = 0
self.mock_instackenv_json({
@ -370,7 +370,7 @@ pxe_ssh,192.168.122.1,root,"KEY2",00:7c:ef:3d:eb:60""")
'mac': ['00:0b:d0:69:7e:58']
}
],
client=self.app.client_manager.rdomanager_oscplugin.baremetal(),
client=self.app.client_manager.tripleoclient.baremetal(),
keystone_client=None)
@mock.patch('os_cloud_config.nodes.register_all_nodes', autospec=True)
@ -405,7 +405,7 @@ pxe_ssh,192.168.122.1,root,"KEY2",00:7c:ef:3d:eb:60""")
'mac': ['00:0b:d0:69:7e:58']
}
],
client=self.app.client_manager.rdomanager_oscplugin.baremetal(),
client=self.app.client_manager.tripleoclient.baremetal(),
keystone_client=None)
@mock.patch('os_cloud_config.nodes.register_all_nodes', autospec=True)
@ -439,7 +439,7 @@ pxe_ssh,192.168.122.1,root,"KEY2",00:7c:ef:3d:eb:60""")
'mac': ['00:7c:ef:3d:eb:60']
}
],
client=self.app.client_manager.rdomanager_oscplugin.baremetal(),
client=self.app.client_manager.tripleoclient.baremetal(),
keystone_client=None)
@ -456,7 +456,7 @@ class TestStartBaremetalIntrospectionBulk(fakes.TestBaremetal):
@mock.patch('ironic_discoverd.client.introspect', autospec=True)
def test_introspect_bulk_one(self, introspect_mock, get_status_mock,):
client = self.app.client_manager.rdomanager_oscplugin.baremetal()
client = self.app.client_manager.tripleoclient.baremetal()
client.node.list.return_value = [
mock.Mock(uuid="ABCDEFGH", provision_state="manageable")
]
@ -467,9 +467,9 @@ class TestStartBaremetalIntrospectionBulk(fakes.TestBaremetal):
introspect_mock.assert_called_once_with(
'ABCDEFGH', base_url=None, auth_token='TOKEN')
@mock.patch('rdomanager_oscplugin.utils.wait_for_node_discovery',
@mock.patch('tripleoclient.utils.wait_for_node_discovery',
autospec=True)
@mock.patch('rdomanager_oscplugin.utils.wait_for_provision_state',
@mock.patch('tripleoclient.utils.wait_for_provision_state',
autospec=True)
@mock.patch('ironic_discoverd.client.get_status', autospec=True)
@mock.patch('ironic_discoverd.client.introspect', autospec=True)
@ -481,7 +481,7 @@ class TestStartBaremetalIntrospectionBulk(fakes.TestBaremetal):
get_status_mock.return_value = {'finished': True, 'error': None}
client = self.app.client_manager.rdomanager_oscplugin.baremetal()
client = self.app.client_manager.tripleoclient.baremetal()
client.node.list.return_value = [
mock.Mock(uuid="ABCDEFGH", provision_state="available"),
mock.Mock(uuid="IJKLMNOP", provision_state="manageable"),
@ -528,7 +528,7 @@ class TestStatusBaremetalIntrospectionBulk(fakes.TestBaremetal):
@mock.patch('ironic_discoverd.client.get_status', autospec=True)
def test_status_bulk_one(self, discoverd_mock):
client = self.app.client_manager.rdomanager_oscplugin.baremetal()
client = self.app.client_manager.tripleoclient.baremetal()
client.node.list.return_value = [
mock.Mock(uuid="ABCDEFGH")
]
@ -550,7 +550,7 @@ class TestStatusBaremetalIntrospectionBulk(fakes.TestBaremetal):
@mock.patch('ironic_discoverd.client.get_status', autospec=True)
def test_status_bulk(self, discoverd_mock):
client = self.app.client_manager.rdomanager_oscplugin.baremetal()
client = self.app.client_manager.tripleoclient.baremetal()
client.node.list.return_value = [
mock.Mock(uuid="ABCDEFGH"),
mock.Mock(uuid="IJKLMNOP"),
@ -586,19 +586,19 @@ class TestConfigureReadyState(fakes.TestBaremetal):
super(TestConfigureReadyState, self).setUp()
self.cmd = baremetal.ConfigureReadyState(self.app, None)
@mock.patch('rdomanager_oscplugin.v1.baremetal.ConfigureReadyState.'
@mock.patch('tripleoclient.v1.baremetal.ConfigureReadyState.'
'_configure_bios')
@mock.patch('rdomanager_oscplugin.v1.baremetal.ConfigureReadyState.'
@mock.patch('tripleoclient.v1.baremetal.ConfigureReadyState.'
'_configure_root_raid_volumes')
@mock.patch('rdomanager_oscplugin.v1.baremetal.ConfigureReadyState.'
@mock.patch('tripleoclient.v1.baremetal.ConfigureReadyState.'
'_configure_nonroot_raid_volumes')
@mock.patch('rdomanager_oscplugin.v1.baremetal.ConfigureReadyState.'
@mock.patch('tripleoclient.v1.baremetal.ConfigureReadyState.'
'_wait_for_drac_config_jobs')
@mock.patch('rdomanager_oscplugin.v1.baremetal.ConfigureReadyState.'
@mock.patch('tripleoclient.v1.baremetal.ConfigureReadyState.'
'_delete_raid_volumes')
@mock.patch('rdomanager_oscplugin.v1.baremetal.ConfigureReadyState.'
@mock.patch('tripleoclient.v1.baremetal.ConfigureReadyState.'
'_change_power_state')
@mock.patch('rdomanager_oscplugin.v1.baremetal.ConfigureReadyState.'
@mock.patch('tripleoclient.v1.baremetal.ConfigureReadyState.'
'_run_introspection')
def test_configure_ready_state(self, mock_run_introspection,
mock_change_power_state,
@ -611,7 +611,7 @@ class TestConfigureReadyState(fakes.TestBaremetal):
nodes = [mock.Mock(uuid='foo', driver='drac'),
mock.Mock(uuid='bar', driver='ilo'),
mock.Mock(uuid='baz', driver='drac')]
bm_client = self.app.client_manager.rdomanager_oscplugin.baremetal()
bm_client = self.app.client_manager.tripleoclient.baremetal()
bm_client.node.list.return_value = nodes
argslist = ['--delete-existing-raid-volumes']
@ -632,17 +632,17 @@ class TestConfigureReadyState(fakes.TestBaremetal):
]))
mock_run_introspection.assert_called_once_with(drac_nodes)
@mock.patch('rdomanager_oscplugin.v1.baremetal.ConfigureReadyState.'
@mock.patch('tripleoclient.v1.baremetal.ConfigureReadyState.'
'_configure_bios')
@mock.patch('rdomanager_oscplugin.v1.baremetal.ConfigureReadyState.'
@mock.patch('tripleoclient.v1.baremetal.ConfigureReadyState.'
'_configure_root_raid_volumes')
@mock.patch('rdomanager_oscplugin.v1.baremetal.ConfigureReadyState.'
@mock.patch('tripleoclient.v1.baremetal.ConfigureReadyState.'
'_configure_nonroot_raid_volumes')
@mock.patch('rdomanager_oscplugin.v1.baremetal.ConfigureReadyState.'
@mock.patch('tripleoclient.v1.baremetal.ConfigureReadyState.'
'_wait_for_drac_config_jobs')
@mock.patch('rdomanager_oscplugin.v1.baremetal.ConfigureReadyState.'
@mock.patch('tripleoclient.v1.baremetal.ConfigureReadyState.'
'_change_power_state')
@mock.patch('rdomanager_oscplugin.v1.baremetal.ConfigureReadyState.'
@mock.patch('tripleoclient.v1.baremetal.ConfigureReadyState.'
'_run_introspection')
def test_configure_ready_state_with_delete_existing_raid_volumes(
self, mock_run_introspection, mock_change_power_state,
@ -653,7 +653,7 @@ class TestConfigureReadyState(fakes.TestBaremetal):
nodes = [mock.Mock(uuid='foo', driver='drac'),
mock.Mock(uuid='bar', driver='ilo'),
mock.Mock(uuid='baz', driver='drac')]
bm_client = self.app.client_manager.rdomanager_oscplugin.baremetal()
bm_client = self.app.client_manager.tripleoclient.baremetal()
bm_client.node.list.return_value = nodes
parsed_args = self.check_parser(self.cmd, [], [])
@ -676,7 +676,7 @@ class TestConfigureReadyState(fakes.TestBaremetal):
return_value=0)
def test__configure_bios(self, mock_sleep_time):
nodes = [mock.Mock(uuid='foo')]
bm_client = self.app.client_manager.rdomanager_oscplugin.baremetal()
bm_client = self.app.client_manager.tripleoclient.baremetal()
self.cmd.bm_client = bm_client
self.cmd._configure_bios(nodes)
@ -689,7 +689,7 @@ class TestConfigureReadyState(fakes.TestBaremetal):
return_value=0)
def test__configure_root_raid_volumes(self, mock_sleep_time):
nodes = [mock.Mock(uuid='foo')]
bm_client = self.app.client_manager.rdomanager_oscplugin.baremetal()
bm_client = self.app.client_manager.tripleoclient.baremetal()
self.cmd.bm_client = bm_client
self.cmd._configure_root_raid_volumes(nodes)
@ -705,7 +705,7 @@ class TestConfigureReadyState(fakes.TestBaremetal):
return_value=0)
def test__configure_nonroot_raid_volumes(self, mock_sleep_time):
nodes = [mock.Mock(uuid='foo')]
bm_client = self.app.client_manager.rdomanager_oscplugin.baremetal()
bm_client = self.app.client_manager.tripleoclient.baremetal()
self.cmd.bm_client = bm_client
self.cmd._configure_nonroot_raid_volumes(nodes)
@ -721,7 +721,7 @@ class TestConfigureReadyState(fakes.TestBaremetal):
return_value=0)
def test__wait_for_drac_config_jobs(self, mock_sleep_time):
nodes = [mock.Mock(uuid='foo')]
bm_client = self.app.client_manager.rdomanager_oscplugin.baremetal()
bm_client = self.app.client_manager.tripleoclient.baremetal()
bm_client.node.vendor_passthru.side_effect = [
mock.Mock(unfinished_jobs={'percent_complete': '34',
'id': 'JID_343938731947',
@ -742,7 +742,7 @@ class TestConfigureReadyState(fakes.TestBaremetal):
return_value=0)
def test__wait_for_drac_config_jobs_times_out(self, mock_sleep_time):
nodes = [mock.Mock(uuid='foo')]
bm_client = self.app.client_manager.rdomanager_oscplugin.baremetal()
bm_client = self.app.client_manager.tripleoclient.baremetal()
bm_client.node.vendor_passthru.return_value = mock.Mock(
unfinished_jobs={'percent_complete': '34',
'id': 'JID_343938731947',
@ -759,7 +759,7 @@ class TestConfigureReadyState(fakes.TestBaremetal):
def test__delete_raid_volumes(self, mock_sleep_time):
node_with_raid_volume = mock.Mock(uuid='foo')
nodes = [node_with_raid_volume, mock.Mock(uuid='bar')]
bm_client = self.app.client_manager.rdomanager_oscplugin.baremetal()
bm_client = self.app.client_manager.tripleoclient.baremetal()
bm_client.node.vendor_passthru.side_effect = [
mock.Mock(virtual_disks=[
{'controller': 'RAID.Integrated.1-1',
@ -788,7 +788,7 @@ class TestConfigureReadyState(fakes.TestBaremetal):
def test__change_power_state(self):
nodes = [mock.Mock(uuid='foo')]
bm_client = self.app.client_manager.rdomanager_oscplugin.baremetal()
bm_client = self.app.client_manager.tripleoclient.baremetal()
self.cmd.bm_client = bm_client
self.cmd._change_power_state(nodes, 'reboot')
@ -796,12 +796,12 @@ class TestConfigureReadyState(fakes.TestBaremetal):
bm_client.node.set_power_state.assert_called_once_with('foo', 'reboot')
@mock.patch('ironic_discoverd.client.introspect', autospec=True)
@mock.patch('rdomanager_oscplugin.utils.wait_for_node_discovery',
@mock.patch('tripleoclient.utils.wait_for_node_discovery',
autospec=True)
def test__run_introspection(self, mock_wait_for_node_discovery,
mock_introspect):
nodes = [mock.Mock(uuid='foo')]
bm_client = self.app.client_manager.rdomanager_oscplugin.baremetal()
bm_client = self.app.client_manager.tripleoclient.baremetal()
self.cmd.bm_client = bm_client
self.cmd.discoverd_url = None
@ -825,7 +825,7 @@ class TestConfigureBaremetalBoot(fakes.TestBaremetal):
def test_configure_boot(self, find_resource_mock):
find_resource_mock.return_value = mock.Mock(id="IDIDID")
bm_client = self.app.client_manager.rdomanager_oscplugin.baremetal()
bm_client = self.app.client_manager.tripleoclient.baremetal()
bm_client.node.list.return_value = [
mock.Mock(uuid="ABCDEFGH"),
mock.Mock(uuid="IJKLMNOP"),
@ -872,7 +872,7 @@ class TestConfigureBaremetalBoot(fakes.TestBaremetal):
def test_configure_boot_in_transition(self, _, find_resource_mock):
find_resource_mock.return_value = mock.Mock(id="IDIDID")
bm_client = self.app.client_manager.rdomanager_oscplugin.baremetal()
bm_client = self.app.client_manager.tripleoclient.baremetal()
bm_client.node.list.return_value = [mock.Mock(uuid="ABCDEFGH",
power_state=None),
]
@ -900,7 +900,7 @@ class TestConfigureBaremetalBoot(fakes.TestBaremetal):
def test_configure_boot_timeout(self, _, find_resource_mock):
find_resource_mock.return_value = mock.Mock(id="IDIDID")
bm_client = self.app.client_manager.rdomanager_oscplugin.baremetal()
bm_client = self.app.client_manager.tripleoclient.baremetal()
bm_client.node.list.return_value = [mock.Mock(uuid="ABCDEFGH",
power_state=None),
]
@ -915,7 +915,7 @@ class TestConfigureBaremetalBoot(fakes.TestBaremetal):
def test_configure_boot_skip_maintenance(self, find_resource_mock):
find_resource_mock.return_value = mock.Mock(id="IDIDID")
bm_client = self.app.client_manager.rdomanager_oscplugin.baremetal()
bm_client = self.app.client_manager.tripleoclient.baremetal()
bm_client.node.list.return_value = [
mock.Mock(uuid="ABCDEFGH", maintenance=False),
]
@ -934,7 +934,7 @@ class TestConfigureBaremetalBoot(fakes.TestBaremetal):
def test_configure_boot_existing_properties(self, find_resource_mock):
find_resource_mock.return_value = mock.Mock(id="IDIDID")
bm_client = self.app.client_manager.rdomanager_oscplugin.baremetal()
bm_client = self.app.client_manager.tripleoclient.baremetal()
bm_client.node.list.return_value = [
mock.Mock(uuid="ABCDEFGH"),
mock.Mock(uuid="IJKLMNOP"),
@ -1015,7 +1015,7 @@ class TestShowNodeCapabilities(fakes.TestBaremetal):
def test_success(self):
bm_client = self.app.client_manager.rdomanager_oscplugin.baremetal()
bm_client = self.app.client_manager.tripleoclient.baremetal()
bm_client.node.list.return_value = [
mock.Mock(uuid='UUID1'),

0
rdomanager_oscplugin/tests/v1/overcloud_deploy/__init__.py → tripleoclient/tests/v1/overcloud_deploy/__init__.py

2
rdomanager_oscplugin/tests/v1/overcloud_deploy/fakes.py → tripleoclient/tests/v1/overcloud_deploy/fakes.py

@ -67,7 +67,7 @@ class TestDeployOvercloud(utils.TestCommand):
super(TestDeployOvercloud, self).setUp()
self.app.client_manager.auth_ref = mock.Mock(auth_token="TOKEN")
self.app.client_manager.rdomanager_oscplugin = FakeClientWrapper()
self.app.client_manager.tripleoclient = FakeClientWrapper()
self.app.client_manager.network = mock.Mock()
self.app.client_manager.compute = mock.Mock()
self.app.client_manager.identity = mock.Mock()

166
rdomanager_oscplugin/tests/v1/overcloud_deploy/test_overcloud_deploy.py → tripleoclient/tests/v1/overcloud_deploy/test_overcloud_deploy.py

@ -22,11 +22,11 @@ from openstackclient.common import exceptions as oscexc
from openstackclient.tests import utils as oscutils
from tuskarclient.v2.plans import Plan
from rdomanager_oscplugin import exceptions
from rdomanager_oscplugin.tests.v1.overcloud_deploy import fakes
from rdomanager_oscplugin.tests.v1.utils import (
from tripleoclient import exceptions
from tripleoclient.tests.v1.overcloud_deploy import fakes
from tripleoclient.tests.v1.utils import (
generate_overcloud_passwords_mock)
from rdomanager_oscplugin.v1 import overcloud_deploy
from tripleoclient.v1 import overcloud_deploy
class TestDeployOvercloud(fakes.TestDeployOvercloud):
@ -44,18 +44,18 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
self._get_passwords = generate_overcloud_passwords_mock
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_deploy_postconfig')
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_create_tempest_deployer_input', autospec=True)
@mock.patch('rdomanager_oscplugin.utils.generate_overcloud_passwords')
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.utils.generate_overcloud_passwords')
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_create_overcloudrc')
@mock.patch('os_cloud_config.keystone.setup_endpoints', autospec=True)
@mock.patch('time.sleep', return_value=None)
@mock.patch('os_cloud_config.keystone.initialize', autospec=True)
@mock.patch('rdomanager_oscplugin.utils.remove_known_hosts', autospec=True)
@mock.patch('rdomanager_oscplugin.utils.wait_for_stack_ready',
@mock.patch('tripleoclient.utils.remove_known_hosts', autospec=True)
@mock.patch('tripleoclient.utils.wait_for_stack_ready',
autospec=True)
@mock.patch('heatclient.common.template_utils.'
'process_multiple_environments_and_files', autospec=True)
@ -63,12 +63,12 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
autospec=True)
@mock.patch('os_cloud_config.keystone_pki.generate_certs_into_json',
autospec=True)
@mock.patch('rdomanager_oscplugin.utils.create_environment_file',
@mock.patch('tripleoclient.utils.create_environment_file',
autospec=True)
@mock.patch('rdomanager_oscplugin.utils.get_config_value', autospec=True)
@mock.patch('rdomanager_oscplugin.utils.check_hypervisor_stats',
@mock.patch('tripleoclient.utils.get_config_value', autospec=True)
@mock.patch('tripleoclient.utils.check_hypervisor_stats',
autospec=True)
@mock.patch('rdomanager_oscplugin.utils.create_cephx_key',
@mock.patch('tripleoclient.utils.create_cephx_key',
autospec=True)
@mock.patch('uuid.uuid1', autospec=True)
def test_tht_scale(self, mock_uuid1, mock_create_cephx_key,
@ -94,7 +94,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
mock_generate_overcloud_passwords.return_value = self._get_passwords()
clients = self.app.client_manager
orchestration_client = clients.rdomanager_oscplugin.orchestration()
orchestration_client = clients.tripleoclient.orchestration()
orchestration_client.stacks.get.return_value = fakes.create_tht_stack()
mock_check_hypervisor_stats.return_value = {
@ -113,7 +113,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
baremetal = clients.rdomanager_oscplugin.baremetal()
baremetal = clients.tripleoclient.baremetal()
baremetal.node.list.return_value = range(10)
result = self.cmd.take_action(parsed_args)
@ -180,18 +180,18 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
mock_create_tempest_deployer_input.assert_called_with(self.cmd)
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_deploy_postconfig')
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_create_tempest_deployer_input', autospec=True)
@mock.patch('rdomanager_oscplugin.utils.generate_overcloud_passwords')
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.utils.generate_overcloud_passwords')
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_create_overcloudrc')
@mock.patch('os_cloud_config.keystone.setup_endpoints', autospec=True)
@mock.patch('time.sleep', return_value=None)
@mock.patch('os_cloud_config.keystone.initialize', autospec=True)
@mock.patch('rdomanager_oscplugin.utils.remove_known_hosts', autospec=True)
@mock.patch('rdomanager_oscplugin.utils.wait_for_stack_ready',
@mock.patch('tripleoclient.utils.remove_known_hosts', autospec=True)
@mock.patch('tripleoclient.utils.wait_for_stack_ready',
autospec=True)
@mock.patch('heatclient.common.template_utils.'
'process_multiple_environments_and_files', autospec=True)
@ -199,12 +199,12 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
autospec=True)
@mock.patch('os_cloud_config.keystone_pki.generate_certs_into_json',
autospec=True)
@mock.patch('rdomanager_oscplugin.utils.create_environment_file',
@mock.patch('tripleoclient.utils.create_environment_file',
autospec=True)
@mock.patch('rdomanager_oscplugin.utils.get_config_value', autospec=True)
@mock.patch('rdomanager_oscplugin.utils.check_hypervisor_stats',
@mock.patch('tripleoclient.utils.get_config_value', autospec=True)
@mock.patch('tripleoclient.utils.check_hypervisor_stats',
autospec=True)
@mock.patch('rdomanager_oscplugin.utils.create_cephx_key',
@mock.patch('tripleoclient.utils.create_cephx_key',
autospec=True)
@mock.patch('uuid.uuid1', autospec=True)
def test_tht_deploy(self, mock_uuid1, mock_create_cephx_key,
@ -230,7 +230,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
mock_generate_overcloud_passwords.return_value = self._get_passwords()
clients = self.app.client_manager
orchestration_client = clients.rdomanager_oscplugin.orchestration()
orchestration_client = clients.tripleoclient.orchestration()
mock_stack = fakes.create_tht_stack()
orchestration_client.stacks.get.return_value = None
@ -255,7 +255,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
baremetal = clients.rdomanager_oscplugin.baremetal()
baremetal = clients.tripleoclient.baremetal()
baremetal.node.list.return_value = range(10)
result = self.cmd.take_action(parsed_args)
@ -330,18 +330,18 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
mock_create_tempest_deployer_input.assert_called_with(self.cmd)
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_deploy_postconfig')
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_create_tempest_deployer_input', autospec=True)
@mock.patch('rdomanager_oscplugin.utils.generate_overcloud_passwords')
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.utils.generate_overcloud_passwords')
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_create_overcloudrc')
@mock.patch('os_cloud_config.keystone.setup_endpoints', autospec=True)
@mock.patch('time.sleep', return_value=None)
@mock.patch('os_cloud_config.keystone.initialize', autospec=True)
@mock.patch('rdomanager_oscplugin.utils.remove_known_hosts', autospec=True)
@mock.patch('rdomanager_oscplugin.utils.wait_for_stack_ready',
@mock.patch('tripleoclient.utils.remove_known_hosts', autospec=True)
@mock.patch('tripleoclient.utils.wait_for_stack_ready',
autospec=True)
@mock.patch('heatclient.common.template_utils.'
'process_multiple_environments_and_files', autospec=True)
@ -349,10 +349,10 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
autospec=True)
@mock.patch('os_cloud_config.keystone_pki.generate_certs_into_json',
autospec=True)
@mock.patch('rdomanager_oscplugin.utils.create_environment_file',
@mock.patch('tripleoclient.utils.create_environment_file',
autospec=True)
@mock.patch('rdomanager_oscplugin.utils.get_config_value', autospec=True)
@mock.patch('rdomanager_oscplugin.utils.check_hypervisor_stats',
@mock.patch('tripleoclient.utils.get_config_value', autospec=True)
@mock.patch('tripleoclient.utils.check_hypervisor_stats',
autospec=True)
def test_deploy_custom_templates(self, mock_check_hypervisor_stats,
mock_get_key,
@ -376,7 +376,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
mock_generate_overcloud_passwords.return_value = self._get_passwords()
clients = self.app.client_manager
orchestration_client = clients.rdomanager_oscplugin.orchestration()
orchestration_client = clients.tripleoclient.orchestration()
orchestration_client.stacks.get.return_value = fakes.create_tht_stack()
mock_check_hypervisor_stats.return_value = {
@ -395,7 +395,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
baremetal = clients.rdomanager_oscplugin.baremetal()
baremetal = clients.tripleoclient.baremetal()
baremetal.node.list.return_value = range(10)
result = self.cmd.take_action(parsed_args)
@ -420,22 +420,22 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
mock_create_tempest_deployer_input.assert_called_with(self.cmd)
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_deploy_postconfig')
@mock.patch('rdomanager_oscplugin.utils.get_config_value', autospec=True)
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.utils.get_config_value', autospec=True)
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_create_tempest_deployer_input', autospec=True)
@mock.patch('rdomanager_oscplugin.utils.generate_overcloud_passwords')
@mock.patch('tripleoclient.utils.generate_overcloud_passwords')
@mock.patch('heatclient.common.template_utils.'
'process_multiple_environments_and_files')
@mock.patch('heatclient.common.template_utils.get_template_contents')
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_get_stack')
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_pre_heat_deploy')
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_create_overcloudrc')
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_heat_deploy')
def test_tuskar_deploy(self, mock_heat_deploy, mock_create_overcloudrc,
most_pre_deploy, mock_get_stack,
@ -462,7 +462,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
]
clients = self.app.client_manager
management = clients.rdomanager_oscplugin.management()
management = clients.tripleoclient.management()
management.plans.templates.return_value = {}
management.plans.resource_class = Plan
@ -483,7 +483,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
baremetal = clients.rdomanager_oscplugin.baremetal()
baremetal = clients.tripleoclient.baremetal()
baremetal.node.list.return_value = range(10)
result = self.cmd.take_action(parsed_args)
@ -538,22 +538,22 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
mock_create_tempest_deployer_input.assert_called_with(self.cmd)
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_deploy_postconfig')
@mock.patch('rdomanager_oscplugin.utils.get_config_value', autospec=True)
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.utils.get_config_value', autospec=True)
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_create_tempest_deployer_input', autospec=True)
@mock.patch('rdomanager_oscplugin.utils.generate_overcloud_passwords')
@mock.patch('tripleoclient.utils.generate_overcloud_passwords')
@mock.patch('heatclient.common.template_utils.'
'process_multiple_environments_and_files')
@mock.patch('heatclient.common.template_utils.get_template_contents')
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_get_stack')
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_pre_heat_deploy')
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_create_overcloudrc')
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_heat_deploy')
def test_tuskar_scale(self, mock_heat_deploy, mock_create_overcloudrc,
most_pre_deploy, mock_get_stack,
@ -579,7 +579,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
]
clients = self.app.client_manager
management = clients.rdomanager_oscplugin.management()
management = clients.tripleoclient.management()
management.plans.templates.return_value = {}
management.plans.resource_class = Plan
@ -600,7 +600,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
baremetal = clients.rdomanager_oscplugin.baremetal()
baremetal = clients.tripleoclient.baremetal()
baremetal.node.list.return_value = range(10)
result = self.cmd.take_action(parsed_args)
@ -655,22 +655,22 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
mock_create_tempest_deployer_input.assert_called_with(self.cmd)
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_deploy_postconfig')
@mock.patch('rdomanager_oscplugin.utils.get_config_value', autospec=True)
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.utils.get_config_value', autospec=True)
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_create_tempest_deployer_input', autospec=True)
@mock.patch('rdomanager_oscplugin.utils.generate_overcloud_passwords')
@mock.patch('tripleoclient.utils.generate_overcloud_passwords')
@mock.patch('heatclient.common.template_utils.'
'process_multiple_environments_and_files')
@mock.patch('heatclient.common.template_utils.get_template_contents')
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_get_stack')
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_pre_heat_deploy')
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_create_overcloudrc')
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_heat_deploy')
def test_tuskar_deploy_extra_config(self, mock_heat_deploy,
mock_create_overcloudrc,
@ -701,7 +701,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
]
clients = self.app.client_manager
management = clients.rdomanager_oscplugin.management()
management = clients.tripleoclient.management()
management.plans.templates.return_value = {}
management.plans.resource_class = Plan
@ -722,7 +722,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
baremetal = clients.rdomanager_oscplugin.baremetal()
baremetal = clients.tripleoclient.baremetal()
baremetal.node.list.return_value = range(10)
result = self.cmd.take_action(parsed_args)
@ -786,11 +786,11 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
mock_create_tempest_deployer_input.assert_called_with(self.cmd)
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_deploy_tuskar', autospec=True)
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_deploy_tripleo_heat_templates', autospec=True)
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_pre_heat_deploy', autospec=True)
def test_invalid_deploy_call(self, mock_pre_deploy, mock_deploy_tht,
mock_deploy_tuskar):
@ -812,11 +812,11 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
self.assertFalse(mock_deploy_tht.called)
self.assertFalse(mock_deploy_tuskar.called)
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_deploy_tuskar', autospec=True)
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_deploy_tripleo_heat_templates', autospec=True)
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_pre_heat_deploy', autospec=True)
def test_missing_sat_url(self, mock_pre_deploy, mock_deploy_tht,
mock_deploy_tuskar):
@ -838,17 +838,17 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
self.assertFalse(mock_deploy_tht.called)
self.assertFalse(mock_deploy_tuskar.called)
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_create_tempest_deployer_input', autospec=True)
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_create_overcloudrc', autospec=True)
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_get_overcloud_endpoint', autospec=True)
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_deploy_tuskar', autospec=True)
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_deploy_tripleo_heat_templates', autospec=True)
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_pre_heat_deploy', autospec=True)
def test_rhel_reg_params_provided(self, mock_pre_deploy, mock_deploy_tht,
mock_deploy_tuskar, mock_oc_endpoint,
@ -921,11 +921,11 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
self.cmd._validate_args,
parsed_args)
@mock.patch('rdomanager_oscplugin.utils.check_hypervisor_stats',
@mock.patch('tripleoclient.utils.check_hypervisor_stats',
autospec=True)
def test_pre_heat_deploy_failed(self, mock_check_hypervisor_stats):
clients = self.app.client_manager
orchestration_client = clients.rdomanager_oscplugin.orchestration()
orchestration_client = clients.tripleoclient.orchestration()
orchestration_client.stacks.get.return_value = None
mock_check_hypervisor_stats.return_value = None
arglist = ['--templates']

8
rdomanager_oscplugin/tests/v1/overcloud_deploy/test_overcloud_deploy_validators.py → tripleoclient/tests/v1/overcloud_deploy/test_overcloud_deploy_validators.py

@ -16,8 +16,8 @@
import mock
from uuid import uuid4
from rdomanager_oscplugin.tests.v1.overcloud_deploy import fakes
from rdomanager_oscplugin.v1 import overcloud_deploy
from tripleoclient.tests.v1.overcloud_deploy import fakes
from tripleoclient.v1 import overcloud_deploy
class TestDeployValidators(fakes.TestDeployOvercloud):
@ -27,7 +27,7 @@ class TestDeployValidators(fakes.TestDeployOvercloud):
# Get the command object to test
self.cmd = overcloud_deploy.DeployOvercloud(self.app, None)
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_image_ids',
return_value=('fb7a98fb-acb9-43ec-9b93-525d1286f9d8',
'8558de2e-1b72-4654-8ba9-cceb89e9194e'))
@ -60,7 +60,7 @@ class TestDeployValidators(fakes.TestDeployOvercloud):
self.assertEqual(self.cmd.predeploy_errors, 1)
self.assertEqual(self.cmd.predeploy_warnings, 1)
@mock.patch('rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud.'
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_image_ids',
return_value=('fb7a98fb-acb9-43ec-9b93-525d1286f9d8',
'8558de2e-1b72-4654-8ba9-cceb89e9194e'))

0
rdomanager_oscplugin/tests/v1/overcloud_image/__init__.py → tripleoclient/tests/v1/overcloud_image/__init__.py

4
rdomanager_oscplugin/tests/v1/overcloud_image/test_overcloud_image.py → tripleoclient/tests/v1/overcloud_image/test_overcloud_image.py

@ -17,8 +17,8 @@ import mock
import os
from openstackclient.common import exceptions
from rdomanager_oscplugin.tests.v1.test_plugin import TestPluginV1
from rdomanager_oscplugin.v1 import overcloud_image
from tripleoclient.tests.v1.test_plugin import TestPluginV1
from tripleoclient.v1 import overcloud_image
class TestOvercloudImageBuild(TestPluginV1):

0
rdomanager_oscplugin/tests/v1/overcloud_netenv_validate/__init__.py → tripleoclient/tests/v1/overcloud_netenv_validate/__init__.py

0
rdomanager_oscplugin/tests/v1/overcloud_netenv_validate/fakes.py → tripleoclient/tests/v1/overcloud_netenv_validate/fakes.py

4
rdomanager_oscplugin/tests/v1/overcloud_netenv_validate/test_overcloud_netenv_validate.py → tripleoclient/tests/v1/overcloud_netenv_validate/test_overcloud_netenv_validate.py

@ -18,8 +18,8 @@ import tempfile
import yaml
from rdomanager_oscplugin.tests.v1.overcloud_netenv_validate import fakes
from rdomanager_oscplugin.v1 import overcloud_netenv_validate
from tripleoclient.tests.v1.overcloud_netenv_validate import fakes
from tripleoclient.v1 import overcloud_netenv_validate
class TestValidateOvercloudNetenv(fakes.TestValidateOvercloudNetenv):

0
rdomanager_oscplugin/tests/v1/overcloud_node/__init__.py → tripleoclient/tests/v1/overcloud_node/__init__.py

2
rdomanager_oscplugin/tests/v1/overcloud_node/fakes.py → tripleoclient/tests/v1/overcloud_node/fakes.py

@ -45,4 +45,4 @@ class TestDeleteNode(utils.TestCommand):
super(TestDeleteNode, self).setUp()
self.app.client_manager.auth_ref = mock.Mock(auth_token="TOKEN")
self.app.client_manager.rdomanager_oscplugin = FakeClientWrapper()
self.app.client_manager.tripleoclient = FakeClientWrapper()

4
rdomanager_oscplugin/tests/v1/overcloud_node/test_overcloud_node.py → tripleoclient/tests/v1/overcloud_node/test_overcloud_node.py

@ -15,8 +15,8 @@
import mock
from rdomanager_oscplugin.tests.v1.overcloud_node import fakes
from rdomanager_oscplugin.v1 import overcloud_node
from tripleoclient.tests.v1.overcloud_node import fakes
from tripleoclient.v1 import overcloud_node
class TestDeleteNode(fakes.TestDeleteNode):

0
rdomanager_oscplugin/tests/v1/overcloud_update/__init__.py → tripleoclient/tests/v1/overcloud_update/__init__.py

2
rdomanager_oscplugin/tests/v1/overcloud_update/fakes.py → tripleoclient/tests/v1/overcloud_update/fakes.py

@ -45,4 +45,4 @@ class TestOvercloudUpdate(utils.TestCommand):
super(TestOvercloudUpdate, self).setUp()
self.app.client_manager.auth_ref = mock.Mock(auth_token="TOKEN")
self.app.client_manager.rdomanager_oscplugin = FakeClientWrapper()
self.app.client_manager.tripleoclient = FakeClientWrapper()

4
rdomanager_oscplugin/tests/v1/overcloud_update/test_overcloud_update.py → tripleoclient/tests/v1/overcloud_update/test_overcloud_update.py

@ -15,8 +15,8 @@
import mock
from rdomanager_oscplugin.tests.v1.overcloud_update import fakes
from rdomanager_oscplugin.v1 import overcloud_update
from tripleoclient.tests.v1.overcloud_update import fakes
from tripleoclient.v1 import overcloud_update
class TestOvercloudUpdate(fakes.TestOvercloudUpdate):

10
rdomanager_oscplugin/tests/v1/test_plugin.py → tripleoclient/tests/v1/test_plugin.py

@ -13,12 +13,12 @@
# under the License.
#
from rdomanager_oscplugin.tests import base
from rdomanager_oscplugin.tests import fakes
from tripleoclient.tests import base
from tripleoclient.tests import fakes
# Load the plugin init module for the plugin list and show commands
plugin_name = 'rdomanager_oscplugin'
plugin_client = 'rdomanager_oscplugin.plugin'
plugin_name = 'tripleoclient'
plugin_client = 'tripleoclient.plugin'
class FakePluginV1Client(object):
@ -31,7 +31,7 @@ class TestPluginV1(base.TestCommand):
def setUp(self):
super(TestPluginV1, self).setUp()
self.app.client_manager.rdomanager_oscplugin = FakePluginV1Client(
self.app.client_manager.tripleoclient = FakePluginV1Client(
endpoint=fakes.AUTH_URL,
token=fakes.AUTH_TOKEN,
)

4
rdomanager_oscplugin/tests/v1/undercloud/test_undercloud.py → tripleoclient/tests/v1/undercloud/test_undercloud.py

@ -15,10 +15,10 @@
import mock
from rdomanager_oscplugin.tests.v1.test_plugin import TestPluginV1
from tripleoclient.tests.v1.test_plugin import TestPluginV1
# Load the plugin init module for the plugin list and show commands
from rdomanager_oscplugin.v1 import undercloud
from tripleoclient.v1 import undercloud
class FakePluginV1Client(object):

0
rdomanager_oscplugin/tests/v1/utils.py → tripleoclient/tests/v1/utils.py

2
rdomanager_oscplugin/utils.py → tripleoclient/utils.py

@ -26,7 +26,7 @@ import sys
import time
import uuid
from rdomanager_oscplugin import exceptions
from tripleoclient import exceptions
WEBROOT = '/dashboard/'

0
rdomanager_oscplugin/v1/__init__.py → tripleoclient/v1/__init__.py

18
rdomanager_oscplugin/v1/baremetal.py → tripleoclient/v1/baremetal.py

@ -28,8 +28,8 @@ from ironic_discoverd import client as discoverd_client
from openstackclient.common import utils as osc_utils
from os_cloud_config import nodes
from rdomanager_oscplugin import exceptions
from rdomanager_oscplugin import utils
from tripleoclient import exceptions
from tripleoclient import utils
def _csv_to_nodes_dict(nodes_csv):
@ -177,7 +177,7 @@ class ImportBaremetal(command.Command):
nodes.register_all_nodes(
parsed_args.service_host,
nodes_json,
client=self.app.client_manager.rdomanager_oscplugin.baremetal(),
client=self.app.client_manager.tripleoclient.baremetal(),
keystone_client=self.app.client_manager.identity)