You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by gr...@apache.org on 2018/04/23 21:09:09 UTC
[10/13] mesos git commit: Added a test helper for creating
`RECONCILE_OPERATIONS` v1 calls.
Added a test helper for creating `RECONCILE_OPERATIONS` v1 calls.
Review: https://reviews.apache.org/r/66467/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/949b44e2
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/949b44e2
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/949b44e2
Branch: refs/heads/master
Commit: 949b44e239aa218aefceb5fadf3cee7c46972ca9
Parents: 28b93d5
Author: Gaston Kleiman <ga...@mesosphere.io>
Authored: Mon Apr 23 13:43:54 2018 -0700
Committer: Greg Mann <gr...@gmail.com>
Committed: Mon Apr 23 13:49:54 2018 -0700
----------------------------------------------------------------------
src/tests/mesos.hpp | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/949b44e2/src/tests/mesos.hpp
----------------------------------------------------------------------
diff --git a/src/tests/mesos.hpp b/src/tests/mesos.hpp
index 7a292f3..dcbfb95 100644
--- a/src/tests/mesos.hpp
+++ b/src/tests/mesos.hpp
@@ -2192,6 +2192,30 @@ inline mesos::v1::scheduler::Call createCallKill(
}
+inline mesos::v1::scheduler::Call createCallReconcileOperations(
+ const mesos::v1::FrameworkID& frameworkId,
+ const std::vector<
+ mesos::v1::scheduler::Call::ReconcileOperations::Operation>&
+ operations = {})
+{
+ mesos::v1::scheduler::Call call;
+ call.set_type(mesos::v1::scheduler::Call::RECONCILE_OPERATIONS);
+ call.mutable_framework_id()->CopyFrom(frameworkId);
+
+ mesos::v1::scheduler::Call::ReconcileOperations* reconcile =
+ call.mutable_reconcile_operations();
+
+ foreach (
+ const mesos::v1::scheduler::Call::ReconcileOperations::Operation&
+ operation,
+ operations) {
+ reconcile->add_operations()->CopyFrom(operation);
+ }
+
+ return call;
+}
+
+
inline mesos::v1::scheduler::Call createCallSubscribe(
const mesos::v1::FrameworkInfo& frameworkInfo,
const Option<mesos::v1::FrameworkID>& frameworkId = None())