REM:
1. 更正通过防护对象获取设备名称不正确导致添加防护对象被删除问题
This commit is contained in:
HuangXin 2021-01-25 14:34:42 +08:00
parent 468215f749
commit a40a7d7f7c
1 changed files with 14 additions and 7 deletions

View File

@ -241,10 +241,10 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
} }
/** /**
* Gets traction strategy format. * Gets ip segment format.
* *
* @param ipSegment the dispose object * @param ipSegment the ip segment
* @return the traction strategy format * @return the ip segment format
*/ */
private String getIpSegmentFormat(String ipSegment) { private String getIpSegmentFormat(String ipSegment) {
for (String v : ConstValue.IP_SEGMENT_SPILT) { for (String v : ConstValue.IP_SEGMENT_SPILT) {
@ -570,10 +570,7 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
} }
for (String protectName : protectNames) { for (String protectName : protectNames) {
String serviceId = protectName String serviceId = getUserServiceId(protectName);
.replace(objectPrefix + "_", "")
.replace("_" + IpAddrType.IPV4.getDescription(), "")
.replace("_" + IpAddrType.IPV6.getDescription(), "");
// UMC上面存在对象已经失效 // UMC上面存在对象已经失效
if (disposeServiceGroup.values().stream().noneMatch(k -> serviceId.equals(k.getServiceId()))) { if (disposeServiceGroup.values().stream().noneMatch(k -> serviceId.equals(k.getServiceId()))) {
@ -605,6 +602,16 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
} }
} }
/**
* Gets user service id.
*
* @param projectObjName the project obj name
* @return the user service id
*/
private String getUserServiceId(String projectObjName) {
return projectObjName.substring(objectPrefix.length() + 2);
}
/** /**
* Gets traction strategy name. * Gets traction strategy name.
* *