The current "backend" code allows the use of both FQDN and IP Addressess when connecting to APIC, however, due to the IPAddress validator used in the flask form (Forms.py), non-ip addresses are marked as invalid on the GUI.
Normally, APICs should be reachable on both FQDN or IP address so this is not a major showstopper, but i ran into this issue when trying to use the acitoolkit against the Devnet Sandbox (sandboxapicdc.cisco.com) which i guess is behind a Proxy/Load Balancer so it cannot be reached directly over IP.
The proposed merge includes:
Change from Required to DataRequired validator (Required is an alias and might be deprecated)
Imported ValidatorError to validate the Custom Validator
Import of re and ipaddress modules for the Custom Validator
Wrote a custom validator that tries to validate the input as IP address. If it fails, it checks the input for characters not permitted in FQDNs (I´m not an expert on regex so this is open to improvement)
The CustomValidation is then used instead of the IPAddress validator
Modified "APIC IP Address:" for "APIC IP Address/FQDN:" on GUI
The current "backend" code allows the use of both FQDN and IP Addressess when connecting to APIC, however, due to the IPAddress validator used in the flask form (Forms.py), non-ip addresses are marked as invalid on the GUI.
Normally, APICs should be reachable on both FQDN or IP address so this is not a major showstopper, but i ran into this issue when trying to use the acitoolkit against the Devnet Sandbox (sandboxapicdc.cisco.com) which i guess is behind a Proxy/Load Balancer so it cannot be reached directly over IP.
The proposed merge includes: