ONOS-3941 Adding Executor pool and support for username but passwordless https login in Rest SB
Change-Id: Ia3da59dbffcabf233a27931aa756488629e8dd63
diff --git a/protocols/rest/api/src/main/java/org/onosproject/protocol/rest/DefaultRestSBDevice.java b/protocols/rest/api/src/main/java/org/onosproject/protocol/rest/DefaultRestSBDevice.java
index 57da2e5..7ea3dd5 100644
--- a/protocols/rest/api/src/main/java/org/onosproject/protocol/rest/DefaultRestSBDevice.java
+++ b/protocols/rest/api/src/main/java/org/onosproject/protocol/rest/DefaultRestSBDevice.java
@@ -34,7 +34,7 @@
private static final String COLON = ":";
private final IpAddress ip;
private final int port;
- private final String name;
+ private final String username;
private final String password;
private boolean isActive;
private String protocol;
@@ -47,7 +47,7 @@
Preconditions.checkNotNull(protocol, "protocol address cannot be null");
this.ip = ip;
this.port = port;
- this.name = name;
+ this.username = name;
this.password = StringUtils.isEmpty(password) ? null : password;
this.isActive = isActive;
this.protocol = protocol;
@@ -65,8 +65,8 @@
}
@Override
- public String name() {
- return name;
+ public String username() {
+ return username;
}
@Override
@@ -110,7 +110,7 @@
return MoreObjects.toStringHelper(this)
.add("url", url)
.add("protocol", protocol)
- .add("name", name)
+ .add("username", username)
.add("port", port)
.add("ip", ip)
.toString();
@@ -125,7 +125,7 @@
return false;
}
RestSBDevice device = (RestSBDevice) obj;
- return this.name.equals(device.name()) && this.ip.equals(device.ip()) &&
+ return this.username.equals(device.username()) && this.ip.equals(device.ip()) &&
this.port == device.port();
}
diff --git a/protocols/rest/api/src/main/java/org/onosproject/protocol/rest/RestSBDevice.java b/protocols/rest/api/src/main/java/org/onosproject/protocol/rest/RestSBDevice.java
index abef64e..81860f3 100644
--- a/protocols/rest/api/src/main/java/org/onosproject/protocol/rest/RestSBDevice.java
+++ b/protocols/rest/api/src/main/java/org/onosproject/protocol/rest/RestSBDevice.java
@@ -38,11 +38,11 @@
int port();
/**
- * Returns the name of this device.
+ * Returns the username of this device.
*
- * @return name
+ * @return username
*/
- String name();
+ String username();
/**
* Returns the password of this device.