Search in sources :

Example 1 with ExternalTepsBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.elan.instance.ExternalTepsBuilder in project netvirt by opendaylight.

the class BgpUtil method addTepToElanInstance.

public void addTepToElanInstance(String rd, String tepIp) {
    if (rd == null || tepIp == null) {
        LOG.error("addTepToElanInstance : Null parameters returning");
        return;
    }
    String elanName = getElanNamefromRd(rd);
    if (elanName == null) {
        LOG.error("Elan null while processing RT2 for RD {}", rd);
        return;
    }
    LOG.debug("Adding tepIp {} to elan {}", tepIp, elanName);
    InstanceIdentifier<ExternalTeps> externalTepsId = getExternalTepsIdentifier(elanName, tepIp);
    ExternalTepsBuilder externalTepsBuilder = new ExternalTepsBuilder();
    ExternalTepsKey externalTepsKey = externalTepsId.firstKeyOf(ExternalTeps.class);
    externalTepsBuilder.setKey(externalTepsKey);
    externalTepsBuilder.setTepIp(externalTepsKey.getTepIp());
    update(externalTepsId, externalTepsBuilder.build());
}
Also used : ExternalTeps(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.elan.instance.ExternalTeps) ExternalTepsKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.elan.instance.ExternalTepsKey) ExternalTepsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.elan.instance.ExternalTepsBuilder)

Aggregations

ExternalTeps (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.elan.instance.ExternalTeps)1 ExternalTepsBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.elan.instance.ExternalTepsBuilder)1 ExternalTepsKey (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.elan.instance.ExternalTepsKey)1