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

Function createDynamicReservationInfo

src/tests/mesos.hpp:1079–1098  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1077
1078template <typename TResource, typename TLabels>
1079inline typename TResource::ReservationInfo createDynamicReservationInfo(
1080 const std::string& role,
1081 const Option<std::string>& principal = None(),
1082 const Option<TLabels>& labels = None())
1083{
1084 typename TResource::ReservationInfo info;
1085
1086 info.set_type(TResource::ReservationInfo::DYNAMIC);
1087 info.set_role(role);
1088
1089 if (principal.isSome()) {
1090 info.set_principal(principal.get());
1091 }
1092
1093 if (labels.isSome()) {
1094 info.mutable_labels()->CopyFrom(labels.get());
1095 }
1096
1097 return info;
1098}
1099
1100
1101template <

Callers 15

TEST_FFunction · 0.85
TEST_PFunction · 0.85
TESTFunction · 0.85
SetUpTestCaseMethod · 0.85
TEST_PFunction · 0.85
TEST_FFunction · 0.85
TEST_PFunction · 0.85
TEST_PFunction · 0.85
TEST_FFunction · 0.85
createOperationsMethod · 0.85

Calls 4

NoneClass · 0.85
CopyFromMethod · 0.80
isSomeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected