<artifactId>openflow-renderer</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>cli-renderer</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>nemo-ui</artifactId>
<classifier>external-resource</classifier>
<type>json</type>
</dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>cli-renderer</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>cli-renderer</artifactId>
+ <version>${project.version}</version>
+ <classifier>config</classifier>
+ <type>xml</type>
+ </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>nemo-ui</artifactId>
</feature>\r
<feature name='odl-nemo-cli-renderer' version='${project.version}' description='OpenDaylight :: NEMO :: CLI Renderer'>\r
<feature version='${project.version}'>odl-nemo-engine-rest</feature>\r
+ <bundle>mvn:org.opendaylight.nemo/cli-renderer/${project.version}</bundle>\r
+ <configfile finalname='etc/opendaylight/karaf/02-nemo-cli-renderer.xml'>mvn:org.opendaylight.nemo/cli-renderer/${project.version}/xml/config</configfile>\r
</feature>\r
<feature name='odl-nemo-engine-ui' version='${project.version}' description='OpenDaylight :: NEMO :: Engine :: UI'>\r
<feature version='${dlux.version}'>odl-dlux-core</feature>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (c) 2015 Huawei, Inc and others. All rights reserved.
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>config-parent</artifactId>
+ <version>0.4.0-SNAPSHOT</version>
+ <relativePath />
+ </parent>
+
+ <groupId>org.opendaylight.nemo</groupId>
+ <artifactId>cli-renderer</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>bundle</packaging>
+ <name>${project.artifactId}</name>
+
+ <properties>
+ <jacoco.version>0.7.2.201409121644</jacoco.version>
+ <sonar.jacoco.reportPath>target/code-coverage/jacoco.exec</sonar.jacoco.reportPath>
+ <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>nemo-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>nemo-impl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>${jacoco.version}</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-sources</goal>
+ </goals>
+ <configuration>
+ <yangFilesRootDir>src/main/yang</yangFilesRootDir>
+ <codeGenerators>
+ <generator>
+ <codeGeneratorClass>
+ org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl
+ </codeGeneratorClass>
+ <outputBaseDir>
+ ${salGeneratorPath}
+ </outputBaseDir>
+ </generator>
+ </codeGenerators>
+ <inspectDependencies>true</inspectDependencies>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>maven-sal-api-gen-plugin</artifactId>
+ <version>${yangtools.version}</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+ </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/etc/opendaylight/karaf/config.xml</file>
+ <type>xml</type>
+ <classifier>config</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>org.opendaylight.nemo.*</include>
+ </includes>
+ </configuration>
+ <executions>
+ <execution>
+ <id>pre-unit-test</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <configuration>
+ <destFile>${sonar.jacoco.reportPath}</destFile>
+ </configuration>
+ </execution>
+ <execution>
+ <id>post-unit-test</id>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <configuration>
+ <dataFile>${sonar.jacoco.reportPath}</dataFile>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <scm>
+ <connection>scm:git:ssh://git.opendaylight.org:29418/nemo.git</connection>
+ <developerConnection>scm:git:ssh://git.opendaylight.org:29418/nemo.git</developerConnection>
+ <url>https://wiki.opendaylight.org/view/NEMO:Main</url>
+ <tag>HEAD</tag>
+ </scm>
+</project>
\ No newline at end of file
--- /dev/null
+/*\r
+ * Copyright (c) 2015 Huawei, Inc. and others. All rights reserved.\r
+ *\r
+ * This program and the accompanying materials are made available under the\r
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
+ * and is available at http://www.eclipse.org/legal/epl-v10.html\r
+ */\r
+\r
+package org.opendaylight.nemo.renderer.cli;\r
+\r
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+\r
+/**\r
+ * NEMO renderer that uses CLI to implement an overlay network\r
+ * using traditional network devices.\r
+ *\r
+ * @author Zhigang Ji\r
+ */\r
+public class CliRenderer implements AutoCloseable {\r
+ private static final Logger LOG = LoggerFactory.getLogger(CliRenderer.class);\r
+\r
+ private final DataBroker dataBroker;\r
+\r
+ public CliRenderer(DataBroker dataBroker) {\r
+ super();\r
+\r
+ this.dataBroker = dataBroker;\r
+\r
+ LOG.info("Initialized the NEMO CLI renderer.");\r
+\r
+ return;\r
+ }\r
+\r
+ @Override\r
+ public void close() throws Exception {\r
+ // TODO\r
+ }\r
+}\r
--- /dev/null
+package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.nemo.cli.renderer.impl.rev151119;
+
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.nemo.renderer.cli.CliRenderer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class CliRendererModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.nemo.cli.renderer.impl.rev151119.AbstractCliRendererModule {
+ private static final Logger LOG = LoggerFactory.getLogger(CliRendererModule.class);
+
+ public CliRendererModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
+ super(identifier, dependencyResolver);
+ }
+
+ public CliRendererModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, CliRendererModule oldModule, AutoCloseable oldInstance) {
+ super(identifier, dependencyResolver, oldModule, oldInstance);
+ }
+
+ @Override
+ public void customValidation() {
+ // add custom validation form module attributes here.
+ }
+
+ @Override
+ public AutoCloseable createInstance() {
+ DataBroker dataBroker = getDataBrokerDependency();
+
+ // TODO
+
+ return new CliRenderer(dataBroker);
+ }
+
+}
--- /dev/null
+/*
+* Generated file
+*
+* Generated from: yang module name: cli-renderer-impl yang module local name: cli-renderer-impl
+* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
+* Generated at: Fri Nov 20 01:24:34 CST 2015
+*
+* Do not modify this file unless it is present under src/main directory
+*/
+package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.nemo.cli.renderer.impl.rev151119;
+public class CliRendererModuleFactory extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.nemo.cli.renderer.impl.rev151119.AbstractCliRendererModuleFactory {
+
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!--\r
+Copyright (c) 2015 Huawei, Inc and others. All rights reserved.\r
+This program and the accompanying materials are made available under the\r
+terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
+and is available at http://www.eclipse.org/legal/epl-v10.html\r
+-->\r
+<snapshot>\r
+ <configuration>\r
+ <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">\r
+ <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">\r
+ <module>\r
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:nemo:cli:renderer:impl">prefix:cli-renderer-impl</type>\r
+ <name>cli-renderer-impl</name>\r
+ <data-broker>\r
+ <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>\r
+ <name>binding-data-broker</name>\r
+ </data-broker>\r
+ <rpc-registry>\r
+ <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-rpc-registry</type>\r
+ <name>binding-rpc-broker</name>\r
+ </rpc-registry>\r
+ <notification-service>\r
+ <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-notification-service</type>\r
+ <name>binding-notification-broker</name>\r
+ </notification-service>\r
+ </module>\r
+ </modules>\r
+ </data>\r
+ </configuration>\r
+\r
+ <required-capabilities></required-capabilities>\r
+</snapshot>
\ No newline at end of file
--- /dev/null
+/*\r
+ * Copyright (c) 2015 Huawei, Inc. and others. All rights reserved.\r
+ *\r
+ * This program and the accompanying materials are made available under the\r
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
+ * and is available at http://www.eclipse.org/legal/epl-v10.html\r
+ */\r
+\r
+module cli-renderer-impl {\r
+ yang-version 1;\r
+\r
+ namespace "urn:opendaylight:params:xml:ns:yang:nemo:cli:renderer:impl";\r
+ prefix "cli-renderer-impl";\r
+\r
+ import config { prefix config; revision-date 2013-04-05; }\r
+ import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28; }\r
+\r
+ description\r
+ "This module contains the base YANG definitions for\r
+ NEMO CLI renderer implementation.";\r
+\r
+ revision "2015-11-19" {\r
+ description\r
+ "Initial revision.";\r
+ }\r
+\r
+ identity cli-renderer-impl {\r
+ base config:module-type;\r
+ config:java-name-prefix CliRenderer;\r
+ }\r
+\r
+ augment "/config:modules/config:module/config:configuration" {\r
+ case cli-renderer-impl {\r
+ when "/config:modules/config:module/config:type = 'cli-renderer-impl'";\r
+\r
+ container data-broker {\r
+ uses config:service-ref {\r
+ refine type {\r
+ mandatory false;\r
+ config:required-identity mdsal:binding-async-data-broker;\r
+ }\r
+ }\r
+ }\r
+ container rpc-registry {\r
+ uses config:service-ref {\r
+ refine type {\r
+ mandatory true;\r
+ config:required-identity mdsal:binding-rpc-registry;\r
+ }\r
+ }\r
+ }\r
+ container notification-service {\r
+ uses config:service-ref {\r
+ refine type {\r
+ mandatory true;\r
+ config:required-identity mdsal:binding-notification-service;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+}\r
--- /dev/null
+/*\r
+ * Copyright (c) 2015 Huawei, Inc. and others. All rights reserved.\r
+ *\r
+ * This program and the accompanying materials are made available under the\r
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
+ * and is available at http://www.eclipse.org/legal/epl-v10.html\r
+ */\r
+\r
+module cli-renderer {\r
+ yang-version 1;\r
+\r
+ namespace "urn:opendaylight:params:xml:ns:yang:nemo:cli:renderer";\r
+ prefix "cli-renderer";\r
+\r
+ description\r
+ "This module defines the NEMO CLI renderer model.";\r
+\r
+ revision "2015-11-19" {\r
+ description\r
+ "Initial revision.";\r
+ }\r
+}\r
<modules>
<module>openflow-renderer</module>
+ <module>cli-renderer</module>
</modules>
<scm>
<module>nemo-artifacts</module>
<module>nemo-api</module>
<module>nemo-impl</module>
- <module>nemo-renderers</module>
<module>nemo-ui</module>
<module>nemo-features</module>
<module>nemo-karaf</module>
+ <module>nemo-renderers</module>
</modules>
<url>https://wiki.opendaylight.org/view/NEMO:Main</url>