Repository: mesos Updated Branches: refs/heads/master e0ad7a8f0 -> 18220a50d
Added basic resource provider Event/Call types. This patch added the basic Event/Call for resource providers to subscribe and apply offer operations. Review: https://reviews.apache.org/r/59046 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d32f85ec Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d32f85ec Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d32f85ec Branch: refs/heads/master Commit: d32f85ec13b1437a6c19851558c808f854549f9b Parents: e0ad7a8 Author: Jie Yu <[email protected]> Authored: Mon May 8 13:48:57 2017 +0200 Committer: Jie Yu <[email protected]> Committed: Mon May 8 14:18:33 2017 +0200 ---------------------------------------------------------------------- .../resource_provider/resource_provider.proto | 28 ++++++++++++++++++++ .../resource_provider/resource_provider.proto | 28 ++++++++++++++++++++ 2 files changed, 56 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/d32f85ec/include/mesos/resource_provider/resource_provider.proto ---------------------------------------------------------------------- diff --git a/include/mesos/resource_provider/resource_provider.proto b/include/mesos/resource_provider/resource_provider.proto index 73cfd31..0efef33 100644 --- a/include/mesos/resource_provider/resource_provider.proto +++ b/include/mesos/resource_provider/resource_provider.proto @@ -29,9 +29,24 @@ message Event { // is UNKNOWN. This enables enum values to be added // in a backwards-compatible way. See: MESOS-4997. UNKNOWN = 0; + + SUBSCRIBED = 1; // See 'Subscribed' below. + OPERATION = 2; // See 'Operation' below. + } + + // First event received by the resource provider when it subscribes + // to the master. + message Subscribed { + } + + // Received when the master wants to send an operation to the + // resource provider. + message Operation { } optional Type type = 1; + optional Subscribed subscribed = 2; + optional Operation operation = 3; } @@ -42,7 +57,20 @@ message Call { // is UNKNOWN. This enables enum values to be added // in a backwards-compatible way. See: MESOS-4997. UNKNOWN = 0; + + SUBSCRIBE = 1; // See 'Subscribe' below. + UPDATE = 2; // See 'Update' below. + } + + // Request to subscribe with the master. + message Subscribe { + } + + // Notify the master about the status of an operation. + message Update { } optional Type type = 1; + optional Subscribe subscribe = 2; + optional Update update = 3; } http://git-wip-us.apache.org/repos/asf/mesos/blob/d32f85ec/include/mesos/v1/resource_provider/resource_provider.proto ---------------------------------------------------------------------- diff --git a/include/mesos/v1/resource_provider/resource_provider.proto b/include/mesos/v1/resource_provider/resource_provider.proto index f83586d..82e6741 100644 --- a/include/mesos/v1/resource_provider/resource_provider.proto +++ b/include/mesos/v1/resource_provider/resource_provider.proto @@ -29,9 +29,24 @@ message Event { // is UNKNOWN. This enables enum values to be added // in a backwards-compatible way. See: MESOS-4997. UNKNOWN = 0; + + SUBSCRIBED = 1; // See 'Subscribed' below. + OPERATION = 2; // See 'Operation' below. + } + + // First event received by the resource provider when it subscribes + // to the master. + message Subscribed { + } + + // Received when the master wants to send an operation to the + // resource provider. + message Operation { } optional Type type = 1; + optional Subscribed subscribed = 2; + optional Operation operation = 3; } @@ -42,7 +57,20 @@ message Call { // is UNKNOWN. This enables enum values to be added // in a backwards-compatible way. See: MESOS-4997. UNKNOWN = 0; + + SUBSCRIBE = 1; // See 'Subscribe' below. + UPDATE = 2; // See 'Update' below. + } + + // Request to subscribe with the master. + message Subscribe { + } + + // Notify the master about the status of an operation. + message Update { } optional Type type = 1; + optional Subscribe subscribe = 2; + optional Update update = 3; }
