[PATCH conductor] BZ 799314 - Clarify error when a deployable has images in the wrong environment.

Matt Wagner matt.wagner at redhat.com
Mon Mar 5 17:14:36 UTC 2012


It was unclear from the previous message what a user was to do. This attempts
to clarify what has gone wrong, and tries to walk the line of giving
a meaningful error that the deployable is unusable to end-users, while
giving enough detail to admins that they understand what is misconfigured.

Partially resolves https://bugzilla.redhat.com/show_bug.cgi?id=799314
---
 src/app/models/deployable.rb |    2 +-
 src/config/locales/en.yml    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/app/models/deployable.rb b/src/app/models/deployable.rb
index de00e08..83aaa71 100644
--- a/src/app/models/deployable.rb
+++ b/src/app/models/deployable.rb
@@ -161,7 +161,7 @@ class Deployable < ActiveRecord::Base
       else
         if image.environment != pool_family.name
           deployable_errors << I18n.t("deployables.flash.error.wrong_environment",
-                                      :assembly => assembly.name,
+                                      :deployable => name,
                                       :uuid => assembly.image_id,
                                       :wrong_env => image.environment,
                                       :environment => pool_family.name)
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index 4bcbbc5..e5ef9ee 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -925,7 +925,7 @@ en:
         no_catalog_exists: "No catalog exists! Please create one."
         no_hwp_exists: "No hardware profile exists! Please create one."
         missing_image: "%{assembly}: Image (UUID: %{uuid}) doesn't exist"
-        wrong_environment: "%{assembly}: Image (UUID: %{uuid}) belongs to the wrong environment (%{wrong_env}) instead of %{environment}"
+        wrong_environment: "The deployable '%{deployable}' contains an image (UUID %{uuid}) in the wrong environment ('%{wrong_env}' should be '%{environment}') and cannot be used."
       warning:
         failed: "Deployable was not created: %{message}"
       notice:
-- 
1.7.7.6




More information about the aeolus-devel mailing list