mirror of
https://github.com/ctripcorp/zeus.git
synced 2024-09-20 07:36:02 +08:00
bug fix
This commit is contained in:
parent
d12edd1af3
commit
7132ec3c16
|
@ -29,6 +29,8 @@ public class DefaultGroupValidator implements GroupValidator {
|
|||
private GroupDao groupDao;
|
||||
@Resource
|
||||
private TrafficPolicyQuery trafficPolicyQuery;
|
||||
@Resource
|
||||
private PathValidator pathValidator;
|
||||
|
||||
@Override
|
||||
public void validateFields(Group group, ValidationContext context) {
|
||||
|
@ -117,8 +119,8 @@ public class DefaultGroupValidator implements GroupValidator {
|
|||
if (gvs.getPriority() > e.getPriority()) {
|
||||
throw new ValidationException("Group has higher `priority` than its traffic policy " + e.getEntryId() + " on vs " + vsId + ".");
|
||||
}
|
||||
if (!gvs.getPath().equals(e.getPath())) {
|
||||
throw new ValidationException("Group and its traffic policy " + e.getEntryId() + " do not have the same `path` value on vs " + vsId + ".");
|
||||
if (!pathValidator.contains(gvs.getPath(), e.getPath())) {
|
||||
throw new ValidationException("Traffic policy " + e.getEntryId() + " is neither sharing the same `path` with nor containing part of the `path` of the current group on vs " + vsId + ".");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue