imp: handle private info aws
@@ -36,6 +36,8 @@ public class VimInstanceUtils {
((DockerVimInstance) vim).setCa("**********");
((DockerVimInstance) vim).setDockerKey("**********");
((DockerVimInstance) vim).setCert("**********");
+ } else if (vim.getClass().getCanonicalName().equals(AmazonVimInstance.class.getCanonicalName())) {
+ ((AmazonVimInstance) vim).setSecretKey("**********");
}
}
@@ -56,6 +58,15 @@ public class VimInstanceUtils {
((DockerVimInstance) vimNew).setCa(((DockerVimInstance) vimOld).getCa());
((DockerVimInstance) vimNew).setDockerKey(((DockerVimInstance) vimOld).getDockerKey());
((DockerVimInstance) vimNew).setCert(((DockerVimInstance) vimOld).getCert());
+ } else if (vimNew
+ .getClass()
+ .getCanonicalName()
+ .equals(AmazonVimInstance.class.getCanonicalName())) {
+ if (((AmazonVimInstance) vimNew).getSecretKey().equals("**********")
+ || ((AmazonVimInstance) vimNew).getSecretKey().isEmpty()
+ || ((AmazonVimInstance) vimNew).getSecretKey() == null) {
+ ((AmazonVimInstance) vimNew).setSecretKey(((AmazonVimInstance) vimOld).getSecretKey());
+ }
}
}
