Search in sources :

Example 1 with TzMembershipBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.dpn.endpoints.dpn.teps.info.tunnel.end.points.TzMembershipBuilder in project genius by opendaylight.

the class ItmUtils method removeTransportZoneMembership.

public static List<TzMembership> removeTransportZoneMembership(TunnelEndPoints endPts, List<TzMembership> zones) {
    LOG.trace(" RemoveTransportZoneMembership TEPs {}, Membership to be removed {} ", endPts, zones);
    List<TzMembership> existingTzList = new ArrayList<>(endPts.getTzMembership());
    for (TzMembership membership : zones) {
        existingTzList.remove(new TzMembershipBuilder().setZoneName(membership.getZoneName()).build());
    }
    LOG.debug("Modified Membership List {}", existingTzList);
    return existingTzList;
}
Also used : ArrayList(java.util.ArrayList) TzMembershipBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.dpn.endpoints.dpn.teps.info.tunnel.end.points.TzMembershipBuilder) TzMembership(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.dpn.endpoints.dpn.teps.info.tunnel.end.points.TzMembership)

Example 2 with TzMembershipBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.dpn.endpoints.dpn.teps.info.tunnel.end.points.TzMembershipBuilder in project genius by opendaylight.

the class ItmUtils method createTransportZoneMembership.

public static List<TzMembership> createTransportZoneMembership(String zoneName) {
    List<TzMembership> zones = new ArrayList<>();
    zones.add(new TzMembershipBuilder().setZoneName(zoneName).build());
    return zones;
}
Also used : ArrayList(java.util.ArrayList) TzMembershipBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.dpn.endpoints.dpn.teps.info.tunnel.end.points.TzMembershipBuilder) TzMembership(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.dpn.endpoints.dpn.teps.info.tunnel.end.points.TzMembership)

Aggregations

ArrayList (java.util.ArrayList)2 TzMembership (org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.dpn.endpoints.dpn.teps.info.tunnel.end.points.TzMembership)2 TzMembershipBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.dpn.endpoints.dpn.teps.info.tunnel.end.points.TzMembershipBuilder)2