Moti Asayag has uploaded a new change for review. Change subject: engine: Restrict vlan-id range to 0-4094 ......................................................................
engine: Restrict vlan-id range to 0-4094 VDSM restricts vlan-id range to 0-4094 due to Linux limitation. The engine should be aligned with VDSM with this matter. Change-Id: I6d22b7d4a8b8482c9d844d8a29a13590c3e2a9cd Bug-Url: https://bugzilla.redhat.com/880254 Signed-off-by: Moti Asayag <masa...@redhat.com> --- M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/Network.java M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties M backend/manager/modules/utils/src/test/resources/AppErrors.properties M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/NetworkModel.java M frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties M frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties 7 files changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/92/10692/1 diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/Network.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/Network.java index 50a85d8..b45dec7 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/Network.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/Network.java @@ -73,7 +73,7 @@ @Column(name = "vlan_id") @Min(value = 0, message = "NETWORK_VLAN_OUT_OF_RANGE", groups = { CreateEntity.class, UpdateEntity.class }) - @Max(value = 4095, message = "NETWORK_VLAN_OUT_OF_RANGE", groups = { CreateEntity.class, UpdateEntity.class }) + @Max(value = 4094, message = "NETWORK_VLAN_OUT_OF_RANGE", groups = { CreateEntity.class, UpdateEntity.class }) private Integer vlanId; @Column(name = "stp") diff --git a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties index eadee7b..f1f2597 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties @@ -385,7 +385,7 @@ ERROR_CANNOT_DESTROY_LAST_STORAGE_DOMAIN_HOST_NOT_ACTIVE=In order to complete the operation a new master Storage Domain needs to be elected, which requires at least one active Host in the Data Center.\n\ -Please make sure one of the Hosts is active in the Data Center first. -NETWORK_VLAN_OUT_OF_RANGE=VLAN ID must be a number between 0 and 4905 +NETWORK_VLAN_OUT_OF_RANGE=VLAN ID must be a number between 0 and 4094 ERROR_CANNOT_ADD_STORAGE_POOL_WITHOUT_DATA_DOMAIN=Cannot attach Storage Domain.\n\ -Please attach Data Domain to the Data Center first. ERROR_CANNOT_REMOVE_POOL_WITH_ACTIVE_DOMAINS=Cannot remove Data Center which contains active/locked Storage Domains.\n\ diff --git a/backend/manager/modules/utils/src/test/resources/AppErrors.properties b/backend/manager/modules/utils/src/test/resources/AppErrors.properties index d44c741..74274f4 100644 --- a/backend/manager/modules/utils/src/test/resources/AppErrors.properties +++ b/backend/manager/modules/utils/src/test/resources/AppErrors.properties @@ -260,7 +260,7 @@ NETWORK_INTERFACE_NOT_HAVE_DISPLAY_FLAG=The specified interface is not a display interface NETWORK_NOT_EXISTS=Specified network doesn't exist ERROR_CANNOT_DETACH_LAST_STORAGE_DOMAIN=Cannot remove master Storage from Repository without other Active Data Storage. -NETWORK_VLAN_OUT_OF_RANGE=VLAN ID must be a number between 0 and 4905 +NETWORK_VLAN_OUT_OF_RANGE=VLAN ID must be a number between 0 and 4094 ERROR_CANNOT_ADD_STORAGE_POOL_WITHOUT_DATA_AND_ISO_DOMAINS=Cannot create Repository - There must be at least one Data storage and one ISO storage. ERROR_CANNOT_ADD_STORAGE_POOL_WITHOUT_DATA_DOMAIN=The first storage in a Repository must be Data storage. ERROR_CANNOT_REMOVE_POOL_WITH_ACTIVE_DOMAINS=Cannot remove Data Center which contains active/locked Storage Domains. Please deactivate all domains and wait for tasks to finish before removing the Data Center. diff --git a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java index 91dbf22..28624ed 100644 --- a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java +++ b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java @@ -1038,7 +1038,7 @@ @DefaultStringValue("In order to complete the operation a new master Storage Domain needs to be elected, which requires at least one active Host in the Data Center.\n-Please make sure one of the Hosts is active in the Data Center first.") String ERROR_CANNOT_DESTROY_LAST_STORAGE_DOMAIN_HOST_NOT_ACTIVE(); - @DefaultStringValue("VLAN ID must be a number between 0 and 4905") + @DefaultStringValue("VLAN ID must be a number between 0 and 4094") String NETWORK_VLAN_OUT_OF_RANGE(); @DefaultStringValue("Cannot attach Storage Domain.\n-Please attach Data Domain to the Data Center first.") diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/NetworkModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/NetworkModel.java index 7f8422b..9a82e11 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/NetworkModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/NetworkModel.java @@ -310,7 +310,7 @@ { IntegerValidation tempVar4 = new IntegerValidation(); tempVar4.setMinimum(0); - tempVar4.setMaximum(4095); + tempVar4.setMaximum(4094); getVLanTag().ValidateEntity(new IValidation[] { new NotEmptyValidation(), tempVar4 }); } diff --git a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties index dd30ffc..77aba50 100644 --- a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties +++ b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties @@ -381,7 +381,7 @@ ERROR_CANNOT_DESTROY_LAST_STORAGE_DOMAIN_HOST_NOT_ACTIVE=In order to complete the operation a new master Storage Domain needs to be elected, which requires at least one active Host in the Data Center.\n\ -Please make sure one of the Hosts is active in the Data Center first. -NETWORK_VLAN_OUT_OF_RANGE=VLAN ID must be a number between 0 and 4905 +NETWORK_VLAN_OUT_OF_RANGE=VLAN ID must be a number between 0 and 4094 ERROR_CANNOT_ADD_STORAGE_POOL_WITHOUT_DATA_DOMAIN=Cannot attach Storage Domain.\n\ -Please attach Data Domain to the Data Center first. ERROR_CANNOT_REMOVE_POOL_WITH_ACTIVE_DOMAINS=Cannot remove Data Center which contains active/locked Storage Domains.\n\ diff --git a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties index 1df069a..9a1af55 100644 --- a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties +++ b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties @@ -379,7 +379,7 @@ ERROR_CANNOT_DESTROY_LAST_STORAGE_DOMAIN_HOST_NOT_ACTIVE=In order to complete the operation a new master Storage Domain needs to be elected, which requires at least one active Host in the Data Center.\n\ -Please make sure one of the Hosts is active in the Data Center first. -NETWORK_VLAN_OUT_OF_RANGE=VLAN ID must be a number between 0 and 4905 +NETWORK_VLAN_OUT_OF_RANGE=VLAN ID must be a number between 0 and 4094 ERROR_CANNOT_ADD_STORAGE_POOL_WITHOUT_DATA_DOMAIN=Cannot attach Storage Domain.\n\ -Please attach Data Domain to the Data Center first. ERROR_CANNOT_REMOVE_POOL_WITH_ACTIVE_DOMAINS=Cannot remove Data Center which contains active/locked Storage Domains.\n\ -- To view, visit http://gerrit.ovirt.org/10692 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6d22b7d4a8b8482c9d844d8a29a13590c3e2a9cd Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Moti Asayag <masa...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches