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

Function createDiskSourceBlock

src/tests/mesos.hpp:1221–1238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1219// Helper for creating a disk source with type `BLOCK'
1220template <typename TResource>
1221inline typename TResource::DiskInfo::Source createDiskSourceBlock(
1222 const Option<std::string>& id = None(),
1223 const Option<std::string>& profile = None())
1224{
1225 typename TResource::DiskInfo::Source source;
1226
1227 source.set_type(TResource::DiskInfo::Source::BLOCK);
1228
1229 if (id.isSome()) {
1230 source.set_id(id.get());
1231 }
1232
1233 if (profile.isSome()) {
1234 source.set_profile(profile.get());
1235 }
1236
1237 return source;
1238}
1239
1240
1241// Helper for creating a disk source with type `RAW'.

Callers 3

createOperationsMethod · 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