'Takes a single host pattern and returns a list of hostnames and an
optional port number that applies to all of them.'

def _expand_hostpattern(self, hostpattern):

    try:
        (pattern, port) = parse_address(hostpattern, allow_ranges=True)
    except:
        pattern = hostpattern
        port = None
    if detect_range(pattern):
        hostnames = expand_hostname_range(pattern)
    else:
        hostnames = [pattern]
    return (hostnames, port)
