public final class VTNMacMapConfig extends Object
VTNMacMapConfig describes configuration information about a
MAC mapping configured in a vBridge.| Constructor and Description |
|---|
VTNMacMapConfig()
Construct an empty MAC mapping configuration.
|
VTNMacMapConfig(VtnMacMapConfig vmmc)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
containsMacAddress(NavigableSet<MacVlan> set,
long addr)
Determine whether the specified MAC address is contained in the given
set or not.
|
boolean |
equals(Object o)
Determine whether the given object is identical to this object.
|
Set<MacVlan> |
getAllowedHosts()
Return a set of hosts to be mapped by MAC mapping.
|
static RpcException |
getAlreadyMappedException(long mac)
Create an exception that indicates the specified MAC address is already
mapped to this vBridge.
|
Set<MacVlan> |
getDeniedHosts()
Return a set of hosts not to be mapped by MAC mapping.
|
static RpcException |
getDuplicateMacAddressException(long mac)
Create an exception that indicates the same MAC address is configured
in the allowed host set.
|
int |
hashCode()
Return the hash code of this object.
|
boolean |
isEmpty()
Determine whether the MAC mapping configuration is empty or not.
|
MacMapConfig |
toMacMapConfig()
Convert this instance into a
MacMapConfig instance. |
MacMapChange |
update(VtnUpdateOperationType op,
List<VlanHostDesc> allowed,
List<VlanHostDesc> denied)
Update the MAC mapping configuration.
|
MacMapChange |
update(VtnUpdateOperationType op,
VtnAclType aclType,
List<VlanHostDesc> hosts)
Update the specified access control list.
|
void |
verify()
Verify the contents of this instance.
|
static MacVlan |
verifyDeniedHost(MacVlan mv)
Verify a host information in the denied host set.
|
static MacVlan |
verifyDeniedHost(VlanHostDesc host)
Verify a host information in the denied host set.
|
public VTNMacMapConfig()
public VTNMacMapConfig(VtnMacMapConfig vmmc) throws RpcException
vmmc - A VtnMacMapConfig instance.RpcException - vmmc contains invalid configuration.public static RpcException getDuplicateMacAddressException(long mac)
mac - A MAC address.RpcException instance.public static RpcException getAlreadyMappedException(long mac)
mac - A MAC address.RpcException instance.public static MacVlan verifyDeniedHost(VlanHostDesc host) throws RpcException
host - A VlanHostDesc instance.MacVlan instance converted from host.RpcException - The given host information cannot be added to the denied host set.public static MacVlan verifyDeniedHost(MacVlan mv) throws RpcException
mv - A MacVlan instance.RpcException - The given host information cannot be added to the denied host set.public static boolean containsMacAddress(NavigableSet<MacVlan> set, long addr)
set - A set of MacVlan instances.addr - A MAC address to be tested.true is returned only if the MAC address specified
by addr is contained in set.public Set<MacVlan> getAllowedHosts()
public Set<MacVlan> getDeniedHosts()
public MacMapConfig toMacMapConfig()
MacMapConfig instance.MacMapConfig instance.public void verify()
throws RpcException
RpcException - Verification failed.public boolean isEmpty()
true only if this MAC mapping configuration is empty.public MacMapChange update(VtnUpdateOperationType op, List<VlanHostDesc> allowed, List<VlanHostDesc> denied) throws RpcException
This method updates both the allowed and denied host set. Note that the caller must discard this instance if this method throws an exception.
op - A VtnUpdateOperationType instance which
indicates how to update the MAC mapping
configuration.allowed - A list of VlanHostDesc instances that
indicates the changes made to the allowed host set.denied - A list of VlanHostDesc instances that
indicates the changes made to the denied host set.MacMapChange instance if the configuration has been
changed. null if not changed.RpcException - An error occurred.public MacMapChange update(VtnUpdateOperationType op, VtnAclType aclType, List<VlanHostDesc> hosts) throws RpcException
Note that the caller must discard this instance if this method throws an exception.
op - A VtnUpdateOperationType instance which
indicates how to change the MAC mapping configuration.aclType - The type of access control list.hosts - A list of VlanHostDesc instances.MacMapChange instance if the configuration has been
changed. null if not changed.RpcException - An error occurred.public boolean equals(Object o)
Copyright © 2018 OpenDaylight. All rights reserved.