Use censor attribute for CLI commands 15/90015/2
authorVenkatrangan Govindarajan <vgovindarajan@luminanetworks.com>
Wed, 27 May 2020 20:57:58 +0000 (02:27 +0530)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 28 May 2020 03:55:14 +0000 (05:55 +0200)
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>
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 8476772ac36fa1f82111ed512ea08eabeac95c91..bdf2cd8ed8fc80e60ef9e2e0a4b6a3a0d4c0c4a5 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;