| 82 | namespace tests { |
| 83 | |
| 84 | struct 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 | |
| 107 | bool operator==(const Allocation& left, const Allocation& right) |
no outgoing calls