Rename rdomanager_oscplugin to tripleoclient

Change-Id: I4593a5248160204645d567d7f2fa3a396629082b
This commit is contained in:
Brad P. Crochet 2015-09-08 10:22:22 -04:00
parent a74940201b
commit 12edde8a53
40 changed files with 214 additions and 214 deletions

View File

@ -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

View File

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

View File

@ -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),

View File

@ -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')

View File

@ -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):

View File

@ -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

View File

@ -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()

View File

@ -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'),

View File

@ -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()

View File

@ -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']

View File

@ -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'))

View File

@ -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):

View File

@ -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):

View File

@ -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()

View File

@ -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):

View File

@ -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()

View File

@ -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):

View File

@ -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,
)

View File

@ -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):

View File

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

View File

@ -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)
@ -205,7 +205,7 @@ class StartBaremetalIntrospectionBulk(IntrospectionParser, command.Command):
def take_action(self, parsed_args):
self.log.debug("take_action(%s)" % parsed_args)
client = self.app.client_manager.rdomanager_oscplugin.baremetal()
client = self.app.client_manager.tripleoclient.baremetal()
auth_token = self.app.client_manager.auth_ref.auth_token
@ -251,7 +251,7 @@ class StartBaremetalIntrospectionBulk(IntrospectionParser, command.Command):
has_errors = True
clients = self.app.client_manager
baremetal_client = clients.rdomanager_oscplugin.baremetal()
baremetal_client = clients.tripleoclient.baremetal()
print("Setting manageable nodes to available...")
self.log.debug("Moving manageable nodes to available state.")
@ -276,7 +276,7 @@ class StatusBaremetalIntrospectionBulk(IntrospectionParser, lister.Lister):
def take_action(self, parsed_args):
self.log.debug("take_action(%s)" % parsed_args)
client = self.app.client_manager.rdomanager_oscplugin.baremetal()
client = self.app.client_manager.tripleoclient.baremetal()
statuses