minor fixes for local-hostpath, documentation

Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
Travis Glenn Hansen
2022-02-22 21:51:16 -07:00
parent 4d215968d7
commit 6345c53a4e
6 changed files with 58 additions and 10 deletions
+14 -7
View File
@@ -1,3 +1,4 @@
const _ = require("lodash");
const { CsiBaseDriver } = require("../index");
const { GrpcError, grpc } = require("../../utils/grpc");
const cp = require("child_process");
@@ -570,15 +571,21 @@ class ControllerClientCommonDriver extends CsiBaseDriver {
* @param {*} call
*/
async GetCapacity(call) {
// really capacity is not used at all with nfs in this fashion, so no reason to enable
// here even though it is technically feasible.
throw new GrpcError(
grpc.status.UNIMPLEMENTED,
`operation not supported by driver`
);
const driver = this;
if (
!driver.options.service.controller.capabilities.rpc.includes(
"GET_CAPACITY"
)
) {
// really capacity is not used at all with nfs in this fashion, so no reason to enable
// here even though it is technically feasible.
throw new GrpcError(
grpc.status.UNIMPLEMENTED,
`operation not supported by driver`
);
}
if (call.request.volume_capabilities) {
const result = this.assertCapabilities(call.request.volume_capabilities);