Permalink
Browse files

fix for Bug 6908, fixed up messages to make the situation clearer

  • Loading branch information...
1 parent c879115 commit d29f48f5a34ac498a6af6a55afc3b4a6e752f56a @timf timf committed Mar 24, 2010
@@ -2,7 +2,7 @@ if [ ! "X$CLCLBUILDER_ENVIRONMENT_DEFINED" = "X" ]; then
return 0
fi
-export CLCLBUILDER_RELEASE_NAME="nimbus-cloud-client-014"
+export CLCLBUILDER_RELEASE_NAME="nimbus-cloud-client-015"
# #########################################################
@@ -33,7 +33,7 @@ export GLOBUS_LOCATION="$CLCLBUILDER_DIST_DIRECTORY/lib/globus"
# #########################################################
-export NIMBUS_CLIENT_INSTALL_SCRIPT="$CLCLBUILDER_BASEDIR/../bin/clients-only-build-and-install.sh"
+export NIMBUS_CLIENT_INSTALL_SCRIPT="$CLCLBUILDER_BASEDIR/../scripts/clients-only-build-and-install.sh"
# #########################################################
@@ -195,6 +195,7 @@ public static void main(String[] args) {
public static final int LISTENER_AUTODESTROY = 5005;
public static final int LISTENER_AUTODESTROY__ERRORS = 5006;
+ public static final int LISTENER_AUTODESTROY_CLOUD_UNPROPAGATE = 5007;
public static final int LISTENER_LOGISTICSQUERY__ERRORS = 5012;
@@ -245,8 +245,20 @@ static void destroy(Workspace workspace,
final String err = "\"" + workspace.getDisplayName() + "\": " +
newState.getState() + ", calling destroy for you.";
if (print.useThis()) {
- print.errln(PrCodes.LISTENER_AUTODESTROY,
- err);
+
+ // Uncleanly injecting cloud-client message here.
+ // And also uncleanly consulting the 'PrintOpts' internals. Bravo.
+ if (print.getOpts().printThis(PrCodes.LISTENER_AUTODESTROY_CLOUD_UNPROPAGATE)) {
+ if (newState.getState().equals(State.STATE_TransportReady)) {
+ print.errln(PrCodes.LISTENER_AUTODESTROY_CLOUD_UNPROPAGATE,
+ "The image has successfully been transferred to your " +
+ "repository directory.\n\nFinalizing the " +
+ "deployment now (terminating the resource " +
+ "lease).\n");
+ }
+ } else {
+ print.errln(PrCodes.LISTENER_AUTODESTROY, err);
+ }
} else if (print.useLogging()) {
logger.error(err);
}
@@ -147,6 +147,8 @@ public CloudClient(Print pr) {
PrCodes.CREATE__EXTRALINES,
PrCodes.MD_SSH__FILE_READ,
PrCodes.MD_USERDATA__FILE_READ,
+ PrCodes.LISTENER_TERMINATION__INSTANCE_ID_PRINT,
+ PrCodes.LISTENER_AUTODESTROY,
PrCodes.CREATE__CTXBROKER_CONTACTINF};
return PrCodes.getAllCodesExcept(optOuts);
}
@@ -138,7 +138,7 @@ boolean isPrintAll() {
return this.printAll;
}
- boolean printThis(int code) {
+ public boolean printThis(int code) {
if (this.disableEntirely) {
return false;
}

0 comments on commit d29f48f

Please sign in to comment.