コード例 #1
0
def cleanup_no_frontend_volume(grpc_em, grpc_c, grpc_r1, grpc_r2):
    grpc_c.volume_frontend_start(FRONTEND_TGT_BLOCKDEV)
    v = grpc_c.volume_get()
    assert v.frontendState == "up"

    cmd.sync_agent_server_reset(grpc_c.address)

    grpc_c.volume_frontend_shutdown()
    v = grpc_c.volume_get()
    assert v.frontendState == "down"
    # ep = grpc_em.engine_get(ENGINE_NO_FRONTEND_NAME)
    # assert ep.spec.frontend == ""

    cleanup_controller(grpc_c)
    cleanup_replica(grpc_r1)
    cleanup_replica(grpc_r2)

    cleanup_replica_dir(FIXED_REPLICA_PATH1)
    cleanup_replica_dir(FIXED_REPLICA_PATH2)
コード例 #2
0
def grpc_extra_replica2(request, grpc_replica_client):
    request.addfinalizer(lambda: cleanup_replica_dir(FIXED_REPLICA_PATH2))
    return grpc_replica_client(
        REPLICA_NAME + "-extra-2",
        args=["replica", FIXED_REPLICA_PATH2, "--size",
              str(SIZE)])
コード例 #3
0
def grpc_fixed_dir_replica1(request, grpc_replica_client):
    request.addfinalizer(lambda: cleanup_replica_dir(FIXED_REPLICA_PATH1))
    return grpc_replica_client(
        REPLICA_NAME + "-fixed-dir-1",
        args=["replica", FIXED_REPLICA_PATH1, "--size",
              str(SIZE)])