BUG-9261: introduce new Credential types
[netconf.git] / netconf / callhome-provider / src / main / java / org / opendaylight / netconf / callhome / mount / CallHomeMountSessionContext.java
index 7fc17996393de7acbfb291b5a4505ca3cd1446a1..9c0de4d55c6cda8b51060c142410ce0dcd243923 100644 (file)
@@ -21,7 +21,7 @@ import org.opendaylight.netconf.client.NetconfClientSessionListener;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Host;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNodeBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.credentials.credentials.LoginPasswordBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.credentials.credentials.LoginPasswordDeprecatedBuilder;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeBuilder;
@@ -40,7 +40,7 @@ class CallHomeMountSessionContext {
     private final ContextKey key;
 
     CallHomeMountSessionContext(String nodeId, CallHomeProtocolSessionContext protocol,
-            CallHomeChannelActivator activator, CloseCallback callback) {
+                                CallHomeChannelActivator activator, CloseCallback callback) {
 
         this.nodeId = new NodeId(Preconditions.checkNotNull(nodeId, "nodeId"));
         this.key = ContextKey.from(protocol.getRemoteAddress());
@@ -67,13 +67,13 @@ class CallHomeMountSessionContext {
         node.setHost(new Host(key.getIpAddress()));
         node.setPort(key.getPort());
         node.setTcpOnly(Boolean.FALSE);
-        node.setCredentials(new LoginPasswordBuilder().setUsername("ommited").setPassword("ommited").build());
+        node.setCredentials(new LoginPasswordDeprecatedBuilder().setUsername("ommited").setPassword("ommited").build());
         node.setSchemaless(Boolean.FALSE);
         return node.build();
     }
 
     @SuppressWarnings("unchecked")
-     <V> Promise<V> activateNetconfChannel(NetconfClientSessionListener sessionListener) {
+    <V> Promise<V> activateNetconfChannel(NetconfClientSessionListener sessionListener) {
         return (Promise<V>) activator.activate(wrap(sessionListener));
     }
 
@@ -95,11 +95,11 @@ class CallHomeMountSessionContext {
             }
 
             @Override
-            public void onSessionDown(NetconfClientSession session, Exception e) {
+            public void onSessionDown(NetconfClientSession session, Exception exc) {
                 try {
                     removeSelf();
                 } finally {
-                    delegate.onSessionDown(session, e);
+                    delegate.onSessionDown(session, exc);
                 }
             }