Skip to content

Commit

Permalink
networkfence: add auto-generated files
Browse files Browse the repository at this point in the history
Signed-off-by: Yug Gupta <[email protected]>
  • Loading branch information
Yuggupta27 authored and mergify[bot] committed Dec 20, 2021
1 parent 50b40cd commit 32fa508
Show file tree
Hide file tree
Showing 5 changed files with 1,182 additions and 71 deletions.
80 changes: 80 additions & 0 deletions fence/fence.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// Code generated by make; DO NOT EDIT.
syntax = "proto3";
package fence;

import "github.com/container-storage-interface/spec/lib/go/csi/csi.proto";
import "google/protobuf/descriptor.proto";

option go_package = "github.com/csi-addons/spec/lib/go/fence";

// FenceController holds the RPC method for performing fencing operations.
service FenceController {
// FenceClusterNetwork RPC call to perform a fencing operation.
rpc FenceClusterNetwork (FenceClusterNetworkRequest)
returns (FenceClusterNetworkResponse) {}

// UnfenceClusterNetwork RPC call to remove a list of CIDR blocks from the
// list of blocklisted/fenced clients.
rpc UnfenceClusterNetwork (UnfenceClusterNetworkRequest)
returns (UnfenceClusterNetworkResponse) {}

// ListClusterFence RPC call to provide a list of blocklisted/fenced clients.
rpc ListClusterFence(ListClusterFenceRequest)
returns (ListClusterFenceResponse){}
}
// FenceClusterNetworkRequest contains the information needed to identify
// the storage cluster so that the appropriate fencing operation can be
// performed.
message FenceClusterNetworkRequest {
// Plugin specific parameters passed in as opaque key-value pairs.
map<string, string> parameters = 1;
// Secrets required by the plugin to complete the request.
map<string, string> secrets = 2 [(csi.v1.csi_secret) = true];
// list of CIDR blocks on which the fencing operation is expected to be
// performed.
repeated CIDR cidrs = 3;
}

// FenceClusterNetworkResponse is returned by the CSI-driver as a result of
// the FenceClusterNetworkRequest call.
message FenceClusterNetworkResponse {
// Intentionally empty.
}
// UnfenceClusterNetworkRequest contains the information needed to identify
// the cluster so that the appropriate fence operation can be
// disabled.
message UnfenceClusterNetworkRequest {
// Plugin specific parameters passed in as opaque key-value pairs.
map<string, string> parameters = 1;
// Secrets required by the plugin to complete the request.
map<string, string> secrets = 2 [(csi.v1.csi_secret) = true];
// list of CIDR blocks on which the fencing operation is expected to be
// performed.
repeated CIDR cidrs = 3;
}

// UnfenceClusterNetworkResponse is returned by the CSI-driver as a result of
// the UnfenceClusterNetworkRequest call.
message UnfenceClusterNetworkResponse {
// Intentionally empty.
}
// ListClusterFenceRequest contains the information needed to identify
// the cluster so that the appropriate fenced clients can be listed.
message ListClusterFenceRequest {
// Plugin specific parameters passed in as opaque key-value pairs.
map<string, string> parameters = 1;
// Secrets required by the plugin to complete the request.
map<string, string> secrets = 2 [(csi.v1.csi_secret) = true];
}

// ListClusterFenceResponse holds the information about the result of the
// ListClusterFenceResponse call.
message ListClusterFenceResponse {
// list of IPs that are blocklisted by the SP.
repeated CIDR cidrs = 1;
}
// CIDR holds a CIDR block.
message CIDR {
// CIDR block
string cidr = 1;
}
23 changes: 23 additions & 0 deletions identity/identity.proto
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,36 @@ message Capability {
Type type = 1;
}

// NetworkFence contains the features of the NetworkFence operation that the
// CSI-driver supports.
message NetworkFence {
// Type describes a CSI Service that CSI-drivers can support.
enum Type {
// UNKNOWN indicates that the CSI-driver does not support the NetworkFence
// operation in the current mode. The CSI-Addons CO plugin will most
// likely ignore this node for the NetworkFence operation.
UNKNOWN = 0;

// NETWORK_FENCE indicates that the CSI-driver provides RPCs for a
// NetworkFence operation.
// The presence of this capability determines whether the CSI-Addons CO
// plugin can invoke RPCs that require access to the storage system,
// similar to the CSI Controller (provisioner).
NETWORK_FENCE = 1;
}
// type contains the Type of CSI Service that the CSI-driver supports.
Type type = 1;
}

// Additional CSI-Addons operations will need to be added here.

oneof type {
// Service or operation that the CSI-driver supports.
Service service = 1;
// ReclaimSpace operation capabilities.
ReclaimSpace reclaim_space = 2;
// NetworkFence operation capabilities
NetworkFence network_fence = 3;

// Additional CSI-Addons operations need to be appended to this list.
}
Expand Down
Loading

0 comments on commit 32fa508

Please sign in to comment.