@Test public void testExecuteTransaction_WithVariousDeploymentSpecs_ExpectsCorrectTaskGraph() throws Exception { this.factoryTask.osSvaCreateMetaTask = new OsSvaCreateMetaTask(); this.factoryTask.osDAIConformanceCheckMetaTask = new OsDAIConformanceCheckMetaTask(); this.factoryTask.mgrCheckDevicesMetaTask = new MgrCheckDevicesMetaTask(); this.factoryTask.deleteSvaServerAndDAIMetaTask = new DeleteSvaServerAndDAIMetaTask(); this.factoryTask.deleteOSSecurityGroup = new DeleteOsSecurityGroupTask(); this.factoryTask.deleteDsFromDb = new DeleteDSFromDbTask(); DSUpdateOrDeleteMetaTask task = this.factoryTask.create(this.ds, this.novaApiMock); task.execute(); TaskGraphHelper.validateTaskGraph(task, this.expectedGraph); }
public DSUpdateOrDeleteMetaTask create(DeploymentSpec ds, Endpoint endPoint) { DSUpdateOrDeleteMetaTask task = new DSUpdateOrDeleteMetaTask(); task.ds = ds; task.endPoint = endPoint; task.name = task.getName(); task.osSvaCreateMetaTask = this.osSvaCreateMetaTask; task.osDAIConformanceCheckMetaTask = this.osDAIConformanceCheckMetaTask; task.mgrCheckDevicesMetaTask = this.mgrCheckDevicesMetaTask; task.deleteSvaServerAndDAIMetaTask = this.deleteSvaServerAndDAIMetaTask; task.deleteOSSecurityGroup = this.deleteOSSecurityGroup; task.deleteDsFromDb = this.deleteDsFromDb; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }
DSUpdateOrDeleteMetaTask extends TransactionalMetaTask { public DSUpdateOrDeleteMetaTask create(DeploymentSpec ds, Endpoint endPoint) { DSUpdateOrDeleteMetaTask task = new DSUpdateOrDeleteMetaTask(); task.ds = ds; task.endPoint = endPoint; task.name = task.getName(); task.osSvaCreateMetaTask = this.osSvaCreateMetaTask; task.osDAIConformanceCheckMetaTask = this.osDAIConformanceCheckMetaTask; task.mgrCheckDevicesMetaTask = this.mgrCheckDevicesMetaTask; task.deleteSvaServerAndDAIMetaTask = this.deleteSvaServerAndDAIMetaTask; task.deleteOSSecurityGroup = this.deleteOSSecurityGroup; task.deleteDsFromDb = this.deleteDsFromDb; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; } }
DSUpdateOrDeleteMetaTask extends TransactionalMetaTask { public DSUpdateOrDeleteMetaTask create(DeploymentSpec ds, Endpoint endPoint) { DSUpdateOrDeleteMetaTask task = new DSUpdateOrDeleteMetaTask(); task.ds = ds; task.endPoint = endPoint; task.name = task.getName(); task.osSvaCreateMetaTask = this.osSvaCreateMetaTask; task.osDAIConformanceCheckMetaTask = this.osDAIConformanceCheckMetaTask; task.mgrCheckDevicesMetaTask = this.mgrCheckDevicesMetaTask; task.deleteSvaServerAndDAIMetaTask = this.deleteSvaServerAndDAIMetaTask; task.deleteOSSecurityGroup = this.deleteOSSecurityGroup; task.deleteDsFromDb = this.deleteDsFromDb; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  }
DSUpdateOrDeleteMetaTask extends TransactionalMetaTask { public DSUpdateOrDeleteMetaTask create(DeploymentSpec ds, Endpoint endPoint) { DSUpdateOrDeleteMetaTask task = new DSUpdateOrDeleteMetaTask(); task.ds = ds; task.endPoint = endPoint; task.name = task.getName(); task.osSvaCreateMetaTask = this.osSvaCreateMetaTask; task.osDAIConformanceCheckMetaTask = this.osDAIConformanceCheckMetaTask; task.mgrCheckDevicesMetaTask = this.mgrCheckDevicesMetaTask; task.deleteSvaServerAndDAIMetaTask = this.deleteSvaServerAndDAIMetaTask; task.deleteOSSecurityGroup = this.deleteOSSecurityGroup; task.deleteDsFromDb = this.deleteDsFromDb; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  DSUpdateOrDeleteMetaTask create(DeploymentSpec ds, Endpoint endPoint); @Override void executeTransaction(EntityManager em); @Override String getName(); @Override TaskGraph getTaskGraph(); @Override Set<LockObjectReference> getObjects(); }
DSUpdateOrDeleteMetaTask extends TransactionalMetaTask { public DSUpdateOrDeleteMetaTask create(DeploymentSpec ds, Endpoint endPoint) { DSUpdateOrDeleteMetaTask task = new DSUpdateOrDeleteMetaTask(); task.ds = ds; task.endPoint = endPoint; task.name = task.getName(); task.osSvaCreateMetaTask = this.osSvaCreateMetaTask; task.osDAIConformanceCheckMetaTask = this.osDAIConformanceCheckMetaTask; task.mgrCheckDevicesMetaTask = this.mgrCheckDevicesMetaTask; task.deleteSvaServerAndDAIMetaTask = this.deleteSvaServerAndDAIMetaTask; task.deleteOSSecurityGroup = this.deleteOSSecurityGroup; task.deleteDsFromDb = this.deleteDsFromDb; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  DSUpdateOrDeleteMetaTask create(DeploymentSpec ds, Endpoint endPoint); @Override void executeTransaction(EntityManager em); @Override String getName(); @Override TaskGraph getTaskGraph(); @Override Set<LockObjectReference> getObjects();  }