CLOUDSTACK-4964: Cisco VNMC: Nexus password gets logged in MS logs during guest n/w implementation with VNMC provider

Suppressing the password from getting logged
This commit is contained in:
Koushik Das 2013-10-25 16:49:10 +05:30
parent d6b3164ca0
commit 295a87ea40
2 changed files with 4 additions and 5 deletions

View File

@ -16,6 +16,8 @@
// under the License.
package com.cloud.agent.api;
import com.cloud.agent.api.LogLevel.Log4jLevel;
/**
* Command for configuring n1kv VSM for asa1kv device. It does the following in VSM:
* a. creating vservice node for asa1kv
@ -25,6 +27,7 @@ public class ConfigureNexusVsmForAsaCommand extends Command {
private long _vlanId;
private String _ipAddress;
private String _vsmUsername;
@LogLevel(Log4jLevel.Off)
private String _vsmPassword;
private String _vsmIp;
private String _asaInPortProfile;

View File

@ -306,11 +306,8 @@ public class CiscoVnmcElement extends AdapterBase implements SourceNatServicePro
return false;
}
Transaction txn = Transaction.currentTxn();
boolean status = false;
try {
txn.start();
// ensure that there is an ASA 1000v assigned to this network
CiscoAsa1000vDevice assignedAsa = assignAsa1000vToNetwork(network);
if (assignedAsa == null) {
@ -408,10 +405,9 @@ public class CiscoVnmcElement extends AdapterBase implements SourceNatServicePro
}
status = true;
txn.commit();
} finally {
if (!status) {
txn.rollback();
unassignAsa1000vFromNetwork(network);
//FIXME: also undo changes in VNMC, VSM if anything failed
}
}