def ipv6_iscsi_storage_domain(system, host, engine_storage_ipv6, lun_id):
    DOMAIN_NAME = 'iscsi-ipv6'
    ISCSI_ADDRESS = engine_storage_ipv6
    ISCSI_PORT = 3260
    ISCSI_TARGET = 'iqn.2014-07.org.ovirt:storage'

    lun = storagelib.LogicalUnit(
        id=lun_id,
        address=ISCSI_ADDRESS,
        port=ISCSI_PORT,
        target=ISCSI_TARGET,
    )

    host_storage_data = storagelib.HostStorageData(
        storage_type=storagelib.StorageType.ISCSI,
        address=None,
        path=None,
        logical_units=(lun, ),
    )

    with storage_domain(
            system,
            DOMAIN_NAME,
            storagelib.StorageDomainType.DATA,
            host,
            host_storage_data,
    ) as sd:
        yield sd
예제 #2
0
def ipv6_nfs_storage_domain(system, host, engine_storage_ipv6):
    DOMAIN_NAME = 'nfs-ipv6'
    DEFAULT_DOMAIN_PATH = '/exports/nfs/share2'

    sd = storagelib.StorageDomain(system)
    host_storage_data = storagelib.HostStorageData(
        storage_type=storagelib.StorageType.NFS,
        address='[' + engine_storage_ipv6 + ']',
        path=DEFAULT_DOMAIN_PATH,
        nfs_version=storagelib.NfsVersion.V4_2)

    with storage_domain(system, DOMAIN_NAME, storagelib.StorageDomainType.DATA,
                        host, host_storage_data) as sd:
        yield sd
예제 #3
0
def ipv6_nfs_storage_domain(system, host, engine_storage_ipv6):
    DOMAIN_NAME = 'nfs-ipv6'
    DEFAULT_DOMAIN_PATH = '/exports/nfs/share2'

    sd = storagelib.StorageDomain(system)
    host_storage_data = storagelib.HostStorageData(
        storage_type=storagelib.StorageType.NFS,
        address='[' + engine_storage_ipv6 + ']',
        path=DEFAULT_DOMAIN_PATH,
        nfs_version=storagelib.NfsVersion.V4_2
    )

    with storage_domain(system, DOMAIN_NAME, storagelib.StorageDomainType.DATA,
                        host, host_storage_data) as sd:
        yield sd
예제 #4
0
def ipv6_iscsi_storage_domain(system, host, engine_storage_ipv6, lun_id):
    DOMAIN_NAME = 'iscsi-ipv6'
    ISCSI_ADDRESS = engine_storage_ipv6
    ISCSI_PORT = 3260
    ISCSI_TARGET = 'iqn.2014-07.org.ovirt:storage'

    lun = storagelib.LogicalUnit(
        id=lun_id,
        address=ISCSI_ADDRESS,
        port=ISCSI_PORT,
        target=ISCSI_TARGET,
    )

    host_storage_data = storagelib.HostStorageData(
        storage_type=storagelib.StorageType.ISCSI,
        address=None,
        path=None,
        logical_units=(lun,))

    with storage_domain(system, DOMAIN_NAME, storagelib.StorageDomainType.DATA,
                        host, host_storage_data) as sd:
        yield sd