use of org.opendaylight.yang.gen.v1.opendaylight.test.bug._2562.namespace.rev160101.Root in project xtext-eclipse by eclipse.
the class Bug377311TestLanguageSemanticSequencer method sequence.
@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
EPackage epackage = semanticObject.eClass().getEPackage();
ParserRule rule = context.getParserRule();
Action action = context.getAssignedAction();
Set<Parameter> parameters = context.getEnabledBooleanParameters();
if (epackage == Bug377311Package.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case Bug377311Package.CHILD:
sequence_Child(context, (Child) semanticObject);
return;
case Bug377311Package.ROOT:
sequence_Root(context, (Root) semanticObject);
return;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
use of org.opendaylight.yang.gen.v1.opendaylight.test.bug._2562.namespace.rev160101.Root in project netvirt by opendaylight.
the class ElanInterfaceManager method setupLeavesLocalBroadcastGroups.
private void setupLeavesLocalBroadcastGroups(ElanInstance elanInfo, DpnInterfaces newDpnInterface, InterfaceInfo interfaceInfo) {
EtreeInstance etreeInstance = elanInfo.getAugmentation(EtreeInstance.class);
if (etreeInstance != null) {
List<Bucket> listBucket = new ArrayList<>();
int bucketId = 0;
List<String> interfaces = new ArrayList<>();
if (newDpnInterface != null) {
interfaces = newDpnInterface.getInterfaces();
}
for (String ifName : interfaces) {
// In case if there is a InterfacePort in the cache which is not
// in
// operational state, skip processing it
InterfaceInfo ifInfo = interfaceManager.getInterfaceInfoFromOperationalDataStore(ifName, interfaceInfo.getInterfaceType());
if (!isOperational(ifInfo)) {
continue;
}
if (!interfaceManager.isExternalInterface(ifName)) {
// only add root interfaces
bucketId = addInterfaceIfRootInterface(bucketId, ifName, listBucket, ifInfo);
}
}
if (listBucket.isEmpty()) {
// No Buckets
createDropBucket(listBucket);
}
long etreeLeafTag = etreeInstance.getEtreeLeafTagVal().getValue();
long groupId = ElanUtils.getEtreeLeafLocalBCGId(etreeLeafTag);
Group group = MDSALUtil.buildGroup(groupId, elanInfo.getElanInstanceName(), GroupTypes.GroupAll, MDSALUtil.buildBucketLists(listBucket));
LOG.trace("installing the localBroadCast Group:{}", group);
mdsalManager.syncInstallGroup(interfaceInfo.getDpId(), group);
}
}
use of org.opendaylight.yang.gen.v1.opendaylight.test.bug._2562.namespace.rev160101.Root in project controller by opendaylight.
the class Bug2562DeserializedUnkeyedListTest method writeRoot.
private void writeRoot(final LogicalDatastoreType store) {
final ReadWriteTransaction readWriteTransaction = getDataBroker().newReadWriteTransaction();
final Barroot barRoot = new BarrootBuilder().setType(2).setValue(2).setKey(new BarrootKey(2)).build();
final ArrayList<Barroot> barRootList = new ArrayList<>();
barRootList.add(barRoot);
final Fooroot fooRoot = new FoorootBuilder().setBarroot(barRootList).build();
final ArrayList<Fooroot> fooRootList = new ArrayList<>();
fooRootList.add(fooRoot);
final Root root = new RootBuilder().setFooroot(fooRootList).build();
readWriteTransaction.put(store, ROOT_PATH, root);
assertCommit(readWriteTransaction.submit());
}
use of org.opendaylight.yang.gen.v1.opendaylight.test.bug._2562.namespace.rev160101.Root in project controller by opendaylight.
the class Bug3090MultiKeyList method write.
private void write(final LogicalDatastoreType store) {
final ReadWriteTransaction readWriteTransaction = getDataBroker().newReadWriteTransaction();
final List<ListInRoot> listInRoots = new ArrayList<>();
for (int i = 0; i < 10; i++) {
listInRoots.add(new ListInRootBuilder().setLeafA("leaf a" + i).setLeafC("leaf c" + i).setLeafB("leaf b" + i).build());
}
final Root root = new RootBuilder().setListInRoot(listInRoots).build();
readWriteTransaction.put(store, ROOT_PATH, root);
assertCommit(readWriteTransaction.submit());
}
use of org.opendaylight.yang.gen.v1.opendaylight.test.bug._2562.namespace.rev160101.Root in project bgpcep by opendaylight.
the class PCEPTunnelTopologyProvider method init.
synchronized void init() {
final WriteTransaction tx = this.dataBroker.newWriteOnlyTransaction();
tx.put(LogicalDatastoreType.OPERATIONAL, getTopologyReference().getInstanceIdentifier(), new TopologyBuilder().setTopologyId(this.tunneltopologyId).setTopologyTypes(new TopologyTypesBuilder().addAugmentation(TopologyTypes1.class, new TopologyTypes1Builder().setTopologyTunnelPcep(new TopologyTunnelPcepBuilder().build()).build()).build()).setNode(new ArrayList<>()).build(), true);
try {
tx.submit().get();
} catch (final InterruptedException | ExecutionException e) {
LOG.error("Failed to create Tunnel Topology root", e);
}
this.reg = this.ncl.getDataProvider().registerDataTreeChangeListener(new DataTreeIdentifier<>(LogicalDatastoreType.OPERATIONAL, this.src), this.ncl);
}
Aggregations