mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [14/48] mesos-site git commit: Updated the website built from mesos SHA: 8687b92.
Date Mon, 30 Oct 2017 15:39:00 GMT
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/529f48dc/content/api/latest/c++/src_2tests_2mesos_8hpp_source.html
----------------------------------------------------------------------
diff --git a/content/api/latest/c++/src_2tests_2mesos_8hpp_source.html b/content/api/latest/c++/src_2tests_2mesos_8hpp_source.html
index 07c1c7e..ec05c04 100644
--- a/content/api/latest/c++/src_2tests_2mesos_8hpp_source.html
+++ b/content/api/latest/c++/src_2tests_2mesos_8hpp_source.html
@@ -994,8 +994,8 @@
 <div class="line"><a name="l00940"></a><span class="lineno">  940</span>&#160;</div>
 <div class="line"><a name="l00941"></a><span class="lineno">  941</span>&#160;<span class="comment">// Helper for creating a disk source with type `PATH`.</span></div>
 <div class="line"><a name="l00942"></a><span class="lineno">  942</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TResource&gt;</div>
-<div class="line"><a name="l00943"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a3e0a121f23f7e53ba4fee14bc85c2093">  943</a></span>&#160;<span class="keyword">inline</span> <span class="keyword">typename</span> TResource::DiskInfo::Source <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a3e0a121f23f7e53ba4fee14bc85c2093">createDiskSourcePath</a>(</div>
-<div class="line"><a name="l00944"></a><span class="lineno">  944</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; root,</div>
+<div class="line"><a name="l00943"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#ab65db29cfcbb539769af0a797d971efb">  943</a></span>&#160;<span class="keyword">inline</span> <span class="keyword">typename</span> TResource::DiskInfo::Source <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#ab65db29cfcbb539769af0a797d971efb">createDiskSourcePath</a>(</div>
+<div class="line"><a name="l00944"></a><span class="lineno">  944</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; root = <a class="code" href="structNone.html">None</a>(),</div>
 <div class="line"><a name="l00945"></a><span class="lineno">  945</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; <span class="keywordtype">id</span> = <a class="code" href="structNone.html">None</a>(),</div>
 <div class="line"><a name="l00946"></a><span class="lineno">  946</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; profile = <a class="code" href="structNone.html">None</a>())</div>
 <div class="line"><a name="l00947"></a><span class="lineno">  947</span>&#160;{</div>
@@ -1003,8 +1003,8 @@
 <div class="line"><a name="l00949"></a><span class="lineno">  949</span>&#160;</div>
 <div class="line"><a name="l00950"></a><span class="lineno">  950</span>&#160;  source.set_type(TResource::DiskInfo::Source::PATH);</div>
 <div class="line"><a name="l00951"></a><span class="lineno">  951</span>&#160;</div>
-<div class="line"><a name="l00952"></a><span class="lineno">  952</span>&#160;  <span class="keywordflow">if</span> (root.<a class="code" href="classOption.html#a4e3bf8416d95246f43c91f1b5c309323">isSome</a>()) {</div>
-<div class="line"><a name="l00953"></a><span class="lineno">  953</span>&#160;    source.mutable_path()-&gt;set_root(root.<a class="code" href="classOption.html#a21358442c0fac1cc978a67a9a9089a79">get</a>());</div>
+<div class="line"><a name="l00952"></a><span class="lineno">  952</span>&#160;  <span class="keywordflow">if</span> (root.isSome()) {</div>
+<div class="line"><a name="l00953"></a><span class="lineno">  953</span>&#160;    source.mutable_path()-&gt;set_root(root.get());</div>
 <div class="line"><a name="l00954"></a><span class="lineno">  954</span>&#160;  }</div>
 <div class="line"><a name="l00955"></a><span class="lineno">  955</span>&#160;</div>
 <div class="line"><a name="l00956"></a><span class="lineno">  956</span>&#160;  <span class="keywordflow">if</span> (<span class="keywordtype">id</span>.isSome()) {</div>
@@ -1021,8 +1021,8 @@
 <div class="line"><a name="l00967"></a><span class="lineno">  967</span>&#160;</div>
 <div class="line"><a name="l00968"></a><span class="lineno">  968</span>&#160;<span class="comment">// Helper for creating a disk source with type `MOUNT`.</span></div>
 <div class="line"><a name="l00969"></a><span class="lineno">  969</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TResource&gt;</div>
-<div class="line"><a name="l00970"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#acf9334619820eae6a7f3618321e16229">  970</a></span>&#160;<span class="keyword">inline</span> <span class="keyword">typename</span> TResource::DiskInfo::Source <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#acf9334619820eae6a7f3618321e16229">createDiskSourceMount</a>(</div>
-<div class="line"><a name="l00971"></a><span class="lineno">  971</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; root,</div>
+<div class="line"><a name="l00970"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#afdb48dc62647ee918141d20e31b933f1">  970</a></span>&#160;<span class="keyword">inline</span> <span class="keyword">typename</span> TResource::DiskInfo::Source <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#afdb48dc62647ee918141d20e31b933f1">createDiskSourceMount</a>(</div>
+<div class="line"><a name="l00971"></a><span class="lineno">  971</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; root = <a class="code" href="structNone.html">None</a>(),</div>
 <div class="line"><a name="l00972"></a><span class="lineno">  972</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; <span class="keywordtype">id</span> = <a class="code" href="structNone.html">None</a>(),</div>
 <div class="line"><a name="l00973"></a><span class="lineno">  973</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; profile = <a class="code" href="structNone.html">None</a>())</div>
 <div class="line"><a name="l00974"></a><span class="lineno">  974</span>&#160;{</div>
@@ -1030,8 +1030,8 @@
 <div class="line"><a name="l00976"></a><span class="lineno">  976</span>&#160;</div>
 <div class="line"><a name="l00977"></a><span class="lineno">  977</span>&#160;  source.set_type(TResource::DiskInfo::Source::MOUNT);</div>
 <div class="line"><a name="l00978"></a><span class="lineno">  978</span>&#160;</div>
-<div class="line"><a name="l00979"></a><span class="lineno">  979</span>&#160;  <span class="keywordflow">if</span> (root.<a class="code" href="classOption.html#a4e3bf8416d95246f43c91f1b5c309323">isSome</a>()) {</div>
-<div class="line"><a name="l00980"></a><span class="lineno">  980</span>&#160;    source.mutable_mount()-&gt;set_root(root.<a class="code" href="classOption.html#a21358442c0fac1cc978a67a9a9089a79">get</a>());</div>
+<div class="line"><a name="l00979"></a><span class="lineno">  979</span>&#160;  <span class="keywordflow">if</span> (root.isSome()) {</div>
+<div class="line"><a name="l00980"></a><span class="lineno">  980</span>&#160;    source.mutable_mount()-&gt;set_root(root.get());</div>
 <div class="line"><a name="l00981"></a><span class="lineno">  981</span>&#160;  }</div>
 <div class="line"><a name="l00982"></a><span class="lineno">  982</span>&#160;</div>
 <div class="line"><a name="l00983"></a><span class="lineno">  983</span>&#160;  <span class="keywordflow">if</span> (<span class="keywordtype">id</span>.isSome()) {</div>
@@ -1046,1922 +1046,1999 @@
 <div class="line"><a name="l00992"></a><span class="lineno">  992</span>&#160;}</div>
 <div class="line"><a name="l00993"></a><span class="lineno">  993</span>&#160;</div>
 <div class="line"><a name="l00994"></a><span class="lineno">  994</span>&#160;</div>
-<div class="line"><a name="l00995"></a><span class="lineno">  995</span>&#160;<span class="comment">// Helper for creating a disk resource.</span></div>
-<div class="line"><a name="l00996"></a><span class="lineno">  996</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TResource, <span class="keyword">typename</span> TResources, <span class="keyword">typename</span> TVolume&gt;</div>
-<div class="line"><a name="l00997"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#ab1479066681bb142e54688ccae08c3a0">  997</a></span>&#160;<span class="keyword">inline</span> TResource <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#ab1479066681bb142e54688ccae08c3a0">createDiskResource</a>(</div>
-<div class="line"><a name="l00998"></a><span class="lineno">  998</span>&#160;    <span class="keyword">const</span> std::string&amp; value,</div>
-<div class="line"><a name="l00999"></a><span class="lineno">  999</span>&#160;    <span class="keyword">const</span> std::string&amp; role,</div>
-<div class="line"><a name="l01000"></a><span class="lineno"> 1000</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; persistenceID,</div>
-<div class="line"><a name="l01001"></a><span class="lineno"> 1001</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; containerPath,</div>
-<div class="line"><a name="l01002"></a><span class="lineno"> 1002</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;typename TResource::DiskInfo::Source&gt;</a>&amp; source = <a class="code" href="structNone.html">None</a>(),</div>
-<div class="line"><a name="l01003"></a><span class="lineno"> 1003</span>&#160;    <span class="keywordtype">bool</span> isShared = <span class="keyword">false</span>)</div>
-<div class="line"><a name="l01004"></a><span class="lineno"> 1004</span>&#160;{</div>
-<div class="line"><a name="l01005"></a><span class="lineno"> 1005</span>&#160;  TResource resource = <a class="code" href="namespaceappc_1_1spec.html#a2107ae129dd83fbd20b22195247f16b5">TResources::parse</a>(<span class="stringliteral">&quot;disk&quot;</span>, value, role).get();</div>
-<div class="line"><a name="l01006"></a><span class="lineno"> 1006</span>&#160;</div>
-<div class="line"><a name="l01007"></a><span class="lineno"> 1007</span>&#160;  <span class="keywordflow">if</span> (persistenceID.<a class="code" href="classOption.html#a4e3bf8416d95246f43c91f1b5c309323">isSome</a>() || containerPath.<a class="code" href="classOption.html#a4e3bf8416d95246f43c91f1b5c309323">isSome</a>() || source.isSome()) {</div>
-<div class="line"><a name="l01008"></a><span class="lineno"> 1008</span>&#160;    resource.mutable_disk()-&gt;CopyFrom(</div>
-<div class="line"><a name="l01009"></a><span class="lineno"> 1009</span>&#160;        createDiskInfo&lt;TResource, TVolume&gt;(</div>
-<div class="line"><a name="l01010"></a><span class="lineno"> 1010</span>&#160;            persistenceID,</div>
-<div class="line"><a name="l01011"></a><span class="lineno"> 1011</span>&#160;            containerPath,</div>
-<div class="line"><a name="l01012"></a><span class="lineno"> 1012</span>&#160;            <a class="code" href="structNone.html">None</a>(),</div>
-<div class="line"><a name="l01013"></a><span class="lineno"> 1013</span>&#160;            <a class="code" href="structNone.html">None</a>(),</div>
-<div class="line"><a name="l01014"></a><span class="lineno"> 1014</span>&#160;            source));</div>
+<div class="line"><a name="l00995"></a><span class="lineno">  995</span>&#160;<span class="comment">// Helper for creating a disk source with type `BLOCK&#39;</span></div>
+<div class="line"><a name="l00996"></a><span class="lineno">  996</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TResource&gt;</div>
+<div class="line"><a name="l00997"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a6d3dece3ebb6438212aa642a0bcfbcb8">  997</a></span>&#160;<span class="keyword">inline</span> <span class="keyword">typename</span> TResource::DiskInfo::Source <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a6d3dece3ebb6438212aa642a0bcfbcb8">createDiskSourceBlock</a>(</div>
+<div class="line"><a name="l00998"></a><span class="lineno">  998</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; <span class="keywordtype">id</span> = <a class="code" href="structNone.html">None</a>(),</div>
+<div class="line"><a name="l00999"></a><span class="lineno">  999</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; profile = <a class="code" href="structNone.html">None</a>())</div>
+<div class="line"><a name="l01000"></a><span class="lineno"> 1000</span>&#160;{</div>
+<div class="line"><a name="l01001"></a><span class="lineno"> 1001</span>&#160;  <span class="keyword">typename</span> TResource::DiskInfo::Source source;</div>
+<div class="line"><a name="l01002"></a><span class="lineno"> 1002</span>&#160;</div>
+<div class="line"><a name="l01003"></a><span class="lineno"> 1003</span>&#160;  source.set_type(TResource::DiskInfo::Source::BLOCK);</div>
+<div class="line"><a name="l01004"></a><span class="lineno"> 1004</span>&#160;</div>
+<div class="line"><a name="l01005"></a><span class="lineno"> 1005</span>&#160;  <span class="keywordflow">if</span> (<span class="keywordtype">id</span>.isSome()) {</div>
+<div class="line"><a name="l01006"></a><span class="lineno"> 1006</span>&#160;    source.set_id(<span class="keywordtype">id</span>.<span class="keyword">get</span>());</div>
+<div class="line"><a name="l01007"></a><span class="lineno"> 1007</span>&#160;  }</div>
+<div class="line"><a name="l01008"></a><span class="lineno"> 1008</span>&#160;</div>
+<div class="line"><a name="l01009"></a><span class="lineno"> 1009</span>&#160;  <span class="keywordflow">if</span> (profile.isSome()) {</div>
+<div class="line"><a name="l01010"></a><span class="lineno"> 1010</span>&#160;    source.set_profile(profile.get());</div>
+<div class="line"><a name="l01011"></a><span class="lineno"> 1011</span>&#160;  }</div>
+<div class="line"><a name="l01012"></a><span class="lineno"> 1012</span>&#160;</div>
+<div class="line"><a name="l01013"></a><span class="lineno"> 1013</span>&#160;  <span class="keywordflow">return</span> source;</div>
+<div class="line"><a name="l01014"></a><span class="lineno"> 1014</span>&#160;}</div>
 <div class="line"><a name="l01015"></a><span class="lineno"> 1015</span>&#160;</div>
-<div class="line"><a name="l01016"></a><span class="lineno"> 1016</span>&#160;    <span class="keywordflow">if</span> (isShared) {</div>
-<div class="line"><a name="l01017"></a><span class="lineno"> 1017</span>&#160;      resource.mutable_shared();</div>
-<div class="line"><a name="l01018"></a><span class="lineno"> 1018</span>&#160;    }</div>
-<div class="line"><a name="l01019"></a><span class="lineno"> 1019</span>&#160;  }</div>
-<div class="line"><a name="l01020"></a><span class="lineno"> 1020</span>&#160;</div>
-<div class="line"><a name="l01021"></a><span class="lineno"> 1021</span>&#160;  <span class="keywordflow">return</span> resource;</div>
-<div class="line"><a name="l01022"></a><span class="lineno"> 1022</span>&#160;}</div>
-<div class="line"><a name="l01023"></a><span class="lineno"> 1023</span>&#160;</div>
+<div class="line"><a name="l01016"></a><span class="lineno"> 1016</span>&#160;</div>
+<div class="line"><a name="l01017"></a><span class="lineno"> 1017</span>&#160;<span class="comment">// Helper for creating a disk source with type `RAW&#39;.</span></div>
+<div class="line"><a name="l01018"></a><span class="lineno"> 1018</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TResource&gt;</div>
+<div class="line"><a name="l01019"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a3c388aad1e6ab87d5eb376eed64cecf5"> 1019</a></span>&#160;<span class="keyword">inline</span> <span class="keyword">typename</span> TResource::DiskInfo::Source <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a3c388aad1e6ab87d5eb376eed64cecf5">createDiskSourceRaw</a>(</div>
+<div class="line"><a name="l01020"></a><span class="lineno"> 1020</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; <span class="keywordtype">id</span> = <a class="code" href="structNone.html">None</a>(),</div>
+<div class="line"><a name="l01021"></a><span class="lineno"> 1021</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; profile = <a class="code" href="structNone.html">None</a>())</div>
+<div class="line"><a name="l01022"></a><span class="lineno"> 1022</span>&#160;{</div>
+<div class="line"><a name="l01023"></a><span class="lineno"> 1023</span>&#160;  <span class="keyword">typename</span> TResource::DiskInfo::Source source;</div>
 <div class="line"><a name="l01024"></a><span class="lineno"> 1024</span>&#160;</div>
-<div class="line"><a name="l01025"></a><span class="lineno"> 1025</span>&#160;<span class="comment">// Note that `reservationPrincipal` should be specified if and only if</span></div>
-<div class="line"><a name="l01026"></a><span class="lineno"> 1026</span>&#160;<span class="comment">// the volume uses dynamically reserved resources.</span></div>
-<div class="line"><a name="l01027"></a><span class="lineno"> 1027</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TResource, <span class="keyword">typename</span> TResources, <span class="keyword">typename</span> TVolume&gt;</div>
-<div class="line"><a name="l01028"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#ab3f6f80401c5645318402940ca2121ce"> 1028</a></span>&#160;<span class="keyword">inline</span> TResource <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#ab3f6f80401c5645318402940ca2121ce">createPersistentVolume</a>(</div>
-<div class="line"><a name="l01029"></a><span class="lineno"> 1029</span>&#160;    <span class="keyword">const</span> <a class="code" href="classBytes.html">Bytes</a>&amp; <a class="code" href="namespaceos_1_1stat.html#a7a116891923bc8b5d8c50f78da8657be">size</a>,</div>
-<div class="line"><a name="l01030"></a><span class="lineno"> 1030</span>&#160;    <span class="keyword">const</span> std::string&amp; role,</div>
-<div class="line"><a name="l01031"></a><span class="lineno"> 1031</span>&#160;    <span class="keyword">const</span> std::string&amp; persistenceId,</div>
-<div class="line"><a name="l01032"></a><span class="lineno"> 1032</span>&#160;    <span class="keyword">const</span> std::string&amp; containerPath,</div>
-<div class="line"><a name="l01033"></a><span class="lineno"> 1033</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; reservationPrincipal = <a class="code" href="structNone.html">None</a>(),</div>
-<div class="line"><a name="l01034"></a><span class="lineno"> 1034</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;typename TResource::DiskInfo::Source&gt;</a>&amp; source = <a class="code" href="structNone.html">None</a>(),</div>
-<div class="line"><a name="l01035"></a><span class="lineno"> 1035</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; creatorPrincipal = <a class="code" href="structNone.html">None</a>(),</div>
-<div class="line"><a name="l01036"></a><span class="lineno"> 1036</span>&#160;    <span class="keywordtype">bool</span> isShared = <span class="keyword">false</span>)</div>
-<div class="line"><a name="l01037"></a><span class="lineno"> 1037</span>&#160;{</div>
-<div class="line"><a name="l01038"></a><span class="lineno"> 1038</span>&#160;  TResource volume =</div>
-<div class="line"><a name="l01039"></a><span class="lineno"> 1039</span>&#160;    <a class="code" href="namespaceappc_1_1spec.html#a2107ae129dd83fbd20b22195247f16b5">TResources::parse</a>(<span class="stringliteral">&quot;disk&quot;</span>, <a class="code" href="namespacens.html#a28116b46e6543597a11733424cd1aa20">stringify</a>(size.<a class="code" href="classBytes.html#aee1957960ddcf609db170b0590ff7db5">megabytes</a>()), role).get();</div>
-<div class="line"><a name="l01040"></a><span class="lineno"> 1040</span>&#160;</div>
-<div class="line"><a name="l01041"></a><span class="lineno"> 1041</span>&#160;  volume.mutable_disk()-&gt;CopyFrom(</div>
-<div class="line"><a name="l01042"></a><span class="lineno"> 1042</span>&#160;      createDiskInfo&lt;TResource, TVolume&gt;(</div>
-<div class="line"><a name="l01043"></a><span class="lineno"> 1043</span>&#160;          persistenceId,</div>
-<div class="line"><a name="l01044"></a><span class="lineno"> 1044</span>&#160;          containerPath,</div>
-<div class="line"><a name="l01045"></a><span class="lineno"> 1045</span>&#160;          <a class="code" href="structNone.html">None</a>(),</div>
-<div class="line"><a name="l01046"></a><span class="lineno"> 1046</span>&#160;          <a class="code" href="structNone.html">None</a>(),</div>
-<div class="line"><a name="l01047"></a><span class="lineno"> 1047</span>&#160;          source,</div>
-<div class="line"><a name="l01048"></a><span class="lineno"> 1048</span>&#160;          creatorPrincipal));</div>
-<div class="line"><a name="l01049"></a><span class="lineno"> 1049</span>&#160;</div>
-<div class="line"><a name="l01050"></a><span class="lineno"> 1050</span>&#160;  <span class="keywordflow">if</span> (reservationPrincipal.isSome()) {</div>
-<div class="line"><a name="l01051"></a><span class="lineno"> 1051</span>&#160;    <span class="keyword">typename</span> TResource::ReservationInfo&amp; reservation =</div>
-<div class="line"><a name="l01052"></a><span class="lineno"> 1052</span>&#160;      *volume.mutable_reservations()-&gt;rbegin();</div>
-<div class="line"><a name="l01053"></a><span class="lineno"> 1053</span>&#160;</div>
-<div class="line"><a name="l01054"></a><span class="lineno"> 1054</span>&#160;    reservation.set_type(TResource::ReservationInfo::DYNAMIC);</div>
-<div class="line"><a name="l01055"></a><span class="lineno"> 1055</span>&#160;    reservation.set_principal(reservationPrincipal.get());</div>
-<div class="line"><a name="l01056"></a><span class="lineno"> 1056</span>&#160;  }</div>
-<div class="line"><a name="l01057"></a><span class="lineno"> 1057</span>&#160;</div>
-<div class="line"><a name="l01058"></a><span class="lineno"> 1058</span>&#160;  <span class="keywordflow">if</span> (isShared) {</div>
-<div class="line"><a name="l01059"></a><span class="lineno"> 1059</span>&#160;    volume.mutable_shared();</div>
-<div class="line"><a name="l01060"></a><span class="lineno"> 1060</span>&#160;  }</div>
-<div class="line"><a name="l01061"></a><span class="lineno"> 1061</span>&#160;</div>
-<div class="line"><a name="l01062"></a><span class="lineno"> 1062</span>&#160;  <span class="keywordflow">return</span> volume;</div>
-<div class="line"><a name="l01063"></a><span class="lineno"> 1063</span>&#160;}</div>
+<div class="line"><a name="l01025"></a><span class="lineno"> 1025</span>&#160;  source.set_type(TResource::DiskInfo::Source::RAW);</div>
+<div class="line"><a name="l01026"></a><span class="lineno"> 1026</span>&#160;</div>
+<div class="line"><a name="l01027"></a><span class="lineno"> 1027</span>&#160;  <span class="keywordflow">if</span> (<span class="keywordtype">id</span>.isSome()) {</div>
+<div class="line"><a name="l01028"></a><span class="lineno"> 1028</span>&#160;    source.set_id(<span class="keywordtype">id</span>.<span class="keyword">get</span>());</div>
+<div class="line"><a name="l01029"></a><span class="lineno"> 1029</span>&#160;  }</div>
+<div class="line"><a name="l01030"></a><span class="lineno"> 1030</span>&#160;</div>
+<div class="line"><a name="l01031"></a><span class="lineno"> 1031</span>&#160;  <span class="keywordflow">if</span> (profile.isSome()) {</div>
+<div class="line"><a name="l01032"></a><span class="lineno"> 1032</span>&#160;    source.set_profile(profile.get());</div>
+<div class="line"><a name="l01033"></a><span class="lineno"> 1033</span>&#160;  }</div>
+<div class="line"><a name="l01034"></a><span class="lineno"> 1034</span>&#160;</div>
+<div class="line"><a name="l01035"></a><span class="lineno"> 1035</span>&#160;  <span class="keywordflow">return</span> source;</div>
+<div class="line"><a name="l01036"></a><span class="lineno"> 1036</span>&#160;}</div>
+<div class="line"><a name="l01037"></a><span class="lineno"> 1037</span>&#160;</div>
+<div class="line"><a name="l01038"></a><span class="lineno"> 1038</span>&#160;</div>
+<div class="line"><a name="l01039"></a><span class="lineno"> 1039</span>&#160;<span class="comment">// Helper for creating a disk resource.</span></div>
+<div class="line"><a name="l01040"></a><span class="lineno"> 1040</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TResource, <span class="keyword">typename</span> TResources, <span class="keyword">typename</span> TVolume&gt;</div>
+<div class="line"><a name="l01041"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#ab1479066681bb142e54688ccae08c3a0"> 1041</a></span>&#160;<span class="keyword">inline</span> TResource <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#ab1479066681bb142e54688ccae08c3a0">createDiskResource</a>(</div>
+<div class="line"><a name="l01042"></a><span class="lineno"> 1042</span>&#160;    <span class="keyword">const</span> std::string&amp; value,</div>
+<div class="line"><a name="l01043"></a><span class="lineno"> 1043</span>&#160;    <span class="keyword">const</span> std::string&amp; role,</div>
+<div class="line"><a name="l01044"></a><span class="lineno"> 1044</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; persistenceID,</div>
+<div class="line"><a name="l01045"></a><span class="lineno"> 1045</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; containerPath,</div>
+<div class="line"><a name="l01046"></a><span class="lineno"> 1046</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;typename TResource::DiskInfo::Source&gt;</a>&amp; source = <a class="code" href="structNone.html">None</a>(),</div>
+<div class="line"><a name="l01047"></a><span class="lineno"> 1047</span>&#160;    <span class="keywordtype">bool</span> isShared = <span class="keyword">false</span>)</div>
+<div class="line"><a name="l01048"></a><span class="lineno"> 1048</span>&#160;{</div>
+<div class="line"><a name="l01049"></a><span class="lineno"> 1049</span>&#160;  TResource resource = <a class="code" href="namespaceappc_1_1spec.html#a2107ae129dd83fbd20b22195247f16b5">TResources::parse</a>(<span class="stringliteral">&quot;disk&quot;</span>, value, role).get();</div>
+<div class="line"><a name="l01050"></a><span class="lineno"> 1050</span>&#160;</div>
+<div class="line"><a name="l01051"></a><span class="lineno"> 1051</span>&#160;  <span class="keywordflow">if</span> (persistenceID.<a class="code" href="classOption.html#a4e3bf8416d95246f43c91f1b5c309323">isSome</a>() || containerPath.<a class="code" href="classOption.html#a4e3bf8416d95246f43c91f1b5c309323">isSome</a>() || source.isSome()) {</div>
+<div class="line"><a name="l01052"></a><span class="lineno"> 1052</span>&#160;    resource.mutable_disk()-&gt;CopyFrom(</div>
+<div class="line"><a name="l01053"></a><span class="lineno"> 1053</span>&#160;        createDiskInfo&lt;TResource, TVolume&gt;(</div>
+<div class="line"><a name="l01054"></a><span class="lineno"> 1054</span>&#160;            persistenceID,</div>
+<div class="line"><a name="l01055"></a><span class="lineno"> 1055</span>&#160;            containerPath,</div>
+<div class="line"><a name="l01056"></a><span class="lineno"> 1056</span>&#160;            <a class="code" href="structNone.html">None</a>(),</div>
+<div class="line"><a name="l01057"></a><span class="lineno"> 1057</span>&#160;            <a class="code" href="structNone.html">None</a>(),</div>
+<div class="line"><a name="l01058"></a><span class="lineno"> 1058</span>&#160;            source));</div>
+<div class="line"><a name="l01059"></a><span class="lineno"> 1059</span>&#160;</div>
+<div class="line"><a name="l01060"></a><span class="lineno"> 1060</span>&#160;    <span class="keywordflow">if</span> (isShared) {</div>
+<div class="line"><a name="l01061"></a><span class="lineno"> 1061</span>&#160;      resource.mutable_shared();</div>
+<div class="line"><a name="l01062"></a><span class="lineno"> 1062</span>&#160;    }</div>
+<div class="line"><a name="l01063"></a><span class="lineno"> 1063</span>&#160;  }</div>
 <div class="line"><a name="l01064"></a><span class="lineno"> 1064</span>&#160;</div>
-<div class="line"><a name="l01065"></a><span class="lineno"> 1065</span>&#160;</div>
-<div class="line"><a name="l01066"></a><span class="lineno"> 1066</span>&#160;<span class="comment">// Note that `reservationPrincipal` should be specified if and only if</span></div>
-<div class="line"><a name="l01067"></a><span class="lineno"> 1067</span>&#160;<span class="comment">// the volume uses dynamically reserved resources.</span></div>
-<div class="line"><a name="l01068"></a><span class="lineno"> 1068</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TResource, <span class="keyword">typename</span> TResources, <span class="keyword">typename</span> TVolume&gt;</div>
-<div class="line"><a name="l01069"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#afd8335a177e8bfe417b4668da9e161ac"> 1069</a></span>&#160;<span class="keyword">inline</span> TResource <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#ab3f6f80401c5645318402940ca2121ce">createPersistentVolume</a>(</div>
-<div class="line"><a name="l01070"></a><span class="lineno"> 1070</span>&#160;    TResource volume,</div>
-<div class="line"><a name="l01071"></a><span class="lineno"> 1071</span>&#160;    <span class="keyword">const</span> std::string&amp; persistenceId,</div>
-<div class="line"><a name="l01072"></a><span class="lineno"> 1072</span>&#160;    <span class="keyword">const</span> std::string&amp; containerPath,</div>
-<div class="line"><a name="l01073"></a><span class="lineno"> 1073</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; reservationPrincipal = <a class="code" href="structNone.html">None</a>(),</div>
-<div class="line"><a name="l01074"></a><span class="lineno"> 1074</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; creatorPrincipal = <a class="code" href="structNone.html">None</a>(),</div>
-<div class="line"><a name="l01075"></a><span class="lineno"> 1075</span>&#160;    <span class="keywordtype">bool</span> isShared = <span class="keyword">false</span>)</div>
-<div class="line"><a name="l01076"></a><span class="lineno"> 1076</span>&#160;{</div>
-<div class="line"><a name="l01077"></a><span class="lineno"> 1077</span>&#160;  <a class="code" href="classOption.html">Option&lt;typename TResource::DiskInfo::Source&gt;</a> source = <a class="code" href="structNone.html">None</a>();</div>
-<div class="line"><a name="l01078"></a><span class="lineno"> 1078</span>&#160;  <span class="keywordflow">if</span> (volume.has_disk() &amp;&amp; volume.disk().has_source()) {</div>
-<div class="line"><a name="l01079"></a><span class="lineno"> 1079</span>&#160;    source = volume.disk().source();</div>
-<div class="line"><a name="l01080"></a><span class="lineno"> 1080</span>&#160;  }</div>
-<div class="line"><a name="l01081"></a><span class="lineno"> 1081</span>&#160;</div>
-<div class="line"><a name="l01082"></a><span class="lineno"> 1082</span>&#160;  volume.mutable_disk()-&gt;CopyFrom(</div>
-<div class="line"><a name="l01083"></a><span class="lineno"> 1083</span>&#160;      createDiskInfo&lt;TResource, TVolume&gt;(</div>
-<div class="line"><a name="l01084"></a><span class="lineno"> 1084</span>&#160;          persistenceId,</div>
-<div class="line"><a name="l01085"></a><span class="lineno"> 1085</span>&#160;          containerPath,</div>
-<div class="line"><a name="l01086"></a><span class="lineno"> 1086</span>&#160;          <a class="code" href="structNone.html">None</a>(),</div>
-<div class="line"><a name="l01087"></a><span class="lineno"> 1087</span>&#160;          <a class="code" href="structNone.html">None</a>(),</div>
-<div class="line"><a name="l01088"></a><span class="lineno"> 1088</span>&#160;          source,</div>
-<div class="line"><a name="l01089"></a><span class="lineno"> 1089</span>&#160;          creatorPrincipal));</div>
-<div class="line"><a name="l01090"></a><span class="lineno"> 1090</span>&#160;</div>
-<div class="line"><a name="l01091"></a><span class="lineno"> 1091</span>&#160;  <span class="keywordflow">if</span> (reservationPrincipal.isSome()) {</div>
-<div class="line"><a name="l01092"></a><span class="lineno"> 1092</span>&#160;    <span class="keyword">typename</span> TResource::ReservationInfo&amp; reservation =</div>
-<div class="line"><a name="l01093"></a><span class="lineno"> 1093</span>&#160;      *volume.mutable_reservations()-&gt;rbegin();</div>
-<div class="line"><a name="l01094"></a><span class="lineno"> 1094</span>&#160;</div>
-<div class="line"><a name="l01095"></a><span class="lineno"> 1095</span>&#160;    reservation.set_type(TResource::ReservationInfo::DYNAMIC);</div>
-<div class="line"><a name="l01096"></a><span class="lineno"> 1096</span>&#160;    reservation.set_principal(reservationPrincipal.get());</div>
-<div class="line"><a name="l01097"></a><span class="lineno"> 1097</span>&#160;  }</div>
-<div class="line"><a name="l01098"></a><span class="lineno"> 1098</span>&#160;</div>
-<div class="line"><a name="l01099"></a><span class="lineno"> 1099</span>&#160;  <span class="keywordflow">if</span> (isShared) {</div>
-<div class="line"><a name="l01100"></a><span class="lineno"> 1100</span>&#160;    volume.mutable_shared();</div>
-<div class="line"><a name="l01101"></a><span class="lineno"> 1101</span>&#160;  }</div>
-<div class="line"><a name="l01102"></a><span class="lineno"> 1102</span>&#160;</div>
-<div class="line"><a name="l01103"></a><span class="lineno"> 1103</span>&#160;  <span class="keywordflow">return</span> volume;</div>
-<div class="line"><a name="l01104"></a><span class="lineno"> 1104</span>&#160;}</div>
+<div class="line"><a name="l01065"></a><span class="lineno"> 1065</span>&#160;  <span class="keywordflow">return</span> resource;</div>
+<div class="line"><a name="l01066"></a><span class="lineno"> 1066</span>&#160;}</div>
+<div class="line"><a name="l01067"></a><span class="lineno"> 1067</span>&#160;</div>
+<div class="line"><a name="l01068"></a><span class="lineno"> 1068</span>&#160;</div>
+<div class="line"><a name="l01069"></a><span class="lineno"> 1069</span>&#160;<span class="comment">// Note that `reservationPrincipal` should be specified if and only if</span></div>
+<div class="line"><a name="l01070"></a><span class="lineno"> 1070</span>&#160;<span class="comment">// the volume uses dynamically reserved resources.</span></div>
+<div class="line"><a name="l01071"></a><span class="lineno"> 1071</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TResource, <span class="keyword">typename</span> TResources, <span class="keyword">typename</span> TVolume&gt;</div>
+<div class="line"><a name="l01072"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#ab3f6f80401c5645318402940ca2121ce"> 1072</a></span>&#160;<span class="keyword">inline</span> TResource <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#ab3f6f80401c5645318402940ca2121ce">createPersistentVolume</a>(</div>
+<div class="line"><a name="l01073"></a><span class="lineno"> 1073</span>&#160;    <span class="keyword">const</span> <a class="code" href="classBytes.html">Bytes</a>&amp; <a class="code" href="namespaceos_1_1stat.html#a7a116891923bc8b5d8c50f78da8657be">size</a>,</div>
+<div class="line"><a name="l01074"></a><span class="lineno"> 1074</span>&#160;    <span class="keyword">const</span> std::string&amp; role,</div>
+<div class="line"><a name="l01075"></a><span class="lineno"> 1075</span>&#160;    <span class="keyword">const</span> std::string&amp; persistenceId,</div>
+<div class="line"><a name="l01076"></a><span class="lineno"> 1076</span>&#160;    <span class="keyword">const</span> std::string&amp; containerPath,</div>
+<div class="line"><a name="l01077"></a><span class="lineno"> 1077</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; reservationPrincipal = <a class="code" href="structNone.html">None</a>(),</div>
+<div class="line"><a name="l01078"></a><span class="lineno"> 1078</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;typename TResource::DiskInfo::Source&gt;</a>&amp; source = <a class="code" href="structNone.html">None</a>(),</div>
+<div class="line"><a name="l01079"></a><span class="lineno"> 1079</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; creatorPrincipal = <a class="code" href="structNone.html">None</a>(),</div>
+<div class="line"><a name="l01080"></a><span class="lineno"> 1080</span>&#160;    <span class="keywordtype">bool</span> isShared = <span class="keyword">false</span>)</div>
+<div class="line"><a name="l01081"></a><span class="lineno"> 1081</span>&#160;{</div>
+<div class="line"><a name="l01082"></a><span class="lineno"> 1082</span>&#160;  TResource volume =</div>
+<div class="line"><a name="l01083"></a><span class="lineno"> 1083</span>&#160;    <a class="code" href="namespaceappc_1_1spec.html#a2107ae129dd83fbd20b22195247f16b5">TResources::parse</a>(<span class="stringliteral">&quot;disk&quot;</span>, <a class="code" href="namespacens.html#a28116b46e6543597a11733424cd1aa20">stringify</a>(size.<a class="code" href="classBytes.html#aee1957960ddcf609db170b0590ff7db5">megabytes</a>()), role).get();</div>
+<div class="line"><a name="l01084"></a><span class="lineno"> 1084</span>&#160;</div>
+<div class="line"><a name="l01085"></a><span class="lineno"> 1085</span>&#160;  volume.mutable_disk()-&gt;CopyFrom(</div>
+<div class="line"><a name="l01086"></a><span class="lineno"> 1086</span>&#160;      createDiskInfo&lt;TResource, TVolume&gt;(</div>
+<div class="line"><a name="l01087"></a><span class="lineno"> 1087</span>&#160;          persistenceId,</div>
+<div class="line"><a name="l01088"></a><span class="lineno"> 1088</span>&#160;          containerPath,</div>
+<div class="line"><a name="l01089"></a><span class="lineno"> 1089</span>&#160;          <a class="code" href="structNone.html">None</a>(),</div>
+<div class="line"><a name="l01090"></a><span class="lineno"> 1090</span>&#160;          <a class="code" href="structNone.html">None</a>(),</div>
+<div class="line"><a name="l01091"></a><span class="lineno"> 1091</span>&#160;          source,</div>
+<div class="line"><a name="l01092"></a><span class="lineno"> 1092</span>&#160;          creatorPrincipal));</div>
+<div class="line"><a name="l01093"></a><span class="lineno"> 1093</span>&#160;</div>
+<div class="line"><a name="l01094"></a><span class="lineno"> 1094</span>&#160;  <span class="keywordflow">if</span> (reservationPrincipal.isSome()) {</div>
+<div class="line"><a name="l01095"></a><span class="lineno"> 1095</span>&#160;    <span class="keyword">typename</span> TResource::ReservationInfo&amp; reservation =</div>
+<div class="line"><a name="l01096"></a><span class="lineno"> 1096</span>&#160;      *volume.mutable_reservations()-&gt;rbegin();</div>
+<div class="line"><a name="l01097"></a><span class="lineno"> 1097</span>&#160;</div>
+<div class="line"><a name="l01098"></a><span class="lineno"> 1098</span>&#160;    reservation.set_type(TResource::ReservationInfo::DYNAMIC);</div>
+<div class="line"><a name="l01099"></a><span class="lineno"> 1099</span>&#160;    reservation.set_principal(reservationPrincipal.get());</div>
+<div class="line"><a name="l01100"></a><span class="lineno"> 1100</span>&#160;  }</div>
+<div class="line"><a name="l01101"></a><span class="lineno"> 1101</span>&#160;</div>
+<div class="line"><a name="l01102"></a><span class="lineno"> 1102</span>&#160;  <span class="keywordflow">if</span> (isShared) {</div>
+<div class="line"><a name="l01103"></a><span class="lineno"> 1103</span>&#160;    volume.mutable_shared();</div>
+<div class="line"><a name="l01104"></a><span class="lineno"> 1104</span>&#160;  }</div>
 <div class="line"><a name="l01105"></a><span class="lineno"> 1105</span>&#160;</div>
-<div class="line"><a name="l01106"></a><span class="lineno"> 1106</span>&#160;</div>
-<div class="line"><a name="l01107"></a><span class="lineno"> 1107</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TCredential&gt;</div>
-<div class="line"><a name="l01108"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a33e1b9a2dea5527be8737ed6084567fb"> 1108</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classprocess_1_1http_1_1Headers.html">process::http::Headers</a> <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a33e1b9a2dea5527be8737ed6084567fb">createBasicAuthHeaders</a>(</div>
-<div class="line"><a name="l01109"></a><span class="lineno"> 1109</span>&#160;    <span class="keyword">const</span> TCredential&amp; credential)</div>
-<div class="line"><a name="l01110"></a><span class="lineno"> 1110</span>&#160;{</div>
-<div class="line"><a name="l01111"></a><span class="lineno"> 1111</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="classprocess_1_1http_1_1Headers.html">process::http::Headers</a>({{</div>
-<div class="line"><a name="l01112"></a><span class="lineno"> 1112</span>&#160;      <span class="stringliteral">&quot;Authorization&quot;</span>,</div>
-<div class="line"><a name="l01113"></a><span class="lineno"> 1113</span>&#160;      <span class="stringliteral">&quot;Basic &quot;</span> +</div>
-<div class="line"><a name="l01114"></a><span class="lineno"> 1114</span>&#160;        <a class="code" href="namespacebase64.html#a47c61bb5df3dae8cd38f44b6b69e5b4d">base64::encode</a>(credential.principal() + <span class="stringliteral">&quot;:&quot;</span> + credential.secret())</div>
-<div class="line"><a name="l01115"></a><span class="lineno"> 1115</span>&#160;  }});</div>
-<div class="line"><a name="l01116"></a><span class="lineno"> 1116</span>&#160;}</div>
-<div class="line"><a name="l01117"></a><span class="lineno"> 1117</span>&#160;</div>
-<div class="line"><a name="l01118"></a><span class="lineno"> 1118</span>&#160;</div>
-<div class="line"><a name="l01119"></a><span class="lineno"> 1119</span>&#160;<span class="comment">// Create WeightInfos from the specified weights flag.</span></div>
-<div class="line"><a name="l01120"></a><span class="lineno"> 1120</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TWeightInfo&gt;</div>
-<div class="line"><a name="l01121"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a96c6096bba99af5d2e8093b06f315c15"> 1121</a></span>&#160;<span class="keyword">inline</span> google::protobuf::RepeatedPtrField&lt;TWeightInfo&gt; <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a96c6096bba99af5d2e8093b06f315c15">createWeightInfos</a>(</div>
-<div class="line"><a name="l01122"></a><span class="lineno"> 1122</span>&#160;    <span class="keyword">const</span> std::string&amp; weightsFlag)</div>
-<div class="line"><a name="l01123"></a><span class="lineno"> 1123</span>&#160;{</div>
-<div class="line"><a name="l01124"></a><span class="lineno"> 1124</span>&#160;  google::protobuf::RepeatedPtrField&lt;TWeightInfo&gt; <a class="code" href="namespacerouting_1_1diagnosis_1_1socket.html#a8937277756951dcc28f2dbdbd9ea24d7">infos</a>;</div>
-<div class="line"><a name="l01125"></a><span class="lineno"> 1125</span>&#160;  std::vector&lt;std::string&gt; tokens = <a class="code" href="namespacestrings.html#afffe11c8ecce961981653358520d6a04">strings::tokenize</a>(weightsFlag, <span class="stringliteral">&quot;,&quot;</span>);</div>
-<div class="line"><a name="l01126"></a><span class="lineno"> 1126</span>&#160;  <span class="keywordflow">foreach</span> (<span class="keyword">const</span> std::string&amp; token, tokens) {</div>
-<div class="line"><a name="l01127"></a><span class="lineno"> 1127</span>&#160;    std::vector&lt;std::string&gt; pair = <a class="code" href="namespacestrings.html#afffe11c8ecce961981653358520d6a04">strings::tokenize</a>(token, <span class="stringliteral">&quot;=&quot;</span>);</div>
-<div class="line"><a name="l01128"></a><span class="lineno"> 1128</span>&#160;    EXPECT_EQ(2u, pair.size());</div>
-<div class="line"><a name="l01129"></a><span class="lineno"> 1129</span>&#160;    <span class="keywordtype">double</span> weight = atof(pair[1].c_str());</div>
-<div class="line"><a name="l01130"></a><span class="lineno"> 1130</span>&#160;    TWeightInfo weightInfo;</div>
-<div class="line"><a name="l01131"></a><span class="lineno"> 1131</span>&#160;    weightInfo.set_role(pair[0]);</div>
-<div class="line"><a name="l01132"></a><span class="lineno"> 1132</span>&#160;    weightInfo.set_weight(weight);</div>
-<div class="line"><a name="l01133"></a><span class="lineno"> 1133</span>&#160;    infos.Add()-&gt;CopyFrom(weightInfo);</div>
-<div class="line"><a name="l01134"></a><span class="lineno"> 1134</span>&#160;  }</div>
-<div class="line"><a name="l01135"></a><span class="lineno"> 1135</span>&#160;</div>
-<div class="line"><a name="l01136"></a><span class="lineno"> 1136</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="namespacerouting_1_1diagnosis_1_1socket.html#a8937277756951dcc28f2dbdbd9ea24d7">infos</a>;</div>
-<div class="line"><a name="l01137"></a><span class="lineno"> 1137</span>&#160;}</div>
+<div class="line"><a name="l01106"></a><span class="lineno"> 1106</span>&#160;  <span class="keywordflow">return</span> volume;</div>
+<div class="line"><a name="l01107"></a><span class="lineno"> 1107</span>&#160;}</div>
+<div class="line"><a name="l01108"></a><span class="lineno"> 1108</span>&#160;</div>
+<div class="line"><a name="l01109"></a><span class="lineno"> 1109</span>&#160;</div>
+<div class="line"><a name="l01110"></a><span class="lineno"> 1110</span>&#160;<span class="comment">// Note that `reservationPrincipal` should be specified if and only if</span></div>
+<div class="line"><a name="l01111"></a><span class="lineno"> 1111</span>&#160;<span class="comment">// the volume uses dynamically reserved resources.</span></div>
+<div class="line"><a name="l01112"></a><span class="lineno"> 1112</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TResource, <span class="keyword">typename</span> TResources, <span class="keyword">typename</span> TVolume&gt;</div>
+<div class="line"><a name="l01113"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#afd8335a177e8bfe417b4668da9e161ac"> 1113</a></span>&#160;<span class="keyword">inline</span> TResource <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#ab3f6f80401c5645318402940ca2121ce">createPersistentVolume</a>(</div>
+<div class="line"><a name="l01114"></a><span class="lineno"> 1114</span>&#160;    TResource volume,</div>
+<div class="line"><a name="l01115"></a><span class="lineno"> 1115</span>&#160;    <span class="keyword">const</span> std::string&amp; persistenceId,</div>
+<div class="line"><a name="l01116"></a><span class="lineno"> 1116</span>&#160;    <span class="keyword">const</span> std::string&amp; containerPath,</div>
+<div class="line"><a name="l01117"></a><span class="lineno"> 1117</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; reservationPrincipal = <a class="code" href="structNone.html">None</a>(),</div>
+<div class="line"><a name="l01118"></a><span class="lineno"> 1118</span>&#160;    <span class="keyword">const</span> <a class="code" href="classOption.html">Option&lt;std::string&gt;</a>&amp; creatorPrincipal = <a class="code" href="structNone.html">None</a>(),</div>
+<div class="line"><a name="l01119"></a><span class="lineno"> 1119</span>&#160;    <span class="keywordtype">bool</span> isShared = <span class="keyword">false</span>)</div>
+<div class="line"><a name="l01120"></a><span class="lineno"> 1120</span>&#160;{</div>
+<div class="line"><a name="l01121"></a><span class="lineno"> 1121</span>&#160;  <a class="code" href="classOption.html">Option&lt;typename TResource::DiskInfo::Source&gt;</a> source = <a class="code" href="structNone.html">None</a>();</div>
+<div class="line"><a name="l01122"></a><span class="lineno"> 1122</span>&#160;  <span class="keywordflow">if</span> (volume.has_disk() &amp;&amp; volume.disk().has_source()) {</div>
+<div class="line"><a name="l01123"></a><span class="lineno"> 1123</span>&#160;    source = volume.disk().source();</div>
+<div class="line"><a name="l01124"></a><span class="lineno"> 1124</span>&#160;  }</div>
+<div class="line"><a name="l01125"></a><span class="lineno"> 1125</span>&#160;</div>
+<div class="line"><a name="l01126"></a><span class="lineno"> 1126</span>&#160;  volume.mutable_disk()-&gt;CopyFrom(</div>
+<div class="line"><a name="l01127"></a><span class="lineno"> 1127</span>&#160;      createDiskInfo&lt;TResource, TVolume&gt;(</div>
+<div class="line"><a name="l01128"></a><span class="lineno"> 1128</span>&#160;          persistenceId,</div>
+<div class="line"><a name="l01129"></a><span class="lineno"> 1129</span>&#160;          containerPath,</div>
+<div class="line"><a name="l01130"></a><span class="lineno"> 1130</span>&#160;          <a class="code" href="structNone.html">None</a>(),</div>
+<div class="line"><a name="l01131"></a><span class="lineno"> 1131</span>&#160;          <a class="code" href="structNone.html">None</a>(),</div>
+<div class="line"><a name="l01132"></a><span class="lineno"> 1132</span>&#160;          source,</div>
+<div class="line"><a name="l01133"></a><span class="lineno"> 1133</span>&#160;          creatorPrincipal));</div>
+<div class="line"><a name="l01134"></a><span class="lineno"> 1134</span>&#160;</div>
+<div class="line"><a name="l01135"></a><span class="lineno"> 1135</span>&#160;  <span class="keywordflow">if</span> (reservationPrincipal.isSome()) {</div>
+<div class="line"><a name="l01136"></a><span class="lineno"> 1136</span>&#160;    <span class="keyword">typename</span> TResource::ReservationInfo&amp; reservation =</div>
+<div class="line"><a name="l01137"></a><span class="lineno"> 1137</span>&#160;      *volume.mutable_reservations()-&gt;rbegin();</div>
 <div class="line"><a name="l01138"></a><span class="lineno"> 1138</span>&#160;</div>
-<div class="line"><a name="l01139"></a><span class="lineno"> 1139</span>&#160;</div>
-<div class="line"><a name="l01140"></a><span class="lineno"> 1140</span>&#160;<span class="comment">// Convert WeightInfos protobuf to weights hashmap.</span></div>
-<div class="line"><a name="l01141"></a><span class="lineno"> 1141</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TWeightInfo&gt;</div>
-<div class="line"><a name="l01142"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#ac4a5499bf7bd860c85008cee8dec7582"> 1142</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classhashmap.html">hashmap&lt;std::string, double&gt;</a> <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#ac4a5499bf7bd860c85008cee8dec7582">convertToHashmap</a>(</div>
-<div class="line"><a name="l01143"></a><span class="lineno"> 1143</span>&#160;    <span class="keyword">const</span> google::protobuf::RepeatedPtrField&lt;TWeightInfo&gt; weightInfos)</div>
-<div class="line"><a name="l01144"></a><span class="lineno"> 1144</span>&#160;{</div>
-<div class="line"><a name="l01145"></a><span class="lineno"> 1145</span>&#160;  <a class="code" href="classhashmap.html">hashmap&lt;std::string, double&gt;</a> weights;</div>
+<div class="line"><a name="l01139"></a><span class="lineno"> 1139</span>&#160;    reservation.set_type(TResource::ReservationInfo::DYNAMIC);</div>
+<div class="line"><a name="l01140"></a><span class="lineno"> 1140</span>&#160;    reservation.set_principal(reservationPrincipal.get());</div>
+<div class="line"><a name="l01141"></a><span class="lineno"> 1141</span>&#160;  }</div>
+<div class="line"><a name="l01142"></a><span class="lineno"> 1142</span>&#160;</div>
+<div class="line"><a name="l01143"></a><span class="lineno"> 1143</span>&#160;  <span class="keywordflow">if</span> (isShared) {</div>
+<div class="line"><a name="l01144"></a><span class="lineno"> 1144</span>&#160;    volume.mutable_shared();</div>
+<div class="line"><a name="l01145"></a><span class="lineno"> 1145</span>&#160;  }</div>
 <div class="line"><a name="l01146"></a><span class="lineno"> 1146</span>&#160;</div>
-<div class="line"><a name="l01147"></a><span class="lineno"> 1147</span>&#160;  <span class="keywordflow">foreach</span> (<span class="keyword">const</span> TWeightInfo&amp; weightInfo, weightInfos) {</div>
-<div class="line"><a name="l01148"></a><span class="lineno"> 1148</span>&#160;    weights[weightInfo.role()] = weightInfo.weight();</div>
-<div class="line"><a name="l01149"></a><span class="lineno"> 1149</span>&#160;  }</div>
+<div class="line"><a name="l01147"></a><span class="lineno"> 1147</span>&#160;  <span class="keywordflow">return</span> volume;</div>
+<div class="line"><a name="l01148"></a><span class="lineno"> 1148</span>&#160;}</div>
+<div class="line"><a name="l01149"></a><span class="lineno"> 1149</span>&#160;</div>
 <div class="line"><a name="l01150"></a><span class="lineno"> 1150</span>&#160;</div>
-<div class="line"><a name="l01151"></a><span class="lineno"> 1151</span>&#160;  <span class="keywordflow">return</span> weights;</div>
-<div class="line"><a name="l01152"></a><span class="lineno"> 1152</span>&#160;}</div>
-<div class="line"><a name="l01153"></a><span class="lineno"> 1153</span>&#160;</div>
-<div class="line"><a name="l01154"></a><span class="lineno"> 1154</span>&#160;</div>
-<div class="line"><a name="l01155"></a><span class="lineno"> 1155</span>&#160;<span class="comment">// Helper to create DomainInfo.</span></div>
-<div class="line"><a name="l01156"></a><span class="lineno"> 1156</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TDomainInfo&gt;</div>
-<div class="line"><a name="l01157"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a350e4f6f831f99d6a3b6f17cdc4f9765"> 1157</a></span>&#160;<span class="keyword">inline</span> TDomainInfo <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a350e4f6f831f99d6a3b6f17cdc4f9765">createDomainInfo</a>(</div>
-<div class="line"><a name="l01158"></a><span class="lineno"> 1158</span>&#160;    <span class="keyword">const</span> std::string&amp; regionName,</div>
-<div class="line"><a name="l01159"></a><span class="lineno"> 1159</span>&#160;    <span class="keyword">const</span> std::string&amp; zoneName)</div>
-<div class="line"><a name="l01160"></a><span class="lineno"> 1160</span>&#160;{</div>
-<div class="line"><a name="l01161"></a><span class="lineno"> 1161</span>&#160;  TDomainInfo domain;</div>
+<div class="line"><a name="l01151"></a><span class="lineno"> 1151</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TCredential&gt;</div>
+<div class="line"><a name="l01152"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a33e1b9a2dea5527be8737ed6084567fb"> 1152</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classprocess_1_1http_1_1Headers.html">process::http::Headers</a> <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a33e1b9a2dea5527be8737ed6084567fb">createBasicAuthHeaders</a>(</div>
+<div class="line"><a name="l01153"></a><span class="lineno"> 1153</span>&#160;    <span class="keyword">const</span> TCredential&amp; credential)</div>
+<div class="line"><a name="l01154"></a><span class="lineno"> 1154</span>&#160;{</div>
+<div class="line"><a name="l01155"></a><span class="lineno"> 1155</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="classprocess_1_1http_1_1Headers.html">process::http::Headers</a>({{</div>
+<div class="line"><a name="l01156"></a><span class="lineno"> 1156</span>&#160;      <span class="stringliteral">&quot;Authorization&quot;</span>,</div>
+<div class="line"><a name="l01157"></a><span class="lineno"> 1157</span>&#160;      <span class="stringliteral">&quot;Basic &quot;</span> +</div>
+<div class="line"><a name="l01158"></a><span class="lineno"> 1158</span>&#160;        <a class="code" href="namespacebase64.html#a47c61bb5df3dae8cd38f44b6b69e5b4d">base64::encode</a>(credential.principal() + <span class="stringliteral">&quot;:&quot;</span> + credential.secret())</div>
+<div class="line"><a name="l01159"></a><span class="lineno"> 1159</span>&#160;  }});</div>
+<div class="line"><a name="l01160"></a><span class="lineno"> 1160</span>&#160;}</div>
+<div class="line"><a name="l01161"></a><span class="lineno"> 1161</span>&#160;</div>
 <div class="line"><a name="l01162"></a><span class="lineno"> 1162</span>&#160;</div>
-<div class="line"><a name="l01163"></a><span class="lineno"> 1163</span>&#160;  domain.mutable_fault_domain()-&gt;mutable_region()-&gt;set_name(regionName);</div>
-<div class="line"><a name="l01164"></a><span class="lineno"> 1164</span>&#160;  domain.mutable_fault_domain()-&gt;mutable_zone()-&gt;set_name(zoneName);</div>
-<div class="line"><a name="l01165"></a><span class="lineno"> 1165</span>&#160;</div>
-<div class="line"><a name="l01166"></a><span class="lineno"> 1166</span>&#160;  <span class="keywordflow">return</span> domain;</div>
-<div class="line"><a name="l01167"></a><span class="lineno"> 1167</span>&#160;}</div>
-<div class="line"><a name="l01168"></a><span class="lineno"> 1168</span>&#160;</div>
-<div class="line"><a name="l01169"></a><span class="lineno"> 1169</span>&#160;</div>
-<div class="line"><a name="l01170"></a><span class="lineno"> 1170</span>&#160;<span class="comment">// Helpers for creating offer operations.</span></div>
-<div class="line"><a name="l01171"></a><span class="lineno"> 1171</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TResources, <span class="keyword">typename</span> TOffer&gt;</div>
-<div class="line"><a name="l01172"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a07ba9c332393ad463065495f37c5bced"> 1172</a></span>&#160;<span class="keyword">inline</span> <span class="keyword">typename</span> <a class="code" href="namespacecgroups_1_1blkio.html#a350b1eb57318afaea7700ab7786b55ef">TOffer::Operation</a> <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a07ba9c332393ad463065495f37c5bced">RESERVE</a>(<span class="keyword">const</span> TResources&amp; resources)</div>
-<div class="line"><a name="l01173"></a><span class="lineno"> 1173</span>&#160;{</div>
-<div class="line"><a name="l01174"></a><span class="lineno"> 1174</span>&#160;  <span class="keyword">typename</span> <a class="code" href="namespacecgroups_1_1blkio.html#a350b1eb57318afaea7700ab7786b55ef">TOffer::Operation</a> operation;</div>
-<div class="line"><a name="l01175"></a><span class="lineno"> 1175</span>&#160;  operation.set_type(<a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a07ba9c332393ad463065495f37c5bced">TOffer::Operation::RESERVE</a>);</div>
-<div class="line"><a name="l01176"></a><span class="lineno"> 1176</span>&#160;  operation.mutable_reserve()-&gt;mutable_resources()-&gt;CopyFrom(resources);</div>
-<div class="line"><a name="l01177"></a><span class="lineno"> 1177</span>&#160;  <span class="keywordflow">return</span> operation;</div>
-<div class="line"><a name="l01178"></a><span class="lineno"> 1178</span>&#160;}</div>
+<div class="line"><a name="l01163"></a><span class="lineno"> 1163</span>&#160;<span class="comment">// Create WeightInfos from the specified weights flag.</span></div>
+<div class="line"><a name="l01164"></a><span class="lineno"> 1164</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TWeightInfo&gt;</div>
+<div class="line"><a name="l01165"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a96c6096bba99af5d2e8093b06f315c15"> 1165</a></span>&#160;<span class="keyword">inline</span> google::protobuf::RepeatedPtrField&lt;TWeightInfo&gt; <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a96c6096bba99af5d2e8093b06f315c15">createWeightInfos</a>(</div>
+<div class="line"><a name="l01166"></a><span class="lineno"> 1166</span>&#160;    <span class="keyword">const</span> std::string&amp; weightsFlag)</div>
+<div class="line"><a name="l01167"></a><span class="lineno"> 1167</span>&#160;{</div>
+<div class="line"><a name="l01168"></a><span class="lineno"> 1168</span>&#160;  google::protobuf::RepeatedPtrField&lt;TWeightInfo&gt; <a class="code" href="namespacerouting_1_1diagnosis_1_1socket.html#a8937277756951dcc28f2dbdbd9ea24d7">infos</a>;</div>
+<div class="line"><a name="l01169"></a><span class="lineno"> 1169</span>&#160;  std::vector&lt;std::string&gt; tokens = <a class="code" href="namespacestrings.html#afffe11c8ecce961981653358520d6a04">strings::tokenize</a>(weightsFlag, <span class="stringliteral">&quot;,&quot;</span>);</div>
+<div class="line"><a name="l01170"></a><span class="lineno"> 1170</span>&#160;  <span class="keywordflow">foreach</span> (<span class="keyword">const</span> std::string&amp; token, tokens) {</div>
+<div class="line"><a name="l01171"></a><span class="lineno"> 1171</span>&#160;    std::vector&lt;std::string&gt; pair = <a class="code" href="namespacestrings.html#afffe11c8ecce961981653358520d6a04">strings::tokenize</a>(token, <span class="stringliteral">&quot;=&quot;</span>);</div>
+<div class="line"><a name="l01172"></a><span class="lineno"> 1172</span>&#160;    EXPECT_EQ(2u, pair.size());</div>
+<div class="line"><a name="l01173"></a><span class="lineno"> 1173</span>&#160;    <span class="keywordtype">double</span> weight = atof(pair[1].c_str());</div>
+<div class="line"><a name="l01174"></a><span class="lineno"> 1174</span>&#160;    TWeightInfo weightInfo;</div>
+<div class="line"><a name="l01175"></a><span class="lineno"> 1175</span>&#160;    weightInfo.set_role(pair[0]);</div>
+<div class="line"><a name="l01176"></a><span class="lineno"> 1176</span>&#160;    weightInfo.set_weight(weight);</div>
+<div class="line"><a name="l01177"></a><span class="lineno"> 1177</span>&#160;    infos.Add()-&gt;CopyFrom(weightInfo);</div>
+<div class="line"><a name="l01178"></a><span class="lineno"> 1178</span>&#160;  }</div>
 <div class="line"><a name="l01179"></a><span class="lineno"> 1179</span>&#160;</div>
-<div class="line"><a name="l01180"></a><span class="lineno"> 1180</span>&#160;</div>
-<div class="line"><a name="l01181"></a><span class="lineno"> 1181</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TResources, <span class="keyword">typename</span> TOffer&gt;</div>
-<div class="line"><a name="l01182"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a7502aad15971920c0d5907ca2f010859"> 1182</a></span>&#160;<span class="keyword">inline</span> <span class="keyword">typename</span> <a class="code" href="namespacecgroups_1_1blkio.html#a350b1eb57318afaea7700ab7786b55ef">TOffer::Operation</a> <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a7502aad15971920c0d5907ca2f010859">UNRESERVE</a>(<span class="keyword">const</span> TResources&amp; resources)</div>
-<div class="line"><a name="l01183"></a><span class="lineno"> 1183</span>&#160;{</div>
-<div class="line"><a name="l01184"></a><span class="lineno"> 1184</span>&#160;  <span class="keyword">typename</span> <a class="code" href="namespacecgroups_1_1blkio.html#a350b1eb57318afaea7700ab7786b55ef">TOffer::Operation</a> operation;</div>
-<div class="line"><a name="l01185"></a><span class="lineno"> 1185</span>&#160;  operation.set_type(<a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a7502aad15971920c0d5907ca2f010859">TOffer::Operation::UNRESERVE</a>);</div>
-<div class="line"><a name="l01186"></a><span class="lineno"> 1186</span>&#160;  operation.mutable_unreserve()-&gt;mutable_resources()-&gt;CopyFrom(resources);</div>
-<div class="line"><a name="l01187"></a><span class="lineno"> 1187</span>&#160;  <span class="keywordflow">return</span> operation;</div>
-<div class="line"><a name="l01188"></a><span class="lineno"> 1188</span>&#160;}</div>
-<div class="line"><a name="l01189"></a><span class="lineno"> 1189</span>&#160;</div>
+<div class="line"><a name="l01180"></a><span class="lineno"> 1180</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="namespacerouting_1_1diagnosis_1_1socket.html#a8937277756951dcc28f2dbdbd9ea24d7">infos</a>;</div>
+<div class="line"><a name="l01181"></a><span class="lineno"> 1181</span>&#160;}</div>
+<div class="line"><a name="l01182"></a><span class="lineno"> 1182</span>&#160;</div>
+<div class="line"><a name="l01183"></a><span class="lineno"> 1183</span>&#160;</div>
+<div class="line"><a name="l01184"></a><span class="lineno"> 1184</span>&#160;<span class="comment">// Convert WeightInfos protobuf to weights hashmap.</span></div>
+<div class="line"><a name="l01185"></a><span class="lineno"> 1185</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TWeightInfo&gt;</div>
+<div class="line"><a name="l01186"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#ac4a5499bf7bd860c85008cee8dec7582"> 1186</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classhashmap.html">hashmap&lt;std::string, double&gt;</a> <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#ac4a5499bf7bd860c85008cee8dec7582">convertToHashmap</a>(</div>
+<div class="line"><a name="l01187"></a><span class="lineno"> 1187</span>&#160;    <span class="keyword">const</span> google::protobuf::RepeatedPtrField&lt;TWeightInfo&gt; weightInfos)</div>
+<div class="line"><a name="l01188"></a><span class="lineno"> 1188</span>&#160;{</div>
+<div class="line"><a name="l01189"></a><span class="lineno"> 1189</span>&#160;  <a class="code" href="classhashmap.html">hashmap&lt;std::string, double&gt;</a> weights;</div>
 <div class="line"><a name="l01190"></a><span class="lineno"> 1190</span>&#160;</div>
-<div class="line"><a name="l01191"></a><span class="lineno"> 1191</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TResources, <span class="keyword">typename</span> TOffer&gt;</div>
-<div class="line"><a name="l01192"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a3fe53df8c99e8dce61568ce527030ce7"> 1192</a></span>&#160;<span class="keyword">inline</span> <span class="keyword">typename</span> <a class="code" href="namespacecgroups_1_1blkio.html#a350b1eb57318afaea7700ab7786b55ef">TOffer::Operation</a> <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a3fe53df8c99e8dce61568ce527030ce7">CREATE</a>(<span class="keyword">const</span> TResources&amp; volumes)</div>
-<div class="line"><a name="l01193"></a><span class="lineno"> 1193</span>&#160;{</div>
-<div class="line"><a name="l01194"></a><span class="lineno"> 1194</span>&#160;  <span class="keyword">typename</span> <a class="code" href="namespacecgroups_1_1blkio.html#a350b1eb57318afaea7700ab7786b55ef">TOffer::Operation</a> operation;</div>
-<div class="line"><a name="l01195"></a><span class="lineno"> 1195</span>&#160;  operation.set_type(<a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a3fe53df8c99e8dce61568ce527030ce7">TOffer::Operation::CREATE</a>);</div>
-<div class="line"><a name="l01196"></a><span class="lineno"> 1196</span>&#160;  operation.mutable_create()-&gt;mutable_volumes()-&gt;CopyFrom(volumes);</div>
-<div class="line"><a name="l01197"></a><span class="lineno"> 1197</span>&#160;  <span class="keywordflow">return</span> operation;</div>
-<div class="line"><a name="l01198"></a><span class="lineno"> 1198</span>&#160;}</div>
-<div class="line"><a name="l01199"></a><span class="lineno"> 1199</span>&#160;</div>
-<div class="line"><a name="l01200"></a><span class="lineno"> 1200</span>&#160;</div>
-<div class="line"><a name="l01201"></a><span class="lineno"> 1201</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TResources, <span class="keyword">typename</span> TOffer&gt;</div>
-<div class="line"><a name="l01202"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a8a7409ebbb940e352722588a8e0bb106"> 1202</a></span>&#160;<span class="keyword">inline</span> <span class="keyword">typename</span> <a class="code" href="namespacecgroups_1_1blkio.html#a350b1eb57318afaea7700ab7786b55ef">TOffer::Operation</a> <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a8a7409ebbb940e352722588a8e0bb106">DESTROY</a>(<span class="keyword">const</span> TResources&amp; volumes)</div>
-<div class="line"><a name="l01203"></a><span class="lineno"> 1203</span>&#160;{</div>
-<div class="line"><a name="l01204"></a><span class="lineno"> 1204</span>&#160;  <span class="keyword">typename</span> <a class="code" href="namespacecgroups_1_1blkio.html#a350b1eb57318afaea7700ab7786b55ef">TOffer::Operation</a> operation;</div>
-<div class="line"><a name="l01205"></a><span class="lineno"> 1205</span>&#160;  operation.set_type(<a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a8a7409ebbb940e352722588a8e0bb106">TOffer::Operation::DESTROY</a>);</div>
-<div class="line"><a name="l01206"></a><span class="lineno"> 1206</span>&#160;  operation.mutable_destroy()-&gt;mutable_volumes()-&gt;CopyFrom(volumes);</div>
-<div class="line"><a name="l01207"></a><span class="lineno"> 1207</span>&#160;  <span class="keywordflow">return</span> operation;</div>
-<div class="line"><a name="l01208"></a><span class="lineno"> 1208</span>&#160;}</div>
+<div class="line"><a name="l01191"></a><span class="lineno"> 1191</span>&#160;  <span class="keywordflow">foreach</span> (<span class="keyword">const</span> TWeightInfo&amp; weightInfo, weightInfos) {</div>
+<div class="line"><a name="l01192"></a><span class="lineno"> 1192</span>&#160;    weights[weightInfo.role()] = weightInfo.weight();</div>
+<div class="line"><a name="l01193"></a><span class="lineno"> 1193</span>&#160;  }</div>
+<div class="line"><a name="l01194"></a><span class="lineno"> 1194</span>&#160;</div>
+<div class="line"><a name="l01195"></a><span class="lineno"> 1195</span>&#160;  <span class="keywordflow">return</span> weights;</div>
+<div class="line"><a name="l01196"></a><span class="lineno"> 1196</span>&#160;}</div>
+<div class="line"><a name="l01197"></a><span class="lineno"> 1197</span>&#160;</div>
+<div class="line"><a name="l01198"></a><span class="lineno"> 1198</span>&#160;</div>
+<div class="line"><a name="l01199"></a><span class="lineno"> 1199</span>&#160;<span class="comment">// Helper to create DomainInfo.</span></div>
+<div class="line"><a name="l01200"></a><span class="lineno"> 1200</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TDomainInfo&gt;</div>
+<div class="line"><a name="l01201"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a350e4f6f831f99d6a3b6f17cdc4f9765"> 1201</a></span>&#160;<span class="keyword">inline</span> TDomainInfo <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a350e4f6f831f99d6a3b6f17cdc4f9765">createDomainInfo</a>(</div>
+<div class="line"><a name="l01202"></a><span class="lineno"> 1202</span>&#160;    <span class="keyword">const</span> std::string&amp; regionName,</div>
+<div class="line"><a name="l01203"></a><span class="lineno"> 1203</span>&#160;    <span class="keyword">const</span> std::string&amp; zoneName)</div>
+<div class="line"><a name="l01204"></a><span class="lineno"> 1204</span>&#160;{</div>
+<div class="line"><a name="l01205"></a><span class="lineno"> 1205</span>&#160;  TDomainInfo domain;</div>
+<div class="line"><a name="l01206"></a><span class="lineno"> 1206</span>&#160;</div>
+<div class="line"><a name="l01207"></a><span class="lineno"> 1207</span>&#160;  domain.mutable_fault_domain()-&gt;mutable_region()-&gt;set_name(regionName);</div>
+<div class="line"><a name="l01208"></a><span class="lineno"> 1208</span>&#160;  domain.mutable_fault_domain()-&gt;mutable_zone()-&gt;set_name(zoneName);</div>
 <div class="line"><a name="l01209"></a><span class="lineno"> 1209</span>&#160;</div>
-<div class="line"><a name="l01210"></a><span class="lineno"> 1210</span>&#160;</div>
-<div class="line"><a name="l01211"></a><span class="lineno"> 1211</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TOffer, <span class="keyword">typename</span> TTaskInfo&gt;</div>
-<div class="line"><a name="l01212"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a5e5ce150a3e1b42ffcc0fd9e5ed659ab"> 1212</a></span>&#160;<span class="keyword">inline</span> <span class="keyword">typename</span> <a class="code" href="namespacecgroups_1_1blkio.html#a350b1eb57318afaea7700ab7786b55ef">TOffer::Operation</a> <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a5e5ce150a3e1b42ffcc0fd9e5ed659ab">LAUNCH</a>(<span class="keyword">const</span> std::vector&lt;TTaskInfo&gt;&amp; tasks)</div>
-<div class="line"><a name="l01213"></a><span class="lineno"> 1213</span>&#160;{</div>
-<div class="line"><a name="l01214"></a><span class="lineno"> 1214</span>&#160;  <span class="keyword">typename</span> <a class="code" href="namespacecgroups_1_1blkio.html#a350b1eb57318afaea7700ab7786b55ef">TOffer::Operation</a> operation;</div>
-<div class="line"><a name="l01215"></a><span class="lineno"> 1215</span>&#160;  operation.set_type(<a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a5e5ce150a3e1b42ffcc0fd9e5ed659ab">TOffer::Operation::LAUNCH</a>);</div>
-<div class="line"><a name="l01216"></a><span class="lineno"> 1216</span>&#160;</div>
-<div class="line"><a name="l01217"></a><span class="lineno"> 1217</span>&#160;  <span class="keywordflow">foreach</span> (<span class="keyword">const</span> TTaskInfo&amp; task, tasks) {</div>
-<div class="line"><a name="l01218"></a><span class="lineno"> 1218</span>&#160;    operation.mutable_launch()-&gt;add_task_infos()-&gt;CopyFrom(task);</div>
-<div class="line"><a name="l01219"></a><span class="lineno"> 1219</span>&#160;  }</div>
-<div class="line"><a name="l01220"></a><span class="lineno"> 1220</span>&#160;</div>
+<div class="line"><a name="l01210"></a><span class="lineno"> 1210</span>&#160;  <span class="keywordflow">return</span> domain;</div>
+<div class="line"><a name="l01211"></a><span class="lineno"> 1211</span>&#160;}</div>
+<div class="line"><a name="l01212"></a><span class="lineno"> 1212</span>&#160;</div>
+<div class="line"><a name="l01213"></a><span class="lineno"> 1213</span>&#160;</div>
+<div class="line"><a name="l01214"></a><span class="lineno"> 1214</span>&#160;<span class="comment">// Helpers for creating offer operations.</span></div>
+<div class="line"><a name="l01215"></a><span class="lineno"> 1215</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TResources, <span class="keyword">typename</span> TOffer&gt;</div>
+<div class="line"><a name="l01216"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a07ba9c332393ad463065495f37c5bced"> 1216</a></span>&#160;<span class="keyword">inline</span> <span class="keyword">typename</span> <a class="code" href="namespacecgroups_1_1blkio.html#a350b1eb57318afaea7700ab7786b55ef">TOffer::Operation</a> <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a07ba9c332393ad463065495f37c5bced">RESERVE</a>(<span class="keyword">const</span> TResources&amp; resources)</div>
+<div class="line"><a name="l01217"></a><span class="lineno"> 1217</span>&#160;{</div>
+<div class="line"><a name="l01218"></a><span class="lineno"> 1218</span>&#160;  <span class="keyword">typename</span> <a class="code" href="namespacecgroups_1_1blkio.html#a350b1eb57318afaea7700ab7786b55ef">TOffer::Operation</a> operation;</div>
+<div class="line"><a name="l01219"></a><span class="lineno"> 1219</span>&#160;  operation.set_type(<a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a07ba9c332393ad463065495f37c5bced">TOffer::Operation::RESERVE</a>);</div>
+<div class="line"><a name="l01220"></a><span class="lineno"> 1220</span>&#160;  operation.mutable_reserve()-&gt;mutable_resources()-&gt;CopyFrom(resources);</div>
 <div class="line"><a name="l01221"></a><span class="lineno"> 1221</span>&#160;  <span class="keywordflow">return</span> operation;</div>
 <div class="line"><a name="l01222"></a><span class="lineno"> 1222</span>&#160;}</div>
 <div class="line"><a name="l01223"></a><span class="lineno"> 1223</span>&#160;</div>
 <div class="line"><a name="l01224"></a><span class="lineno"> 1224</span>&#160;</div>
-<div class="line"><a name="l01225"></a><span class="lineno"> 1225</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TExecutorInfo, <span class="keyword">typename</span> TTaskGroupInfo, <span class="keyword">typename</span> TOffer&gt;</div>
-<div class="line"><a name="l01226"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#ac32a101c068371a2114b0f63a0c45db2"> 1226</a></span>&#160;<span class="keyword">inline</span> <span class="keyword">typename</span> <a class="code" href="namespacecgroups_1_1blkio.html#a350b1eb57318afaea7700ab7786b55ef">TOffer::Operation</a> <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#ac32a101c068371a2114b0f63a0c45db2">LAUNCH_GROUP</a>(</div>
-<div class="line"><a name="l01227"></a><span class="lineno"> 1227</span>&#160;    <span class="keyword">const</span> TExecutorInfo&amp; executorInfo,</div>
-<div class="line"><a name="l01228"></a><span class="lineno"> 1228</span>&#160;    <span class="keyword">const</span> TTaskGroupInfo&amp; taskGroup)</div>
-<div class="line"><a name="l01229"></a><span class="lineno"> 1229</span>&#160;{</div>
-<div class="line"><a name="l01230"></a><span class="lineno"> 1230</span>&#160;  <span class="keyword">typename</span> <a class="code" href="namespacecgroups_1_1blkio.html#a350b1eb57318afaea7700ab7786b55ef">TOffer::Operation</a> operation;</div>
-<div class="line"><a name="l01231"></a><span class="lineno"> 1231</span>&#160;  operation.set_type(<a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#ac32a101c068371a2114b0f63a0c45db2">TOffer::Operation::LAUNCH_GROUP</a>);</div>
-<div class="line"><a name="l01232"></a><span class="lineno"> 1232</span>&#160;  operation.mutable_launch_group()-&gt;mutable_executor()-&gt;CopyFrom(executorInfo);</div>
-<div class="line"><a name="l01233"></a><span class="lineno"> 1233</span>&#160;  operation.mutable_launch_group()-&gt;mutable_task_group()-&gt;CopyFrom(taskGroup);</div>
-<div class="line"><a name="l01234"></a><span class="lineno"> 1234</span>&#160;  <span class="keywordflow">return</span> operation;</div>
-<div class="line"><a name="l01235"></a><span class="lineno"> 1235</span>&#160;}</div>
-<div class="line"><a name="l01236"></a><span class="lineno"> 1236</span>&#160;</div>
-<div class="line"><a name="l01237"></a><span class="lineno"> 1237</span>&#160;</div>
-<div class="line"><a name="l01238"></a><span class="lineno"> 1238</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TParameters, <span class="keyword">typename</span> TParameter&gt;</div>
-<div class="line"><a name="l01239"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#acfb7d6b4d5a646c620b8aba7f2f2c4fa"> 1239</a></span>&#160;<span class="keyword">inline</span> TParameters <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#acfb7d6b4d5a646c620b8aba7f2f2c4fa">parameterize</a>(<span class="keyword">const</span> ACLs&amp; acls)</div>
-<div class="line"><a name="l01240"></a><span class="lineno"> 1240</span>&#160;{</div>
-<div class="line"><a name="l01241"></a><span class="lineno"> 1241</span>&#160;  TParameters parameters;</div>
-<div class="line"><a name="l01242"></a><span class="lineno"> 1242</span>&#160;  TParameter* parameter = parameters.add_parameter();</div>
-<div class="line"><a name="l01243"></a><span class="lineno"> 1243</span>&#160;  parameter-&gt;set_key(<span class="stringliteral">&quot;acls&quot;</span>);</div>
-<div class="line"><a name="l01244"></a><span class="lineno"> 1244</span>&#160;  parameter-&gt;set_value(std::string(<a class="code" href="jsonify_8hpp.html#ab2d3ecf67ed06919e96e5e97b2effdc3">jsonify</a>(<a class="code" href="structJSON_1_1Protobuf.html">JSON::Protobuf</a>(acls))));</div>
-<div class="line"><a name="l01245"></a><span class="lineno"> 1245</span>&#160;</div>
-<div class="line"><a name="l01246"></a><span class="lineno"> 1246</span>&#160;  <span class="keywordflow">return</span> parameters;</div>
-<div class="line"><a name="l01247"></a><span class="lineno"> 1247</span>&#160;}</div>
-<div class="line"><a name="l01248"></a><span class="lineno"> 1248</span>&#160;} <span class="comment">// namespace common {</span></div>
-<div class="line"><a name="l01249"></a><span class="lineno"> 1249</span>&#160;</div>
-<div class="line"><a name="l01250"></a><span class="lineno"> 1250</span>&#160;</div>
-<div class="line"><a name="l01251"></a><span class="lineno"> 1251</span>&#160;<span class="comment">// TODO(jmlvanre): Remove `inline` once we have adjusted all tests to</span></div>
-<div class="line"><a name="l01252"></a><span class="lineno"> 1252</span>&#160;<span class="comment">// distinguish between `internal` and `v1`.</span></div>
-<div class="line"><a name="l01253"></a><span class="lineno"> 1253</span>&#160;<span class="keyword">inline</span> <span class="keyword">namespace </span>internal {</div>
-<div class="line"><a name="l01254"></a><span class="lineno"> 1254</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span>... Args&gt;</div>
-<div class="line"><a name="l01255"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1internal.html#a1d89ea8fd0a176a5b25e672b0a88899a"> 1255</a></span>&#160;<span class="keyword">inline</span> ExecutorInfo <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a4dce57dfa3947f14a6a6d95d170c44ad">createExecutorInfo</a>(Args&amp;&amp;... args)</div>
-<div class="line"><a name="l01256"></a><span class="lineno"> 1256</span>&#160;{</div>
-<div class="line"><a name="l01257"></a><span class="lineno"> 1257</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a4dce57dfa3947f14a6a6d95d170c44ad">common::createExecutorInfo</a>&lt;</div>
-<div class="line"><a name="l01258"></a><span class="lineno"> 1258</span>&#160;      ExecutorInfo,</div>
-<div class="line"><a name="l01259"></a><span class="lineno"> 1259</span>&#160;      ExecutorID,</div>
-<div class="line"><a name="l01260"></a><span class="lineno"> 1260</span>&#160;      <a class="code" href="classmesos_1_1Resources.html">Resources</a>,</div>
-<div class="line"><a name="l01261"></a><span class="lineno"> 1261</span>&#160;      CommandInfo,</div>
-<div class="line"><a name="l01262"></a><span class="lineno"> 1262</span>&#160;      FrameworkID&gt;(std::forward&lt;Args&gt;(args)...);</div>
-<div class="line"><a name="l01263"></a><span class="lineno"> 1263</span>&#160;}</div>
+<div class="line"><a name="l01225"></a><span class="lineno"> 1225</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TResources, <span class="keyword">typename</span> TOffer&gt;</div>
+<div class="line"><a name="l01226"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a7502aad15971920c0d5907ca2f010859"> 1226</a></span>&#160;<span class="keyword">inline</span> <span class="keyword">typename</span> <a class="code" href="namespacecgroups_1_1blkio.html#a350b1eb57318afaea7700ab7786b55ef">TOffer::Operation</a> <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a7502aad15971920c0d5907ca2f010859">UNRESERVE</a>(<span class="keyword">const</span> TResources&amp; resources)</div>
+<div class="line"><a name="l01227"></a><span class="lineno"> 1227</span>&#160;{</div>
+<div class="line"><a name="l01228"></a><span class="lineno"> 1228</span>&#160;  <span class="keyword">typename</span> <a class="code" href="namespacecgroups_1_1blkio.html#a350b1eb57318afaea7700ab7786b55ef">TOffer::Operation</a> operation;</div>
+<div class="line"><a name="l01229"></a><span class="lineno"> 1229</span>&#160;  operation.set_type(<a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a7502aad15971920c0d5907ca2f010859">TOffer::Operation::UNRESERVE</a>);</div>
+<div class="line"><a name="l01230"></a><span class="lineno"> 1230</span>&#160;  operation.mutable_unreserve()-&gt;mutable_resources()-&gt;CopyFrom(resources);</div>
+<div class="line"><a name="l01231"></a><span class="lineno"> 1231</span>&#160;  <span class="keywordflow">return</span> operation;</div>
+<div class="line"><a name="l01232"></a><span class="lineno"> 1232</span>&#160;}</div>
+<div class="line"><a name="l01233"></a><span class="lineno"> 1233</span>&#160;</div>
+<div class="line"><a name="l01234"></a><span class="lineno"> 1234</span>&#160;</div>
+<div class="line"><a name="l01235"></a><span class="lineno"> 1235</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TResources, <span class="keyword">typename</span> TOffer&gt;</div>
+<div class="line"><a name="l01236"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a3fe53df8c99e8dce61568ce527030ce7"> 1236</a></span>&#160;<span class="keyword">inline</span> <span class="keyword">typename</span> <a class="code" href="namespacecgroups_1_1blkio.html#a350b1eb57318afaea7700ab7786b55ef">TOffer::Operation</a> <a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a3fe53df8c99e8dce61568ce527030ce7">CREATE</a>(<span class="keyword">const</span> TResources&amp; volumes)</div>
+<div class="line"><a name="l01237"></a><span class="lineno"> 1237</span>&#160;{</div>
+<div class="line"><a name="l01238"></a><span class="lineno"> 1238</span>&#160;  <span class="keyword">typename</span> <a class="code" href="namespacecgroups_1_1blkio.html#a350b1eb57318afaea7700ab7786b55ef">TOffer::Operation</a> operation;</div>
+<div class="line"><a name="l01239"></a><span class="lineno"> 1239</span>&#160;  operation.set_type(<a class="code" href="namespacemesos_1_1internal_1_1tests_1_1common.html#a3fe53df8c99e8dce61568ce527030ce7">TOffer::Operation::CREATE</a>);</div>
+<div class="line"><a name="l01240"></a><span class="lineno"> 1240</span>&#160;  operation.mutable_create()-&gt;mutable_volumes()-&gt;CopyF

<TRUNCATED>

Mime
View raw message