parent
96e99b6556
commit
42cbb0760c
|
@ -8,14 +8,10 @@ import com.dispose.ability.impl.HuaWeiAbilityImpl;
|
||||||
import com.dispose.ability.impl.PengXinAbilityImpl;
|
import com.dispose.ability.impl.PengXinAbilityImpl;
|
||||||
import com.dispose.ability.impl.VirtualAbilityImpl;
|
import com.dispose.ability.impl.VirtualAbilityImpl;
|
||||||
import com.dispose.common.DisposeCapacityType;
|
import com.dispose.common.DisposeCapacityType;
|
||||||
import com.dispose.common.DisposeConfigValue;
|
|
||||||
import com.dispose.common.DisposeObjectType;
|
|
||||||
import com.dispose.common.ErrorCode;
|
import com.dispose.common.ErrorCode;
|
||||||
import com.dispose.common.Helper;
|
|
||||||
import com.dispose.common.HttpType;
|
import com.dispose.common.HttpType;
|
||||||
import com.dispose.manager.DisposeDeviceManager;
|
import com.dispose.manager.DisposeDeviceManager;
|
||||||
import com.dispose.mapper.ServiceGroupMapper;
|
import com.dispose.mapper.ServiceGroupMapper;
|
||||||
import com.dispose.pojo.entity.DisposeCapacity;
|
|
||||||
import com.dispose.pojo.entity.DisposeDevice;
|
import com.dispose.pojo.entity.DisposeDevice;
|
||||||
import com.dispose.pojo.po.AbilityInfo;
|
import com.dispose.pojo.po.AbilityInfo;
|
||||||
import com.dispose.service.DisposeAbilityRouterService;
|
import com.dispose.service.DisposeAbilityRouterService;
|
||||||
|
@ -165,37 +161,6 @@ public class DisposeAbilityRouterServiceImpl implements DisposeAbilityRouterServ
|
||||||
return ErrorCode.ERR_OK;
|
return ErrorCode.ERR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Is carry ip boolean.
|
|
||||||
*
|
|
||||||
* @param disposeIp the dispose ip
|
|
||||||
* @param ipSegment the ip segment
|
|
||||||
* @return the boolean
|
|
||||||
*/
|
|
||||||
private boolean isCarryIp(String disposeIp, String ipSegment) {
|
|
||||||
for (String v : ipSegment.split(DisposeConfigValue.SPLIT_CHAR)) {
|
|
||||||
if (Helper.ipInRange(v, disposeIp)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Is carry dispose object boolean.
|
|
||||||
*
|
|
||||||
* @param disposeIp the dispose ip
|
|
||||||
* @param cfgProtect the cfg protect
|
|
||||||
* @return the boolean
|
|
||||||
*/
|
|
||||||
private boolean isCarryDisposeObject(String disposeIp, List<DisposeCapacity> cfgProtect) {
|
|
||||||
|
|
||||||
if (cfgProtect.stream().noneMatch(k -> (k.getObjectType().getValue() & DisposeObjectType.IP.getValue()) != 0)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return cfgProtect.stream().anyMatch(k -> isCarryIp(disposeIp, k.getProtectIp()));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verify dispose capacity error code.
|
* Verify dispose capacity error code.
|
||||||
|
|
Loading…
Reference in New Issue