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 2018/03/27 06:34:28 UTC
[2/3] mesos git commit: Fixed createVolumeHostPath helper.
Fixed createVolumeHostPath helper.
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/020b8cba
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/020b8cba
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/020b8cba
Branch: refs/heads/master
Commit: 020b8cbafaf70ef4b95915bf9b81200509b23a50
Parents: 77c5635
Author: Jie Yu <yu...@gmail.com>
Authored: Mon Mar 26 23:28:20 2018 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Mon Mar 26 23:29:01 2018 -0700
----------------------------------------------------------------------
src/tests/mesos.hpp | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/020b8cba/src/tests/mesos.hpp
----------------------------------------------------------------------
diff --git a/src/tests/mesos.hpp b/src/tests/mesos.hpp
index 01fd1c2..46c271b 100644
--- a/src/tests/mesos.hpp
+++ b/src/tests/mesos.hpp
@@ -706,12 +706,13 @@ inline TVolume createVolumeSandboxPath(
}
-template <typename TVolume>
+template <typename TVolume, typename TMountPropagation>
inline TVolume createVolumeHostPath(
const std::string& containerPath,
const std::string& hostPath,
const typename TVolume::Mode& mode,
- const Option<MountPropagation::Mode>& mountPropagationMode = None())
+ const Option<typename TMountPropagation::Mode>& mountPropagationMode =
+ None())
{
TVolume volume;
volume.set_container_path(containerPath);
@@ -1532,7 +1533,8 @@ inline Volume createVolumeSandboxPath(Args&&... args)
template <typename... Args>
inline Volume createVolumeHostPath(Args&&... args)
{
- return common::createVolumeHostPath<Volume>(std::forward<Args>(args)...);
+ return common::createVolumeHostPath<Volume, MountPropagation>(
+ std::forward<Args>(args)...);
}
@@ -1812,8 +1814,9 @@ inline mesos::v1::Volume createVolumeSandboxPath(Args&&... args)
template <typename... Args>
inline mesos::v1::Volume createVolumeHostPath(Args&&... args)
{
- return common::createVolumeHostPath<mesos::v1::Volume>(
- std::forward<Args>(args)...);
+ return common::createVolumeHostPath<
+ mesos::v1::Volume,
+ mesos::v1::MountPropagation>(std::forward<Args>(args)...);
}