Sandro Bonazzola has posted comments on this change.
Change subject: packaging: setup: added FQDN validation to engine-setup-2
......................................................................
Patch Set 4: (5 inline comments)
....................................................
File packaging/setup/plugins/ovirt-engine-setup/config/protocols.py
Line 83: _DIG_LOOKUP_RE = re.compile(
Line 84: flags=re.VERBOSE,
Line 85: pattern=r"""
Line 86: ^
Line 87: (?P<query>[^\t]+)
ok
Line 88: \t
Line 89: \t
Line 90: \d+
Line 91: \t
Line 84: flags=re.VERBOSE,
Line 85: pattern=r"""
Line 86: ^
Line 87: (?P<query>[^\t]+)
Line 88: \t
ok
Line 89: \t
Line 90: \d+
Line 91: \t
Line 92: IN
Line 90: \d+
Line 91: \t
Line 92: IN
Line 93: \t
Line 94: A
Here we're searching IP addresses not CNAMEs.
Line 95: \t
Line 96: (?P<answer>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
Line 97:
Line 98: """
Line 92: IN
Line 93: \t
Line 94: A
Line 95: \t
Line 96: (?P<answer>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
You can't do reverse lookup of cname aliases. I think that adding support for
CNAME answers should be discussed and done in another patch.
Line 97:
Line 98: """
Line 99: )
Line 100:
Line 150:
Line 151: def _dig_lookup(self, addr, reverse=False):
Line 152: pattern = (self._DIG_REVLOOKUP_RE if reverse else
self._DIG_LOOKUP_RE)
Line 153: addresses = set()
Line 154: args = [self.command.get('dig')]
Thanks for the suggestion, but I prefer using the long version because it
simpler getting only A answers excluding CNAME answers.
Line 155: if reverse:
Line 156: args.append('-x')
Line 157: args.append(addr)
Line 158: rc, stdout, stderr = self.execute(
--
To view, visit http://gerrit.ovirt.org/14699
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie9764f32ba5e30062532bf11c67756677333c44f
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: Alex Lourie <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Ofer Schreiber <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: Yedidyah Bar David <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches