Package org.onosproject.vpls.config
Class VplsAppConfig
- java.lang.Object
-
- org.onosproject.net.config.Config<org.onosproject.core.ApplicationId>
-
- org.onosproject.vpls.config.VplsAppConfig
-
public class VplsAppConfig extends org.onosproject.net.config.Config<org.onosproject.core.ApplicationId>Represents the VPLS application configuration.
-
-
Constructor Summary
Constructors Constructor Description VplsAppConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddIface(java.lang.String vplsName, java.lang.String iface)Adds a network interface to a VPLS.voidaddVpls(VplsConfig vpls)Adds a VPLS to the configuration.voidclearVplsConfig()Clears all VPLS configurations.VplsConfiggetVplsWithName(java.lang.String name)Returns the VPLS configuration given a VPLS name.voidremoveIface(VplsConfig name, java.lang.String iface)Removes a network interface from a VPLS.voidremoveVpls(java.lang.String vplsName)Removes a VPLS from the configuration.voidsetEncap(java.lang.String vplsName, org.onosproject.net.EncapsulationType encap)Activate, deactivates, sets the encapsulation type for a given VPLS.longupdateTime()Retrieves the last time of update for the VPLS information in the store.voidupdateTime(long timestamp)Sets the last time of update for the VPLS information in the store.VplsConfigvplsFromIface(java.lang.String iface)Finds a VPLS with a given network interface.java.util.Set<VplsConfig>vplss()Returns a set of configured VPLSs.-
Methods inherited from class org.onosproject.net.config.Config
apply, clear, get, get, get, get, get, get, getList, getList, hasField, hasField, hasFields, hasFields, hasOnlyFields, hasOnlyFields, init, isBoolean, isBoolean, isConnectPoint, isConnectPoint, isDecimal, isDecimal, isIntegralNumber, isIntegralNumber, isIpAddress, isIpAddress, isIpPrefix, isIpPrefix, isMacAddress, isMacAddress, isNumber, isNumber, isString, isString, isTpPort, isTpPort, isValid, isValidLength, key, node, setList, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, subject, toString
-
-
-
-
Method Detail
-
vplss
public java.util.Set<VplsConfig> vplss()
Returns a set of configured VPLSs.- Returns:
- set of VPLSs
-
getVplsWithName
public VplsConfig getVplsWithName(java.lang.String name)
Returns the VPLS configuration given a VPLS name.- Parameters:
name- the name of the VPLS- Returns:
- the VPLS configuration if it exists; null otherwise
-
addVpls
public void addVpls(VplsConfig vpls)
Adds a VPLS to the configuration.- Parameters:
vpls- the name of the VPLS
-
removeVpls
public void removeVpls(java.lang.String vplsName)
Removes a VPLS from the configuration.- Parameters:
vplsName- the vplsName of the VPLS to be removed
-
vplsFromIface
public VplsConfig vplsFromIface(java.lang.String iface)
Finds a VPLS with a given network interface.- Parameters:
iface- the network interface- Returns:
- the VPLS if found; null otherwise
-
addIface
public void addIface(java.lang.String vplsName, java.lang.String iface)Adds a network interface to a VPLS.- Parameters:
vplsName- the vplsName of the VPLSiface- the network interface to be added
-
removeIface
public void removeIface(VplsConfig name, java.lang.String iface)
Removes a network interface from a VPLS.- Parameters:
name- the name of the VPLSiface- the network interface to be removed
-
setEncap
public void setEncap(java.lang.String vplsName, org.onosproject.net.EncapsulationType encap)Activate, deactivates, sets the encapsulation type for a given VPLS.- Parameters:
vplsName- the vplsName of the VPLSencap- the encapsulation type, if set
-
updateTime
public void updateTime(long timestamp)
Sets the last time of update for the VPLS information in the store.- Parameters:
timestamp- the update time
-
updateTime
public long updateTime()
Retrieves the last time of update for the VPLS information in the store.- Returns:
- update time, -1 if there is no update time in the config
-
clearVplsConfig
public void clearVplsConfig()
Clears all VPLS configurations.
-
-