Merge "CORD_1598 - The Egress VLAN is not configurable in the IGMP proxy outbound packets"
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..8bc2e12
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+target
+.classpath
+.project
+.settings
+*.swp
+*.iml
diff --git a/app.xml b/app.xml
index 0b0389d..162ec50 100644
--- a/app.xml
+++ b/app.xml
@@ -14,9 +14,9 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
-<app name="org.opencord.igmpproxy" origin="Nokia" version="1.2-SNAPSHOT"
-        featuresRepo="mvn:org.opencord/onos-app-igmpproxy/1.2-SNAPSHOT/xml/features"
+<app name="org.opencord.igmpproxy" origin="Nokia" version="1.0.0-SNAPSHOT"
+        featuresRepo="mvn:org.opencord/onos-app-igmpproxy/1.0.0-SNAPSHOT/xml/features"
         features="onos-app-igmpproxy" apps="org.opencord.mcast">
     <description>IGMP PROXY APP</description>
-    <artifact>mvn:org.opencord/onos-app-igmpproxy/1.2-SNAPSHOT</artifact>
+    <artifact>mvn:org.opencord/onos-app-igmpproxy/1.0.0-SNAPSHOT</artifact>
 </app>
diff --git a/pom.xml b/pom.xml
index 4986eeb..9139b56 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ Copyright 2015-present Open Networking Laboratory
+  ~ Copyright 2015-present Open Networking Foundation
   ~
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@
 
     <groupId>org.opencord</groupId>
     <artifactId>onos-app-igmpproxy</artifactId>
-    <version>1.2-SNAPSHOT</version>
+    <version>1.0.0-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <description>IGMP PROXY APP</description>
@@ -41,7 +41,8 @@
         <onos.app.url>http://opencord.org</onos.app.url>
         <onos.app.readme>IGMP implementation.</onos.app.readme>
         <onos.app.requires>org.opencord.config</onos.app.requires>
-        <onos.app.requires>org.opencord.mcast</onos.app.requires>
+	<onos.app.requires>org.opencord.mcast</onos.app.requires>
+	<cord.config.version>1.2.0-SNAPSHOT</cord.config.version>
     </properties>
 
 
@@ -92,7 +93,7 @@
         <dependency>
             <groupId>org.opencord</groupId>
             <artifactId>cord-config</artifactId>
-            <version>${project.version}</version>
+	    <version>${cord.config.version}</version>
         </dependency>
     </dependencies>
 
diff --git a/src/main/java/org/opencord/igmpproxy/GroupMember.java b/src/main/java/org/opencord/igmpproxy/GroupMember.java
index 4fab7d4..5101167 100644
--- a/src/main/java/org/opencord/igmpproxy/GroupMember.java
+++ b/src/main/java/org/opencord/igmpproxy/GroupMember.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.opencord.igmpproxy;
 
 import org.onlab.packet.IGMPMembership;
diff --git a/src/main/java/org/opencord/igmpproxy/IgmpManager.java b/src/main/java/org/opencord/igmpproxy/IgmpManager.java
index 967e467..1b95105 100644
--- a/src/main/java/org/opencord/igmpproxy/IgmpManager.java
+++ b/src/main/java/org/opencord/igmpproxy/IgmpManager.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.opencord.igmpproxy;
 
 import com.google.common.collect.Maps;
@@ -557,9 +572,15 @@
     }
 
     private boolean isConnectPoint(DeviceId device, PortNumber port) {
-        return (connectPointMode && connectPoint.deviceId().equals(device)
-                && connectPoint.port().equals(port));
+        if (connectPoint != null) {
+            return (connectPointMode && connectPoint.deviceId().equals(device)
+                    && connectPoint.port().equals(port));
+        } else {
+            log.info("connectPoint not configured for device {}", device);
+            return false;
+        }
     }
+
     private boolean isUplink(DeviceId device, PortNumber port) {
         return ((!connectPointMode) && oltData.containsKey(device)
                 && oltData.get(device).uplink().equals(port));
diff --git a/src/main/java/org/opencord/igmpproxy/IgmpSender.java b/src/main/java/org/opencord/igmpproxy/IgmpSender.java
index 21db478..75e1d7b 100644
--- a/src/main/java/org/opencord/igmpproxy/IgmpSender.java
+++ b/src/main/java/org/opencord/igmpproxy/IgmpSender.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.opencord.igmpproxy;
 
 import org.onlab.packet.Ethernet;
diff --git a/src/main/java/org/opencord/igmpproxy/IgmpTimer.java b/src/main/java/org/opencord/igmpproxy/IgmpTimer.java
index 0124b42..4d5e5d8 100644
--- a/src/main/java/org/opencord/igmpproxy/IgmpTimer.java
+++ b/src/main/java/org/opencord/igmpproxy/IgmpTimer.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.opencord.igmpproxy;
 
 import com.google.common.collect.Maps;
diff --git a/src/main/java/org/opencord/igmpproxy/IgmpproxyConfig.java b/src/main/java/org/opencord/igmpproxy/IgmpproxyConfig.java
index 0756218..107c262 100644
--- a/src/main/java/org/opencord/igmpproxy/IgmpproxyConfig.java
+++ b/src/main/java/org/opencord/igmpproxy/IgmpproxyConfig.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.opencord.igmpproxy;
 
 import org.onosproject.core.ApplicationId;
diff --git a/src/main/java/org/opencord/igmpproxy/IgmpproxySsmTranslateConfig.java b/src/main/java/org/opencord/igmpproxy/IgmpproxySsmTranslateConfig.java
index b8f42a5..9c6da25 100644
--- a/src/main/java/org/opencord/igmpproxy/IgmpproxySsmTranslateConfig.java
+++ b/src/main/java/org/opencord/igmpproxy/IgmpproxySsmTranslateConfig.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016-present Open Networking Laboratory
+ * Copyright 2017-present Open Networking Foundation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.opencord.igmpproxy;
 
 import com.fasterxml.jackson.databind.JsonNode;
diff --git a/src/main/java/org/opencord/igmpproxy/SingleStateMachine.java b/src/main/java/org/opencord/igmpproxy/SingleStateMachine.java
index ceaac52..1675069 100644
--- a/src/main/java/org/opencord/igmpproxy/SingleStateMachine.java
+++ b/src/main/java/org/opencord/igmpproxy/SingleStateMachine.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.opencord.igmpproxy;
 
 import org.onlab.packet.Ethernet;
@@ -7,7 +22,7 @@
 import java.util.Random;
 
 /**
- * State machine for single IGMP group member. The state machine is implemented on 
+ * State machine for single IGMP group member. The state machine is implemented on
  * RFC 2236 "6. Host State Diagram".
  */
 public class SingleStateMachine {
diff --git a/src/main/java/org/opencord/igmpproxy/StateMachine.java b/src/main/java/org/opencord/igmpproxy/StateMachine.java
index 6c12877..27378ad 100644
--- a/src/main/java/org/opencord/igmpproxy/StateMachine.java
+++ b/src/main/java/org/opencord/igmpproxy/StateMachine.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.opencord.igmpproxy;
 
 import com.google.common.collect.Maps;
@@ -7,7 +22,7 @@
 import java.util.Set;
 
 /**
- * State machine for whole IGMP process. The state machine is implemented on 
+ * State machine for whole IGMP process. The state machine is implemented on
  * RFC 2236 "6. Host State Diagram".
  */
 public final class StateMachine {
diff --git a/src/main/java/org/opencord/igmpproxy/package-info.java b/src/main/java/org/opencord/igmpproxy/package-info.java
index ad33c32..a2f9362 100644
--- a/src/main/java/org/opencord/igmpproxy/package-info.java
+++ b/src/main/java/org/opencord/igmpproxy/package-info.java
@@ -1,4 +1,20 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 /**
  * Created by onos on 17-3-9.
  */
-package org.opencord.igmpproxy;
\ No newline at end of file
+package org.opencord.igmpproxy;