@Test public void testExecute_WithInspectionHook_ExpectUpdate() throws Exception { SfcFlowClassifierUpdateTask updateTask = this.task.create(this.sg, this.port); updateTask.execute(); verify(this.sdnApi, times(1)).updateInspectionHook( argThat(new InspectionHookElementMatcher(INSPECTION_HOOK_ID, OPENSTACK_VMPORT_ID, OPENSTACK_SFC_ID))); verify(this.port, times(0)).setInspectionHookId(any()); }
public SfcFlowClassifierUpdateTask create(SecurityGroup securityGroup, VMPort port) { SfcFlowClassifierUpdateTask task = new SfcFlowClassifierUpdateTask(); task.securityGroup = securityGroup; task.sfc = securityGroup.getServiceFunctionChain(); task.port = port; task.vmName = port.getVm() != null ? port.getVm().getName() : port.getSubnet().getName(); task.apiFactory = this.apiFactory; task.name = task.getName(); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }
SfcFlowClassifierUpdateTask extends TransactionalTask { public SfcFlowClassifierUpdateTask create(SecurityGroup securityGroup, VMPort port) { SfcFlowClassifierUpdateTask task = new SfcFlowClassifierUpdateTask(); task.securityGroup = securityGroup; task.sfc = securityGroup.getServiceFunctionChain(); task.port = port; task.vmName = port.getVm() != null ? port.getVm().getName() : port.getSubnet().getName(); task.apiFactory = this.apiFactory; task.name = task.getName(); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; } }
SfcFlowClassifierUpdateTask extends TransactionalTask { public SfcFlowClassifierUpdateTask create(SecurityGroup securityGroup, VMPort port) { SfcFlowClassifierUpdateTask task = new SfcFlowClassifierUpdateTask(); task.securityGroup = securityGroup; task.sfc = securityGroup.getServiceFunctionChain(); task.port = port; task.vmName = port.getVm() != null ? port.getVm().getName() : port.getSubnet().getName(); task.apiFactory = this.apiFactory; task.name = task.getName(); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  }
SfcFlowClassifierUpdateTask extends TransactionalTask { public SfcFlowClassifierUpdateTask create(SecurityGroup securityGroup, VMPort port) { SfcFlowClassifierUpdateTask task = new SfcFlowClassifierUpdateTask(); task.securityGroup = securityGroup; task.sfc = securityGroup.getServiceFunctionChain(); task.port = port; task.vmName = port.getVm() != null ? port.getVm().getName() : port.getSubnet().getName(); task.apiFactory = this.apiFactory; task.name = task.getName(); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  SfcFlowClassifierUpdateTask create(SecurityGroup securityGroup, VMPort port); @Override void executeTransaction(EntityManager em); @Override String getName(); @Override Set<LockObjectReference> getObjects(); }
SfcFlowClassifierUpdateTask extends TransactionalTask { public SfcFlowClassifierUpdateTask create(SecurityGroup securityGroup, VMPort port) { SfcFlowClassifierUpdateTask task = new SfcFlowClassifierUpdateTask(); task.securityGroup = securityGroup; task.sfc = securityGroup.getServiceFunctionChain(); task.port = port; task.vmName = port.getVm() != null ? port.getVm().getName() : port.getSubnet().getName(); task.apiFactory = this.apiFactory; task.name = task.getName(); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  SfcFlowClassifierUpdateTask create(SecurityGroup securityGroup, VMPort port); @Override void executeTransaction(EntityManager em); @Override String getName(); @Override Set<LockObjectReference> getObjects();  }