use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.ClusterIdentifier in project bgpcep by opendaylight.
the class ExportAttributeTestUtil method createClusterIdInput.
private static ClusterId createClusterIdInput() {
final ClusterIdentifier cluster1 = new ClusterIdentifier(new Ipv4Address("1.1.1.1"));
final ClusterIdentifier cluster2 = new ClusterIdentifier(new Ipv4Address("1.1.1.2"));
return new ClusterIdBuilder().setCluster(Arrays.asList(cluster1, cluster2)).build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.ClusterIdentifier in project bgpcep by opendaylight.
the class SetClusterIdPrependHandler method prependClusterId.
private Attributes prependClusterId(final Attributes attributes, final ClusterIdentifier clusterId) {
final AttributesBuilder newAtt = new AttributesBuilder(attributes);
final List<ClusterIdentifier> newClusterList = new ArrayList<>();
newClusterList.add(clusterId);
if (attributes.getClusterId() != null && !attributes.getClusterId().getCluster().isEmpty()) {
final List<ClusterIdentifier> oldList = attributes.getClusterId().getCluster();
newClusterList.addAll(oldList);
}
return newAtt.setClusterId(new ClusterIdBuilder().setCluster(newClusterList).build()).build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.ClusterIdentifier in project bgpcep by opendaylight.
the class RibImpl method isGlobalEqual.
Boolean isGlobalEqual(final Global global) {
final List<AfiSafi> globalAfiSafi = getAfiSafiWithDefault(global.getAfiSafis(), true);
final Config globalConfig = global.getConfig();
final AsNumber globalAs = globalConfig.getAs();
final Ipv4Address globalRouterId = global.getConfig().getRouterId();
final ClusterIdentifier globalClusterId = getGlobalClusterIdentifier(globalConfig);
return this.afiSafi.containsAll(globalAfiSafi) && globalAfiSafi.containsAll(this.afiSafi) && globalAs.equals(this.asNumber) && globalRouterId.getValue().equals(this.routerId.getValue()) && globalClusterId.getValue().equals(this.clusterId.getValue());
}
Aggregations