@Test public void testExecuteTransaction_WithVariousDeploymentSpecs_ExpectsCorrectTaskGraph() throws Exception { this.factoryTask.deleteOrCleanK8sDAITask = new CleanK8sDAITask(); this.factoryTask.createOrUpdateK8sDAITask = new CreateOrUpdateK8sDAITask(); this.factoryTask.conformK8sInspectionPortMetaTask = new ConformK8sDeploymentSpecInspectionPortsMetaTask(); this.factoryTask.managerCheckDevicesMetaTask = new MgrCheckDevicesMetaTask(); ConformK8sDeploymentPodsMetaTask task = this.factoryTask.create(this.ds, this.k8sPodApi); task.execute(); TaskGraphHelper.validateTaskGraph(task, this.expectedGraph); }
public ConformK8sDeploymentPodsMetaTask create(DeploymentSpec ds, KubernetesPodApi k8sPodApi) { ConformK8sDeploymentPodsMetaTask task = new ConformK8sDeploymentPodsMetaTask(); task.deleteOrCleanK8sDAITask = this.deleteOrCleanK8sDAITask; task.createOrUpdateK8sDAITask = this.createOrUpdateK8sDAITask; task.conformK8sInspectionPortMetaTask = this.conformK8sInspectionPortMetaTask; task.managerCheckDevicesMetaTask = this.managerCheckDevicesMetaTask; task.ds = ds; task.k8sPodApi = this.k8sPodApi; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }
ConformK8sDeploymentPodsMetaTask extends TransactionalMetaTask { public ConformK8sDeploymentPodsMetaTask create(DeploymentSpec ds, KubernetesPodApi k8sPodApi) { ConformK8sDeploymentPodsMetaTask task = new ConformK8sDeploymentPodsMetaTask(); task.deleteOrCleanK8sDAITask = this.deleteOrCleanK8sDAITask; task.createOrUpdateK8sDAITask = this.createOrUpdateK8sDAITask; task.conformK8sInspectionPortMetaTask = this.conformK8sInspectionPortMetaTask; task.managerCheckDevicesMetaTask = this.managerCheckDevicesMetaTask; task.ds = ds; task.k8sPodApi = this.k8sPodApi; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; } }
ConformK8sDeploymentPodsMetaTask extends TransactionalMetaTask { public ConformK8sDeploymentPodsMetaTask create(DeploymentSpec ds, KubernetesPodApi k8sPodApi) { ConformK8sDeploymentPodsMetaTask task = new ConformK8sDeploymentPodsMetaTask(); task.deleteOrCleanK8sDAITask = this.deleteOrCleanK8sDAITask; task.createOrUpdateK8sDAITask = this.createOrUpdateK8sDAITask; task.conformK8sInspectionPortMetaTask = this.conformK8sInspectionPortMetaTask; task.managerCheckDevicesMetaTask = this.managerCheckDevicesMetaTask; task.ds = ds; task.k8sPodApi = this.k8sPodApi; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  }
ConformK8sDeploymentPodsMetaTask extends TransactionalMetaTask { public ConformK8sDeploymentPodsMetaTask create(DeploymentSpec ds, KubernetesPodApi k8sPodApi) { ConformK8sDeploymentPodsMetaTask task = new ConformK8sDeploymentPodsMetaTask(); task.deleteOrCleanK8sDAITask = this.deleteOrCleanK8sDAITask; task.createOrUpdateK8sDAITask = this.createOrUpdateK8sDAITask; task.conformK8sInspectionPortMetaTask = this.conformK8sInspectionPortMetaTask; task.managerCheckDevicesMetaTask = this.managerCheckDevicesMetaTask; task.ds = ds; task.k8sPodApi = this.k8sPodApi; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  ConformK8sDeploymentPodsMetaTask create(DeploymentSpec ds, KubernetesPodApi k8sPodApi); ConformK8sDeploymentPodsMetaTask create(DeploymentSpec ds); @Override void executeTransaction(EntityManager em); @Override String getName(); @Override TaskGraph getTaskGraph(); @Override Set<LockObjectReference> getObjects(); }
ConformK8sDeploymentPodsMetaTask extends TransactionalMetaTask { public ConformK8sDeploymentPodsMetaTask create(DeploymentSpec ds, KubernetesPodApi k8sPodApi) { ConformK8sDeploymentPodsMetaTask task = new ConformK8sDeploymentPodsMetaTask(); task.deleteOrCleanK8sDAITask = this.deleteOrCleanK8sDAITask; task.createOrUpdateK8sDAITask = this.createOrUpdateK8sDAITask; task.conformK8sInspectionPortMetaTask = this.conformK8sInspectionPortMetaTask; task.managerCheckDevicesMetaTask = this.managerCheckDevicesMetaTask; task.ds = ds; task.k8sPodApi = this.k8sPodApi; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  ConformK8sDeploymentPodsMetaTask create(DeploymentSpec ds, KubernetesPodApi k8sPodApi); ConformK8sDeploymentPodsMetaTask create(DeploymentSpec ds); @Override void executeTransaction(EntityManager em); @Override String getName(); @Override TaskGraph getTaskGraph(); @Override Set<LockObjectReference> getObjects();  }