commit | 48df84e653a2523455cfb6d344891888a4d6361c | [log] [tgz] |
---|---|---|
author | Shivani Vaidya <shivani.9114@gmail.com> | Thu Apr 13 13:48:17 2017 -0700 |
committer | Andrea Campanella <andrea@onlab.us> | Tue Apr 18 19:01:01 2017 +0000 |
tree | 1451cdf05e91a20de04a44bfad3e713ab0d049f5 | |
parent | fe6cebadeb2e72bebf56c5ebcaaa8acc3d2953f9 [diff] |
unit tests for NetconfSessionImpl Change-Id: Ic1b7d0221343f288b98c41f456809b59689e198f
diff --git a/protocols/netconf/api/src/main/java/org/onosproject/netconf/TargetConfig.java b/protocols/netconf/api/src/main/java/org/onosproject/netconf/TargetConfig.java index ecc924c..90f3148 100644 --- a/protocols/netconf/api/src/main/java/org/onosproject/netconf/TargetConfig.java +++ b/protocols/netconf/api/src/main/java/org/onosproject/netconf/TargetConfig.java
@@ -27,21 +27,13 @@ this.name = name; } - TargetConfig toTargetConfig(String targetConfig) { - switch (targetConfig) { - case "running": - return RUNNING; - case "candidate": - return CANDIDATE; - case "startup": - return STARTUP; - default: - return null; - } + public static TargetConfig toTargetConfig(String targetConfig) { + return valueOf(targetConfig.toUpperCase()); } @Override public String toString() { return this.name; } + }