Package org.onosproject.protocol.rest
Interface RestSBDevice
-
- All Known Implementing Classes:
DefaultRestSBDevice
public interface RestSBDeviceRepresents an abstraction of a Rest Device in ONOS.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classRestSBDevice.AuthenticationSchemeREST Authentication schemes.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RestSBDevice.AuthenticationSchemeauthentication()The authentication scheme of rest device.org.onosproject.net.DeviceIddeviceId()Returns the ONOS deviceID for this device.java.util.Optional<java.lang.String>hwVersion()The hardware version of the rest device.org.onlab.packet.IpAddressip()Returns the ip of this device.booleanisActive()Returns the state of this device.booleanisProxy()Returns the proxy state of this device (if true, the device is proxying multiple ONOS devices).java.util.Optional<java.lang.String>manufacturer()The manufacturer of the rest device.java.lang.Stringpassword()Returns the password of this device.intport()Returns the port of this device.java.lang.Stringprotocol()Returns the protocol for the REST request, usually HTTP o HTTPS.voidsetActive(boolean active)Sets or unsets the state of the device.java.util.Optional<java.lang.String>swVersion()The software version of rest device.java.util.Optional<java.lang.String>testUrl()Returns the url for the REST TEST requests.java.lang.Stringtoken()The access token of rest device if authentication is OAuth2.java.lang.Stringurl()Returns the url for the REST requests, to be used instead of IP and PORT.java.lang.Stringusername()Returns the username of this device.
-
-
-
Method Detail
-
ip
org.onlab.packet.IpAddress ip()
Returns the ip of this device.- Returns:
- ip
-
port
int port()
Returns the port of this device.- Returns:
- port
-
authentication
RestSBDevice.AuthenticationScheme authentication()
The authentication scheme of rest device.- Returns:
- authentication
-
token
java.lang.String token()
The access token of rest device if authentication is OAuth2.- Returns:
- token
-
username
java.lang.String username()
Returns the username of this device.- Returns:
- username
-
password
java.lang.String password()
Returns the password of this device.- Returns:
- password
-
deviceId
org.onosproject.net.DeviceId deviceId()
Returns the ONOS deviceID for this device.- Returns:
- DeviceId
-
setActive
void setActive(boolean active)
Sets or unsets the state of the device.- Parameters:
active- boolean
-
isActive
boolean isActive()
Returns the state of this device.- Returns:
- state
-
protocol
java.lang.String protocol()
Returns the protocol for the REST request, usually HTTP o HTTPS.- Returns:
- protocol
-
url
java.lang.String url()
Returns the url for the REST requests, to be used instead of IP and PORT.- Returns:
- url
-
isProxy
boolean isProxy()
Returns the proxy state of this device (if true, the device is proxying multiple ONOS devices).- Returns:
- proxy state
-
testUrl
java.util.Optional<java.lang.String> testUrl()
Returns the url for the REST TEST requests.- Returns:
- testUrl
-
manufacturer
java.util.Optional<java.lang.String> manufacturer()
The manufacturer of the rest device.- Returns:
- the name of the manufacturer
-
hwVersion
java.util.Optional<java.lang.String> hwVersion()
The hardware version of the rest device.- Returns:
- the hardware version
-
swVersion
java.util.Optional<java.lang.String> swVersion()
The software version of rest device.- Returns:
- the software version.
-
-