Added resource provider selectors in `disk_profile.proto`.

This patch adds two selectors to the `CSIManifest` protobuf so that the
URI disk profile adaptor can be customized to notify each resource
provider with a different set of profiles.

Review: https://reviews.apache.org/r/65538/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/5aabef41
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/5aabef41
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/5aabef41

Branch: refs/heads/master
Commit: 5aabef41cd1531f59380274548e0d01d4f346b42
Parents: 2da758e
Author: Chun-Hung Hsiao <chhs...@mesosphere.io>
Authored: Thu Feb 8 14:41:23 2018 -0800
Committer: Jie Yu <yujie....@gmail.com>
Committed: Thu Feb 8 16:24:02 2018 -0800

----------------------------------------------------------------------
 .../storage/disk_profile.proto                  | 23 ++++++++++++++++++++
 1 file changed, 23 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/5aabef41/src/resource_provider/storage/disk_profile.proto
----------------------------------------------------------------------
diff --git a/src/resource_provider/storage/disk_profile.proto 
b/src/resource_provider/storage/disk_profile.proto
index 6cf1f8a..b9448d7 100644
--- a/src/resource_provider/storage/disk_profile.proto
+++ b/src/resource_provider/storage/disk_profile.proto
@@ -23,6 +23,29 @@ package mesos.resource_provider;
 
 message DiskProfileMapping {
   message CSIManifest {
+    // Use this selector if the profile applies to certain resource
+    // provider instances.
+    message ResourceProviderSelector {
+      message ResourceProvider {
+        string type = 1; // REQUIRED.
+        string name = 2; // REQUIRED.
+      }
+
+      repeated ResourceProvider resource_providers = 1; // REQUIRED.
+    }
+
+    // Use this selector if the profile applies to all resource
+    // providers running a specific CSI plugin implementation.
+    message CSIPluginTypeSelector {
+      string plugin_type = 1; // REQUIRED.
+    }
+
+    // One of the selectors MUST be specified.
+    oneof selector {
+      ResourceProviderSelector resource_provider_selector = 3;
+      CSIPluginTypeSelector csi_plugin_type_selector = 4;
+    }
+
     // Capabilities used for creating, publishing, and validating volumes.
     // This field is REQUIRED.
     //

Reply via email to