From f065050d170bc26138096d1a8783bc51b0ff17fa Mon Sep 17 00:00:00 2001 From: Adam Dyess Date: Thu, 23 Jan 2020 10:52:50 -0600 Subject: [PATCH] use ':' style argument definitions rather than '@' --- zaza/openstack/charm_tests/keystone/tests.py | 14 ++++++++++---- zaza/openstack/charm_tests/test_utils.py | 12 ++++++------ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/zaza/openstack/charm_tests/keystone/tests.py b/zaza/openstack/charm_tests/keystone/tests.py index 21a4740..c402a31 100644 --- a/zaza/openstack/charm_tests/keystone/tests.py +++ b/zaza/openstack/charm_tests/keystone/tests.py @@ -383,6 +383,12 @@ class LdapTests(BaseKeystoneTest): @staticmethod def _get_ldap_config(): + """Generate ldap config for current model. + + :return: tuple of whether ldap-server is running and if so, config + for the keystone-ldap application. + :rtype: Tuple[bool, Dict[str,str]] + """ ldap_ips = zaza.model.get_app_ips("ldap-server") if ldap_ips: return True, { @@ -397,10 +403,10 @@ class LdapTests(BaseKeystoneTest): def _find_keystone_v3_user(self, username, domain): """Find a user within a specified keystone v3 domain. - @param str username: Username to search for in keystone - @param str domain: username selected from which domain - @return: return username if found - @rtype: Optional[str] + :param str username: Username to search for in keystone + :param str domain: username selected from which domain + :return: return username if found + :rtype: Optional[str] """ client = self.admin_keystone_client domain_users = client.users.list( diff --git a/zaza/openstack/charm_tests/test_utils.py b/zaza/openstack/charm_tests/test_utils.py index 6c44b0c..48835f5 100644 --- a/zaza/openstack/charm_tests/test_utils.py +++ b/zaza/openstack/charm_tests/test_utils.py @@ -136,15 +136,15 @@ class OpenStackBaseTest(unittest.TestCase): def config_current(self, application_name=None, keys=None): """Get Current Config of an application normalized into key-values. - @param application_name: String application name for use when called + :param application_name: String application name for use when called by a charm under test other than the object's application. - @type application_name: Optional[str] - @param keys: iterable of strs to index into the current config. If + :type application_name: Optional[str] + :param keys: iterable of strs to index into the current config. If None, return all keys from the config - @type keys: Optional[Iterable[str]] - @return: Dictionary of requested config from application - @rtype: Dict[str, str] + :type keys: Optional[Iterable[str]] + :return: Dictionary of requested config from application + :rtype: Dict[str, str] """ if not application_name: application_name = self.application_name