public class DefaultRestSBDevice extends Object implements RestSBDevice
| Constructor and Description |
|---|
DefaultRestSBDevice(org.onlab.packet.IpAddress ip,
int port,
String name,
String password,
String protocol,
String url,
boolean isActive) |
DefaultRestSBDevice(org.onlab.packet.IpAddress ip,
int port,
String name,
String password,
String protocol,
String url,
boolean isActive,
String testUrl,
String manufacturer,
String hwVersion,
String swVersion) |
| Modifier and Type | Method and Description |
|---|---|
org.onosproject.net.DeviceId |
deviceId()
Returns the ONOS deviceID for this device.
|
boolean |
equals(Object obj) |
int |
hashCode() |
Optional<String> |
hwVersion()
The hardware version of the rest device.
|
org.onlab.packet.IpAddress |
ip()
Returns the ip of this device.
|
boolean |
isActive()
Returns the state of this device.
|
boolean |
isProxy()
Returns the proxy state of this device
(if true, the device is proxying multiple ONOS devices).
|
Optional<String> |
manufacturer()
The manufacturer of the rest device.
|
String |
password()
Returns the password of this device.
|
int |
port()
Returns the password of this device.
|
String |
protocol()
Returns the protocol for the REST request, usually HTTP o HTTPS.
|
void |
setActive(boolean active)
Sets or unsets the state of the device.
|
Optional<String> |
swVersion()
The software version of rest device.
|
Optional<String> |
testUrl()
Returns the url for the REST TEST requests.
|
String |
toString() |
String |
url()
Returns the url for the REST requests, to be used instead of IP and PORT.
|
String |
username()
Returns the username of this device.
|
public DefaultRestSBDevice(org.onlab.packet.IpAddress ip,
int port,
String name,
String password,
String protocol,
String url,
boolean isActive)
public org.onlab.packet.IpAddress ip()
RestSBDeviceip in interface RestSBDevicepublic int port()
RestSBDeviceport in interface RestSBDevicepublic String username()
RestSBDeviceusername in interface RestSBDevicepublic String password()
RestSBDevicepassword in interface RestSBDevicepublic org.onosproject.net.DeviceId deviceId()
RestSBDevicedeviceId in interface RestSBDevicepublic void setActive(boolean active)
RestSBDevicesetActive in interface RestSBDeviceactive - booleanpublic boolean isActive()
RestSBDeviceisActive in interface RestSBDevicepublic String protocol()
RestSBDeviceprotocol in interface RestSBDevicepublic String url()
RestSBDeviceurl in interface RestSBDevicepublic boolean isProxy()
RestSBDeviceisProxy in interface RestSBDevicepublic Optional<String> testUrl()
RestSBDevicetestUrl in interface RestSBDevicepublic Optional<String> manufacturer()
RestSBDevicemanufacturer in interface RestSBDevicepublic Optional<String> hwVersion()
RestSBDevicehwVersion in interface RestSBDevicepublic Optional<String> swVersion()
RestSBDeviceswVersion in interface RestSBDevice