ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [ambari] 06/21: AMBARI-22797. Better CLI option names
Date Fri, 26 Jan 2018 15:22:11 GMT
This is an automated email from the ASF dual-hosted git repository.

ncole pushed a commit to branch branch-feature-AMBARI-21674
in repository https://gitbox.apache.org/repos/asf/ambari.git

commit 6a20183ac1e17ad8445feabe50fe04ddc5081712
Author: Sandor Molnar <smolnar@hortonworks.com>
AuthorDate: Sun Jan 21 22:19:30 2018 +0100

    AMBARI-22797. Better CLI option names
---
 ambari-server/src/main/python/ambari-server.py               |  8 ++++----
 ambari-server/src/main/python/ambari_server/setupSecurity.py |  8 ++++----
 ambari-server/src/test/python/TestAmbariServer.py            | 12 ++++++------
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py
index 72dd292..e7f0bcf 100755
--- a/ambari-server/src/main/python/ambari-server.py
+++ b/ambari-server/src/main/python/ambari-server.py
@@ -532,10 +532,10 @@ def init_ldap_sync_parser_options(parser):
 
 @OsFamilyFuncImpl(OsFamilyImpl.DEFAULT)
 def init_ldap_setup_parser_options(parser):
-  parser.add_option('--ldap-url-host', default=None, help="Primary Host for LDAP", dest="ldap_url_host")
-  parser.add_option('--ldap-url-port', default=None, help="Primary Port for LDAP", dest="ldap_url_port")
-  parser.add_option('--ldap-secondary-url-host', default=None, help="Secondary Host for LDAP",
dest="ldap_secondary_url_host")
-  parser.add_option('--ldap-secondary-url-port', default=None, help="Secondary Port for LDAP",
dest="ldap_secondary_url_port")
+  parser.add_option('--ldap-primary-host', default=None, help="Primary Host for LDAP", dest="ldap_primary_host")
+  parser.add_option('--ldap-primary-port', default=None, help="Primary Port for LDAP", dest="ldap_primary_port")
+  parser.add_option('--ldap-secondary-host', default=None, help="Secondary Host for LDAP",
dest="ldap_secondary_host")
+  parser.add_option('--ldap-secondary-port', default=None, help="Secondary Port for LDAP",
dest="ldap_secondary_port")
   parser.add_option('--ldap-ssl', default=None, help="Use SSL [true/false] for LDAP", dest="ldap_ssl")
   parser.add_option('--ldap-user-class', default=None, help="User Attribute Object Class
for LDAP", dest="ldap_user_class")
   parser.add_option('--ldap-user-attr', default=None, help="User Attribute Name for LDAP",
dest="ldap_user_attr")
diff --git a/ambari-server/src/main/python/ambari_server/setupSecurity.py b/ambari-server/src/main/python/ambari_server/setupSecurity.py
index ac803c5..165f6eb 100644
--- a/ambari-server/src/main/python/ambari_server/setupSecurity.py
+++ b/ambari-server/src/main/python/ambari_server/setupSecurity.py
@@ -605,10 +605,10 @@ def init_ldap_properties_list_reqd(properties, options):
 @OsFamilyFuncImpl(OsFamilyImpl.DEFAULT)
 def init_ldap_properties_list_reqd(properties, options):
   ldap_properties = [
-    LdapPropTemplate(properties, options.ldap_url_host, "ambari.ldap.connectivity.server.host",
"Primary URL Host* {0}: ", REGEX_HOSTNAME, False),
-    LdapPropTemplate(properties, options.ldap_url_port, "ambari.ldap.connectivity.server.port",
"Primary URL Port* {0}: ", REGEX_PORT, False),
-    LdapPropTemplate(properties, options.ldap_secondary_url_host, "ambari.ldap.connectivity.secondary.server.host",
"Secondary URL Host {0}: ", REGEX_HOSTNAME, True),
-    LdapPropTemplate(properties, options.ldap_secondary_url_port, "ambari.ldap.connectivity.secondary.server.port",
"Secondary URL Port {0}: ", REGEX_PORT, True),
+    LdapPropTemplate(properties, options.ldap_primary_host, "ambari.ldap.connectivity.server.host",
"Primary URL Host* {0}: ", REGEX_HOSTNAME, False),
+    LdapPropTemplate(properties, options.ldap_primary_port, "ambari.ldap.connectivity.server.port",
"Primary URL Port* {0}: ", REGEX_PORT, False),
+    LdapPropTemplate(properties, options.ldap_secondary_host, "ambari.ldap.connectivity.secondary.server.host",
"Secondary URL Host {0}: ", REGEX_HOSTNAME, True),
+    LdapPropTemplate(properties, options.ldap_secondary_port, "ambari.ldap.connectivity.secondary.server.port",
"Secondary URL Port {0}: ", REGEX_PORT, True),
     LdapPropTemplate(properties, options.ldap_ssl, "ambari.ldap.connectivity.use_ssl", "Use
SSL* [true/false] {0}: ", REGEX_TRUE_FALSE, False, "false"),
     LdapPropTemplate(properties, options.ldap_user_class, "ambari.ldap.attributes.user.object_class",
"User object class* {0}: ", REGEX_ANYTHING, False, "person"),
     LdapPropTemplate(properties, options.ldap_user_attr, "ambari.ldap.attributes.user.name_attr",
"User name attribute* {0}: ", REGEX_ANYTHING, False, "uid"),
diff --git a/ambari-server/src/test/python/TestAmbariServer.py b/ambari-server/src/test/python/TestAmbariServer.py
index d5755b3..2b7be6b 100644
--- a/ambari-server/src/test/python/TestAmbariServer.py
+++ b/ambari-server/src/test/python/TestAmbariServer.py
@@ -7519,8 +7519,8 @@ class TestAmbariServer(TestCase):
     get_YN_input_method.side_effect = [True, True]
     update_properties_method.reset_mock()
 
-    options.ldap_url_host = None
-    options.ldap_url_port = None
+    options.ldap_primary_host = None
+    options.ldap_primary_port = None
     options.ldap_member_attr = None
     setup_ldap(options)
 
@@ -8664,10 +8664,10 @@ class TestAmbariServer(TestCase):
 
   def _create_empty_options_mock(self):
     options = MagicMock()
-    options.ldap_url_host = None
-    options.ldap_url_port = None
-    options.ldap_secondary_url_host = None
-    options.ldap_secondary_url_port = None
+    options.ldap_primary_host = None
+    options.ldap_primary_port = None
+    options.ldap_secondary_host = None
+    options.ldap_secondary_port = None
     options.ldap_ssl = None
     options.ldap_user_class = None
     options.ldap_user_attr = None

-- 
To stop receiving notification emails like this one, please contact
ncole@apache.org.

Mime
View raw message