Skip to content

Commit 295a87e

Browse files
committed
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
1 parent d6b3164 commit 295a87e

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

‎plugins/network-elements/cisco-vnmc/src/com/cloud/agent/api/ConfigureNexusVsmForAsaCommand.java‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
// under the License.
1717
package com.cloud.agent.api;
1818

19+
import com.cloud.agent.api.LogLevel.Log4jLevel;
20+
1921
/**
2022
* Command for configuring n1kv VSM for asa1kv device. It does the following in VSM:
2123
* a. creating vservice node for asa1kv
@@ -25,6 +27,7 @@ public class ConfigureNexusVsmForAsaCommand extends Command {
2527
private long _vlanId;
2628
private String _ipAddress;
2729
private String _vsmUsername;
30+
@LogLevel(Log4jLevel.Off)
2831
private String _vsmPassword;
2932
private String _vsmIp;
3033
private String _asaInPortProfile;

‎plugins/network-elements/cisco-vnmc/src/com/cloud/network/element/CiscoVnmcElement.java‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -306,11 +306,8 @@ public boolean implement(Network network, NetworkOffering offering,
306306
return false;
307307
}
308308

309-
Transaction txn = Transaction.currentTxn();
310309
boolean status = false;
311310
try {
312-
txn.start();
313-
314311
// ensure that there is an ASA 1000v assigned to this network
315312
CiscoAsa1000vDevice assignedAsa = assignAsa1000vToNetwork(network);
316313
if (assignedAsa == null) {
@@ -408,10 +405,9 @@ public boolean implement(Network network, NetworkOffering offering,
408405
}
409406

410407
status = true;
411-
txn.commit();
412408
} finally {
413409
if (!status) {
414-
txn.rollback();
410+
unassignAsa1000vFromNetwork(network);
415411
//FIXME: also undo changes in VNMC, VSM if anything failed
416412
}
417413
}

0 commit comments

Comments
 (0)