mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ji...@apache.org
Subject mesos git commit: Removed the unnecessary Option in docker volume driver client.
Date Sun, 24 Apr 2016 19:02:19 GMT
Repository: mesos
Updated Branches:
  refs/heads/master 8212770ff -> e3c4a0767


Removed the unnecessary Option in docker volume driver client.


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

Branch: refs/heads/master
Commit: e3c4a076783bfe2a3cc0f0c858dbf4f3cb0e1e1b
Parents: 8212770
Author: Jie Yu <yujie.jay@gmail.com>
Authored: Sun Apr 24 12:02:11 2016 -0700
Committer: Jie Yu <yujie.jay@gmail.com>
Committed: Sun Apr 24 12:02:11 2016 -0700

----------------------------------------------------------------------
 .../containerizer/mesos/isolators/docker/volume/driver.cpp   | 8 +++-----
 .../containerizer/mesos/isolators/docker/volume/driver.hpp   | 4 +---
 2 files changed, 4 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e3c4a076/src/slave/containerizer/mesos/isolators/docker/volume/driver.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/docker/volume/driver.cpp b/src/slave/containerizer/mesos/isolators/docker/volume/driver.cpp
index c63fa02..ef43c56 100644
--- a/src/slave/containerizer/mesos/isolators/docker/volume/driver.cpp
+++ b/src/slave/containerizer/mesos/isolators/docker/volume/driver.cpp
@@ -51,7 +51,7 @@ Try<Owned<DriverClient>> DriverClient::create(
 Future<string> DriverClient::mount(
     const string& driver,
     const string& name,
-    const Option<hashmap<string, string>>& options)
+    const hashmap<string, string>& options)
 {
   // Refer to https://github.com/emccode/dvdcli for how dvdcli works.
   // TODO(gyliu513): Add `explicitcreate` if 'options' is None. Refer
@@ -63,10 +63,8 @@ Future<string> DriverClient::mount(
     "--volumename=" + name,
   };
 
-  if (options.isSome()) {
-    foreachpair (const string& key, const string& value, options.get()) {
-      argv.push_back("--volumeopts=" + key + "=" + value);
-    }
+  foreachpair (const string& key, const string& value, options) {
+    argv.push_back("--volumeopts=" + key + "=" + value);
   }
 
   string command = strings::join(

http://git-wip-us.apache.org/repos/asf/mesos/blob/e3c4a076/src/slave/containerizer/mesos/isolators/docker/volume/driver.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/docker/volume/driver.hpp b/src/slave/containerizer/mesos/isolators/docker/volume/driver.hpp
index 2b674b8..070d520 100644
--- a/src/slave/containerizer/mesos/isolators/docker/volume/driver.hpp
+++ b/src/slave/containerizer/mesos/isolators/docker/volume/driver.hpp
@@ -23,9 +23,7 @@
 #include <process/owned.hpp>
 
 #include <stout/hashmap.hpp>
-#include <stout/none.hpp>
 #include <stout/nothing.hpp>
-#include <stout/option.hpp>
 #include <stout/try.hpp>
 
 namespace mesos {
@@ -62,7 +60,7 @@ public:
   virtual process::Future<std::string> mount(
       const std::string& driver,
       const std::string& name,
-      const Option<hashmap<std::string, std::string>>& options = None());
+      const hashmap<std::string, std::string>& options);
 
   /**
    * Performs an 'unmount'.


Mime
View raw message