From c17c90641100deab3cd8b774e742032779e74592 Mon Sep 17 00:00:00 2001 From: Shixing Liu Date: Fri, 4 Dec 2015 18:24:51 +0800 Subject: [PATCH] Modify pom and features file for CLI renderer. Add some config files for CLI renderer. Change-Id: Ia3d9179f028796a7a49c082527dd8815246b05d6 Signed-off-by: Shixing Liu --- nemo-features/pom.xml | 28 ++ nemo-features/src/main/features/features.xml | 4 + nemo-renderers/cli-renderer/pom.xml | 55 ++++ .../opendaylight/karaf/external-resource.json | 32 ++ .../etc/opendaylight/karaf/host-resource.json | 3 + .../etc/opendaylight/karaf/link-resource.json | 141 ++++++++ .../etc/opendaylight/karaf/node-resource.json | 311 ++++++++++++++++++ 7 files changed, 574 insertions(+) create mode 100644 nemo-renderers/cli-renderer/src/main/resources/etc/opendaylight/karaf/external-resource.json create mode 100644 nemo-renderers/cli-renderer/src/main/resources/etc/opendaylight/karaf/host-resource.json create mode 100644 nemo-renderers/cli-renderer/src/main/resources/etc/opendaylight/karaf/link-resource.json create mode 100644 nemo-renderers/cli-renderer/src/main/resources/etc/opendaylight/karaf/node-resource.json diff --git a/nemo-features/pom.xml b/nemo-features/pom.xml index 44bd72b..99f119d 100644 --- a/nemo-features/pom.xml +++ b/nemo-features/pom.xml @@ -181,6 +181,34 @@ and is available at http://www.eclipse.org/legal/epl-v10.html config xml + + ${project.groupId} + cli-renderer + ${project.version} + node-resource + json + + + ${project.groupId} + cli-renderer + ${project.version} + host-resource + json + + + ${project.groupId} + cli-renderer + ${project.version} + link-resource + json + + + ${project.groupId} + cli-renderer + ${project.version} + external-resource + json + ${project.groupId} nemo-ui diff --git a/nemo-features/src/main/features/features.xml b/nemo-features/src/main/features/features.xml index f28721a..e81288b 100644 --- a/nemo-features/src/main/features/features.xml +++ b/nemo-features/src/main/features/features.xml @@ -45,6 +45,10 @@ and is available at http://www.eclipse.org/legal/epl-v10.html odl-nemo-engine-rest mvn:org.opendaylight.nemo/cli-renderer/${project.version} mvn:org.opendaylight.nemo/cli-renderer/${project.version}/xml/config + mvn:org.opendaylight.nemo/cli-renderer/${project.version}/json/node-resource + mvn:org.opendaylight.nemo/cli-renderer/${project.version}/json/link-resource + mvn:org.opendaylight.nemo/cli-renderer/${project.version}/json/host-resource + mvn:org.opendaylight.nemo/cli-renderer/${project.version}/json/external-resource odl-dlux-core diff --git a/nemo-renderers/cli-renderer/pom.xml b/nemo-renderers/cli-renderer/pom.xml index 9ec4d15..58579df 100644 --- a/nemo-renderers/cli-renderer/pom.xml +++ b/nemo-renderers/cli-renderer/pom.xml @@ -29,6 +29,11 @@ and is available at http://www.eclipse.org/legal/epl-v10.html + + org.jboss.netty + netty + 3.2.6.Final + ${project.groupId} nemo-api @@ -39,6 +44,22 @@ and is available at http://www.eclipse.org/legal/epl-v10.html nemo-impl ${project.version} + + com.fasterxml.jackson.core + jackson-core + + + com.fasterxml.jackson.core + jackson-databind + + + com.fasterxml.jackson.core + jackson-annotations + + + org.codehaus.jettison + jettison + junit junit @@ -66,6 +87,20 @@ and is available at http://www.eclipse.org/legal/epl-v10.html + + org.apache.felix + maven-bundle-plugin + + + + org.codehaus.jackson, + org.codehaus.jackson.*, + org.joda.time.* + + * + + + org.opendaylight.yangtools yang-maven-plugin @@ -116,6 +151,26 @@ and is available at http://www.eclipse.org/legal/epl-v10.html xml config + + ${project.build.directory}/classes/etc/opendaylight/karaf/node-resource.json + json + node-resource + + + ${project.build.directory}/classes/etc/opendaylight/karaf/host-resource.json + json + host-resource + + + ${project.build.directory}/classes/etc/opendaylight/karaf/link-resource.json + json + link-resource + + + ${project.build.directory}/classes/etc/opendaylight/karaf/external-resource.json + json + external-resource + diff --git a/nemo-renderers/cli-renderer/src/main/resources/etc/opendaylight/karaf/external-resource.json b/nemo-renderers/cli-renderer/src/main/resources/etc/opendaylight/karaf/external-resource.json new file mode 100644 index 0000000..5201bf3 --- /dev/null +++ b/nemo-renderers/cli-renderer/src/main/resources/etc/opendaylight/karaf/external-resource.json @@ -0,0 +1,32 @@ +{ + "external-network: [ + { + "node-id": "bank-branch1", + "access-node-id":"HW:NE40E:CE1", + "access-port-id":"HW:NE40E:CE1:GE1/0/0", + "layer":"3", + "protocol":"static", + "mac-address":"" + }, + { + "node-id": "bank-branch2", + "access-node-id":"HW:NE40E:CE2", + "access-port-id":"HW:NE40E:CE2:GE3/0/2", + "layer":"3", + "protocol":"static", + "mac-address":"" + }, + { + "node-id": "bank-DC", + "access-node-id":"HW:NE40E:CE3", + "access-port-id":"HW:NE40E:CE3:GE1/0/0", + "layer":"3", + "protocol":"static" + "mac-address":"" + } + ] +} + + + + diff --git a/nemo-renderers/cli-renderer/src/main/resources/etc/opendaylight/karaf/host-resource.json b/nemo-renderers/cli-renderer/src/main/resources/etc/opendaylight/karaf/host-resource.json new file mode 100644 index 0000000..a86a271 --- /dev/null +++ b/nemo-renderers/cli-renderer/src/main/resources/etc/opendaylight/karaf/host-resource.json @@ -0,0 +1,3 @@ +{ + "host":[] +} \ No newline at end of file diff --git a/nemo-renderers/cli-renderer/src/main/resources/etc/opendaylight/karaf/link-resource.json b/nemo-renderers/cli-renderer/src/main/resources/etc/opendaylight/karaf/link-resource.json new file mode 100644 index 0000000..5949908 --- /dev/null +++ b/nemo-renderers/cli-renderer/src/main/resources/etc/opendaylight/karaf/link-resource.json @@ -0,0 +1,141 @@ +{ + "link": [ + { + "link-id":"link_1", + "left-node-id":"HW:NE40E:CE1", + "left-port-id":"HW:NE40E:CE1:GE1/0/6", + "right-node-id":"HW:NE40E:PE1", + "right-port-id":"HW:NE40E:PE1:GE2/0/6", + "link-bandwidth":"10240", + "metric":"1", + "delay":"", + "loss-rate":"" + }, + { + "link-id":"link_2", + "left-node-id":"HW:NE40E:PE1", + "left-port-id":"HW:NE40E:PE1:GE2/0/6", + "right-node-id":"HW:NE40E:CE1", + "right-port-id":"HW:NE40E:CE1:GE1/0/6", + "link-bandwidth":"10240", + "metric":"1", + "delay":"", + "loss-rate":"" + }, + + { + "link-id":"link_3", + "left-node-id":"HW:NE40E:PE1", + "left-port-id":"HW:NE40E:PE1:GE2/0/7", + "right-node-id":"HW:NE40E:PE2", + "right-port-id":"HW:NE40E:PE2:GE3/0/2", + "link-bandwidth":"10240", + "metric":"1", + "delay":"", + "loss-rate":"" + }, + { + "link-id":"link_4", + "left-node-id":"HW:NE40E:PE2", + "left-port-id":"HW:NE40E:PE2:GE3/0/2", + "right-node-id":"HW:NE40E:PE1", + "right-port-id":"HW:NE40E:PE1:GE2/0/7", + "link-bandwidth":"10240", + "metric":"1", + "delay":"", + "loss-rate":"" + }, + + { + "link-id":"link_5", + "left-node-id":"HW:NE40E:PE1", + "left-port-id":"HW:NE40E:PE1:GE2/0/8", + "right-node-id":"HW:NE40E:PE3", + "right-port-id":"HW:NE40E:PE3:GE1/0/8", + "link-bandwidth":"10240", + "metric":"1", + "delay":"", + "loss-rate":"" + }, + { + "link-id":"link_6", + "left-node-id":"HW:NE40E:PE3", + "left-port-id":"HW:NE40E:PE3:GE1/0/8", + "right-node-id":"HW:NE40E:PE1", + "right-port-id":"HW:NE40E:PE1:GE2/0/8", + "link-bandwidth":"10240", + "metric":"1", + "delay":"", + "loss-rate":"" + }, + + { + "link-id":"link_7", + "left-node-id":"HW:NE40E:CE2", + "left-port-id":"HW:NE40E:CE2:GE3/0/3", + "right-node-id":"HW:NE40E:PE2", + "right-port-id":"HW:NE40E:PE2:GE3/0/3", + "link-bandwidth":"10240", + "metric":"1", + "delay":"", + "loss-rate":"" + }, + { + "link-id":"link_8", + "left-node-id":"HW:NE40E:PE2", + "left-port-id":"HW:NE40E:PE2:GE3/0/3", + "right-node-id":"HW:NE40E:CE2", + "right-port-id":"HW:NE40E:CE2:GE3/0/3", + "link-bandwidth":"10240", + "metric":"1", + "delay":"", + "loss-rate":"" + }, + + { + "link-id":"link_9", + "left-node-id":"HW:NE40E:PE2", + "left-port-id":"HW:NE40E:PE2:GE3/0/1", + "right-node-id":"HW:NE40E:PE3", + "right-port-id":"HW:NE40E:PE3:GE1/0/2", + "link-bandwidth":"10240", + "metric":"1", + "delay":"", + "loss-rate":"" + }, + { + "link-id":"link_10", + "left-node-id":"HW:NE40E:PE3", + "left-port-id":"HW:NE40E:PE3:GE1/0/2", + "right-node-id":"HW:NE40E:PE2", + "right-port-id":"HW:NE40E:PE2:GE3/0/1", + "link-bandwidth":"10240", + "metric":"1", + "delay":"", + "loss-rate":"" + }, + + { + "link-id":"link_11", + "left-node-id":"HW:NE40E:PE3", + "left-port-id":"HW:NE40E:PE3:GE1/0/0", + "right-node-id":"HW:NE40E:CE3", + "right-port-id":"HW:NE40E:CE3:GE1/0/10", + "link-bandwidth":"10240", + "metric":"1", + "delay":"", + "loss-rate":"" + }, + { + "link-id":"link_12", + "left-node-id":"HW:NE40E:CE3", + "left-port-id":"HW:NE40E:CE3:GE1/0/10", + "right-node-id":"HW:NE40E:PE3", + "right-port-id":"HW:NE40E:PE3:GE1/0/0", + "link-bandwidth":"10240", + "metric":"1", + "delay":"", + "loss-rate":"" + } + ] +} \ No newline at end of file diff --git a/nemo-renderers/cli-renderer/src/main/resources/etc/opendaylight/karaf/node-resource.json b/nemo-renderers/cli-renderer/src/main/resources/etc/opendaylight/karaf/node-resource.json new file mode 100644 index 0000000..052dd0a --- /dev/null +++ b/nemo-renderers/cli-renderer/src/main/resources/etc/opendaylight/karaf/node-resource.json @@ -0,0 +1,311 @@ +{ + "node": [ + { + "node-id": "HW:NE40E:PE1", + "node-type": "router", + "attribute":[ + { + "name":"location", + "value":"HW:NE40E:PE1" + }, + { + "name":"capacity", + "value":"" + } + ], + "port": [ + { + "port-id": "HW:NE40E:PE1:GE2/0/6", + "port-type":"internal", + "port-ip-address": "", + "port-mac-address":"", + "mask": "", + "bandwidth":"", + "attribute":[ + { + "name":"location", + "value":"HW:NE40E:PE1:GE2/0/6" + } + ] + }, + { + "port-id": "HW:NE40E:PE1:GE2/0/7", + "port-type":"internal", + "port-ip-address": "", + "port-mac-address":"", + "mask": "", + "bandwidth":"", + "attribute":[ + { + "name":"location", + "value":"HW:NE40E:PE1:GE2/0/7" + } + ] + }, + { + "port-id": "HW:NE40E:PE1:GE2/0/8", + "port-type":"internal", + "port-ip-address": "", + "port-mac-address":"", + "mask": "", + "bandwidth":"", + "attribute":[ + { + "name":"location", + "value":"HW:NE40E:PE1:GE2/0/8" + } + ] + } + ] + }, + { + "node-id": "HW:NE40E:PE2", + "node-type": "router", + "attribute":[ + { + "name":"location", + "value":"HW:NE40E:PE2" + }, + { + "name":"capacity", + "value":"" + } + ], + "port": [ + { + "port-id": "HW:NE40E:PE2:GE3/0/1", + "port-type":"internal", + "port-ip-address": "", + "port-mac-address":"", + "mask": "", + "bandwidth":"", + "attribute":[ + { + "name":"location", + "value":"HW:NE40E:PE2:GE3/0/1" + } + ] + }, + { + "port-id": "HW:NE40E:PE2:GE3/0/2", + "port-type":"internal", + "port-ip-address": "", + "port-mac-address":"", + "mask": "", + "bandwidth":"", + "attribute":[ + { + "name":"location", + "value":"HW:NE40E:PE2:GE3/0/2" + } + ] + }, + { + "port-id": "HW:NE40E:PE2:GE3/0/3", + "port-type":"internal", + "port-ip-address": "", + "port-mac-address":"", + "mask": "", + "bandwidth":"", + "attribute":[ + { + "name":"location", + "value":"HW:NE40E:PE2:GE3/0/3" + } + ] + } + ] + }, + { + "node-id": "HW:NE40E:PE3", + "node-type": "router", + "attribute":[ + { + "name":"location", + "value":"HW:NE40E:PE3" + }, + { + "name":"capacity", + "value":"" + } + ], + "port": [ + { + "port-id": "HW:NE40E:PE3:GE1/0/0", + "port-type":"internal", + "port-ip-address": "", + "port-mac-address":"", + "mask": "", + "bandwidth":"", + "attribute":[ + { + "name":"location", + "value":"HW:NE40E:PE3:GE1/0/0" + } + ] + }, + { + "port-id": "HW:NE40E:PE3:GE1/0/2", + "port-type":"internal", + "port-ip-address": "", + "port-mac-address":"", + "mask": "", + "bandwidth":"", + "attribute":[ + { + "name":"location", + "value":"HW:NE40E:PE3:GE1/0/2" + } + ] + }, + { + "port-id": "HW:NE40E:PE3:GE1/0/8", + "port-type":"internal", + "port-ip-address": "", + "port-mac-address":"", + "mask": "", + "bandwidth":"", + "attribute":[ + { + "name":"location", + "value":"HW:NE40E:PE3:GE1/0/8" + } + ] + } + ] + }, + { + "node-id": "HW:NE40E:CE1", + "node-type": "router", + "attribute":[ + { + "name":"location", + "value":"HW:NE40E:CE1" + }, + { + "name":"capacity", + "value":"" + } + ], + "port": [ + { + "port-id": "HW:NE40E:CE1:GE1/0/0", + "port-type":"external", + "port-ip-address": "", + "port-mac-address":"", + "mask": "", + "bandwidth":"", + "attribute":[ + { + "name":"location", + "value":"HW:NE40E:CE1:GE1/0/0" + } + ] + }, + { + "port-id": "HW:NE40E:CE1:GE1/0/6", + "port-type":"internal", + "port-ip-address": "", + "port-mac-address":"", + "mask": "", + "bandwidth":"", + "attribute":[ + { + "name":"location", + "value":"HW:NE40E:CE1:GE1/0/6" + } + ] + } + ] + }, + { + "node-id": "HW:NE40E:CE2", + "node-type": "router", + "attribute":[ + { + "name":"location", + "value":"HW:NE40E:CE2" + }, + { + "name":"capacity", + "value":"" + } + ], + "port": [ + { + "port-id": "HW:NE40E:CE2:GE3/0/2", + "port-type":"external", + "port-ip-address": "", + "port-mac-address":"", + "mask": "", + "bandwidth":"", + "attribute":[ + { + "name":"location", + "value":"HW:NE40E:CE2:GE3/0/2" + } + ] + }, + { + "port-id": "HW:NE40E:CE2:GE3/0/3", + "port-type":"internal", + "port-ip-address": "", + "port-mac-address":"", + "mask": "", + "bandwidth":"", + "attribute":[ + { + "name":"location", + "value":"HW:NE40E:CE2:GE3/0/3" + } + ] + } + ] + }, + { + "node-id": "HW:NE40E:CE3", + "node-type": "router", + "attribute":[ + { + "name":"location", + "value":"HW:NE40E:CE3" + }, + { + "name":"capacity", + "value":"" + } + ], + "port": [ + { + "port-id": "HW:NE40E:CE3:GE1/0/0", + "port-type":"external", + "port-ip-address": "", + "port-mac-address":"", + "mask": "", + "bandwidth":"", + "attribute":[ + { + "name":"location", + "value":"HW:NE40E:CE3:GE1/0/0" + } + ] + }, + { + "port-id": "HW:NE40E:CE3:GE1/0/10", + "port-type":"internal", + "port-ip-address": "", + "port-mac-address":"", + "mask": "", + "bandwidth":"", + "attribute":[ + { + "name":"location", + "value":"HW:NE40E:CE3:GE1/0/10" + } + ] + } + ] + } + + ] +} \ No newline at end of file -- 2.36.6