Class BgpUtil

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    @Singleton
    public class BgpUtil
    extends java.lang.Object
    implements java.lang.AutoCloseable
    • Constructor Detail

      • BgpUtil

        @Inject
        public BgpUtil​(org.opendaylight.mdsal.binding.api.DataBroker dataBroker,
                       IFibManager fibManager)
    • Method Detail

      • init

        @PostConstruct
        public void init()
      • close

        @PreDestroy
        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
      • getAFItranslatedfromPrefix

        public static int getAFItranslatedfromPrefix​(java.lang.String argPrefix)
        get a translation from prefix ipv6 to afi
        . "ffff::1/128" sets afi as 2 because is an IPv6 value
        Parameters:
        argPrefix - ip address as ipv4 or ipv6
        Returns:
        afi 1 for AFI_IP 2 for AFI_IPV6
      • update

        public <T extends org.opendaylight.yangtools.yang.binding.DataObject> void update​(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path,
                                                                                          T data)
      • write

        public <T extends org.opendaylight.yangtools.yang.binding.DataObject> void write​(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path,
                                                                                         T data)
      • delete

        public <T extends org.opendaylight.yangtools.yang.binding.DataObject> void delete​(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path)
      • convertToThriftEncapType

        public static encap_type convertToThriftEncapType​(EncapType encapType)
      • getVpnInstanceOpDataIdentifier

        public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VpnInstanceOpDataEntry> getVpnInstanceOpDataIdentifier​(java.lang.String rd)
      • addTepToElanInstance

        public void addTepToElanInstance​(java.lang.String rd,
                                         java.lang.String tepIp)
      • deleteTepFromElanInstance

        public void deleteTepFromElanInstance​(java.lang.String rd,
                                              java.lang.String tepIp)
      • getVpnNameFromRd

        public java.lang.String getVpnNameFromRd​(java.lang.String rd)
      • getVrfFromRd

        public Vrfs getVrfFromRd​(java.lang.String rd)
        get the vrf with the RouterDistinguisher pass in param.
        Parameters:
        rd - is the RouteDistinguisher of vrf
        Returns:
        the vrf of rd or null if no exist
      • getLayerType

        public static LayerType getLayerType​(AddressFamiliesVrf adf)
        get layerType used from an AddressFamiliesVrf.
        Parameters:
        adf - is the AddressFamiliesVrf from which the layer is asked.
        Returns:
        the layerType to reach from the argument addressFamilyVrf or null if not found
      • removeVrfEntry

        public void removeVrfEntry​(java.lang.String rd,
                                   VrfEntry vrfEntry)
      • enableBfdFlag

        public void enableBfdFlag()
      • disableBfdFlag

        public void disableBfdFlag()
      • isBfdEnabled

        public boolean isBfdEnabled()
      • getBfdConfig

        public BfdConfig getBfdConfig()
      • getDcgwTepConfig

        public DcgwTepList getDcgwTepConfig()
      • getDcgwTepConfig

        public java.util.List<java.lang.String> getDcgwTepConfig​(java.lang.String dcgwIp)
      • getDpnTEPsInfos

        public static java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.dpn.endpoints.DPNTEPsInfo> getDpnTEPsInfos​(org.opendaylight.mdsal.binding.api.DataBroker dataBroker)
      • removeOrUpdateLBGroups

        public void removeOrUpdateLBGroups​(java.lang.String tepIp,
                                           int addRemoveOrUpdate)