Exemplo n.º 1
0
def run(**kw):
    ceph_nodes = kw.get('ceph_nodes')
    clients = kw.get('clients')
    test_data = kw.get('test_data')
    win_client = clients[0]

    log.info('Preparing windows cient')
    win_client.start_iscsi_initiator()
    win_client.create_new_target(test_data['gwcli_node'].private_ip)
    test_data['initiator_name'] = win_client.get_iscsi_initiator_name()

    log.info('Creating iscsi host')
    iscsi_util = IscsiUtils(ceph_nodes)
    iscsi_util.create_host(test_data['gwcli_node'], test_data['initiator_name'])

    return 0
Exemplo n.º 2
0
def run(**kw):
    ceph_nodes = kw.get("ceph_nodes")
    clients = kw.get("clients")
    test_data = kw.get("test_data")
    win_client = clients[0]

    log.info("Preparing windows cient")
    win_client.start_iscsi_initiator()
    win_client.create_new_target(test_data["gwcli_node"].private_ip)
    test_data["initiator_name"] = win_client.get_iscsi_initiator_name()

    log.info("Creating iscsi host")
    iscsi_util = IscsiUtils(ceph_nodes)
    iscsi_util.create_host(test_data["gwcli_node"],
                           test_data["initiator_name"])

    return 0
Exemplo n.º 3
0
def run(**kw):
    config = kw.get('config')
    test_data = kw.get('test_data')
    test_data['no_of_luns'] = config.get('no_of_luns', 10)
    ceph_nodes = kw.get('ceph_nodes')
    image_name = 'test_image' + str(random.randint(10, 999))

    log.info('Creating iscsi host')
    iscsi_util = IscsiUtils(ceph_nodes)
    iscsi_util.install_prereq_rhel_client()
    initiator_name = iscsi_util.get_initiatorname(full=True)
    iscsi_util.create_host(test_data['gwcli_node'], initiator_name)
    iscsi_util.create_luns(
        test_data['no_of_luns'],
        test_data['gwcli_node'],
        initiator_name,
        image_name,
        iosize="2g",
        map_to_client=True)

    return 0
Exemplo n.º 4
0
def run(**kw):
    config = kw.get("config")
    test_data = kw.get("test_data")
    test_data["no_of_luns"] = config.get("no_of_luns", 10)
    ceph_nodes = kw.get("ceph_nodes")
    image_name = "test_image" + str(random.randint(10, 999))

    log.info("Creating iscsi host")
    iscsi_util = IscsiUtils(ceph_nodes)
    iscsi_util.install_prereq_rhel_client()
    initiator_name = iscsi_util.get_initiatorname(full=True)
    iscsi_util.create_host(test_data["gwcli_node"], initiator_name)
    iscsi_util.create_luns(
        test_data["no_of_luns"],
        test_data["gwcli_node"],
        initiator_name,
        image_name,
        iosize="2g",
        map_to_client=True,
    )

    return 0