@Test public void testExecute_WhenSDNReturnsNullNetworkElement_ThrowsVmidcException() throws Exception { CreateK8sLabelPodTask task = this.factoryTask.create(NETWORK_ELEMENT_NOT_FOUND_K8S_POD, NETWORK_ELEMENT_NOT_FOUND_POD_SGM_LABEL); registerNetworkElement(NETWORK_ELEMENT_NOT_FOUND_POD_SGM_LABEL.getSecurityGroupMembers().iterator().next(), null, NETWORK_ELEMENT_NOT_FOUND_K8S_POD); this.exception.expect(VmidcException.class); this.exception.expectMessage("The SDN controller did not return a network element for the device"); task.execute(); }
public CreateK8sLabelPodTask create(KubernetesPod k8sPod, Label label) { CreateK8sLabelPodTask task = new CreateK8sLabelPodTask(); task.k8sPod = k8sPod; task.label = label; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }
CreateK8sLabelPodTask extends TransactionalTask { public CreateK8sLabelPodTask create(KubernetesPod k8sPod, Label label) { CreateK8sLabelPodTask task = new CreateK8sLabelPodTask(); task.k8sPod = k8sPod; task.label = label; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; } }
CreateK8sLabelPodTask extends TransactionalTask { public CreateK8sLabelPodTask create(KubernetesPod k8sPod, Label label) { CreateK8sLabelPodTask task = new CreateK8sLabelPodTask(); task.k8sPod = k8sPod; task.label = label; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  }
CreateK8sLabelPodTask extends TransactionalTask { public CreateK8sLabelPodTask create(KubernetesPod k8sPod, Label label) { CreateK8sLabelPodTask task = new CreateK8sLabelPodTask(); task.k8sPod = k8sPod; task.label = label; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  @Override void executeTransaction(EntityManager em); CreateK8sLabelPodTask create(KubernetesPod k8sPod, Label label); @Override String getName(); @Override Set<LockObjectReference> getObjects(); }
CreateK8sLabelPodTask extends TransactionalTask { public CreateK8sLabelPodTask create(KubernetesPod k8sPod, Label label) { CreateK8sLabelPodTask task = new CreateK8sLabelPodTask(); task.k8sPod = k8sPod; task.label = label; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  @Override void executeTransaction(EntityManager em); CreateK8sLabelPodTask create(KubernetesPod k8sPod, Label label); @Override String getName(); @Override Set<LockObjectReference> getObjects();  }