Douglas Schilling Landgraf has uploaded a new change for review.

Change subject: register: simplify check fqdn
......................................................................

register: simplify check fqdn

Currently we use --check-fqdn (True or False) which
is unneeded. We can simplify using --nocheck-fqdn.

Change-Id: I106ee53d2b29c32f872e379bc535e10f616733c4
Signed-off-by: Douglas Schilling Landgraf <dougsl...@redhat.com>
---
M lib/vdsm/tool/register.py
1 file changed, 9 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/20/44220/1

diff --git a/lib/vdsm/tool/register.py b/lib/vdsm/tool/register.py
index 8e464a4..99b7a34 100644
--- a/lib/vdsm/tool/register.py
+++ b/lib/vdsm/tool/register.py
@@ -39,7 +39,7 @@
 
     def __init__(self, engine_fqdn, engine_https_port=None,
                  fingerprint=None, ssh_port=None,
-                 ssh_user=None, check_fqdn=True,
+                 ssh_user=None, check_fqdn=None,
                  vdsm_port=None, node_fqdn=None,
                  node_name=None):
         """
@@ -78,10 +78,7 @@
         self.logger.debug("Engine https port: {hp}".format(
                           hp=self.engine_port))
 
-        if check_fqdn is None:
-            self.check_fqdn = True
-        else:
-            self.check_fqdn = tobool(check_fqdn)
+        self.check_fqdn = check_fqdn
         self.logger.debug("Check FQDN: {v}".format(v=self.check_fqdn))
 
         self.fprint = fingerprint
@@ -394,7 +391,7 @@
 
     parser.add_argument(
         '--engine-fqdn',
-        help="Engine FQDN (See also: --check-fqdn)",
+        help="Engine FQDN (See also: --nocheck-fqdn)",
         required=True
     )
 
@@ -419,9 +416,11 @@
     )
 
     parser.add_argument(
-        '--check-fqdn',
-        help="Disable or Enable FQDN check for Engine CA, this option "
-             "is enabled by default (Use: True or False)",
+        '--nocheck-fqdn',
+        default=True,
+        action='store_false',
+        help="Disable FQDN check for Engine CA, this option "
+             "is enabled by default",
     )
 
     parser.add_argument(
@@ -448,7 +447,7 @@
                    ssh_user=args.ssh_user,
                    ssh_port=args.ssh_port,
                    fingerprint=args.fingerprint,
-                   check_fqdn=args.check_fqdn)
+                   check_fqdn=args.nocheck_fqdn)
 
     try:
         reg.handshake()


-- 
To view, visit https://gerrit.ovirt.org/44220
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I106ee53d2b29c32f872e379bc535e10f616733c4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsl...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to