Class VpnHelper


  • public final class VpnHelper
    extends java.lang.Object
    • Method Detail

      • getVpnInstance

        public static @Nullable VpnInstance getVpnInstance​(org.opendaylight.mdsal.binding.api.DataBroker broker,
                                                           java.lang.String vpnInstanceName)
      • read

        public static <T extends org.opendaylight.yangtools.yang.binding.DataObject> java.util.Optional<T> read​(org.opendaylight.mdsal.binding.api.DataBroker broker,
                                                                                                                org.opendaylight.mdsal.common.api.LogicalDatastoreType datastoreType,
                                                                                                                org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path)
      • getAllVpnInstances

        public static java.util.List<VpnInstance> getAllVpnInstances​(org.opendaylight.mdsal.binding.api.DataBroker broker)
      • getVpnId

        public static long getVpnId​(org.opendaylight.mdsal.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 reference
        vpnName - Name of the VPN
        Returns:
        the dataplane identifier of the VPN, the VrfTag.
      • getVpnInterface

        public static @Nullable VpnInterface getVpnInterface​(org.opendaylight.mdsal.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)
      • 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.mdsal.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 data
        subnetUuid - 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)