MCPcopy Create free account
hub / github.com/apache/mesos / createDiskSourcePath

Function createDiskSourcePath

src/tests/mesos.hpp:1167–1189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1165// Helper for creating a disk source with type `PATH`.
1166template <typename TResource>
1167inline typename TResource::DiskInfo::Source createDiskSourcePath(
1168 const Option<std::string>& root = None(),
1169 const Option<std::string>& id = None(),
1170 const Option<std::string>& profile = None())
1171{
1172 typename TResource::DiskInfo::Source source;
1173
1174 source.set_type(TResource::DiskInfo::Source::PATH);
1175
1176 if (root.isSome()) {
1177 source.mutable_path()->set_root(root.get());
1178 }
1179
1180 if (id.isSome()) {
1181 source.set_id(id.get());
1182 }
1183
1184 if (profile.isSome()) {
1185 source.set_profile(profile.get());
1186 }
1187
1188 return source;
1189}
1190
1191
1192// Helper for creating a disk source with type `MOUNT`.

Callers 4

TESTFunction · 0.85
getDiskResourceMethod · 0.85
TEST_FFunction · 0.85
TESTFunction · 0.85

Calls 3

NoneClass · 0.85
isSomeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected