Added `devolve` helper for `ContainerID`.

This will be used subsequently.

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


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

Branch: refs/heads/master
Commit: ec009f45538b6ecc330984a3a85b5e2361f3e5aa
Parents: e9c89ab
Author: Vinod Kone <vinodk...@gmail.com>
Authored: Tue Nov 29 19:51:41 2016 -0800
Committer: Vinod Kone <vinodk...@gmail.com>
Committed: Thu Dec 1 21:54:28 2016 -0800

----------------------------------------------------------------------
 src/internal/devolve.cpp | 6 ++++++
 src/internal/devolve.hpp | 1 +
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/ec009f45/src/internal/devolve.cpp
----------------------------------------------------------------------
diff --git a/src/internal/devolve.cpp b/src/internal/devolve.cpp
index a94bafa..a49171a 100644
--- a/src/internal/devolve.cpp
+++ b/src/internal/devolve.cpp
@@ -54,6 +54,12 @@ CommandInfo devolve(const v1::CommandInfo& command)
 }
 
 
+ContainerID devolve(const v1::ContainerID& containerId)
+{
+  return devolve<ContainerID>(containerId);
+}
+
+
 Credential devolve(const v1::Credential& credential)
 {
   return devolve<Credential>(credential);

http://git-wip-us.apache.org/repos/asf/mesos/blob/ec009f45/src/internal/devolve.hpp
----------------------------------------------------------------------
diff --git a/src/internal/devolve.hpp b/src/internal/devolve.hpp
index 15347e1..6d9503d 100644
--- a/src/internal/devolve.hpp
+++ b/src/internal/devolve.hpp
@@ -46,6 +46,7 @@ namespace internal {
 
 // Helpers for devolving types between versions. Please add as necessary!
 CommandInfo devolve(const v1::CommandInfo& command);
+ContainerID devolve(const v1::ContainerID& containerId);
 Credential devolve(const v1::Credential& credential);
 ExecutorID devolve(const v1::ExecutorID& executorId);
 FrameworkID devolve(const v1::FrameworkID& frameworkId);

Reply via email to