From f87fb5621a574f39d0b47999151940c906c128cb Mon Sep 17 00:00:00 2001 From: Danil Uzlov <36223296+d-uzlov@users.noreply.github.com> Date: Mon, 24 Mar 2025 21:42:06 +0000 Subject: [PATCH] add optional callContext to all remaining driver calls --- src/driver/controller-local-hostpath/index.js | 2 +- src/driver/controller-objectivefs/index.js | 20 +++++++++---------- src/driver/controller-zfs-local/index.js | 2 +- src/driver/freenas/ssh.js | 2 +- src/driver/node-manual/index.js | 18 ++++++++--------- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/driver/controller-local-hostpath/index.js b/src/driver/controller-local-hostpath/index.js index a838cac..b038b0e 100644 --- a/src/driver/controller-local-hostpath/index.js +++ b/src/driver/controller-local-hostpath/index.js @@ -78,7 +78,7 @@ class ControllerLocalHostpathDriver extends ControllerClientCommonDriver { * @param {*} call * @returns */ - async NodeGetInfo(call) { + async NodeGetInfo(call, callContext) { const response = await super.NodeGetInfo(...arguments); response.accessible_topology = { segments: { diff --git a/src/driver/controller-objectivefs/index.js b/src/driver/controller-objectivefs/index.js index 089a188..daf60aa 100644 --- a/src/driver/controller-objectivefs/index.js +++ b/src/driver/controller-objectivefs/index.js @@ -270,7 +270,7 @@ class ControllerObjectiveFSDriver extends CsiBaseDriver { * * @param {*} call */ - async Probe(call) { + async Probe(call, callContext) { const driver = this; const pool = _.get(driver.options, "objectivefs.pool"); const object_store = _.get(driver.options, "objectivefs.env.OBJECTSTORE"); @@ -301,7 +301,7 @@ class ControllerObjectiveFSDriver extends CsiBaseDriver { * * @param {*} call */ - async CreateVolume(call) { + async CreateVolume(call, callContext) { const driver = this; const ofsClient = await driver.getObjectiveFSClient(); const pool = _.get(driver.options, "objectivefs.pool"); @@ -446,7 +446,7 @@ class ControllerObjectiveFSDriver extends CsiBaseDriver { * * @param {*} call */ - async DeleteVolume(call) { + async DeleteVolume(call, callContext) { const driver = this; const ofsClient = await driver.getObjectiveFSClient(); const pool = _.get(driver.options, "objectivefs.pool"); @@ -481,7 +481,7 @@ class ControllerObjectiveFSDriver extends CsiBaseDriver { * * @param {*} call */ - async ControllerExpandVolume(call) { + async ControllerExpandVolume(call, callContext) { throw new GrpcError( grpc.status.UNIMPLEMENTED, `operation not supported by driver` @@ -493,7 +493,7 @@ class ControllerObjectiveFSDriver extends CsiBaseDriver { * * @param {*} call */ - async GetCapacity(call) { + async GetCapacity(call, callContext) { throw new GrpcError( grpc.status.UNIMPLEMENTED, `operation not supported by driver` @@ -506,7 +506,7 @@ class ControllerObjectiveFSDriver extends CsiBaseDriver { * * @param {*} call */ - async ListVolumes(call) { + async ListVolumes(call, callContext) { const driver = this; const ofsClient = await driver.getObjectiveFSClient(); const pool = _.get(driver.options, "objectivefs.pool"); @@ -588,7 +588,7 @@ class ControllerObjectiveFSDriver extends CsiBaseDriver { * * @param {*} call */ - async ListSnapshots(call) { + async ListSnapshots(call, callContext) { throw new GrpcError( grpc.status.UNIMPLEMENTED, `operation not supported by driver` @@ -599,7 +599,7 @@ class ControllerObjectiveFSDriver extends CsiBaseDriver { * * @param {*} call */ - async CreateSnapshot(call) { + async CreateSnapshot(call, callContext) { throw new GrpcError( grpc.status.UNIMPLEMENTED, `operation not supported by driver` @@ -612,7 +612,7 @@ class ControllerObjectiveFSDriver extends CsiBaseDriver { * * @param {*} call */ - async DeleteSnapshot(call) { + async DeleteSnapshot(call, callContext) { throw new GrpcError( grpc.status.UNIMPLEMENTED, `operation not supported by driver` @@ -623,7 +623,7 @@ class ControllerObjectiveFSDriver extends CsiBaseDriver { * * @param {*} call */ - async ValidateVolumeCapabilities(call) { + async ValidateVolumeCapabilities(call, callContext) { const driver = this; const ofsClient = await driver.getObjectiveFSClient(); const pool = _.get(driver.options, "objectivefs.pool"); diff --git a/src/driver/controller-zfs-local/index.js b/src/driver/controller-zfs-local/index.js index 5bdecc3..c70586a 100644 --- a/src/driver/controller-zfs-local/index.js +++ b/src/driver/controller-zfs-local/index.js @@ -227,7 +227,7 @@ class ControllerZfsLocalDriver extends ControllerZfsBaseDriver { * @param {*} call * @returns */ - async NodeGetInfo(call) { + async NodeGetInfo(call, callContext) { const response = await super.NodeGetInfo(...arguments); response.accessible_topology = { segments: { diff --git a/src/driver/freenas/ssh.js b/src/driver/freenas/ssh.js index 7f401dc..225e0bb 100644 --- a/src/driver/freenas/ssh.js +++ b/src/driver/freenas/ssh.js @@ -35,7 +35,7 @@ class FreeNASSshDriver extends ControllerZfsBaseDriver { * * @param {*} call */ - async Probe(call) { + async Probe(call, callContext) { const driver = this; if (driver.ctx.args.csiMode.includes("controller")) { diff --git a/src/driver/node-manual/index.js b/src/driver/node-manual/index.js index adbbe22..443d4eb 100644 --- a/src/driver/node-manual/index.js +++ b/src/driver/node-manual/index.js @@ -242,7 +242,7 @@ class NodeManualDriver extends CsiBaseDriver { * * @param {*} call */ - async CreateVolume(call) { + async CreateVolume(call, callContext) { throw new GrpcError( grpc.status.UNIMPLEMENTED, `operation not supported by driver` @@ -253,7 +253,7 @@ class NodeManualDriver extends CsiBaseDriver { * * @param {*} call */ - async DeleteVolume(call) { + async DeleteVolume(call, callContext) { throw new GrpcError( grpc.status.UNIMPLEMENTED, `operation not supported by driver` @@ -264,7 +264,7 @@ class NodeManualDriver extends CsiBaseDriver { * * @param {*} call */ - async ControllerExpandVolume(call) { + async ControllerExpandVolume(call, callContext) { throw new GrpcError( grpc.status.UNIMPLEMENTED, `operation not supported by driver` @@ -275,7 +275,7 @@ class NodeManualDriver extends CsiBaseDriver { * * @param {*} call */ - async GetCapacity(call) { + async GetCapacity(call, callContext) { throw new GrpcError( grpc.status.UNIMPLEMENTED, `operation not supported by driver` @@ -286,7 +286,7 @@ class NodeManualDriver extends CsiBaseDriver { * * @param {*} call */ - async ListVolumes(call) { + async ListVolumes(call, callContext) { throw new GrpcError( grpc.status.UNIMPLEMENTED, `operation not supported by driver` @@ -297,7 +297,7 @@ class NodeManualDriver extends CsiBaseDriver { * * @param {*} call */ - async ListSnapshots(call) { + async ListSnapshots(call, callContext) { throw new GrpcError( grpc.status.UNIMPLEMENTED, `operation not supported by driver` @@ -308,7 +308,7 @@ class NodeManualDriver extends CsiBaseDriver { * * @param {*} call */ - async CreateSnapshot(call) { + async CreateSnapshot(call, callContext) { throw new GrpcError( grpc.status.UNIMPLEMENTED, `operation not supported by driver` @@ -319,7 +319,7 @@ class NodeManualDriver extends CsiBaseDriver { * * @param {*} call */ - async DeleteSnapshot(call) { + async DeleteSnapshot(call, callContext) { throw new GrpcError( grpc.status.UNIMPLEMENTED, `operation not supported by driver` @@ -330,7 +330,7 @@ class NodeManualDriver extends CsiBaseDriver { * * @param {*} call */ - async ValidateVolumeCapabilities(call) { + async ValidateVolumeCapabilities(call, callContext) { throw new GrpcError( grpc.status.UNIMPLEMENTED, `operation not supported by driver`