import opendaylight-l2-types {prefix types;revision-date "2013-08-27";}
import opendaylight-match-types {prefix match-type;revision-date "2013-10-26";}
import opendaylight-table-types {prefix table-type;revision-date "2013-10-26";}
+ import opendaylight-action-types {prefix action-type;revision-date "2013-11-12";}
+
revision "2013-07-09" {
description "";
leaf egress {
type inv:node-connector-ref;
}
+ leaf buffer-id {
+ type uint32;
+ }
+
uses raw-packet;
+ uses action-type:action-list;
}
}
}
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>maven-sal-api-gen-plugin</artifactId>
- <version>${yang.codegen.version}</version>
+ <version>${yangtools.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-binding</artifactId>
- <version>${yang.codegen.version}</version>
+ <version>${yangtools.version}</version>
<type>jar</type>
</dependency>
</dependencies>
<relativePath>../commons/opendaylight</relativePath>
</parent>
- <groupId>org.opendaylight.controller</groupId>
<artifactId>sal-parent</artifactId>
<version>1.1-SNAPSHOT</version>
<packaging>pom</packaging>
<!-- Dependency Versions -->
<slf4j.version>1.7.2</slf4j.version>
- <yang.codegen.version>${yangtools.version}</yang.codegen.version>
<guava.version>14.0.1</guava.version>
<osgi.core.version>5.0.0</osgi.core.version>
<junit.version>4.8.1</junit.version>
return NOTIFICATION_EXECUTOR;
}
+ /**
+ * @deprecated This method is only used from configuration modules and thus callers of it
+ * should use service injection to make the executor configurable.
+ */
+ @Deprecated
public static synchronized final ListeningExecutorService getDefaultCommitExecutor() {
if (COMMIT_EXECUTOR == null) {
- COMMIT_EXECUTOR = createNamedExecutor("md-sal-binding-commit-%d");
+ ThreadFactory factory = new ThreadFactoryBuilder().setDaemon(true).setNameFormat("md-sal-binding-commit-%d").build();
+ /*
+ * FIXME: this used to be newCacheThreadPool(), but MD-SAL does not have transaction
+ * ordering guarantees, which means that using a concurrent threadpool results
+ * in application data being committed in random order, potentially resulting
+ * in inconsistent data being present. Once proper primitives are introduced,
+ * concurrency can be reintroduced.
+ */
+ ExecutorService executor = Executors.newSingleThreadExecutor(factory);
+ COMMIT_EXECUTOR = MoreExecutors.listeningDecorator(executor);
}
return COMMIT_EXECUTOR;
ThreadFactory factory = new ThreadFactoryBuilder().setDaemon(true).setNameFormat(format).build();
ExecutorService executor = Executors.newCachedThreadPool(factory);
return MoreExecutors.listeningDecorator(executor);
-
}
-
}
@Deprecated
void putRuntimeData(P path, D data);
+ /**
+ * Store a piece of data at specified path. This acts as a merge operation,
+ * which is to say that any pre-existing data which is not explicitly
+ * overwritten will be preserved. This means that if you store a container,
+ * its child lists will be merged. Performing the following put operations:
+ *
+ * 1) container { list [ a ] }
+ * 2) container { list [ b ] }
+ *
+ * will result in the following data being present:
+ *
+ * container { list [ a, b ] }
+ *
+ * This also means that storing the container will preserve any augmentations
+ * which have been attached to it.
+ *
+ * If you require an explicit replace operation, perform
+ * {@link removeOperationalData} first.
+ */
void putOperationalData(P path, D data);
+ /**
+ * Store a piece of data at specified path. This acts as a merge operation,
+ * which is to say that any pre-existing data which is not explicitly
+ * overwritten will be preserved. This means that if you store a container,
+ * its child lists will be merged. Performing the following put operations:
+ *
+ * 1) container { list [ a ] }
+ * 2) container { list [ b ] }
+ *
+ * will result in the following data being present:
+ *
+ * container { list [ a, b ] }
+ *
+ * This also means that storing the container will preserve any augmentations
+ * which have been attached to it.
+ *
+ * If you require an explicit replace operation, perform
+ * {@link removeConfigurationData} first.
+ */
void putConfigurationData(P path, D data);
/**
}
configurationUpdate.put(path, mergeConfigurationData(path,original, data));
- configurationRemove.remove(path);
}
@Override
operationalCreated.put(path, data);
}
operationalUpdate.put(path, mergeOperationalData(path,original,data));
- operationalRemove.remove(path);
}
@Override
def RpcResult<Void> finish(HashMapDataStoreTransaction transaction) {
val modification = transaction.modification;
- configuration.putAll(modification.updatedConfigurationData);
- operational.putAll(modification.updatedOperationalData);
-
for (removal : modification.removedConfigurationData) {
remove(configuration,removal);
}
for (removal : modification.removedOperationalData) {
remove(operational,removal);
}
+ configuration.putAll(modification.updatedConfigurationData);
+ operational.putAll(modification.updatedOperationalData);
+
return Rpcs.getRpcResult(true, null, Collections.emptySet);
}
if(node.keyDefinition === null || node.keyDefinition.empty) {
return modified;
- }
+ }
val originalMap = (original as List).toIndexMap(node.keyDefinition);
val modifiedMap = (modified as List).toIndexMap(node.keyDefinition);
if(originalEntry != null) {
originalMap.remove(entry.key);
mergedNodes.add(merge(node,originalEntry,entry.value,configurational));
-
+ } else {
+ mergedNodes.add(entry.value);
}
}
mergedNodes.addAll(originalMap.values);
import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
import org.opendaylight.yangtools.yang.model.api.UsesNode;
-import org.opendaylight.yangtools.yang.model.api.YangNode;
import static com.google.common.base.Preconditions.*;
public NetconfDataRootNode(SchemaContext schema) {
// TODO Auto-generated constructor stub
}
-
- public YangNode getParent() {
- // TODO Auto-generated method stub
- return null;
- }
@Override
public Set<TypeDefinition<?>> getTypeDefinitions() {
import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
import org.opendaylight.yangtools.yang.model.api.UsesNode;
-import org.opendaylight.yangtools.yang.model.api.YangNode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>maven-sal-api-gen-plugin</artifactId>
- <version>${yang.codegen.version}</version>
+ <version>${yangtools.version}</version>
<type>jar</type>
</dependency>
</dependencies>