@@ -80,6 +80,16 @@ def setup_ifcfg_log(): ifcfglog = logging.getLogger("ifcfg")
def check_ip_address(address, version=None):
- """
- Check if the given IP address is valid in given version if set.
- :param str address: IP address for testing
- :param int version: ``4`` for IPv4, ``6`` for IPv6 or
nothing if we don't care
I think it would be clearer to say something like "or None to allow either format."