properly return topologies for local-hostpath
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
parent
48600e3052
commit
ea8fc84fa6
|
|
@ -515,6 +515,11 @@ class ControllerClientCommonDriver extends CsiBaseDriver {
|
|||
driver.options.instance_id;
|
||||
}
|
||||
|
||||
let accessible_topology;
|
||||
if (typeof this.getAccessibleTopology === "function") {
|
||||
accessible_topology = await this.getAccessibleTopology();
|
||||
}
|
||||
|
||||
const res = {
|
||||
volume: {
|
||||
volume_id: name,
|
||||
|
|
@ -522,6 +527,7 @@ class ControllerClientCommonDriver extends CsiBaseDriver {
|
|||
capacity_bytes: 0,
|
||||
content_source: volume_content_source,
|
||||
volume_context,
|
||||
accessible_topology,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -57,6 +57,22 @@ class ControllerLocalHostpathDriver extends ControllerClientCommonDriver {
|
|||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* List of topologies associated with the *volume*
|
||||
*
|
||||
* @returns array
|
||||
*/
|
||||
async getAccessibleTopology() {
|
||||
const response = await super.NodeGetInfo(...arguments);
|
||||
return [
|
||||
{
|
||||
segments: {
|
||||
[NODE_TOPOLOGY_KEY_NAME]: response.node_id,
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Add node topologies
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue