Remove os-client-config references
We've depended on openstacksdk for config for ages now, clean up after ourselves and stop installing it in tests. Change-Id: I66b3ec2a36bc462d2f1ac151e95ccbdc946076b8
This commit is contained in:
parent
2cb4193579
commit
7696593dc1
@ -9,7 +9,6 @@
|
|||||||
- openstack/cliff
|
- openstack/cliff
|
||||||
- openstack/keystoneauth
|
- openstack/keystoneauth
|
||||||
- openstack/openstacksdk
|
- openstack/openstacksdk
|
||||||
- openstack/os-client-config
|
|
||||||
- openstack/osc-lib
|
- openstack/osc-lib
|
||||||
- openstack/python-openstackclient
|
- openstack/python-openstackclient
|
||||||
vars:
|
vars:
|
||||||
@ -30,7 +29,6 @@
|
|||||||
- openstack/cliff
|
- openstack/cliff
|
||||||
- openstack/keystoneauth
|
- openstack/keystoneauth
|
||||||
- openstack/openstacksdk
|
- openstack/openstacksdk
|
||||||
- openstack/os-client-config
|
|
||||||
- openstack/osc-lib
|
- openstack/osc-lib
|
||||||
- openstack/python-openstackclient
|
- openstack/python-openstackclient
|
||||||
vars:
|
vars:
|
||||||
@ -127,12 +125,11 @@
|
|||||||
- openstack/cliff
|
- openstack/cliff
|
||||||
- openstack/keystoneauth
|
- openstack/keystoneauth
|
||||||
- openstack/openstacksdk
|
- openstack/openstacksdk
|
||||||
- openstack/os-client-config
|
|
||||||
- openstack/osc-lib
|
- openstack/osc-lib
|
||||||
- openstack/python-openstackclient
|
- openstack/python-openstackclient
|
||||||
vars:
|
vars:
|
||||||
devstack_localrc:
|
devstack_localrc:
|
||||||
LIBS_FROM_GIT: python-openstackclient,openstacksdk,osc-lib,os-client-config,cliff
|
LIBS_FROM_GIT: python-openstackclient,openstacksdk,osc-lib,cliff
|
||||||
# This is insufficient, but leaving it here as a reminder of what may
|
# This is insufficient, but leaving it here as a reminder of what may
|
||||||
# someday be all we need to make this work
|
# someday be all we need to make this work
|
||||||
# disable_python3_package swift
|
# disable_python3_package swift
|
||||||
|
@ -51,7 +51,6 @@ munch==2.1.0
|
|||||||
netaddr==0.7.18
|
netaddr==0.7.18
|
||||||
netifaces==0.10.4
|
netifaces==0.10.4
|
||||||
openstacksdk==0.44.0
|
openstacksdk==0.44.0
|
||||||
os-client-config==1.28.0
|
|
||||||
os-service-types==1.7.0
|
os-service-types==1.7.0
|
||||||
os-testr==1.0.0
|
os-testr==1.0.0
|
||||||
osc-lib==2.0.0
|
osc-lib==2.0.0
|
||||||
|
@ -20,16 +20,6 @@ from openstackclient import shell
|
|||||||
from openstackclient.tests.unit.integ import base as test_base
|
from openstackclient.tests.unit.integ import base as test_base
|
||||||
from openstackclient.tests.unit import test_shell
|
from openstackclient.tests.unit import test_shell
|
||||||
|
|
||||||
# NOTE(dtroyer): Attempt the import to detect if the SDK installed is new
|
|
||||||
# enough to contain the os_client_config code. If so, use
|
|
||||||
# that path for mocks.
|
|
||||||
CONFIG_MOCK_BASE = "openstack.config.loader"
|
|
||||||
try:
|
|
||||||
from openstack.config import defaults # noqa
|
|
||||||
except ImportError:
|
|
||||||
# Fall back to os-client-config
|
|
||||||
CONFIG_MOCK_BASE = "os_client_config.config"
|
|
||||||
|
|
||||||
|
|
||||||
class TestIntegShellCliNoAuth(test_base.TestInteg):
|
class TestIntegShellCliNoAuth(test_base.TestInteg):
|
||||||
|
|
||||||
@ -455,8 +445,8 @@ class TestIntegShellCliPrecedenceOCC(test_base.TestInteg):
|
|||||||
temp_dir = self.useFixture(fixtures.TempDir())
|
temp_dir = self.useFixture(fixtures.TempDir())
|
||||||
return temp_dir.join(filename)
|
return temp_dir.join(filename)
|
||||||
|
|
||||||
@mock.patch(CONFIG_MOCK_BASE + ".OpenStackConfig._load_vendor_file")
|
@mock.patch("openstack.config.loader.OpenStackConfig._load_vendor_file")
|
||||||
@mock.patch(CONFIG_MOCK_BASE + ".OpenStackConfig._load_config_file")
|
@mock.patch("openstack.config.loader.OpenStackConfig._load_config_file")
|
||||||
def test_shell_args_precedence_1(self, config_mock, vendor_mock):
|
def test_shell_args_precedence_1(self, config_mock, vendor_mock):
|
||||||
"""Precedence run 1
|
"""Precedence run 1
|
||||||
|
|
||||||
@ -473,7 +463,6 @@ class TestIntegShellCliPrecedenceOCC(test_base.TestInteg):
|
|||||||
return ('file.yaml', copy.deepcopy(test_shell.PUBLIC_1))
|
return ('file.yaml', copy.deepcopy(test_shell.PUBLIC_1))
|
||||||
vendor_mock.side_effect = vendor_mock_return
|
vendor_mock.side_effect = vendor_mock_return
|
||||||
|
|
||||||
print("CONFIG_MOCK_BASE=%s" % CONFIG_MOCK_BASE)
|
|
||||||
_shell = shell.OpenStackShell()
|
_shell = shell.OpenStackShell()
|
||||||
_shell.run(
|
_shell.run(
|
||||||
"--os-password qaz extension list".split(),
|
"--os-password qaz extension list".split(),
|
||||||
@ -527,8 +516,8 @@ class TestIntegShellCliPrecedenceOCC(test_base.TestInteg):
|
|||||||
# +env, +cli, +occ
|
# +env, +cli, +occ
|
||||||
# see test_shell_args_precedence_2()
|
# see test_shell_args_precedence_2()
|
||||||
|
|
||||||
@mock.patch(CONFIG_MOCK_BASE + ".OpenStackConfig._load_vendor_file")
|
@mock.patch("openstack.config.loader.OpenStackConfig._load_vendor_file")
|
||||||
@mock.patch(CONFIG_MOCK_BASE + ".OpenStackConfig._load_config_file")
|
@mock.patch("openstack.config.loader.OpenStackConfig._load_config_file")
|
||||||
def test_shell_args_precedence_2(self, config_mock, vendor_mock):
|
def test_shell_args_precedence_2(self, config_mock, vendor_mock):
|
||||||
"""Precedence run 2
|
"""Precedence run 2
|
||||||
|
|
||||||
@ -545,7 +534,6 @@ class TestIntegShellCliPrecedenceOCC(test_base.TestInteg):
|
|||||||
return ('file.yaml', copy.deepcopy(test_shell.PUBLIC_1))
|
return ('file.yaml', copy.deepcopy(test_shell.PUBLIC_1))
|
||||||
vendor_mock.side_effect = vendor_mock_return
|
vendor_mock.side_effect = vendor_mock_return
|
||||||
|
|
||||||
print("CONFIG_MOCK_BASE=%s" % CONFIG_MOCK_BASE)
|
|
||||||
_shell = shell.OpenStackShell()
|
_shell = shell.OpenStackShell()
|
||||||
_shell.run(
|
_shell.run(
|
||||||
"--os-username zarquon --os-password qaz "
|
"--os-username zarquon --os-password qaz "
|
||||||
|
@ -9,7 +9,6 @@ oslotest>=3.2.0 # Apache-2.0
|
|||||||
requests>=2.14.2 # Apache-2.0
|
requests>=2.14.2 # Apache-2.0
|
||||||
requests-mock>=1.2.0 # Apache-2.0
|
requests-mock>=1.2.0 # Apache-2.0
|
||||||
stevedore>=1.20.0 # Apache-2.0
|
stevedore>=1.20.0 # Apache-2.0
|
||||||
os-client-config>=1.28.0 # Apache-2.0
|
|
||||||
stestr>=1.0.0 # Apache-2.0
|
stestr>=1.0.0 # Apache-2.0
|
||||||
testtools>=2.2.0 # MIT
|
testtools>=2.2.0 # MIT
|
||||||
tempest>=17.1.0 # Apache-2.0
|
tempest>=17.1.0 # Apache-2.0
|
||||||
|
2
tox.ini
2
tox.ini
@ -64,7 +64,6 @@ commands =
|
|||||||
python -m pip install -q -U -e "git+file://{toxinidir}/../cliff#egg=cliff"
|
python -m pip install -q -U -e "git+file://{toxinidir}/../cliff#egg=cliff"
|
||||||
python -m pip install -q -U -e "git+file://{toxinidir}/../keystoneauth#egg=keystoneauth"
|
python -m pip install -q -U -e "git+file://{toxinidir}/../keystoneauth#egg=keystoneauth"
|
||||||
python -m pip install -q -U -e "git+file://{toxinidir}/../osc-lib#egg=osc_lib"
|
python -m pip install -q -U -e "git+file://{toxinidir}/../osc-lib#egg=osc_lib"
|
||||||
python -m pip install -q -U -e "git+file://{toxinidir}/../os-client-config#egg=os_client_config"
|
|
||||||
pythom -m pip install -q -e "git+file://{toxinidir}/../openstacksdk#egg=openstacksdk"
|
pythom -m pip install -q -e "git+file://{toxinidir}/../openstacksdk#egg=openstacksdk"
|
||||||
python -m pip freeze
|
python -m pip freeze
|
||||||
stestr run {posargs}
|
stestr run {posargs}
|
||||||
@ -83,7 +82,6 @@ commands =
|
|||||||
python -m pip install -q -U -e "git+file://{toxinidir}/../cliff#egg=cliff"
|
python -m pip install -q -U -e "git+file://{toxinidir}/../cliff#egg=cliff"
|
||||||
python -m pip install -q -U -e "git+file://{toxinidir}/../keystoneauth#egg=keystoneauth"
|
python -m pip install -q -U -e "git+file://{toxinidir}/../keystoneauth#egg=keystoneauth"
|
||||||
python -m pip install -q -U -e "git+file://{toxinidir}/../osc-lib#egg=osc_lib"
|
python -m pip install -q -U -e "git+file://{toxinidir}/../osc-lib#egg=osc_lib"
|
||||||
python -m pip install -q -U -e "git+file://{toxinidir}/../os-client-config#egg=os_client_config"
|
|
||||||
python -m pip install -q -U -e "git+file://{toxinidir}/../openstacksdk#egg=openstacksdk"
|
python -m pip install -q -U -e "git+file://{toxinidir}/../openstacksdk#egg=openstacksdk"
|
||||||
python -m pip freeze
|
python -m pip freeze
|
||||||
stestr run {posargs}
|
stestr run {posargs}
|
||||||
|
Loading…
Reference in New Issue
Block a user