Ejemplo n.º 1
0
def onezone(request):
    class Onezone(object):
        def __init__(self, nodes):
            (_, _, domain) = nodes[0].partition('@')
            self.domain = domain

    result = env.up(tests.utils.path_utils.config_file('env.json'))

    request.addfinalizer(
        lambda: docker.remove(result['docker_ids'], force=True, volumes=True))

    return Onezone(result['oz_worker_nodes'])
Ejemplo n.º 2
0
def onezone(request):
    class Onezone(object):

        def __init__(self, nodes):
            (_, _, domain) = nodes[0].partition('@')
            self.domain = domain

    result = env.up(tests.utils.path_utils.config_file('env.json'))

    request.addfinalizer(lambda: docker.remove(
        result['docker_ids'], force=True, volumes=True))

    return Onezone(result['oz_worker_nodes'])
Ejemplo n.º 3
0
def environment(request, context):
    """
    Sets up environment and returns environment description.
    """
    curr_path = os.path.dirname(os.path.abspath(__file__))
    env_path = os.path.join(curr_path, '..', '..', 'environments', context.env_json)
    env_desc = env.up(env_path)

    def fin():
        docker.remove(request.environment['docker_ids'], force=True, volumes=True)

    request.addfinalizer(fin)
    request.environment = env_desc
    return env_desc
Ejemplo n.º 4
0
parser.add_argument('-bc',
                    '--bin-client',
                    action='store',
                    default=env.default('bin_oc'),
                    help='the path to oneclient repository (precompiled)',
                    dest='bin_oc')

parser.add_argument('-l',
                    '--logdir',
                    action='store',
                    default=env.default('logdir'),
                    help='path to a directory where the logs will be stored',
                    dest='logdir')

parser.add_argument('config_path',
                    action='store',
                    help='path to json configuration file')

args = parser.parse_args()

output = env.up(args.config_path,
                image=args.image,
                bin_am=args.bin_am,
                bin_gr=args.bin_gr,
                bin_op_ccm=args.bin_op_ccm,
                bin_op_worker=args.bin_op_worker,
                bin_oc=args.bin_oc,
                logdir=args.logdir)

print(json.dumps(output))
Ejemplo n.º 5
0
    '-bl', '--bin-luma',
    action='store',
    default=env.default('bin_luma'),
    help='the path to luma repository',
    dest='bin_luma')

parser.add_argument(
    '-l', '--logdir',
    action='store',
    default=env.default('logdir'),
    help='path to a directory where the logs will be stored',
    dest='logdir')

parser.add_argument(
    'config_path',
    action='store',
    help='path to json configuration file')

args = parser.parse_args()

output = env.up(args.config_path, image=args.image, ceph_image=args.ceph_image,
                s3_image=args.s3_image, glusterfs_image=args.glusterfs_image,
                bin_am=args.bin_am, bin_oz=args.bin_oz,
                bin_cluster_manager=args.bin_cluster_manager,
                bin_op_worker=args.bin_op_worker,
                bin_cluster_worker=args.bin_cluster_worker,
                bin_luma=args.bin_luma, bin_onepanel=args.bin_onepanel,
                bin_oc=args.bin_oc, logdir=args.logdir)

print(json.dumps(output))
Ejemplo n.º 6
0
                    '--logdir',
                    action='store',
                    default=env.default('logdir'),
                    help='path to a directory where the logs will be stored',
                    dest='logdir')

parser.add_argument('--app-name',
                    action='store',
                    default=env.default('app_name'),
                    help='name of the application',
                    dest='app_name')

parser.add_argument('config_path',
                    action='store',
                    help='path to json configuration file')

args = parser.parse_args()

output = env.up(args.config_path,
                image=args.image,
                bin_am=args.bin_am,
                bin_gr=args.bin_gr,
                bin_cluster_manager=args.bin_cluster_manager,
                bin_op_worker=args.bin_op_worker,
                bin_cluster_worker=args.bin_cluster_worker,
                bin_oc=args.bin_oc,
                logdir=args.logdir,
                app_name=args.app_name)

print(json.dumps(output))
Ejemplo n.º 7
0
                    help='the path to luma repository',
                    dest='bin_luma')

parser.add_argument('-l',
                    '--logdir',
                    action='store',
                    default=env.default('logdir'),
                    help='path to a directory where the logs will be stored',
                    dest='logdir')

parser.add_argument('config_path',
                    action='store',
                    help='path to json configuration file')

args = parser.parse_args()

output = env.up(args.config_path,
                image=args.image,
                ceph_image=args.ceph_image,
                s3_image=args.s3_image,
                bin_am=args.bin_am,
                bin_oz=args.bin_oz,
                bin_cluster_manager=args.bin_cluster_manager,
                bin_op_worker=args.bin_op_worker,
                bin_cluster_worker=args.bin_cluster_worker,
                bin_luma=args.bin_luma,
                bin_oc=args.bin_oc,
                logdir=args.logdir)

print(json.dumps(output))
Ejemplo n.º 8
0
 def setup_class(cls):
     cls.result = env.up(test_utils.test_file('env.json'))