Mod aaa-12 修复华为设备无法连接的问题。
RCA: SOL: 修改人:dongxiancun 检视人:dongxiancun
This commit is contained in:
parent
ac4301942a
commit
7f21167a59
|
@ -106,7 +106,9 @@ public class HuaweiNetconfSpeaker implements DataTreeChangeListener<ConnectorInf
|
|||
/**create netconf node with connect device information */
|
||||
final NetconfNodeBuilder netconfNodeBuilder = new NetconfNodeBuilder();
|
||||
netconfNodeBuilder.setHost(new Host(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress(connectDevice.getIp().getIpv4Address())))
|
||||
.setPort(new PortNumber(connectDevice.getPort().getValue()));
|
||||
.setPort(new PortNumber(connectDevice.getPort().getValue()))
|
||||
.setTcpOnly(false)
|
||||
.setSchemaless(false);
|
||||
String username = connectDevice.getUserName();
|
||||
String password = connectDevice.getPassword();
|
||||
if (Strings.isNullOrEmpty(username) || Strings.isNullOrEmpty(password)) {
|
||||
|
@ -210,7 +212,11 @@ public class HuaweiNetconfSpeaker implements DataTreeChangeListener<ConnectorInf
|
|||
} else if (rootNode.getModificationType() == DELETE) {
|
||||
LOG.info("onDataTreeChanged - Toaster config with path {} was deleted: old Toaster: {}",
|
||||
change.getRootPath().getRootIdentifier(), rootNode.getDataBefore());
|
||||
disConnectDevice(device.getId().getValue());
|
||||
ConnectorInfo oldEntry = rootNode.getDataBefore();
|
||||
oldEntry.getRemoteDevices().forEach( d -> {
|
||||
disConnectDevice(d.getId().getValue());
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -302,6 +308,7 @@ public class HuaweiNetconfSpeaker implements DataTreeChangeListener<ConnectorInf
|
|||
InstanceIdentifier<CpuInfos> iid =
|
||||
InstanceIdentifier.create(Devm.class).child(CpuInfos.class);
|
||||
Optional<CpuInfos> cupInfos;
|
||||
LOG.info("开始向华为设备获取cpu信息!");
|
||||
try {
|
||||
// Read from a transaction is asynchronous, but a simple
|
||||
// get/checkedGet makes the call synchronous
|
||||
|
|
Loading…
Reference in New Issue