From c961bd752be1fb2eee707cb5c7c44d1bda0894d2 Mon Sep 17 00:00:00 2001 From: Jan Srnicek Date: Thu, 25 Aug 2016 16:27:23 +0200 Subject: HONEYCOMB-140 - Honeycomb Plugin Archetype Change-Id: I6e04fb769e82fb539dbd6a79bb465974796137a4 Signed-off-by: Jan Srnicek --- .../__rootArtifactId__-api/pom.xml | 62 ++++++++++++++++++++++ .../src/main/yang/__rootArtifactId__.yang | 49 +++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 tools/archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/pom.xml create mode 100644 tools/archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/yang/__rootArtifactId__.yang (limited to 'tools/archetype/src/main/resources/archetype-resources/__rootArtifactId__-api') diff --git a/tools/archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/pom.xml b/tools/archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/pom.xml new file mode 100644 index 000000000..a88775d8a --- /dev/null +++ b/tools/archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/pom.xml @@ -0,0 +1,62 @@ + + + + io.fd.honeycomb.common + api-parent + 1.0.0-SNAPSHOT + + + 4.0.0 + ${groupId} + ${rootArtifactId}-api + ${version} + bundle + + + + + org.opendaylight.mdsal.model + mdsal-model-artifacts + 0.8.2-Beryllium-SR2 + pom + import + + + + + + + org.opendaylight.mdsal.model + iana-if-type-2014-05-08 + + + org.opendaylight.mdsal.model + ietf-yang-types-20130715 + + + org.opendaylight.mdsal.model + ietf-interfaces + + + org.opendaylight.mdsal.model + ietf-inet-types-2013-07-15 + + + org.opendaylight.mdsal.model + yang-ext + + + diff --git a/tools/archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/yang/__rootArtifactId__.yang b/tools/archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/yang/__rootArtifactId__.yang new file mode 100644 index 000000000..d5852ebeb --- /dev/null +++ b/tools/archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/yang/__rootArtifactId__.yang @@ -0,0 +1,49 @@ +module ${rootArtifactId} { + + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:${rootArtifactId}"; + prefix "${rootArtifactId}"; + + description + "This YANG module defines the generic configuration and + operational data for ${rootArtifactId} in VPP"; + + revision "2016-09-18" { + description "Initial revision of ${rootArtifactId} model"; + } + + container ${rootArtifactId} { + uses ${rootArtifactId}-params; + description "Configuration data of ${rootArtifactId} in Honeycomb"; + + // READ + // curl -u admin:admin http://localhost:8181/restconf/config/${rootArtifactId}:${rootArtifactId} + + // WRITE + // curl http://localhost:8181/restconf/operational/${rootArtifactId}:${rootArtifactId} + + } + + container ${rootArtifactId}-state { + config false; + uses ${rootArtifactId}-params; + description "Operational data of ${rootArtifactId} persisted in VPP"; + + // READ + // curl -u admin:admin http://localhost:8181/restconf/operational/${rootArtifactId}:${rootArtifactId}-state + } + + grouping ${rootArtifactId}-params { + list element { + + key id; + leaf id { + type uint32; + } + + leaf description { + type string; + } + } + } +} \ No newline at end of file -- cgit 1.2.3-korg