You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2015/12/04 23:25:27 UTC

mesos git commit: Added 'principal' field to 'Resource.DiskInfo.Persistence'.

Repository: mesos
Updated Branches:
  refs/heads/master 4201c2c3e -> 9ae136c22


Added 'principal' field to 'Resource.DiskInfo.Persistence'.

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


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

Branch: refs/heads/master
Commit: 9ae136c222e6a5409c33245e59e7b9be6a1db1f5
Parents: 4201c2c
Author: Greg Mann <gr...@mesosphere.io>
Authored: Fri Dec 4 14:07:47 2015 -0800
Committer: Jie Yu <yu...@gmail.com>
Committed: Fri Dec 4 14:25:19 2015 -0800

----------------------------------------------------------------------
 include/mesos/mesos.proto    | 17 +++++++++++++++++
 include/mesos/v1/mesos.proto | 17 +++++++++++++++++
 2 files changed, 34 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/9ae136c2/include/mesos/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto
index 001e643..3a10c8a 100644
--- a/include/mesos/mesos.proto
+++ b/include/mesos/mesos.proto
@@ -595,8 +595,11 @@ message Resource {
     // that reserved this resource. It is used in conjunction with the
     // "unreserve" ACL to determine whether the entity attempting to
     // unreserve this resource is permitted to do so.
+    //
     // NOTE: This field should match the FrameworkInfo.principal of
     // the framework that reserved this resource.
+    //
+    // TODO(greggomann): We may want to make this field optional.
     required string principal = 1;
   }
 
@@ -621,6 +624,20 @@ message Resource {
       // A unique ID for the persistent disk volume.
       // NOTE: The ID needs to be unique per role on each slave.
       required string id = 1;
+
+      // This field indicates the principal of the operator or
+      // framework that created this volume. It is used in conjunction
+      // with the "destroy" ACL to determine whether an entity
+      // attempting to destroy the volume is permitted to do so.
+      //
+      // NOTE: This field is optional, while the `principal` found in
+      // `ReservationInfo` is required. This field is optional to
+      // allow for the possibility of volume creation without a
+      // principal, though currently it must be provided.
+      //
+      // NOTE: This field should match the FrameworkInfo.principal of
+      // the framework that created the volume.
+      optional string principal = 2;
     }
 
     optional Persistence persistence = 1;

http://git-wip-us.apache.org/repos/asf/mesos/blob/9ae136c2/include/mesos/v1/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/v1/mesos.proto b/include/mesos/v1/mesos.proto
index 23dd729..be3d61e 100644
--- a/include/mesos/v1/mesos.proto
+++ b/include/mesos/v1/mesos.proto
@@ -594,8 +594,11 @@ message Resource {
     // that reserved this resource. It is used in conjunction with the
     // "unreserve" ACL to determine whether the entity attempting to
     // unreserve this resource is permitted to do so.
+    //
     // NOTE: This field should match the FrameworkInfo.principal of
     // the framework that reserved this resource.
+    //
+    // TODO(greggomann): We may want to make this field optional.
     required string principal = 1;
   }
 
@@ -620,6 +623,20 @@ message Resource {
       // A unique ID for the persistent disk volume.
       // NOTE: The ID needs to be unique per role on each agent.
       required string id = 1;
+
+      // This field indicates the principal of the operator or
+      // framework that created this volume. It is used in conjunction
+      // with the "destroy" ACL to determine whether an entity
+      // attempting to destroy the volume is permitted to do so.
+      //
+      // NOTE: This field is optional, while the `principal` found in
+      // `ReservationInfo` is required. This field is optional to
+      // allow for the possibility of volume creation without a
+      // principal, though currently it must be provided.
+      //
+      // NOTE: This field should match the FrameworkInfo.principal of
+      // the framework that created the volume.
+      optional string principal = 2;
     }
 
     optional Persistence persistence = 1;