* Add sample yang files (not running codegen). 79/1379/1
authorSuchi Raman <suchi.raman@plexxi.com>
Mon, 23 Sep 2013 17:36:32 +0000 (13:36 -0400)
committerSuchi Raman <suchi.raman@plexxi.com>
Mon, 23 Sep 2013 22:15:24 +0000 (18:15 -0400)
* Add subnet/prefix to affinity id.

Signed-off-by: Suchi Raman <suchi.raman@plexxi.com>
affinity/api/src/main/java/org/opendaylight/affinity/affinity/AffinityGroup.java
affinity/api/src/main/java/org/opendaylight/affinity/affinity/AffinityLink.java
affinity/api/src/main/java/org/opendaylight/controller/affinity/InetAddressMask.java [new file with mode: 0644]
affinity/api/src/test/java/org/opendaylight/affinity/affinity/AffinityGroupTest.java
affinity/implementation/src/test/java/org/opendaylight/affinity/affinity/internal/AffinityManagerImplTest.java
affinity/northbound/src/main/resources/META-INF/MANIFEST.MF
affinity/yang/src/main/yang/affinity-topology-all.yang [new file with mode: 0644]
affinity/yang/src/main/yang/affinity-topology.yang
pom.xml
src/main/yang/affinity-topology.yang

index d8d017d9caef7ba0edec8dcf6e1ececa10199075..df0626321351505891a44a8754cd569f8a88e9b9 100644 (file)
@@ -62,16 +62,27 @@ public class AffinityGroup implements Cloneable, Serializable {
 
     // Basic affinity element, IP address
     public Status add(String ipaddress) {
-       AffinityIdentifier<InetAddress> elem = new AffinityIdentifier();
+        AffinityIdentifier<InetAddress> elem = new AffinityIdentifier();
+        
+        elem.setName(ipaddress);
+        if (NetUtils.isIPAddressValid(ipaddress)) {
+            elem.set(NetUtils.parseInetAddress(ipaddress));
+            elements.put(ipaddress, elem);
+            return new Status(StatusCode.SUCCESS);
+        } else {
+            return new Status(StatusCode.BADREQUEST);
+        }
+    }
 
-       elem.setName(ipaddress);
-       if (NetUtils.isIPAddressValid(ipaddress)) {
-           elem.set(NetUtils.parseInetAddress(ipaddress));
-           elements.put(ipaddress, elem);
-           return new Status(StatusCode.SUCCESS);
-       } else {
-           return new Status(StatusCode.BADREQUEST);
-       }
+    // Basic affinity element, IP prefix/mask
+    public Status addInetMask(String addrmask) {
+        InetAddressMask inetaddrmask = new InetAddressMask(addrmask);
+       AffinityIdentifier<InetAddressMask> elem = new AffinityIdentifier();
+
+        elem.setName(addrmask);
+        elem.set(inetaddrmask);
+        elements.put(addrmask, elem);
+        return new Status(StatusCode.SUCCESS);
     }
 
     // Remove an affinity element given its IP address.
index 9406c5991e477a2452c69733ab0dc1109b991d0b..65c98b4c0f0db8a89a4b18c8199e7496035405a7 100644 (file)
@@ -48,6 +48,8 @@ public class AffinityLink implements Cloneable, Serializable {
     AffinityGroup toGroup;
     @XmlElement 
     String affinityAttribute;
+    @XmlElement 
+    String affinityWaypoint;
 
     public AffinityLink() {
     }
@@ -72,6 +74,11 @@ public class AffinityLink implements Cloneable, Serializable {
        this.affinityAttribute = attribute;
     }
 
+    /* Set the waypoint address, if the attribute is "redirect" */
+    public void setWaypoint(String wpaddr) {
+       this.affinityWaypoint = wpaddr;
+    }
+
     public String getAttribute() {
        return this.affinityAttribute;
     }
diff --git a/affinity/api/src/main/java/org/opendaylight/controller/affinity/InetAddressMask.java b/affinity/api/src/main/java/org/opendaylight/controller/affinity/InetAddressMask.java
new file mode 100644 (file)
index 0000000..13b723d
--- /dev/null
@@ -0,0 +1,110 @@
+package org.opendaylight.controller.affinity;
+
+import java.io.Serializable;
+import java.net.Inet4Address;
+import java.net.InetAddress;
+import java.nio.ByteBuffer;
+import java.util.Map;
+import java.net.UnknownHostException;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This class defines an Inet address mask object.
+ */
+public class InetAddressMask {
+    private String name;
+    
+    InetAddress networkAddress;
+    Short mask;
+
+    public InetAddressMask() {
+
+    }
+    /* String addrmask is in the a.b.c.d/m format. */
+    public InetAddressMask(String addrmask) {
+        this.networkAddress = getIPAddress(addrmask);
+        this.mask = getIPMaskLen(addrmask);
+    }
+
+    public InetAddress getIPAddress(String ipmask) {
+        InetAddress ip = null;
+        try {
+            ip = InetAddress.getByName(ipmask.split("/")[0]);
+        } catch (UnknownHostException e1) {
+            return null;
+        }
+        return ip;
+    }
+
+    public Short getIPMaskLen(String ipmask) {
+        Short maskLen = 0;
+        String[] s = ipmask.split("/");
+        maskLen = (s.length == 2) ? Short.valueOf(s[1]) : 32;
+        return maskLen;
+    }
+
+    /**
+     * Get the IP address portion of the sub-network of the static route.
+     * @return InetAddress: the IP address portion of the sub-network of the static route
+     */
+    public InetAddress getNetworkAddress() {
+        return networkAddress;
+    }
+
+    /**
+     * Set the IP address portion of the sub-network of the static route.
+     * @param networkAddress The IP address (InetAddress) to be set
+     */
+    public void setNetworkAddress(InetAddress networkAddress) {
+        this.networkAddress = networkAddress;
+    }
+
+    /**
+     * Get the mask of the sub-network of the static route.
+     * @return mask: the mask  (InetAddress) of the sub-network of the static route
+     */
+    public Short getMask() {
+        return mask;
+    }
+
+    /**
+     * Set the sub-network's mask of the static route.
+     * @param mask The mask (InetAddress) to be set
+     */
+    public void setMask(Short mask) {
+        this.mask = mask;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((mask == null) ? 0 : mask.hashCode());
+        result = prime * result
+                + ((networkAddress == null) ? 0 : networkAddress.hashCode());
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        return "InetAddressMask [networkAddress=" + networkAddress + ", mask=" + mask + "]";
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        InetAddressMask other = (InetAddressMask) obj;
+        if (!networkAddress.equals(other.networkAddress))
+            return false;
+        if (!mask.equals(other.mask))
+            return false;
+        return true;
+    }
+}
index 629f1ba892bf280bf91ddb01d136d94d5f4fb6bc..2469c8c56dbef1dc29f6e3be7a7ff9439f4c6d06 100644 (file)
@@ -45,7 +45,8 @@ public class AffinityGroupTest extends TestCase {
        al1.setFromGroup(ag1);
        al1.setToGroup(ag2);
        al1.setName("link1");
-       al1.setAttribute("isolate");
+       al1.setAttribute("redirect");
+        al1.setWaypoint("20.0.0.11");
 
        // Add a self loop for ag2.
        AffinityLink al2 = new AffinityLink("link2", ag2, ag2);
@@ -54,7 +55,7 @@ public class AffinityGroupTest extends TestCase {
        al2.setName("link2");
        al2.setAttribute("hopcount");
 
-       System.out.println("Affinity group size is " + ag1.size());
+       System.out.println("Affinity group size is " + ag1.size());
         Assert.assertTrue(ag1.size() == 2);
        ag1.print();
     }
index 0edaec371445a34cda4185680e50568399bc6058..403f0b50945f29e91452b30b2ed12fdd6a3368da 100644 (file)
@@ -86,6 +86,35 @@ public class AffinityManagerImplTest {
         result = affinitymgr.addAffinityLink(al2);
         Assert.assertTrue(result.isSuccess());
        
+        AffinityGroup ag3 = new AffinityGroup("any");
+        ag3.addInetMask("0.0.0.0/0");
+        
+        AffinityGroup ag4 = new AffinityGroup("servers");
+        ag4.addInetMask("20.0.0.0/8");
+
+       // Add an affinity link from ag1 to ag2. 
+       AffinityLink al3 = new AffinityLink();
+       al3.setFromGroup(ag3);
+       al3.setToGroup(ag4);
+       al3.setName("link3");
+       al3.setAttribute("redirect");
+        al3.setWaypoint("20.0.0.11");
+        
+       result = affinitymgr.addAffinityGroup(ag3);
+        Assert.assertTrue(result.isSuccess());
+       result = affinitymgr.addAffinityGroup(ag4);
+        Assert.assertTrue(result.isSuccess());
+       result = affinitymgr.addAffinityLink(al3);
+        Assert.assertTrue(result.isSuccess());
+
+        // Print all pairs/flows from the affinity link al3. 
+        System.out.println("affinity link " + al3.getName());
+        List<Entry<AffinityIdentifier, AffinityIdentifier>> flowlist1;
+        flowlist1 = affinitymgr.getAllFlowsByAffinityIdentifier(al3);
+        for (Entry<AffinityIdentifier, AffinityIdentifier> flow : flowlist1) {
+            System.out.println("flow with from=" + flow.getKey() + " to=" + flow.getValue());
+        }
+
        /* Test the get methods. */
 
        /* Get all members as hosts */
index df8012b8548d3eb9fa1506d02c0e3e7e039e4a72..99eff67642c443233708bd404b9f0a4dda94f5fa 100644 (file)
@@ -1,5 +1,5 @@
 Manifest-Version: 1.0\r
-Bnd-LastModified: 1379947567902\r
+Bnd-LastModified: 1379957710321\r
 Build-Jdk: 1.7.0_25\r
 Built-By: sraman\r
 Bundle-ManifestVersion: 2\r
diff --git a/affinity/yang/src/main/yang/affinity-topology-all.yang b/affinity/yang/src/main/yang/affinity-topology-all.yang
new file mode 100644 (file)
index 0000000..f6715b2
--- /dev/null
@@ -0,0 +1,178 @@
+module affinity-topology-all { 
+    namespace "urn:opendaylight:affinity";
+    prefix affinity;
+
+    import ietf-inet-types { prefix inet; }
+    import ietf-yang-types { prefix yang; }
+    import yang-ext { prefix ext; }
+    import inventory {prefix inv;}
+
+    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-identifiers {
+            key id;
+            uses affinity-identifier;
+        }
+    }
+
+    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;
+        }
+    }
+
+    grouping affinity-identifier {
+        leaf id {
+            type string;
+        }
+        // Address is either an IP address, IP prefix, or MAC address.
+        leaf address {
+            description "Mac or Inet address";
+            type union {
+                type inet:ip-address;
+                type inet:ip-prefix;
+                type yang:mac-address;
+            }
+        }
+    }
+
+    // Various types of affinity topologies. Used in union 'affinity-attribute'. 
+
+    // Isolate flows according to certain constraints. 
+    grouping isolate-path {
+        leaf max-flows-per-link {
+            type uint16;
+        }
+    }
+
+    // Route through shortest path per l2/l3 semantics. 
+    grouping shortest-path {
+        leaf max-flows-per-link {
+            type uint16;
+        }
+    }
+   
+    // Redirect flows through list of waypoints represented by node-connectors. 
+    grouping redirect-path {
+        list node-connectors {
+            key id;
+            uses inv:node-connector-id; // or ref?
+        }
+    }
+
+    // oversubscription path
+    grouping oversubscription-path {
+        leaf max-link-oversubscription-percent {
+            type uint16;
+        }
+    }
+
+    // Affinity attribute. 
+    grouping affinity-attribute {
+        leaf id {
+            type string;
+        }
+        choice attribute-type {
+            description "affinity attribute";
+            case isolate-path {
+                 container isolate-path {
+                     uses isolate-path;
+                 }
+            }
+            case shortest-path {
+                    container shortest-path {
+                        uses shortest-path;
+                    }
+            }
+            case redirect-path {
+                    container redirect-path {
+                        uses redirect-path;
+                    }
+            }
+            case oversubscription-path {
+                    container oversubscription-path {
+                        uses oversubscription-path;
+                    }
+            }
+        }
+    }
+
+    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 create-affinity-group {
+        input {
+            uses affinity-group;
+        }
+    }
+    rpc add-affinity-element {
+        input {
+            container element {
+                uses affinity-identifier;
+            }
+            leaf group {
+                type affinity-group-ref;
+            }
+        }
+    }
+
+    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 {
+    
+    }
+}
+
+
index 509af19cfa59a9add7a8694eaf76f3fd3e763eea..440d9e9a5d88f5c041c2a0e2b6fec85989376d04 100644 (file)
@@ -11,11 +11,11 @@ module affinity-topology {
     }
 
     typedef affinity-group-ref {
-    type instance-identifier;
+        type instance-identifier;
     }
-
+    
     typedef affinity-link-ref {
-    type instance-identifier;
+        type instance-identifier;
     }
 
     grouping affinity-group {
@@ -53,10 +53,10 @@ module affinity-topology {
     }
 
     identity affinity-group-context {
-    description "Identity used to mark affinity-group context";
+        description "Identity used to mark affinity-group context";
     }
     identity affinity-link-context {
-    description "Identity used to mark affinity-link context";
+        description "Identity used to mark affinity-link context";
     }
 
     container affinity-topology {
@@ -75,8 +75,8 @@ module affinity-topology {
     rpc get-affinity-groups {
         output {
             list affinity-group {
-            key id;
-            uses affinity-group;
+                key id;
+                uses affinity-group;
             }
         }
     }
diff --git a/pom.xml b/pom.xml
index baf8c5150620f3c95865abbc2deda694d1558526..710537c625c8d01dcfeb81ebaab39cbae70fdf0d 100644 (file)
--- a/pom.xml
+++ b/pom.xml
-<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">\r
-  <modelVersion>4.0.0</modelVersion>\r
-\r
-  <groupId>org.opendaylight.affinity</groupId>\r
-  <artifactId>affinityParent</artifactId>\r
-  <version>0.4.1-SNAPSHOT</version>\r
-  <packaging>pom</packaging>\r
-\r
-  <scm>\r
-    <connection>scm:git:http://git.opendaylight.org/gerrit/p/affinity.git</connection>\r
-    <developerConnection>scm:git:ssh://git.opendaylight.org:29418/affinity.git</developerConnection>\r
-  </scm>\r
-\r
-  <properties>\r
-    <checkstyle.version>2.10</checkstyle.version>\r
-    <commons.lang.version>3.1</commons.lang.version>\r
-    <compiler.version>2.3.2</compiler.version>\r
-    <enunciate.version>1.26.2</enunciate.version>\r
-    <exam.version>3.0.0</exam.version>\r
-    <failsafe.version>2.15</failsafe.version>\r
-    <geminiweb.version>2.2.0.RELEASE</geminiweb.version>\r
-    <jackson.version>1.9.8</jackson.version>\r
-    <jersey.version>1.17</jersey.version>\r
-    <junit.version>4.10</junit.version>\r
-    <logback.version>1.0.9</logback.version>\r
-    <nexusproxy>http://nexus.opendaylight.org/content</nexusproxy>\r
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
-    <projectinfo>2.6</projectinfo>\r
-    <propertymavenplugin.version>1.0-alpha-2</propertymavenplugin.version>\r
-    <sitedeploy>dav:http://nexus.opendaylight.org/content/sites/site</sitedeploy>\r
-    <siteplugin>3.2</siteplugin>\r
-    <slf4j.version>1.7.2</slf4j.version>\r
-    <!-- Sonar properties using jacoco to retrieve integration test results -->\r
-    <sonar.branch>${user.name}-private-view</sonar.branch>\r
-    <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>\r
-    <sonar.host.url>https://sonar.opendaylight.org/</sonar.host.url>\r
-    <sonar.jacoco.Reportpath>target/jacoco.exec</sonar.jacoco.Reportpath>\r
-    <sonar.jacoco.itReportPath>target/jacoco-it.exec</sonar.jacoco.itReportPath>\r
-    <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>\r
-    <sonar.language>java</sonar.language>\r
-    <sonar.skippedModules>org.openflow.openflowj,net.sf.jung2</sonar.skippedModules>\r
-    <spring.version>3.1.3.RELEASE</spring.version>\r
-    <spring-security.version>3.1.3.RELEASE</spring-security.version>\r
-    <surefire.version>2.15</surefire.version>\r
-    <testvm.argLine>-Xmx1024m -XX:MaxPermSize=256m</testvm.argLine>\r
-    <url.version>1.5.0</url.version>\r
-    <virgo.version>3.6.0.RELEASE</virgo.version>\r
-  </properties>\r
-\r
-    <modules>\r
-      <module>affinity/api</module>\r
-      <module>affinity/yang</module>\r
-      <module>affinity/implementation</module>\r
-      <module>affinity/integrationtest</module>\r
-      <module>affinity/northbound</module>\r
-      <module>analytics/api</module>\r
-      <module>analytics/implementation</module>\r
-      <module>analytics/integrationtest</module>\r
-      <module>analytics/northbound</module>\r
-    </modules>\r
-\r
-    <repositories>\r
-      <!-- To get SVNKit -->\r
-      <repository>\r
-       <id>svnkit-snapshots</id>\r
-       <name>svnkit-snapshots</name>\r
-       <url>${nexusproxy}/repositories/svnkit-snapshots/</url>\r
-      </repository>\r
-      <!-- OpenDayLight Released artifact -->\r
-      <repository>\r
-        <id>opendaylight-release</id>\r
-        <name>opendaylight-release</name>\r
-        <url>${nexusproxy}/repositories/opendaylight.release/</url>\r
-      </repository>\r
-      <!-- OpenDayLight Snapshot artifact -->\r
-      <repository>\r
-        <id>opendaylight-snapshot</id>\r
-        <name>opendaylight-snapshot</name>\r
-        <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>\r
-      </repository>\r
-      <!-- PAX Management -->\r
-      <repository>\r
-        <id>ops4j-releases</id>\r
-        <name>ops4j-releases</name>\r
-        <url>${nexusproxy}/repositories/ops4j-releases/</url>\r
-      </repository>\r
-    </repositories>\r
-\r
-  <pluginRepositories>\r
-       <pluginRepository>\r
-           <id>opendaylight-release</id>\r
-           <name>opendaylight-release</name>\r
-           <url>http://nexus.opendaylight.org/content/repositories/opendaylight.release/</url>\r
-       </pluginRepository>\r
-       <pluginRepository>\r
-           <id>opendaylight-snapshot</id>\r
-           <name>opendaylight-snapshot</name>\r
-           <url>http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>\r
-       </pluginRepository>\r
-  </pluginRepositories>\r
-\r
-\r
-\r
-  <distributionManagement>\r
-    <!-- OpenDayLight Released artifact -->\r
-    <repository>\r
-      <id>opendaylight-release</id>\r
-      <url>${nexusproxy}/repositories/opendaylight.release/</url>\r
-    </repository>\r
-    <!-- OpenDayLight Snapshot artifact -->\r
-    <snapshotRepository>\r
-      <id>opendaylight-snapshot</id>\r
-      <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>\r
-    </snapshotRepository>\r
-    <!-- Site deployment -->\r
-    <site>\r
-      <id>website</id>\r
-      <url>${sitedeploy}</url>\r
-    </site>\r
-  </distributionManagement>\r
-\r
-    <dependencies>\r
-      <dependency>\r
-        <groupId>junit</groupId>\r
-        <artifactId>junit</artifactId>\r
-        <version>4.10</version>\r
-        <scope>test</scope>\r
-        <optional>true</optional>\r
-      </dependency>\r
-      <dependency>\r
-        <groupId>org.slf4j</groupId>\r
-        <artifactId>slf4j-simple</artifactId>\r
-        <version>1.7.2</version>\r
-      </dependency>\r
-    </dependencies>\r
-\r
-  <build>\r
-    <plugins>\r
-      <plugin>\r
-        <groupId>org.codehaus.mojo</groupId>\r
-        <artifactId>buildnumber-maven-plugin</artifactId>\r
-        <version>1.2</version>\r
-        <executions>\r
-          <execution>\r
-            <phase>validate</phase>\r
-            <goals>\r
-              <goal>create</goal>\r
-            </goals>\r
-          </execution>\r
-        </executions>\r
-        <configuration>\r
-          <doCheck>false</doCheck>\r
-          <doUpdate>false</doUpdate>\r
-          <providerImplementations>\r
-            <svn>javasvn</svn>\r
-          </providerImplementations>\r
-          <revisionOnScmFailure>VersionUnknown</revisionOnScmFailure>\r
-        </configuration>\r
-        <dependencies>\r
-          <dependency>\r
-            <groupId>com.google.code.maven-scm-provider-svnjava</groupId>\r
-            <artifactId>maven-scm-provider-svnjava</artifactId>\r
-            <version>2.0.5</version>\r
-          </dependency>\r
-          <dependency>\r
-            <groupId>org.tmatesoft.svnkit</groupId>\r
-            <artifactId>svnkit</artifactId>\r
-            <version>1.7.4-v1</version>\r
-          </dependency>\r
-          <dependency>\r
-            <groupId>org.apache.maven.scm</groupId>\r
-            <artifactId>maven-scm-provider-svn-commons</artifactId>\r
-            <version>1.7</version>\r
-          </dependency>\r
-        </dependencies>\r
-      </plugin>\r
-    </plugins>\r
-  </build>\r
-    <reporting>\r
-        <plugins>\r
-            <plugin>\r
-                <groupId>org.codehaus.mojo</groupId>\r
-                <artifactId>findbugs-maven-plugin</artifactId>\r
-                <version>2.4.0</version>\r
-                <configuration>\r
-                    <effort>Max</effort>\r
-                    <threshold>Low</threshold>\r
-                    <goal>site</goal>\r
-                </configuration>\r
-            </plugin>\r
-            <plugin>\r
-                <groupId>org.codehaus.mojo</groupId>\r
-                <artifactId>jdepend-maven-plugin</artifactId>\r
-                <version>2.0-beta-2</version>\r
-            </plugin>\r
-        </plugins>\r
-    </reporting>\r
-</project>\r
+<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>
+
+  <groupId>org.opendaylight.affinity</groupId>
+  <artifactId>affinityParent</artifactId>
+  <version>0.4.1-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <scm>
+    <connection>scm:git:http://git.opendaylight.org/gerrit/p/affinity.git</connection>
+    <developerConnection>scm:git:ssh://git.opendaylight.org:29418/affinity.git</developerConnection>
+  </scm>
+
+  <properties>
+    <checkstyle.version>2.10</checkstyle.version>
+    <commons.lang.version>3.1</commons.lang.version>
+    <compiler.version>2.3.2</compiler.version>
+    <enunciate.version>1.26.2</enunciate.version>
+    <exam.version>3.0.0</exam.version>
+    <failsafe.version>2.15</failsafe.version>
+    <geminiweb.version>2.2.0.RELEASE</geminiweb.version>
+    <jackson.version>1.9.8</jackson.version>
+    <jersey.version>1.17</jersey.version>
+    <junit.version>4.10</junit.version>
+    <logback.version>1.0.9</logback.version>
+    <nexusproxy>http://nexus.opendaylight.org/content</nexusproxy>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <projectinfo>2.6</projectinfo>
+    <propertymavenplugin.version>1.0-alpha-2</propertymavenplugin.version>
+    <sitedeploy>dav:http://nexus.opendaylight.org/content/sites/site</sitedeploy>
+    <siteplugin>3.2</siteplugin>
+    <slf4j.version>1.7.2</slf4j.version>
+    <!-- Sonar properties using jacoco to retrieve integration test results -->
+    <sonar.branch>${user.name}-private-view</sonar.branch>
+    <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
+    <sonar.host.url>https://sonar.opendaylight.org/</sonar.host.url>
+    <sonar.jacoco.Reportpath>target/jacoco.exec</sonar.jacoco.Reportpath>
+    <sonar.jacoco.itReportPath>target/jacoco-it.exec</sonar.jacoco.itReportPath>
+    <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
+    <sonar.language>java</sonar.language>
+    <sonar.skippedModules>org.openflow.openflowj,net.sf.jung2</sonar.skippedModules>
+    <spring.version>3.1.3.RELEASE</spring.version>
+    <spring-security.version>3.1.3.RELEASE</spring-security.version>
+    <surefire.version>2.15</surefire.version>
+    <testvm.argLine>-Xmx1024m -XX:MaxPermSize=256m</testvm.argLine>
+    <url.version>1.5.0</url.version>
+    <virgo.version>3.6.0.RELEASE</virgo.version>
+  </properties>
+
+    <modules>
+      <module>affinity/api</module>
+<!--      <module>affinity/yang</module> -->
+      <module>affinity/implementation</module>
+      <module>affinity/integrationtest</module>
+      <module>affinity/northbound</module>
+      <module>analytics/api</module>
+      <module>analytics/implementation</module>
+      <module>analytics/integrationtest</module>
+      <module>analytics/northbound</module>
+    </modules>
+
+    <repositories>
+      <!-- To get SVNKit -->
+      <repository>
+       <id>svnkit-snapshots</id>
+       <name>svnkit-snapshots</name>
+       <url>${nexusproxy}/repositories/svnkit-snapshots/</url>
+      </repository>
+      <!-- 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>
+      <!-- PAX Management -->
+      <repository>
+        <id>ops4j-releases</id>
+        <name>ops4j-releases</name>
+        <url>${nexusproxy}/repositories/ops4j-releases/</url>
+      </repository>
+    </repositories>
+
+  <pluginRepositories>
+       <pluginRepository>
+           <id>opendaylight-release</id>
+           <name>opendaylight-release</name>
+           <url>http://nexus.opendaylight.org/content/repositories/opendaylight.release/</url>
+       </pluginRepository>
+       <pluginRepository>
+           <id>opendaylight-snapshot</id>
+           <name>opendaylight-snapshot</name>
+           <url>http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
+       </pluginRepository>
+  </pluginRepositories>
+
+
+
+  <distributionManagement>
+    <!-- OpenDayLight Released artifact -->
+    <repository>
+      <id>opendaylight-release</id>
+      <url>${nexusproxy}/repositories/opendaylight.release/</url>
+    </repository>
+    <!-- OpenDayLight Snapshot artifact -->
+    <snapshotRepository>
+      <id>opendaylight-snapshot</id>
+      <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>
+    </snapshotRepository>
+    <!-- Site deployment -->
+    <site>
+      <id>website</id>
+      <url>${sitedeploy}</url>
+    </site>
+  </distributionManagement>
+
+    <dependencies>
+      <dependency>
+        <groupId>junit</groupId>
+        <artifactId>junit</artifactId>
+        <version>4.10</version>
+        <scope>test</scope>
+        <optional>true</optional>
+      </dependency>
+      <dependency>
+        <groupId>org.slf4j</groupId>
+        <artifactId>slf4j-simple</artifactId>
+        <version>1.7.2</version>
+      </dependency>
+    </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>buildnumber-maven-plugin</artifactId>
+        <version>1.2</version>
+        <executions>
+          <execution>
+            <phase>validate</phase>
+            <goals>
+              <goal>create</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <doCheck>false</doCheck>
+          <doUpdate>false</doUpdate>
+          <providerImplementations>
+            <svn>javasvn</svn>
+          </providerImplementations>
+          <revisionOnScmFailure>VersionUnknown</revisionOnScmFailure>
+        </configuration>
+        <dependencies>
+          <dependency>
+            <groupId>com.google.code.maven-scm-provider-svnjava</groupId>
+            <artifactId>maven-scm-provider-svnjava</artifactId>
+            <version>2.0.5</version>
+          </dependency>
+          <dependency>
+            <groupId>org.tmatesoft.svnkit</groupId>
+            <artifactId>svnkit</artifactId>
+            <version>1.7.4-v1</version>
+          </dependency>
+          <dependency>
+            <groupId>org.apache.maven.scm</groupId>
+            <artifactId>maven-scm-provider-svn-commons</artifactId>
+            <version>1.7</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+    </plugins>
+  </build>
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>findbugs-maven-plugin</artifactId>
+                <version>2.4.0</version>
+                <configuration>
+                    <effort>Max</effort>
+                    <threshold>Low</threshold>
+                    <goal>site</goal>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>jdepend-maven-plugin</artifactId>
+                <version>2.0-beta-2</version>
+            </plugin>
+        </plugins>
+    </reporting>
+</project>
index 426abb01bc09054b831c6b2144b7e105217a120b..2ec0adb700518e2155cb9076ebfa2afb20daaf06 100644 (file)
@@ -52,6 +52,10 @@ module affinity-topology {
        }
     }
 
+    grouping affinity-flows {
+        uses opendaylight-five-tuple;
+    }
+    
     identity affinity-group-context {
        description "Identity used to mark affinity-group context";
     }