add VLAN tests to FUNCintentRest
fix SDNIP-ICMP intent tests in FUNCintentRest

Change-Id: I0b95bc3424da64e6959381e1d70d835ec73c942b
diff --git a/TestON/drivers/common/api/controller/onosrestdriver.py b/TestON/drivers/common/api/controller/onosrestdriver.py
index 1b7c8fd..08f242d 100644
--- a/TestON/drivers/common/api/controller/onosrestdriver.py
+++ b/TestON/drivers/common/api/controller/onosrestdriver.py
@@ -431,7 +431,7 @@
             main.exit()
 
     def addHostIntent( self, hostIdOne, hostIdTwo, appId='org.onosproject.cli',
-                       ip="DEFAULT", port="DEFAULT" ):
+                       ip="DEFAULT", port="DEFAULT", vlanId="" ):
         """
         Description:
             Adds a host-to-host intent ( bidirectional ) by
@@ -454,6 +454,9 @@
                           "constraints": [{"type": "LinkTypeConstraint",
                                            "types": ["OPTICAL"],
                                            "inclusive": 'false' }]}
+            if vlanId:
+                intentJson[ 'selector' ][ 'criteria' ].append( { "type":"VLAN_VID",
+                                                                 "vlanId":vlanId } )
             output = None
             if ip == "DEFAULT":
                 main.log.warn( "No ip given, reverting to ip from topo file" )
@@ -501,7 +504,8 @@
                         tcpSrc="",
                         tcpDst="",
                         ip="DEFAULT",
-                        port="DEFAULT" ):
+                        port="DEFAULT",
+                        vlanId="" ):
         """
         Description:
             Adds a point-to-point intent ( uni-directional ) by
@@ -599,6 +603,10 @@
                 intentJson[ 'selector' ][ 'criteria' ].append(
                                                        { "type":"IP_PROTO",
                                                          "protocol": ipProto } )
+            if vlanId:
+                intentJson[ 'selector' ][ 'criteria' ].append(
+                                                       { "type":"VLAN_VID",
+                                                         "vlanId": vlanId } )
 
             # TODO: Bandwidth and Lambda will be implemented if needed