'Returns Device Connector.
Factory method to create and return
correct SB connector object based on the protocol'

def get_connector(self, fabric, sb_connector):

    fabric_ip = fabric.safe_get('fc_fabric_address')
    client = self.sb_conn_map.get(fabric_ip)
    if (not client):
        fabric_user = fabric.safe_get('fc_fabric_user')
        fabric_pwd = fabric.safe_get('fc_fabric_password')
        fabric_port = fabric.safe_get('fc_fabric_port')
        fc_vfid = fabric.safe_get('fc_virtual_fabric_id')
        fabric_ssh_cert_path = fabric.safe_get('fc_fabric_ssh_cert_path')
        LOG.debug('Client    not    found.    Creating    connection    client    for    %(ip)s    with    %(connector)s    protocol    for    the    user    %(user)s    at    port    %(port)s.', {'ip': fabric_ip, 'connector': sb_connector, 'user': fabric_user, 'port': fabric_port, 'vf_id': fc_vfid})
        if (sb_connector.lower() in (fc_zone_constants.HTTP, fc_zone_constants.HTTPS)):
            client = importutils.import_object('cinder.zonemanager.drivers.brocade.brcd_http_fc_zone_client.BrcdHTTPFCZoneClient', ipaddress=fabric_ip, username=fabric_user, password=fabric_pwd, port=fabric_port, vfid=fc_vfid, protocol=sb_connector)
        else:
            client = importutils.import_object('cinder.zonemanager.drivers.brocade.brcd_fc_zone_client_cli.BrcdFCZoneClientCLI', ipaddress=fabric_ip, username=fabric_user, password=fabric_pwd, key=fabric_ssh_cert_path, port=fabric_port)
        self.sb_conn_map.update({fabric_ip: client})
    return client
