summaryrefslogtreecommitdiffstats
path: root/ipaclient/discovery.py
Commit message (Collapse)AuthorAgeFilesLines
* Make ipaclient.discovery usable from command lineChristian Heimes2019-04-261-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | For debugging and testing make it possible to run a simple domain discovery from the command line ``` $ python3 -m ipaclient.discovery demo1.freeipa.org realm DEMO1.FREEIPA.ORG (Discovered from LDAP DNS records in ipa.demo1.freeipa.org) domain demo1.freeipa.org (Discovered LDAP SRV records from demo1.freeipa.org) basedn dc=demo1,dc=freeipa,dc=org (From IPA server ldap://ipa.demo1.freeipa.org:389) server ipa.demo1.freeipa.org (Discovered from LDAP DNS records in ipa.demo1.freeipa.org) servers ['ipa.demo1.freeipa.org'] Success $ python3 -m ipaclient.discovery freeipa.org realm None domain None basedn None server None servers [] NO_LDAP_SERVER ``` Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
* Make IPADiscovery work without ldapChristian Heimes2019-04-261-10/+21
| | | | | | | | ipaclient.discover.IPADiscovery skips LDAP discovery when python-ldap is not present. Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
* ipa-client-install: autodiscovery must refuse single-label domainsFlorence Blanc-Renaud2019-04-101-11/+34
| | | | | | | | | | | | | | Since commit 905ab93, ipa-server-install refuses single-label domains, but older IPA server versions could be installed with a single-label domain/realm. ipa-client-install is already refusing single-label domain/realm when provided to the CLI with --domain / --realm but does not perform the same check when the domain is discovered. This commit adds a check to domain names automatically discovered and skips single-label domains. Same check for realm names. Fixes: https://pagure.io/freeipa/issue/7598 Reviewed-By: Rob Crittenden <rcritten@redhat.com>
* Reformat and PEP8 ipaclient.discoveryChristian Heimes2019-03-011-47/+48
| | | | | | | | Since the moved code is detected as new/modified code, make fastlint is complaining about PEP 8 violations. Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
* Make IPADiscovery available in PyPI packagesChristian Heimes2019-03-011-0/+569
The ipaclient PyPI package does not ship the ipaclient.install subpackage. The ipaclient.install.ipadiscovery module with IPADiscovery is now available as ipaclient.discovery, so it can be used by consumers of PyPI packages. The module ipaclient.install.ipadiscovery provides a backwards compatibility shim with deprecation warning. Fixes: https://pagure.io/freeipa/issue/7861 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>