Package org.onosproject.upgrade
Interface UpgradeService
-
- All Superinterfaces:
ListenerService<UpgradeEvent,UpgradeEventListener>
@Beta public interface UpgradeService extends ListenerService<UpgradeEvent,UpgradeEventListener>
Upgrade service.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Upgrade
getState()
Returns the current upgrade state.Version
getVersion()
Returns the currently active software version.boolean
isLocalActive()
Returns whether the local node is active.boolean
isLocalUpgraded()
Returns whether the local node is an upgraded node.boolean
isUpgrading()
Returns whether an upgrade is in progress.-
Methods inherited from interface org.onosproject.event.ListenerService
addListener, removeListener
-
-
-
-
Method Detail
-
getState
Upgrade getState()
Returns the current upgrade state.- Returns:
- the current upgrade state
-
isUpgrading
boolean isUpgrading()
Returns whether an upgrade is in progress.An upgrade is in progress if the upgrade
Upgrade.Status
is active, e.g.Upgrade.Status.INITIALIZED
,Upgrade.Status.UPGRADED
, etc.- Returns:
- indicates whether an upgrade is in progress
-
getVersion
Version getVersion()
Returns the currently active software version.The returned version is representative of the version currently in control of the network. When the upgrade transitions to the
Upgrade.Status.UPGRADING
state, control over the network is transferred fromUpgrade.source()
nodes toUpgrade.target()
nodes, and the version returned by this method represents that change.- Returns:
- the software version
-
isLocalActive
boolean isLocalActive()
Returns whether the local node is active.The local node will be active if its
Version
matches the version returned bygetVersion()
.- Returns:
- indicates whether the local node is active according to its version
-
isLocalUpgraded
boolean isLocalUpgraded()
Returns whether the local node is an upgraded node.- Returns:
true
if the local node's version matchesUpgrade.target()
-
-