Esempio n. 1
0
 def mark_antiaffinity_met_because_all_antiaffinity_pods_are_matched_and_those_that_cant_dont_suite(
         self, pod: Pod, globalVar: GlobalVar):
     assert pod.calc_antiaffinity_pods_list_length == pod.target_number_of_antiaffinity_pods
     assert pod.antiaffinity_set == True
     # assert globalVar.block_policy_calculated == True
     pod.antiaffinity_met = True
     globalVar.block_policy_calculated = True
Esempio n. 2
0
 def mark_antiaffinity_met_because_all_antiaffinity_pods_are_matched(
         self, pod: Pod, globalVar: GlobalVar):
     assert pod.calc_antiaffinity_pods_list_length == pod.podsMatchedByAntiaffinity_length
     assert pod.antiaffinity_set == True
     # assert globalVar.block_policy_calculated == True
     pod.antiaffinity_met = True
     globalVar.block_policy_calculated = True
Esempio n. 3
0
 def mark_antiaffinity_met_because_all_antiaffinity_pods_are_matched_and_those_that_cant_dont_suite_below_the_limit_for_node_amount(
         self, pod: Pod, globalVar: GlobalVar):
     assert pod.nodesThatHaveAllocatedPodsThatHaveAntiaffinityWithThisPod_length + pod.nodesThatCantAllocateThisPod_length == globalVar.amountOfNodes_limit
     assert pod.antiaffinity_set == True
     pod.antiaffinity_met = True