+++ /dev/null
-module affinity-topology {
- namespace "urn:opendaylight:affinity";
- prefix affinity;
-
- import ietf-inet-types { prefix inet; }
- import ietf-yang-types { prefix yang; }
- import yang-ext { prefix ext; }
-
- revision "2013-09-16" {
- description "Initial revision of affinity model";
- }
-
- typedef affinity-group-ref {
- type instance-identifier;
- }
-
- typedef affinity-link-ref {
- type instance-identifier;
- }
-
- grouping affinity-group {
- leaf id {
- type string;
- }
- list affinity-identifier {
- key id;
- leaf id {
- type string;
- }
- leaf address {
- description "Mac or Inet address";
- type union {
- type inet:ip-address;
- type yang:mac-address;
- }
- }
- }
- }
-
- grouping affinity-link {
- leaf id {
- type string;
- }
- leaf from-affinity-group {
- type affinity-group-ref;
- }
- leaf to-affinity-group {
- type affinity-group-ref;
- }
- leaf attribute {
- type string;
- }
- }
-
- identity affinity-group-context {
- description "Identity used to mark affinity-group context";
- }
- identity affinity-link-context {
- description "Identity used to mark affinity-link context";
- }
-
- container affinity-topology {
- list affinity-group {
- key id;
- ext:context-instance "affinity-group-context";
- uses affinity-group;
- }
- list affinity-link {
- key id;
- ext:context-instance "affinity-link-context";
- uses affinity-link;
- }
- }
-
- rpc get-affinity-groups {
- output {
- list affinity-group {
- key id;
- uses affinity-group;
- }
- }
- }
- rpc get-affinity-links {
-
- }
- rpc get-affinity-group {
-
- }
- rpc get-affinity-link {
-
- }
-}
-
-
--- /dev/null
+<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">
+
+ <!-- parent>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>sal-parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent -->
+ <scm>
+ <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>
+ <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
+ <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL</url>
+ </scm>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.opendaylight.controller.model</groupId>
+ <artifactId>model-parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+
+ <properties>
+ <yang.version>0.5.7-SNAPSHOT</yang.version>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <maven.compiler.source>1.7</maven.compiler.source>
+ <maven.compiler.target>1.7</maven.compiler.target>
+ <maven.bundle.version>2.4.0</maven.bundle.version>
+ <nexusproxy>http://nexus.opendaylight.org/content</nexusproxy>
+ </properties>
+
+ <repositories>
+ <!-- OpenDayLight Released artifact -->
+ <repository>
+ <id>opendaylight-release</id>
+ <name>opendaylight-release</name>
+ <url>${nexusproxy}/repositories/opendaylight.release/</url>
+ </repository>
+ <!-- OpenDayLight Snapshot artifact -->
+ <repository>
+ <id>opendaylight-snapshot</id>
+ <name>opendaylight-snapshot</name>
+ <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>
+ </repository>
+ </repositories>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>central2</id>
+ <name>central2</name>
+ <url>${nexusproxy}/repositories/central2/</url>
+ </pluginRepository>
+ <pluginRepository>
+ <id>opendaylight-release</id>
+ <url>${nexusproxy}/repositories/opendaylight.release/</url>
+ </pluginRepository>
+ <!-- OpenDayLight Snapshot artifact -->
+ <pluginRepository>
+ <id>opendaylight-snapshot</id>
+ <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>
+ </pluginRepository>
+ </pluginRepositories>
+
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>${maven.bundle.version}</version>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
+ </instructions>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-maven-plugin</artifactId>
+ <version>${yang.version}</version>
+ <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>
+ target/generated-sources/sal
+ </outputBaseDir>
+ </generator>
+ </codeGenerators>
+ <inspectDependencies>true</inspectDependencies>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>maven-sal-api-gen-plugin</artifactId>
+ <version>0.5.7-SNAPSHOT</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.7</version>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>target/generated-sources/sal</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse
+ m2e settings only. It has no influence on the Maven build itself. -->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>
+ org.opendaylight.yangtools
+ </groupId>
+ <artifactId>
+ yang-maven-plugin
+ </artifactId>
+ <versionRange>
+ [0.5,)
+ </versionRange>
+ <goals>
+ <goal>
+ generate-sources
+ </goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore></ignore>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-binding</artifactId>
+ <version>${yang.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-common</artifactId>
+ <version>${yang.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools.model</groupId>
+ <artifactId>ietf-inet-types</artifactId>
+ <version>2010.09.24-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools.model</groupId>
+ <artifactId>ietf-yang-types</artifactId>
+ <version>2010.09.24-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-ext</artifactId>
+ <version>2013.09.07-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+
+</project>
\ No newline at end of file
--- /dev/null
+module affinity-topology {
+ namespace "urn:opendaylight:affinity";
+ prefix affinity;
+
+ import ietf-inet-types { prefix inet; }
+ import ietf-yang-types { prefix yang; }
+ import yang-ext { prefix ext; }
+
+ revision "2013-09-16" {
+ description "Initial revision of affinity model";
+ }
+
+ typedef affinity-group-ref {
+ type instance-identifier;
+ }
+
+ typedef affinity-link-ref {
+ type instance-identifier;
+ }
+
+ grouping affinity-group {
+ leaf id {
+ type string;
+ }
+ list affinity-identifier {
+ key id;
+ leaf id {
+ type string;
+ }
+ leaf address {
+ description "Mac or Inet address";
+ type union {
+ type inet:ip-address;
+ type yang:mac-address;
+ }
+ }
+ }
+ }
+
+ grouping affinity-link {
+ leaf id {
+ type string;
+ }
+ leaf from-affinity-group {
+ type affinity-group-ref;
+ }
+ leaf to-affinity-group {
+ type affinity-group-ref;
+ }
+ leaf attribute {
+ type string;
+ }
+ }
+
+ identity affinity-group-context {
+ description "Identity used to mark affinity-group context";
+ }
+ identity affinity-link-context {
+ description "Identity used to mark affinity-link context";
+ }
+
+ container affinity-topology {
+ list affinity-group {
+ key id;
+ ext:context-instance "affinity-group-context";
+ uses affinity-group;
+ }
+ list affinity-link {
+ key id;
+ ext:context-instance "affinity-link-context";
+ uses affinity-link;
+ }
+ }
+
+ rpc get-affinity-groups {
+ output {
+ list affinity-group {
+ key id;
+ uses affinity-group;
+ }
+ }
+ }
+ rpc get-affinity-links {
+
+ }
+ rpc get-affinity-group {
+
+ }
+ rpc get-affinity-link {
+
+ }
+}
+
+
+++ /dev/null
- module toaster {
-
- yang-version 1;
-
- namespace
- "http://netconfcentral.org/ns/toaster";
-
- prefix toast;
-
- organization "Netconf Central";
-
- contact
- "Andy Bierman <andy@netconfcentral.org>";
-
- description
- "YANG version of the TOASTER-MIB.";
-
- revision "2009-11-20" {
- description
- "Toaster module in progress.";
- }
-
-
- identity toast-type {
- description
- "Base for all bread types supported by the toaster.
- New bread types not listed here nay be added in the
- future.";
- }
-
- identity white-bread {
- base toast:toast-type;
- description "White bread.";
- }
-
- identity wheat-bread {
- base toast-type;
- description "Wheat bread.";
- }
-
- identity wonder-bread {
- base toast-type;
- description "Wonder bread.";
- }
-
- identity frozen-waffle {
- base toast-type;
- description "Frozen waffle.";
- }
-
- identity frozen-bagel {
- base toast-type;
- description "Frozen bagel.";
- }
-
- identity hash-brown {
- base toast-type;
- description "Hash browned potatos.";
- }
-
- typedef DisplayString {
- type string {
- length "0 .. 255";
- }
- description
- "YANG version of the SMIv2 DisplayString TEXTUAL-CONVENTION.";
- reference
- "RFC 2579, section 2.";
-
- }
-
- container toaster {
- presence
- "Indicates the toaster service is available";
- description
- "Top-level container for all toaster database objects.";
- leaf toasterManufacturer {
- type DisplayString;
- config false;
- mandatory true;
- description
- "The name of the toaster's manufacturer. For instance,
- Microsoft Toaster.";
- }
-
- leaf toasterModelNumber {
- type DisplayString;
- config false;
- mandatory true;
- description
- "The name of the toaster's model. For instance,
- Radiant Automatic.";
- }
-
- leaf toasterStatus {
- type enumeration {
- enum "up" {
- value 1;
- description
- "The toaster knob position is up.
- No toast is being made now.";
- }
- enum "down" {
- value 2;
- description
- "The toaster knob position is down.
- Toast is being made now.";
- }
- }
- config false;
- mandatory true;
- description
- "This variable indicates the current state of
- the toaster.";
- }
- } // container toaster
-
- rpc make-toast {
- description
- "Make some toast.
- The toastDone notification will be sent when
- the toast is finished.
- An 'in-use' error will be returned if toast
- is already being made.
- A 'resource-denied' error will be returned
- if the toaster service is disabled.";
- input {
- leaf toasterDoneness {
- type uint32 {
- range "1 .. 10";
- }
- default '5';
- description
- "This variable controls how well-done is the
- ensuing toast. It should be on a scale of 1 to 10.
- Toast made at 10 generally is considered unfit
- for human consumption; toast made at 1 is warmed
- lightly.";
- }
-
- leaf toasterToastType {
- type identityref {
- base toast:toast-type;
- }
- default 'wheat-bread';
- description
- "This variable informs the toaster of the type of
- material that is being toasted. The toaster
- uses this information, combined with
- toasterDoneness, to compute for how
- long the material must be toasted to achieve
- the required doneness.";
- }
- }
- } // rpc make-toast
-
- rpc cancel-toast {
- description
- "Stop making toast, if any is being made.
- A 'resource-denied' error will be returned
- if the toaster service is disabled.";
- } // rpc cancel-toast
-
- notification toastDone {
- description
- "Indicates that the toast in progress has completed.";
- leaf toastStatus {
- type enumeration {
- enum "done" {
- value 0;
- description "The toast is done.";
- }
- enum "cancelled" {
- value 1;
- description
- "The toast was cancelled.";
- }
- enum "error" {
- value 2;
- description
- "The toaster service was disabled or
- the toaster is broken.";
- }
- }
- description
- "Indicates the final toast status";
- }
- } // notification toastDone
- } // module toaster
\r
<modules>\r
<module>affinity/api</module>\r
+ <module>affinity/yang</module>\r
<module>affinity/implementation</module>\r
<module>affinity/northbound</module>\r
<module>analytics/api</module>\r
<artifactId>slf4j-simple</artifactId>\r
<version>1.7.2</version>\r
</dependency>\r
- <dependency>\r
- <groupId>org.opendaylight.yangtools</groupId>\r
- <artifactId>yang-binding</artifactId>\r
- <version>0.5.7-SNAPSHOT</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.opendaylight.yangtools</groupId>\r
- <artifactId>yang-common</artifactId>\r
- <version>0.5.7-SNAPSHOT</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.opendaylight.yangtools.model</groupId>\r
- <artifactId>ietf-inet-types</artifactId>\r
- <version>2010.09.24-SNAPSHOT</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.opendaylight.yangtools.model</groupId>\r
- <artifactId>ietf-yang-types</artifactId>\r
- <version>2010.09.24-SNAPSHOT</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.opendaylight.yangtools</groupId>\r
- <artifactId>yang-ext</artifactId>\r
- <version>2013.09.07-SNAPSHOT</version>\r
- </dependency>\r
- \r
</dependencies>\r
\r
<build>\r
</dependency>\r
</dependencies>\r
</plugin>\r
- <plugin>\r
- <groupId>org.opendaylight.yangtools</groupId>\r
- <artifactId>yang-maven-plugin</artifactId>\r
- <version>0.5.6-SNAPSHOT</version>\r
- <executions>\r
- <execution>\r
- <goals>\r
- <goal>generate-sources</goal>\r
- </goals>\r
- <configuration>\r
- <yangFilesRootDir>src/main/yang</yangFilesRootDir>\r
- <codeGenerators>\r
- <generator>\r
- <codeGeneratorClass>\r
- org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl\r
- </codeGeneratorClass>\r
- <outputBaseDir>\r
- target/generated-sources/sal\r
- </outputBaseDir>\r
- </generator>\r
- </codeGenerators>\r
- <inspectDependencies>true</inspectDependencies>\r
- </configuration>\r
- </execution>\r
- </executions>\r
- <dependencies>\r
- <dependency>\r
- <groupId>org.opendaylight.yangtools</groupId>\r
- <artifactId>maven-sal-api-gen-plugin</artifactId>\r
- <version>0.5.6-SNAPSHOT</version>\r
- <type>jar</type>\r
- </dependency>\r
- </dependencies>\r
- </plugin> \r
</plugins>\r
</build>\r
<reporting>\r