Use censor attribute for CLI commands 86/89986/3
authorVenkatrangan Govindarajan <vgovindarajan@luminanetworks.com>
Wed, 27 May 2020 20:57:58 +0000 (02:27 +0530)
committerRobert Varga <nite@hq.sk>
Sun, 14 Jun 2020 18:03:43 +0000 (18:03 +0000)
This patch will help avoid usernames/passwords for device
access to be saved in karafhistory

JIRA: NETCONF-694
Change-Id: If2ac255b0ec9bbc32e3aec7d0247497cc927a3e1
Signed-off-by: Venkatrangan Govindarajan <vgovindarajan@luminanetworks.com>
(cherry picked from commit 1c201f8a99753109f18a47053c16c2d9b756ac37)

netconf/netconf-console/src/main/java/org/opendaylight/netconf/console/commands/NetconfConnectDeviceCommand.java
netconf/netconf-console/src/main/java/org/opendaylight/netconf/console/commands/NetconfUpdateDeviceCommand.java

index 578b49a4d3d3061f797e7468262eb79516e40d5c..909e90593ce7567e2437b207d5f70e5a8c0055d0 100644 (file)
@@ -76,6 +76,7 @@ public class NetconfConnectDeviceCommand implements Action {
             aliases = { "--username" },
             description = "Username for netconf connection",
             required = false,
+            censor = true,
             multiValued = false)
     private String username;
 
@@ -83,6 +84,7 @@ public class NetconfConnectDeviceCommand implements Action {
             aliases = { "--password" },
             description = "Password for netconf connection",
             required = false,
+            censor = true,
             multiValued = false)
     private String password;
 
index 62978e208812ad1ac9ec9ec72920882d4bdf2c47..9d0581b8a47e4862f143b690e34e2a4378246f32 100644 (file)
@@ -47,6 +47,7 @@ public class NetconfUpdateDeviceCommand implements Action {
             aliases = { "--username" },
             description = "Username for NETCONF connection",
             required = true,
+            censor = true,
             multiValued = false)
     private String username;
 
@@ -54,6 +55,7 @@ public class NetconfUpdateDeviceCommand implements Action {
             aliases = { "--password" },
             description = "Password for NETCONF connection",
             required = true,
+            censor = true,
             multiValued = false)
     private String password;