Class VpnHelper
- java.lang.Object
-
- org.opendaylight.netvirt.vpnmanager.api.VpnHelper
-
public final class VpnHelper extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
doesVpnInterfaceBelongToVpnInstance(java.lang.String vpnName, java.util.List<VpnInstanceNames> vpnInstanceList)
static java.util.List<VpnInstance>
getAllVpnInstances(org.opendaylight.controller.md.sal.binding.api.DataBroker broker)
static @Nullable java.lang.String
getFirstVpnNameFromVpnInterface(VpnInterface original)
static @Nullable Subnetmap
getSubnetmapFromItsUuid(org.opendaylight.controller.md.sal.binding.api.DataBroker broker, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid subnetUuid)
Get Subnetmap from its Uuid.static long
getVpnId(org.opendaylight.controller.md.sal.binding.api.DataBroker broker, java.lang.String vpnName)
Retrieves the dataplane identifier of a specific VPN, searching by its VpnInstance name.static @Nullable VpnInstance
getVpnInstance(org.opendaylight.controller.md.sal.binding.api.DataBroker broker, java.lang.String vpnInstanceName)
static @Nullable VpnInterface
getVpnInterface(org.opendaylight.controller.md.sal.binding.api.DataBroker broker, java.lang.String vpnInterfaceName)
static VpnInstanceNames
getVpnInterfaceVpnInstanceNames(java.lang.String vpnName, VpnInstanceNames.AssociatedSubnetType subnetType)
static @NonNull java.util.List<java.lang.String>
getVpnInterfaceVpnInstanceNamesString(@Nullable java.util.List<VpnInstanceNames> vpnInstanceList)
static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VpnToDpnList>
getVpnToDpnListIdentifier(java.lang.String rd, org.opendaylight.yangtools.yang.common.Uint64 dpnId)
static boolean
isSubnetPartOfVpn(Subnetmap sn, java.lang.String vpnName)
static <T extends org.opendaylight.yangtools.yang.binding.DataObject>
com.google.common.base.Optional<T>read(org.opendaylight.controller.md.sal.binding.api.DataBroker broker, org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType datastoreType, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path)
static void
removeVpnInterfaceVpnInstanceNamesFromList(java.lang.String vpnName, java.util.List<VpnInstanceNames> vpnInstanceList)
-
-
-
Method Detail
-
getVpnInstance
public static @Nullable VpnInstance getVpnInstance(org.opendaylight.controller.md.sal.binding.api.DataBroker broker, java.lang.String vpnInstanceName)
-
read
public static <T extends org.opendaylight.yangtools.yang.binding.DataObject> com.google.common.base.Optional<T> read(org.opendaylight.controller.md.sal.binding.api.DataBroker broker, org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType datastoreType, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path)
-
getAllVpnInstances
public static java.util.List<VpnInstance> getAllVpnInstances(org.opendaylight.controller.md.sal.binding.api.DataBroker broker)
-
getVpnId
public static long getVpnId(org.opendaylight.controller.md.sal.binding.api.DataBroker broker, java.lang.String vpnName)
Retrieves the dataplane identifier of a specific VPN, searching by its VpnInstance name.- Parameters:
broker
- dataBroker service referencevpnName
- Name of the VPN- Returns:
- the dataplane identifier of the VPN, the VrfTag.
-
getVpnInterface
public static @Nullable VpnInterface getVpnInterface(org.opendaylight.controller.md.sal.binding.api.DataBroker broker, java.lang.String vpnInterfaceName)
-
getFirstVpnNameFromVpnInterface
public static @Nullable java.lang.String getFirstVpnNameFromVpnInterface(VpnInterface original)
-
getVpnInterfaceVpnInstanceNamesString
public static @NonNull java.util.List<java.lang.String> getVpnInterfaceVpnInstanceNamesString(@Nullable java.util.List<VpnInstanceNames> vpnInstanceList)
-
getVpnInterfaceVpnInstanceNames
public static VpnInstanceNames getVpnInterfaceVpnInstanceNames(java.lang.String vpnName, VpnInstanceNames.AssociatedSubnetType subnetType)
-
removeVpnInterfaceVpnInstanceNamesFromList
public static void removeVpnInterfaceVpnInstanceNamesFromList(java.lang.String vpnName, java.util.List<VpnInstanceNames> vpnInstanceList)
-
doesVpnInterfaceBelongToVpnInstance
public static boolean doesVpnInterfaceBelongToVpnInstance(java.lang.String vpnName, java.util.List<VpnInstanceNames> vpnInstanceList)
-
isSubnetPartOfVpn
public static boolean isSubnetPartOfVpn(Subnetmap sn, java.lang.String vpnName)
-
getSubnetmapFromItsUuid
public static @Nullable Subnetmap getSubnetmapFromItsUuid(org.opendaylight.controller.md.sal.binding.api.DataBroker broker, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid subnetUuid)
Get Subnetmap from its Uuid.- Parameters:
broker
- the data broker for look for datasubnetUuid
- the subnet's Uuid- Returns:
- the Subnetmap of Uuid or null if it is not found
-
getVpnToDpnListIdentifier
public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VpnToDpnList> getVpnToDpnListIdentifier(java.lang.String rd, org.opendaylight.yangtools.yang.common.Uint64 dpnId)
-
-