Updated GET_CONTAINERS API allowing nested/standalone containers. Review: https://reviews.apache.org/r/64628
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/cc6e2a1a Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/cc6e2a1a Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/cc6e2a1a Branch: refs/heads/master Commit: cc6e2a1ac94a60b4a0c764b207d87a47a06ff314 Parents: 7e432a9 Author: Jie Yu <[email protected]> Authored: Thu Dec 14 15:02:46 2017 -0800 Committer: Jie Yu <[email protected]> Committed: Fri Dec 15 09:32:00 2017 -0800 ---------------------------------------------------------------------- include/mesos/agent/agent.proto | 14 +++++++++++--- include/mesos/v1/agent/agent.proto | 14 +++++++++++--- 2 files changed, 22 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/cc6e2a1a/include/mesos/agent/agent.proto ---------------------------------------------------------------------- diff --git a/include/mesos/agent/agent.proto b/include/mesos/agent/agent.proto index c3b1f22..25af6dc 100644 --- a/include/mesos/agent/agent.proto +++ b/include/mesos/agent/agent.proto @@ -133,6 +133,12 @@ message Call { optional uint64 length = 3; } + // Lists active containers on the agent. + message GetContainers { + optional bool show_nested = 1; + optional bool show_standalone = 2; + } + // Deprecated in favor of `LaunchContainer`. message LaunchNestedContainer { required ContainerID container_id = 1; @@ -347,6 +353,8 @@ message Call { optional ListFiles list_files = 4; optional ReadFile read_file = 5; + optional GetContainers get_containers = 20; + optional LaunchNestedContainer launch_nested_container = 6 [deprecated = true]; @@ -452,9 +460,9 @@ message Response { // of the containers. message GetContainers { message Container { - required FrameworkID framework_id = 1; - required ExecutorID executor_id = 2; - required string executor_name = 3; + optional FrameworkID framework_id = 1; + optional ExecutorID executor_id = 2; + optional string executor_name = 3; required ContainerID container_id = 4; optional ContainerStatus container_status = 5; optional ResourceStatistics resource_statistics = 6; http://git-wip-us.apache.org/repos/asf/mesos/blob/cc6e2a1a/include/mesos/v1/agent/agent.proto ---------------------------------------------------------------------- diff --git a/include/mesos/v1/agent/agent.proto b/include/mesos/v1/agent/agent.proto index 280a3b0..4ae9013 100644 --- a/include/mesos/v1/agent/agent.proto +++ b/include/mesos/v1/agent/agent.proto @@ -133,6 +133,12 @@ message Call { optional uint64 length = 3; } + // Lists active containers on the agent. + message GetContainers { + optional bool show_nested = 1; + optional bool show_standalone = 2; + } + // Deprecated in favor of `LaunchContainer`. message LaunchNestedContainer { required ContainerID container_id = 1; @@ -347,6 +353,8 @@ message Call { optional ListFiles list_files = 4; optional ReadFile read_file = 5; + optional GetContainers get_containers = 20; + optional LaunchNestedContainer launch_nested_container = 6 [deprecated = true]; @@ -452,9 +460,9 @@ message Response { // of the containers. message GetContainers { message Container { - required FrameworkID framework_id = 1; - required ExecutorID executor_id = 2; - required string executor_name = 3; + optional FrameworkID framework_id = 1; + optional ExecutorID executor_id = 2; + optional string executor_name = 3; required ContainerID container_id = 4; optional ContainerStatus container_status = 5; optional ResourceStatistics resource_statistics = 6;
