@Override
public void executeTransaction(EntityManager em) throws Exception {
OSCEntityManager<DistributedApplianceInstance> daiEmgr = new OSCEntityManager<DistributedApplianceInstance>(DistributedApplianceInstance.class, em, this.txBroadcastUtil);
this.dai = daiEmgr.findByPrimaryKey(this.dai.getId());
try (SdnRedirectionApi redirection = this.apiFactoryService.createNetworkRedirectionApi(this.dai.getVirtualSystem())) {
DefaultInspectionPort inspectionPort = new DefaultInspectionPort(null, null, this.dai.getInspectionElementId(), this.dai.getInspectionElementParentId());
redirection.removeInspectionPort(inspectionPort);
}
// After removing the inspection port from the SDN controller we can now delete this orphan DAI
OSCEntityManager.delete(em, this.dai, this.txBroadcastUtil);
}
DeleteK8sDAIInspectionPortTask.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:osc-core
作者:
评论列表
文章目录