Remove configs parameter from TripleoInventory
The TripleoInventory class used to support the command line options being passed in as a config option for tripleo-validations. This was corrected in tripleo-validations during the Queens cycle and is no longer used. Change-Id: Ieb21e139d0197c87696e318c7d85fef51dfb96fc
This commit is contained in:
parent
d610129d8f
commit
9288f0f8fc
@ -0,0 +1,6 @@
|
||||
---
|
||||
other:
|
||||
- |
|
||||
TripleoInventory class no longer supports the parameters being passed in as
|
||||
as config object. This was added to support transition in in
|
||||
tripleo-validations that was corrected in Queens.
|
@ -83,7 +83,7 @@ class StackOutputs(object):
|
||||
|
||||
|
||||
class TripleoInventory(object):
|
||||
def __init__(self, configs=None, session=None, hclient=None,
|
||||
def __init__(self, session=None, hclient=None,
|
||||
plan_name=None, auth_url=None, project_name=None,
|
||||
cacert=None, username=None, ansible_ssh_user=None,
|
||||
host_network=None, ansible_python_interpreter=None):
|
||||
@ -91,25 +91,13 @@ class TripleoInventory(object):
|
||||
self.hclient = hclient
|
||||
self.hosts_format_dict = False
|
||||
self.host_network = host_network or HOST_NETWORK
|
||||
if configs is not None:
|
||||
# FIXME(shardy) backwards compatibility until we switch
|
||||
# tripleo-validations to pass the individual values
|
||||
self.auth_url = configs.auth_url
|
||||
self.cacert = configs.cacert
|
||||
self.project_name = configs.project_name
|
||||
self.username = configs.username
|
||||
self.ansible_ssh_user = configs.ansible_ssh_user
|
||||
self.plan_name = configs.plan
|
||||
self.ansible_python_interpreter = \
|
||||
configs.ansible_python_interpreter
|
||||
else:
|
||||
self.auth_url = auth_url
|
||||
self.cacert = cacert
|
||||
self.project_name = project_name
|
||||
self.username = username
|
||||
self.ansible_ssh_user = ansible_ssh_user
|
||||
self.plan_name = plan_name
|
||||
self.ansible_python_interpreter = ansible_python_interpreter
|
||||
self.auth_url = auth_url
|
||||
self.cacert = cacert
|
||||
self.project_name = project_name
|
||||
self.username = username
|
||||
self.ansible_ssh_user = ansible_ssh_user
|
||||
self.plan_name = plan_name
|
||||
self.ansible_python_interpreter = ansible_python_interpreter
|
||||
self.stack_outputs = StackOutputs(self.plan_name, self.hclient)
|
||||
self.hostvars = {}
|
||||
|
||||
|
@ -171,21 +171,6 @@ class TestInventory(base.TestCase):
|
||||
def test_inventory_list(self):
|
||||
self._inventory_list(self.inventory)
|
||||
|
||||
def test_inventory_list_backwards_compat_configs(self):
|
||||
# FIXME(shardy) backwards compatibility until we switch
|
||||
# tripleo-validations to pass the individual values
|
||||
configs = MagicMock()
|
||||
configs.plan = self.plan_name
|
||||
configs.auth_url = 'xyz://keystone.local'
|
||||
configs.cacert = 'acacert'
|
||||
configs.project_name = 'admin'
|
||||
configs.username = 'admin'
|
||||
configs.ansible_ssh_user = 'heat-admin'
|
||||
configs.ansible_python_interpreter = None
|
||||
inventory = TripleoInventory(
|
||||
configs, self.session, self.hclient)
|
||||
self._inventory_list(inventory)
|
||||
|
||||
def _inventory_list(self, inventory):
|
||||
ansible_ssh_user = 'heat-admin'
|
||||
expected = {
|
||||
|
Loading…
Reference in New Issue
Block a user