def svm_list(self): vms = getattr(self, '_svm_list', []) if not vms or len(vms) != len(self.svm_ids): # Reduce the svm_list to take care of reduce in ecmp instances self._svm_list = [ vm for vm in vms if vm.get_uuid() in self.svm_ids ] self.svms = { k: v for k, v in self.svms.items() if k in self.svm_ids } # Increase the svm_list to take care of increase in ecmp instances for vmid in set(self.svm_ids) - set( [vm.get_uuid() for vm in self._svm_list]): vm = VMFixture(self.connections, uuid=vmid) vm.setUp() vm.wait_till_vm_is_active() # Populate tap intf details on the VM objects # Faster than calling wait_till_vm_is_up() if not vm.verify_vm_in_agent(): self.logger.error('VM %s not found in vrouter agent' % (vmid)) self._svm_list.append(vm) self.svms[vmid] = vm return self._svm_list
def svm_list(self): vms = getattr(self, '_svm_list', []) if not vms or len(vms) != len(self.svm_ids): # Reduce the svm_list to take care of reduce in ecmp instances self._svm_list = [vm for vm in vms if vm.get_uuid() in self.svm_ids] self.svms = {k:v for k,v in self.svms.items() if k in self.svm_ids} # Increase the svm_list to take care of increase in ecmp instances for vmid in set(self.svm_ids) - set([vm.get_uuid() for vm in self._svm_list]): vm = VMFixture(self.connections, uuid=vmid) vm.setUp() vm.wait_till_vm_is_active() # Populate tap intf details on the VM objects # Faster than calling wait_till_vm_is_up() if not vm.verify_vm_in_agent(): self.logger.error('VM %s not found in vrouter agent' %( vmid)) self._svm_list.append(vm) self.svms[vmid] = vm return self._svm_list