def validate_ip_ranges(namespace):
    if (namespace.api_server_authorized_ip_ranges is not None):
        if (namespace.api_server_authorized_ip_ranges == ''):
            return
        for ip in namespace.api_server_authorized_ip_ranges.split(','):
            try:
                ip_network(ip)
            except ValueError:
                raise CLIError('--api-server-authorized-ip-ranges should be list of IPv4 addresses or CIDRs')
def validate_ip_ranges(namespace):
    if (namespace.api_server_authorized_ip_ranges is not None):
        if (namespace.api_server_authorized_ip_ranges == ):
            return
        for ip in namespace.api_server_authorized_ip_ranges.split(','):
            try:
                ip_network(ip)
            except ValueError:
                raise CLIError('--api-server-authorized-ip-ranges should be list of IPv4 addresses or CIDRs')