[VOL-4585]  openonu changes adapter for adding FTTB Subscriber Traffic flows

Change-Id: Ia180db9e19547b5a1d6e0ac72696f098b6dbb515
diff --git a/VERSION b/VERSION
index 14627a7..2380dcf 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-7.1.6
+7.1.7
diff --git a/pkg/flows/flow_utils.go b/pkg/flows/flow_utils.go
old mode 100644
new mode 100755
index 1e50a63..46375fa
--- a/pkg/flows/flow_utils.go
+++ b/pkg/flows/flow_utils.go
@@ -629,6 +629,22 @@
 	return innerTag
 }
 
+func GetInnerTagFromWriteMetaData(ctx context.Context, metadata uint64) uint16 {
+	/*
+			  Write metadata instruction value (metadata) is 8 bytes:
+		    	MS 2 bytes: C Tag
+		    	Next 2 bytes: Technology Profile Id
+		    	Next 4 bytes: Port number (uni or nni)
+		    	This is set in the ONOS OltPipeline as a write metadata instruction
+	*/
+	var innerTag uint16 = 0
+	if metadata != 0 {
+		innerTag = uint16((metadata >> 48) & 0xFFFF)
+		logger.Debugw(ctx, "Found  CVLAN from write metadate action", log.Fields{"c_vlan": innerTag})
+	}
+	return innerTag
+}
+
 //GetInnerTagFromMetaData retrieves the inner tag from the Metadata_ofp. The port number (UNI on ONU) is in the
 // lower 32-bits of Metadata_ofp and the inner_tag is in the upper 32-bits. This is set in the ONOS OltPipeline as
 //// a Metadata_ofp field