Exemple #1
0
def get_current_host(node):
    parameters = node_util.get_parameters(node, magic_consts.CINDER_CONF, {
        "host": [("DEFAULT", "host")],
        "backend": [("DEFAULT", "volume_backend_name")],
    })
    # NOTE(akscram): result = "rbd:volumes#DEFAULT"
    result = "{host}#{backend}".format(
        host=parameters["host"],
        backend=parameters["backend"],
    )
    return result
Exemple #2
0
def get_new_host(node):
    parameters = node_util.get_parameters(node, magic_consts.CINDER_CONF, {
        "host": [("DEFAULT", "host"), ("RBD-backend", "backend_host")],
        "backend": [("RBD-backend", "volume_backend_name")],
    })
    # NOTE(akscram): result = "rbd:volumes@RBD-backend#RBD-backend"
    result = "{host}@{backend}#RBD-backend".format(
        host=parameters["host"],
        backend=parameters["backend"],
    )
    return result