'Create a new host on the storage system.
We create a host name and associate it with the given connection
information.  The host name will be a cleaned up version of the given
host name (at most 55 characters), plus a random 8-character suffix to
avoid collisions. The total length should be at most 63 characters.'

def create_host(self, connector, iscsi=False):

    LOG.debug('Enter:    create_host:    host    %s.', connector['host'])
    host_name = connector['host']
    if (not isinstance(host_name, six.string_types)):
        msg = _('create_host:    Host    name    is    not    unicode    or    string.')
        LOG.error(msg)
        raise exception.VolumeDriverException(message=msg)
    ports = []
    if iscsi:
        if ('initiator' in connector):
            ports.append(['initiator', ('%s' % connector['initiator'])])
        else:
            msg = _('create_host:    No    initiators    supplied.')
    elif ('wwpns' in connector):
        for wwpn in connector['wwpns']:
            ports.append(['wwpn', ('%s' % wwpn)])
    else:
        msg = _('create_host:    No    wwpns    supplied.')
    if (not len(ports)):
        LOG.error(msg)
        raise exception.VolumeDriverException(message=msg)
    if isinstance(host_name, six.text_type):
        host_name = unicodedata.normalize('NFKD', host_name).encode('ascii', 'replace').decode('ascii')
    for num in range(0, 128):
        ch = str(chr(num))
        if ((not ch.isalnum()) and (ch not in ['    ', '.', '-', '_'])):
            host_name = host_name.replace(ch, '-')
    if (not re.match('^[A-Za-z]', host_name)):
        host_name = ('_' + host_name)
    rand_id = str(random.randint(0, 99999999)).zfill(8)
    host_name = ('%s-%s' % (host_name[:55], rand_id))
    port = ports.pop(0)
    self.ssh.mkhost(host_name, port[0], port[1])
    for port in ports:
        self.ssh.addhostport(host_name, port[0], port[1])
    LOG.debug('Leave:    create_host:    host    %(host)s    -    %(host_name)s.', {'host': connector['host'], 'host_name': host_name})
    return host_name
