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

Class Allocation

src/tests/hierarchical_allocator_tests.cpp:84–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82namespace tests {
83
84struct Allocation
85{
86 Allocation() = default;
87
88 Allocation(
89 const FrameworkID& frameworkId_,
90 const hashmap<string, hashmap<SlaveID, Resources>>& resources_)
91 : frameworkId(frameworkId_),
92 resources(resources_)
93 {
94 // Ensure the resources have the allocation info set.
95 foreachkey (const string& role, resources) {
96 foreachvalue (Resources& r, resources.at(role)) {
97 r.allocate(role);
98 }
99 }
100 }
101
102 FrameworkID frameworkId;
103 hashmap<string, hashmap<SlaveID, Resources>> resources;
104};
105
106
107bool operator==(const Allocation& left, const Allocation& right)

Callers 3

TEST_FFunction · 0.70
TEST_PFunction · 0.70

Calls

no outgoing calls

Tested by 3

TEST_FFunction · 0.56
TEST_PFunction · 0.56