Esempio n. 1
0
def find_arches():
    """
    Return a list of uniq target arch values from test cases
    """
    arch = get_platform_arch()
    target_arches = []
    for test_case in find_testcases():
        if arch in getattr(test_case, 'arch_skip', None):
            continue
        target_arch = getattr(test_case, 'target_arch', None)
        if target_arch and target_arch not in target_arches:
            target_arches.append(target_arch)
    return target_arches
Esempio n. 2
0
def zfs_assert_supported():
    """ Determine if the runtime system supports zfs.
    returns: True if system supports zfs
    raises: RuntimeError: if system does not support zfs
    """
    arch = util.get_platform_arch()
    if arch in ZFS_UNSUPPORTED_ARCHES:
        raise RuntimeError("zfs is not supported on architecture: %s" % arch)

    release = util.lsb_release()['codename']
    if release in ZFS_UNSUPPORTED_RELEASES:
        raise RuntimeError("zfs is not supported on release: %s" % release)

    if 'zfs' not in get_supported_filesystems():
        try:
            util.load_kernel_module('zfs')
        except util.ProcessExecutionError as err:
            raise RuntimeError("Failed to load 'zfs' kernel module: %s" % err)

    missing_progs = [p for p in ('zpool', 'zfs') if not util.which(p)]
    if missing_progs:
        raise RuntimeError("Missing zfs utils: %s" % ','.join(missing_progs))
Esempio n. 3
0
class _ReleaseBase(object):
    repo = "maas-daily"
    arch = get_platform_arch()
    target_arch = arch
    mem = "1024"
Esempio n. 4
0
class _ReleaseBase(object):
    repo = "maas-daily"
    arch = get_platform_arch()