mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-12-25 03:01:26 +01:00
[ONOS-8137] Bug fixed for driver not found in case of ipv6 address being used in short notation
Change-Id: I8fd0922eb2cce98ecb5612979f0554ac2281351b
This commit is contained in:
parent
b07d88a32f
commit
b6a6bcbe12
@ -126,8 +126,9 @@ public class NetconfDeviceInfo {
|
||||
/**
|
||||
* Convenieince constructor that converts all known fields from NetCfg data.
|
||||
* @param netconfConfig NetCf configuration
|
||||
* @param deviceId deviceId as per netcfg
|
||||
*/
|
||||
public NetconfDeviceInfo(NetconfDeviceConfig netconfConfig) {
|
||||
public NetconfDeviceInfo(NetconfDeviceConfig netconfConfig, DeviceId deviceId) {
|
||||
checkArgument(!netconfConfig.username().isEmpty(), "Empty device name");
|
||||
checkArgument(netconfConfig.port() > 0, "Negative port");
|
||||
checkNotNull(netconfConfig.ip(), "Null ip address");
|
||||
@ -135,6 +136,7 @@ public class NetconfDeviceInfo {
|
||||
this.name = netconfConfig.username();
|
||||
this.password = netconfConfig.password();
|
||||
this.ipAddress = netconfConfig.ip();
|
||||
this.deviceId = deviceId;
|
||||
this.port = netconfConfig.port();
|
||||
this.path = netconfConfig.path();
|
||||
if (netconfConfig.sshKey() != null && !netconfConfig.sshKey().isEmpty()) {
|
||||
|
||||
@ -370,7 +370,7 @@ public class NetconfControllerImpl implements NetconfController {
|
||||
|
||||
if (netCfg != null) {
|
||||
log.debug("Device {} is present in NetworkConfig", deviceId);
|
||||
deviceInfo = new NetconfDeviceInfo(netCfg);
|
||||
deviceInfo = new NetconfDeviceInfo(netCfg, deviceId);
|
||||
} else {
|
||||
log.debug("Creating NETCONF device {}", deviceId);
|
||||
deviceInfo = createDeviceInfo(deviceId);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user