Moti Asayag has uploaded a new change for review. Change subject: host-deploy: Generalize the action type is messages ......................................................................
host-deploy: Generalize the action type is messages In order to reuse the same can-do-action message from different commands, the hard-coded action type should be replaced with a parameter. Change-Id: Id1bd86f61b8727f8a4271ed29c73005cc26b7f4c Signed-off-by: Moti Asayag <masa...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/hostdeploy/UpgradeOvirtNodeInternalCommand.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.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 6 files changed, 16 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/36/40636/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/hostdeploy/UpgradeOvirtNodeInternalCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/hostdeploy/UpgradeOvirtNodeInternalCommand.java index 0bec1c3..ba9d47c 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/hostdeploy/UpgradeOvirtNodeInternalCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/hostdeploy/UpgradeOvirtNodeInternalCommand.java @@ -55,6 +55,12 @@ return lockProperties.withScope(Scope.Execution); } + @Override + protected void setActionMessageParameters() { + addCanDoActionMessage(VdcBllMessages.VAR__ACTION__INSTALL); + addCanDoActionMessage(VdcBllMessages.VAR__TYPE__HOST); + } + private boolean isISOCompatible( File iso, RpmVersion ovirtHostOsVersion diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java index 9f80617..33951a5 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java @@ -131,6 +131,7 @@ VAR__ACTION__WRITE_PUB_KEYS, VAR__ACTION__REGISTER, VAR__ACTION__UPGRADE, + VAR__ACTION__INSTALL, // Host statuses replacements VAR__HOST_STATUS__UP, 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 3ffae09..cf92383 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties @@ -120,7 +120,7 @@ VDS_CANNOT_INSTALL_EMPTY_PASSWORD=Cannot install Host with empty password. VDS_CANNOT_INSTALL_STATUS_ILLEGAL=Cannot install Host. Please move Host to Maintenance mode first. VDS_CANNOT_UPGRADE_BETWEEN_MAJOR_VERSION=Cannot upgrade Host. Host version is not compatible with selected ISO version. Please select an ISO with major version ${IsoVersion}.x. -VDS_CANNOT_INSTALL_MISSING_IMAGE_FILE=Cannot install Host. Image file is missing. +VDS_CANNOT_INSTALL_MISSING_IMAGE_FILE=Cannot ${action} ${type}. Image file is missing. NO_AVAILABLE_UPDATES_FOR_HOST=Cannot ${action} ${type}. There are no available updates for the host. VDS_PORT_CHANGE_REQUIRE_INSTALL=The Host Port number cannot be changed without reinstalling the Host. VDS_TRY_CREATE_SECURE_CERTIFICATE_NOT_FOUND=Cannot add new Host using a secured connection, Certificate file could not be found. @@ -394,6 +394,7 @@ VAR__ACTION__VOLUME_SNAPSHOT_CONFIG_UPDATE="$action gluster volume snapshot config update" VAR__ACTION__REGISTER=$action register VAR__ACTION__UPGRADE=$action upgrade +VAR__ACTION__INSTALL=$action install VAR__HOST_STATUS__UP=$hostStatus Up VAR__HOST_STATUS__UP_MAINTENANCE_OR_NON_OPERATIONAL=$hostStatus Up, Maintenance or Non operational 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 ccd5fb0..3be153d 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 @@ -301,7 +301,7 @@ @DefaultStringValue("Cannot upgrade Host. Host version is not compatible with selected ISO version. Please select an ISO with major version ${IsoVersion}.x.") String VDS_CANNOT_UPGRADE_BETWEEN_MAJOR_VERSION(); - @DefaultStringValue("Cannot install Host. Image file is missing.") + @DefaultStringValue("Cannot ${action} ${type}. Image file is missing.") String VDS_CANNOT_INSTALL_MISSING_IMAGE_FILE(); @DefaultStringValue("Cannot ${action} ${type}. There are no available updates for the host.") @@ -1066,6 +1066,9 @@ @DefaultStringValue("$action upgrade") String VAR__ACTION__UPGRADE(); + @DefaultStringValue("$action install") + String VAR__ACTION__INSTALL(); + @DefaultStringValue("$action start profiling") String VAR__ACTION__START_PROFILE(); 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 1b0a8ed..0d6e432 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 @@ -103,7 +103,7 @@ VDS_CANNOT_INSTALL_EMPTY_PASSWORD=Cannot install Host with empty password. VDS_CANNOT_INSTALL_STATUS_ILLEGAL=Cannot install Host. Please move Host to Maintenance mode first. VDS_CANNOT_UPGRADE_BETWEEN_MAJOR_VERSION=Cannot upgrade Host. Host version is not compatible with selected ISO version. Please select an ISO with major version ${IsoVersion}.x. -VDS_CANNOT_INSTALL_MISSING_IMAGE_FILE=Cannot install Host. Image file is missing. +VDS_CANNOT_INSTALL_MISSING_IMAGE_FILE=Cannot ${action} ${type}. Image file is missing. VDS_PORT_CHANGE_REQUIRE_INSTALL=The Host Port number cannot be changed without reinstalling the Host. VDS_TRY_CREATE_SECURE_CERTIFICATE_NOT_FOUND=Cannot add new Host using a secured connection, Certificate file could not be found. VDS_FENCE_DISABLED=Cannot fence Host, Host fence is disabled. 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 7cd14fb..408d0ee 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 @@ -119,7 +119,7 @@ VDS_CANNOT_INSTALL_EMPTY_PASSWORD=Cannot install Host with empty password. VDS_CANNOT_INSTALL_STATUS_ILLEGAL=Cannot install Host. Please move Host to Maintenance mode first. VDS_CANNOT_UPGRADE_BETWEEN_MAJOR_VERSION=Cannot upgrade Host. Host version is not compatible with selected ISO version. Please select an ISO with major version ${IsoVersion}.x. -VDS_CANNOT_INSTALL_MISSING_IMAGE_FILE=Cannot install Host. Image file is missing. +VDS_CANNOT_INSTALL_MISSING_IMAGE_FILE=Cannot ${action} ${type}. Image file is missing. NO_AVAILABLE_UPDATES_FOR_HOST=Cannot ${action} ${type}. There are no available updates for the host. VDS_PORT_CHANGE_REQUIRE_INSTALL=The Host Port number cannot be changed without reinstalling the Host. VDS_TRY_CREATE_SECURE_CERTIFICATE_NOT_FOUND=Cannot add new Host using a secured connection, Certificate file could not be found. @@ -398,6 +398,7 @@ VAR__ACTION__VOLUME_SNAPSHOT_CONFIG_UPDATE="$action gluster volume snapshot config update" VAR__ACTION__REGISTER=$action register VAR__ACTION__UPGRADE=$action upgrade +VAR__ACTION__INSTALL=$action install VAR__HOST_STATUS__UP=$hostStatus Up VAR__HOST_STATUS__UP_MAINTENANCE_OR_NON_OPERATIONAL=$hostStatus Up, Maintenance or Non operational -- To view, visit https://gerrit.ovirt.org/40636 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id1bd86f61b8727f8a4271ed29c73005cc26b7f4c 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