REST interface for VPLS application
Change-Id: I2cab5bd6ff0ce026d0ef844bba6199fdd7f3e50d
This repository contains the files that provide a REST interface for VPLS
application.I create a new package in org.onosproject.vpls
called rest that contains the java classes VplsWebApplication and
VplsWebResource. The VplsWebResource provides create/update/read/delete
(CURD) functionality, leveraging the methods defined in the Vpls java
interface. I create a new folder called resources that contains
the json definitions and the files for the "web page".
diff --git a/apps/vpls/src/test/java/resources/vpls-cfg.json b/apps/vpls/src/test/java/resources/vpls-cfg.json
new file mode 100644
index 0000000..5236124
--- /dev/null
+++ b/apps/vpls/src/test/java/resources/vpls-cfg.json
@@ -0,0 +1,67 @@
+{
+ "ports": {
+ "of:0000000000000001/1": {
+ "interfaces": [
+ {
+ "name": "h1",
+ "vlan": "100"
+ }
+ ]
+ },
+ "of:0000000000000002/1": {
+ "interfaces": [
+ {
+ "name": "h2",
+ "vlan": "200"
+ }
+ ]
+ },
+ "of:0000000000000003/1": {
+ "interfaces": [
+ {
+ "name": "h3",
+ "vlan": "300"
+ }
+ ]
+ },
+ "of:0000000000000004/1": {
+ "interfaces": [
+ {
+ "name": "h4",
+ "vlan": "400"
+ }
+ ]
+ },
+ "of:0000000000000005/1": {
+ "interfaces": [
+ {
+ "name": "h5"
+ }
+ ]
+ },
+ "of:0000000000000006/1": {
+ "interfaces": [
+ {
+ "name": "h6"
+ }
+ ]
+ }
+ },
+ "apps" : {
+ "org.onosproject.vpls" : {
+ "vpls" : {
+ "vplsList" : [
+ {
+ "name" : "VPLS1",
+ "interfaces" : ["h1", "h2", "h5", "h6"]
+ },
+ {
+ "name" : "VPLS2",
+ "interfaces" : ["h3", "h4"],
+ "encapsulation" : "vlan"
+ }
+ ]
+ }
+ }
+ }
+}
\ No newline at end of file