<bundle>mvn:org.opendaylight.controller/shutdown-api/${project.version}</bundle>
<bundle>mvn:org.opendaylight.controller/shutdown-impl/${project.version}</bundle>
<bundle>mvn:org.osgi/org.osgi.core/${osgi.core.version}</bundle>
- <bundle>wrap:mvn:com.google.guava/guava/${guava.version}</bundle>
+ <bundle>mvn:com.google.guava/guava/${guava.version}</bundle>
<bundle>mvn:org.javassist/javassist/${javassist.version}</bundle>
</feature>
<feature name='odl-config-manager' version='${project.version}'>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>commons.opendaylight</artifactId>
+ <version>1.4.2-SNAPSHOT</version>
+ <relativePath>../../opendaylight/commons/opendaylight</relativePath>
+ </parent>
+ <artifactId>features-nsf</artifactId>
+ <packaging>pom</packaging>
+ <name>OpenDaylight :: Features :: Network Service Functions</name>
+ <description>Feature for Network Service Functions</description>
+ <properties>
+ <features.file>features.xml</features.file>
+ </properties>
+ <build>
+ <resources>
+ <resource>
+ <filtering>true</filtering>
+ <directory>src/main/resources</directory>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>filter</id>
+ <goals>
+ <goal>resources</goal>
+ </goals>
+ <phase>generate-resources</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${project.build.directory}/classes/${features.file}</file>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<features name="nsf-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
+ <feature name="odl-nsf-all" description="OpenDaylight :: NSF :: All Network Service Functions" version="${project.version}">
+ <feature version="${sal.version}">odl-adsal-all</feature>
+ <feature version="${project.version}">odl-nsf-managers</feature>
+ <feature version="${project.version}">odl-adsal-northbound</feature>
+ <!--
+ TODO : Resolve this in a follow-up commit
+ <feature>odl-controller-web</feature>
+ -->
+ </feature>
+
+ <feature name="odl-nsf-managers" description="OpenDaylight :: AD-SAL :: Network Service Functions" version="${project.version}">
+ <feature version="${project.version}">base-all</feature>
+ <feature version="${sal.version}">odl-adsal-all</feature>
+ <bundle>mvn:org.opendaylight.controller/usermanager/${usermanager.version}</bundle>
+ <bundle>mvn:org.opendaylight.controller/usermanager.implementation/${usermanager.version}</bundle>
+
+ <bundle>mvn:org.opendaylight.controller/appauth/${appauth.version}</bundle>
+
+ <bundle>mvn:org.opendaylight.controller/connectionmanager/${connectionmanager.version}</bundle>
+ <bundle>mvn:org.opendaylight.controller/connectionmanager.implementation/${connectionmanager.version}</bundle>
+
+ <bundle>mvn:org.opendaylight.controller/containermanager/${containermanager.version}</bundle>
+ <bundle>mvn:org.opendaylight.controller/containermanager.implementation/${containermanager.version}</bundle>
+
+ <bundle>mvn:org.opendaylight.controller/statisticsmanager/${statisticsmanager.version}</bundle>
+ <bundle>mvn:org.opendaylight.controller/statisticsmanager.implementation/${statisticsmanager.implementation.version}</bundle>
+
+ <bundle>mvn:org.opendaylight.controller/switchmanager/${switchmanager.api.version}</bundle>
+ <bundle>mvn:org.opendaylight.controller/switchmanager.implementation/${switchmanager.implementation.version}</bundle>
+
+ <bundle>mvn:org.opendaylight.controller/forwardingrulesmanager/${forwardingrulesmanager.version}</bundle>
+ <bundle>mvn:org.opendaylight.controller/forwardingrulesmanager.implementation/${forwardingrulesmanager.implementation.version}</bundle>
+
+ <bundle>mvn:org.opendaylight.controller/topologymanager/${topologymanager.version}</bundle>
+
+ <bundle>mvn:org.opendaylight.controller/networkconfig.neutron/${networkconfig.neutron.version}</bundle>
+ <bundle>mvn:org.opendaylight.controller/networkconfig.neutron.implementation/${networkconfig.neutron.implementation.version}</bundle>
+
+ <bundle>mvn:org.opendaylight.controller/hosttracker/${hosttracker.api.version}</bundle>
+ <bundle>mvn:org.opendaylight.controller/hosttracker.implementation/${hosttracker.implementation.version}</bundle>
+
+ <bundle>mvn:org.opendaylight.controller/forwarding.staticrouting</bundle>
+
+ <bundle>mvn:org.opendaylight.controller.thirdparty/net.sf.jung2/2.0.1</bundle>
+ <bundle>mvn:org.opendaylight.controller/routing.dijkstra_implementation</bundle>
+ </feature>
+
+ <feature name="odl-adsal-northbound" description="OpenDaylight :: AD-SAL :: Northbound APIs" version="${project.version}">
+ <feature version="${project.version}">base-all</feature>
+ <feature version="${project.version}">odl-nsf-managers</feature>
+ <bundle start-level="35">mvn:org.ow2.asm/asm-all/${asm.version}</bundle>
+ <!--
+ TODO : Resolve these in a follow-up commit
+ <bundle>mvn:org.opendaylight.controller/httpservice-bridge/${httpservice-bridge.northbound.version}</bundle>
+ <bundle>mvn:org.opendaylight.controller/jolokia-bridge/${jolokia-bridge.version}</bundle>
+ -->
+ <bundle>mvn:org.opendaylight.controller/bundlescanner/${bundlescanner.api.version}</bundle>
+ <bundle>mvn:org.opendaylight.controller/bundlescanner.implementation/${bundlescanner.implementation.version}</bundle>
+ <bundle>mvn:org.opendaylight.controller/commons.northbound/${northbound.commons.version}</bundle>
+ <bundle>mvn:org.opendaylight.controller/flowprogrammer.northbound/${flowprogrammer.northbound.version}</bundle>
+ <bundle>mvn:org.opendaylight.controller/hosttracker.northbound/${hosttracker.northbound.version}</bundle>
+ <bundle>mvn:org.opendaylight.controller/networkconfig.bridgedomain.northbound/${networkconfig.bridgedomain.northbound.version}</bundle>
+ <bundle>mvn:org.opendaylight.controller/networkconfig.neutron.northbound/${networkconfig.neutron.northbound.version}</bundle>
+ <bundle>mvn:org.opendaylight.controller/forwarding.staticrouting.northbound/${forwarding.staticrouting.northbound.version}</bundle>
+ <bundle>mvn:org.opendaylight.controller/statistics.northbound/${statistics.northbound.version}</bundle>
+ <bundle>mvn:org.opendaylight.controller/subnets.northbound/${subnets.northbound.version}</bundle>
+ <bundle>mvn:org.opendaylight.controller/switchmanager.northbound/${switchmanager.northbound.version}</bundle>
+ <bundle>mvn:org.opendaylight.controller/topology.northbound/${topology.northbound.version}</bundle>
+ <bundle>mvn:org.opendaylight.controller/usermanager.northbound/${usermanager.northbound.version}</bundle>
+ </feature>
+</features>
\ No newline at end of file
<maven>3.0</maven>
</prerequisites>
<modules>
+ <module>base</module>
+ <module>controller</module>
+ <module>adsal</module>
+ <module>nsf</module>
+ <module>extras</module>
<module>config</module>
<module>config-persister</module>
<module>config-netty</module>
<type>xml</type>
<scope>runtime</scope>
</dependency>
+
+ <!-- AD-SAL Related Features -->
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>features-adsal</artifactId>
<type>xml</type>
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>features-nsf</artifactId>
+ <version>${project.version}</version>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!-- MD-SAL Related Features -->
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>mdsal-features</artifactId>
grouping flow-statistics {
container flow-statistics {
//config "false";
- uses flow-types:flow;
uses stat-types:generic-statistics;
}
}
FlowBuilder builder = new FlowBuilder()
.setKey(FLOW_KEY)
.addAugmentation(FlowStatisticsData.class,new FlowStatisticsDataBuilder()
- .setFlowStatistics(new FlowStatisticsBuilder()
- .setBarrier(true)
- .setMatch(new MatchBuilder()
- .build())
- .build())
+ .setFlowStatistics(new FlowStatisticsBuilder().build())
.build())
- ;//.build();
+ .setBarrier(true)
+ .setMatch(new MatchBuilder()
+ .build())
+ ;
return builder.build();
}
import org.opendaylight.controller.md.sal.dom.api.DOMDataReadTransaction;
import org.opendaylight.controller.md.sal.dom.xsql.jdbc.JDBCResultSet;
import org.opendaylight.controller.md.sal.dom.xsql.jdbc.JDBCServer;
-import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.model.api.Module;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.opendaylight.yangtools.yang.model.api.SchemaContextListener;
synchronized (XSQLAdapter.class) {
if (l == null) {
l = new PrintStream(
- new FileOutputStream("/tmp/xql.log"));
+ new FileOutputStream("/tmp/xql.log"));
}
}
}
synchronized (XSQLAdapter.class) {
if (l == null) {
l = new PrintStream(
- new FileOutputStream("/tmp/xql.log"));
+ new FileOutputStream("/tmp/xql.log"));
}
}
}
if (table.getParent().isModule()) {
try {
List<Object> result = new LinkedList<Object>();
- InstanceIdentifier instanceIdentifier =
- InstanceIdentifier.builder()
+ YangInstanceIdentifier instanceIdentifier = YangInstanceIdentifier
+ .builder()
.node(XSQLODLUtils.getPath(table.getODLNode()).get(0))
.toInstance();
- DOMDataReadTransaction t = this.domDataBroker.newReadOnlyTransaction();
- Object node =
- t.read(LogicalDatastoreType.OPERATIONAL, instanceIdentifier)
- .get();
+ DOMDataReadTransaction t = this.domDataBroker
+ .newReadOnlyTransaction();
+ Object node = t.read(LogicalDatastoreType.OPERATIONAL,
+ instanceIdentifier).get();
node = XSQLODLUtils.get(node, "reference");
if (node == null) {
return result;
}
- //XSQLAdapter.log(""+node);
+ // XSQLAdapter.log(""+node);
Map<?, ?> children = XSQLODLUtils.getChildren(node);
for (Object c : children.values()) {
Map<?, ?> sons = XSQLODLUtils.getChildren(c);
List<NETask> tasks = new LinkedList<XSQLAdapter.NETask>();
for (Object entry : roots) {
- NETask task = new NETask(rs, entry, main,bluePrint);
+ NETask task = new NETask(rs, entry, main, bluePrint);
rs.numberOfTasks++;
tasks.add(task);
}
}
protected void processCommand(StringBuffer inputString, PrintStream sout,
- TelnetConnection tc) {
+ TelnetConnection tc) {
if (inputString.toString().trim().equals("r")) {
sout.println(lastInputString);
inputString = lastInputString;
if (input.startsWith("setExcel")) {
String substr = input.substring("setExcel".length()).trim();
if (!substr.equals("")) {
- //excelPath01 = substr;
+ // excelPath01 = substr;
}
- //sout.println("Excel Path="+excelPath01);
+ // sout.println("Excel Path="+excelPath01);
} else if (input.startsWith("list vrel")) {
String substr = input.substring("list vrel".length()).trim();
- XSQLBluePrintNode node = bluePrint.getBluePrintNodeByTableName(substr);
+ XSQLBluePrintNode node = bluePrint
+ .getBluePrintNodeByTableName(substr);
if (node == null) {
sout.println("Unknown Interface " + substr);
return;
}
} else if (input.startsWith("list vfields")) {
String substr = input.substring("list vfields".length()).trim();
- XSQLBluePrintNode node = bluePrint.getBluePrintNodeByTableName(substr);
+ XSQLBluePrintNode node = bluePrint
+ .getBluePrintNodeByTableName(substr);
if (node == null) {
sout.println("Unknown Interface " + substr);
return;
jdbcServer.connectToClient(addr);
sout.println("Connected To " + addr);
} else if (input.startsWith("fetch")) {
- //fetchSize = Integer.parseInt(input.substring(6).trim());
+ // fetchSize = Integer.parseInt(input.substring(6).trim());
} else if (input.startsWith("list vtables")) {
- String iNames[] =
- bluePrint.getAllTableNames().toArray(new String[0]);
+ String iNames[] = bluePrint.getAllTableNames().toArray(
+ new String[0]);
Arrays.sort(iNames);
sout.println();
for (int i = 0; i < iNames.length; i++) {
sout.println(s);
}
} else if (input.equals("help") || input.equals("?")) {
- //sout.println(getLongDescription());
+ // sout.println(getLongDescription());
} else if (input.equals("avmdata")) {
try {
- //myConnection.getManagedData();
+ // myConnection.getManagedData();
} catch (Exception err) {
}
} else if (input.equals("innerjoin")) {
- //innerJoin = !innerJoin;
- //sout.println("Inner Join set to "+innerJoin);
+ // innerJoin = !innerJoin;
+ // sout.println("Inner Join set to "+innerJoin);
} else if (input.equals("exit")) {
try {
sout.close();
if (toCsv) {
if (exportToFileName != null) {
try {
- PrintStream o =
- new PrintStream(new File(exportToFileName));
+ PrintStream o = new PrintStream(new File(
+ exportToFileName));
executeSql(inputString.toString(), o);
o.close();
} catch (Exception err) {
}
} else {
try {
- String fName =
- "export-" + System.currentTimeMillis() + ".csv";
+ String fName = "export-" + System.currentTimeMillis()
+ + ".csv";
PrintStream o = new PrintStream(new File(fName));
executeSql(inputString.toString(), o);
o.close();
}
}
-
if (!toCsv) {
out.print("|");
}
out.print(" ");
}
-
if (loc > 0) {
if (toCsv) {
out.print("\",\"");
}
}
-
public static class NETask implements Runnable {
private JDBCResultSet rs = null;
private XSQLBluePrintNode main = null;
private XSQLBluePrint bluePrint = null;
- public NETask(JDBCResultSet _rs, Object _modelRoot,XSQLBluePrintNode _main,XSQLBluePrint _bluePrint) {
+ public NETask(JDBCResultSet _rs, Object _modelRoot,
+ XSQLBluePrintNode _main, XSQLBluePrint _bluePrint) {
this.rs = _rs;
this.modelRoot = _modelRoot;
this.main = _main;
}
public void run() {
- rs.addRecords(modelRoot, main, true, main.getBluePrintNodeName(),bluePrint);
+ rs.addRecords(modelRoot, main, true, main.getBluePrintNodeName(),
+ bluePrint);
synchronized (rs) {
rs.numberOfTasks--;
if (rs.numberOfTasks == 0) {
}
}
-
private static class NEEntry {
private Object ne = null;
}
}
-
private class TelnetConnection extends Thread {
private Socket socket = null;
package org.opendaylight.controller.md.sal.dom.xsql;
import java.lang.reflect.Field;
+import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
import org.opendaylight.yangtools.yang.model.api.DataNodeContainer;
import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
import org.opendaylight.yangtools.yang.model.api.ListSchemaNode;
}
private static void collectODL(XSQLBluePrint bluePrint,
- XSQLBluePrintNode parent, Set<DataSchemaNode> nodes, int level) {
+ XSQLBluePrintNode parent, Collection<DataSchemaNode> nodes, int level) {
if (nodes == null) {
return;
}
protected FlowStatsEntry updateSingleStat(final DataModificationTransaction trans, final FlowAndStatisticsMapList map) {
short tableId = map.getTableId();
- FlowBuilder flowBuilder = new FlowBuilder();
-
FlowStatisticsDataBuilder flowStatisticsData = new FlowStatisticsDataBuilder();
- FlowBuilder flow = new FlowBuilder();
- flow.setContainerName(map.getContainerName());
- flow.setBufferId(map.getBufferId());
- flow.setCookie(map.getCookie());
- flow.setCookieMask(map.getCookieMask());
- flow.setFlags(map.getFlags());
- flow.setFlowName(map.getFlowName());
- flow.setHardTimeout(map.getHardTimeout());
- if(map.getFlowId() != null)
+ FlowBuilder flow = new FlowBuilder(map);
+ if(map.getFlowId() != null) {
flow.setId(new FlowId(map.getFlowId().getValue()));
- flow.setIdleTimeout(map.getIdleTimeout());
- flow.setInstallHw(map.isInstallHw());
- flow.setInstructions(map.getInstructions());
- if(map.getFlowId()!= null)
+ }
+ if(map.getFlowId()!= null) {
flow.setKey(new FlowKey(new FlowId(map.getKey().getFlowId().getValue())));
- flow.setMatch(map.getMatch());
- flow.setOutGroup(map.getOutGroup());
- flow.setOutPort(map.getOutPort());
- flow.setPriority(map.getPriority());
- flow.setStrict(map.isStrict());
- flow.setTableId(tableId);
+ }
Flow flowRule = flow.build();
flowStatistics.setByteCount(flowStats.getByteCount());
flowStatistics.setPacketCount(flowStats.getPacketCount());
flowStatistics.setDuration(flowStats.getDuration());
- flowStatistics.setContainerName(map.getContainerName());
- flowStatistics.setBufferId(map.getBufferId());
- flowStatistics.setCookie(map.getCookie());
- flowStatistics.setCookieMask(map.getCookieMask());
- flowStatistics.setFlags(map.getFlags());
- flowStatistics.setFlowName(map.getFlowName());
- flowStatistics.setHardTimeout(map.getHardTimeout());
- flowStatistics.setIdleTimeout(map.getIdleTimeout());
- flowStatistics.setInstallHw(map.isInstallHw());
- flowStatistics.setInstructions(map.getInstructions());
- flowStatistics.setMatch(map.getMatch());
- flowStatistics.setOutGroup(map.getOutGroup());
- flowStatistics.setOutPort(map.getOutPort());
- flowStatistics.setPriority(map.getPriority());
- flowStatistics.setStrict(map.isStrict());
- flowStatistics.setTableId(tableId);
flowStatisticsData.setFlowStatistics(flowStatistics.build());
.augmentation(FlowCapableNode.class)
.child(Table.class, new TableKey(tableId))
.child(Flow.class,existingFlow.getKey()).toInstance();
- flowBuilder.setKey(existingFlow.getKey());
- flowBuilder.addAugmentation(FlowStatisticsData.class, flowStatisticsData.build());
+ flow.setKey(existingFlow.getKey());
+ flow.addAugmentation(FlowStatisticsData.class, flowStatisticsData.build());
logger.debug("Found matching flow in the datastore, augmenting statistics");
// Update entry with timestamp of latest response
- flow.setKey(existingFlow.getKey());
FlowStatsEntry flowStatsEntry = new FlowStatsEntry(tableId,flow.build());
- trans.putOperationalData(flowRef, flowBuilder.build());
+ trans.putOperationalData(flowRef, flow.build());
return flowStatsEntry;
}
}
.augmentation(FlowCapableNode.class)
.child(Table.class, new TableKey(tableId))
.child(Flow.class,existingFlow.getKey()).toInstance();
- flowBuilder.setKey(existingFlow.getKey());
- flowBuilder.addAugmentation(FlowStatisticsData.class, flowStatisticsData.build());
+ flow.setKey(existingFlow.getKey());
+ flow.addAugmentation(FlowStatisticsData.class, flowStatisticsData.build());
logger.debug("Found matching unaccounted flow in the operational datastore, augmenting statistics");
// Update entry with timestamp of latest response
- flow.setKey(existingFlow.getKey());
FlowStatsEntry flowStatsEntry = new FlowStatsEntry(tableId,flow.build());
- trans.putOperationalData(flowRef, flowBuilder.build());
+ trans.putOperationalData(flowRef, flow.build());
return flowStatsEntry;
}
}
InstanceIdentifier<Flow> flowRef = getNodeIdentifierBuilder().augmentation(FlowCapableNode.class)
.child(Table.class, new TableKey(tableId))
.child(Flow.class,newFlowKey).toInstance();
- flowBuilder.setKey(newFlowKey);
- flowBuilder.addAugmentation(FlowStatisticsData.class, flowStatisticsData.build());
+ flow.setKey(newFlowKey);
+ flow.addAugmentation(FlowStatisticsData.class, flowStatisticsData.build());
logger.debug("Flow {} is not present in config data store, augmenting statistics as an unaccounted flow",
- flowBuilder.build());
+ flow.build());
// Update entry with timestamp of latest response
flow.setKey(newFlowKey);
FlowStatsEntry flowStatsEntry = new FlowStatsEntry(tableId,flow.build());
- trans.putOperationalData(flowRef, flowBuilder.build());
+ trans.putOperationalData(flowRef, flow.build());
return flowStatsEntry;
}
<module>opendaylight/commons/filter-valve</module>
<!-- Karaf Distribution -->
- <module>features/base</module>
- <module>features/controller</module>
- <module>features/adsal</module>
- <module>features/extras</module>
<module>opendaylight/dummy-console</module>
<module>opendaylight/karaf-branding</module>
<module>opendaylight/distribution/opendaylight-karaf</module>