@Test public void testExecuteTransaction_WithVariousSecurityGroupInterfaces_ExpectsValidTaskGraphOrException() throws Exception { this.factoryTask.allocateDai = new AllocateDAIWithSGIMembersTask(); this.factoryTask.deallocateDai = new DeallocateDAIOfSGIMembersTask(); this.factoryTask.createPortGroupHook = new CreatePortGroupHookTask(); this.factoryTask.removePortGroupHook = new RemovePortGroupHookTask(); CheckPortGroupHookMetaTask task = this.factoryTask.create(this.sgi, this.isDeleteTg); if (this.expectedExceptionMessage != null) { this.exception.expect(VmidcBrokerValidationException.class); this.exception.expectMessage(this.expectedExceptionMessage); } task.execute(); if (this.expectedGraph != null) { TaskGraphHelper.validateTaskGraph(task, this.expectedGraph); } }
public CheckPortGroupHookMetaTask create(SecurityGroupInterface sgi, boolean isDeleteTg) { CheckPortGroupHookMetaTask task = new CheckPortGroupHookMetaTask(); task.sgi = sgi; task.isDeleteTaskGraph = isDeleteTg; task.allocateDai = this.allocateDai; task.deallocateDai = this.deallocateDai; task.createPortGroupHook = this.createPortGroupHook; task.removePortGroupHook = this.removePortGroupHook; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }
CheckPortGroupHookMetaTask extends TransactionalMetaTask { public CheckPortGroupHookMetaTask create(SecurityGroupInterface sgi, boolean isDeleteTg) { CheckPortGroupHookMetaTask task = new CheckPortGroupHookMetaTask(); task.sgi = sgi; task.isDeleteTaskGraph = isDeleteTg; task.allocateDai = this.allocateDai; task.deallocateDai = this.deallocateDai; task.createPortGroupHook = this.createPortGroupHook; task.removePortGroupHook = this.removePortGroupHook; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; } }
CheckPortGroupHookMetaTask extends TransactionalMetaTask { public CheckPortGroupHookMetaTask create(SecurityGroupInterface sgi, boolean isDeleteTg) { CheckPortGroupHookMetaTask task = new CheckPortGroupHookMetaTask(); task.sgi = sgi; task.isDeleteTaskGraph = isDeleteTg; task.allocateDai = this.allocateDai; task.deallocateDai = this.deallocateDai; task.createPortGroupHook = this.createPortGroupHook; task.removePortGroupHook = this.removePortGroupHook; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  }
CheckPortGroupHookMetaTask extends TransactionalMetaTask { public CheckPortGroupHookMetaTask create(SecurityGroupInterface sgi, boolean isDeleteTg) { CheckPortGroupHookMetaTask task = new CheckPortGroupHookMetaTask(); task.sgi = sgi; task.isDeleteTaskGraph = isDeleteTg; task.allocateDai = this.allocateDai; task.deallocateDai = this.deallocateDai; task.createPortGroupHook = this.createPortGroupHook; task.removePortGroupHook = this.removePortGroupHook; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  CheckPortGroupHookMetaTask create(SecurityGroupInterface sgi, boolean isDeleteTg); @Override void executeTransaction(EntityManager em); @Override String getName(); @Override Set<LockObjectReference> getObjects(); @Override TaskGraph getTaskGraph(); }
CheckPortGroupHookMetaTask extends TransactionalMetaTask { public CheckPortGroupHookMetaTask create(SecurityGroupInterface sgi, boolean isDeleteTg) { CheckPortGroupHookMetaTask task = new CheckPortGroupHookMetaTask(); task.sgi = sgi; task.isDeleteTaskGraph = isDeleteTg; task.allocateDai = this.allocateDai; task.deallocateDai = this.deallocateDai; task.createPortGroupHook = this.createPortGroupHook; task.removePortGroupHook = this.removePortGroupHook; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  CheckPortGroupHookMetaTask create(SecurityGroupInterface sgi, boolean isDeleteTg); @Override void executeTransaction(EntityManager em); @Override String getName(); @Override Set<LockObjectReference> getObjects(); @Override TaskGraph getTaskGraph();  }