shorter peer name for vlan, add fsfw config

Change-Id: I35d1b58f68b19e8c3fa3e45d0a0fbddd9fee49c0
diff --git a/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/Dependency/Functions.py b/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/Dependency/Functions.py
index 8d4007a..97a432a 100644
--- a/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/Dependency/Functions.py
+++ b/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/Dependency/Functions.py
@@ -66,7 +66,7 @@
 
 
 def pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
+                       peers = ["pr64514", "pr64515", "pr64516"],
                        expectAllSuccess = True ):
     """
     Carry out ping test between each BGP speaker and peer pair
diff --git a/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/Dependency/USECASE_SdnipI2MN_Cluster.py b/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/Dependency/USECASE_SdnipI2MN_Cluster.py
index d034371..0c3ab08 100644
--- a/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/Dependency/USECASE_SdnipI2MN_Cluster.py
+++ b/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/Dependency/USECASE_SdnipI2MN_Cluster.py
@@ -38,9 +38,9 @@
         Topo.__init__( self, *args, **kwargs )
 
         # BGP peer hosts
-        peer64514 = self.addHost( 'peer64514' )
-        peer64515 = self.addHost( 'peer64515' )
-        peer64516 = self.addHost( 'peer64516' )
+        pr64514 = self.addHost( 'pr64514' )
+        pr64515 = self.addHost( 'pr64515' )
+        pr64516 = self.addHost( 'pr64516' )
 
         '''
         sw1 = self.addSwitch( 'SEAT', dpid = '00000000000000a1' )
@@ -197,19 +197,19 @@
         self.addLink( sw38, sw39 )
 
         # connection between switches and peers
-        self.addLink( peer64514, sw32 )
-        self.addLink( peer64515, sw8 )
-        self.addLink( peer64516, sw28 )
+        self.addLink( pr64514, sw32 )
+        self.addLink( pr64515, sw8 )
+        self.addLink( pr64516, sw28 )
 
         # connection between BGP peer and hosts behind the BGP peer
-        self.addLink( peer64514, host64514 )
-        self.addLink( peer64515, host64515 )
-        self.addLink( peer64516, host64516 )
+        self.addLink( pr64514, host64514 )
+        self.addLink( pr64515, host64515 )
+        self.addLink( pr64516, host64516 )
 
         # Internal Connection To Hosts
-        self.addLink( swCtl100, peer64514 )
-        self.addLink( swCtl100, peer64515 )
-        self.addLink( swCtl100, peer64516 )
+        self.addLink( swCtl100, pr64514 )
+        self.addLink( swCtl100, pr64515 )
+        self.addLink( swCtl100, pr64516 )
         self.addLink( swCtl100, speaker1 )
         self.addLink( swCtl100, speaker2 )
 
@@ -286,9 +286,9 @@
     net = Mininet( topo = topo, controller = RemoteController )
 
 
-    speaker1, speaker2, peer64514, peer64515, peer64516 = \
+    speaker1, speaker2, pr64514, pr64515, pr64516 = \
     net.get( 'speaker1', 'speaker2' ,
-             'peer64514', 'peer64515', 'peer64516' )
+             'pr64514', 'pr64515', 'pr64516' )
 
     # Adding addresses to speakers' interface connected to sw24
     # for BGP peering
@@ -312,33 +312,33 @@
     net.start()
 
     # setup configuration on the interface connected to switch
-    peer64514.cmd( "ifconfig  peer64514-eth0 10.0.4.1 up" )
-    peer64514.cmd( "ip addr add 10.0.14.1/24 dev peer64514-eth0" )
-    peer64514.setMAC( '00:00:00:00:00:04', 'peer64514-eth0' )
-    peer64515.cmd( "ifconfig  peer64515-eth0 10.0.5.1 up" )
-    peer64515.cmd( "ip addr add 10.0.15.1/24 dev peer64515-eth0" )
-    peer64515.setMAC( '00:00:00:00:00:05', 'peer64515-eth0' )
-    peer64516.cmd( "ifconfig  peer64516-eth0 10.0.6.1 up" )
-    peer64516.cmd( "ip addr add 10.0.16.1/24 dev peer64516-eth0" )
-    peer64516.setMAC( '00:00:00:00:00:06', 'peer64516-eth0' )
+    pr64514.cmd( "ifconfig  pr64514-eth0 10.0.4.1 up" )
+    pr64514.cmd( "ip addr add 10.0.14.1/24 dev pr64514-eth0" )
+    pr64514.setMAC( '00:00:00:00:00:04', 'pr64514-eth0' )
+    pr64515.cmd( "ifconfig  pr64515-eth0 10.0.5.1 up" )
+    pr64515.cmd( "ip addr add 10.0.15.1/24 dev pr64515-eth0" )
+    pr64515.setMAC( '00:00:00:00:00:05', 'pr64515-eth0' )
+    pr64516.cmd( "ifconfig  pr64516-eth0 10.0.6.1 up" )
+    pr64516.cmd( "ip addr add 10.0.16.1/24 dev pr64516-eth0" )
+    pr64516.setMAC( '00:00:00:00:00:06', 'pr64516-eth0' )
 
     # setup configuration on the interface connected to hosts
-    peer64514.setIP( "4.0.0.254", 8, "peer64514-eth1" )
-    peer64514.setMAC( '00:00:00:00:00:44', 'peer64514-eth1' )
-    peer64515.setIP( "5.0.0.254", 8, "peer64515-eth1" )
-    peer64515.setMAC( '00:00:00:00:00:55', 'peer64515-eth1' )
-    peer64516.setIP( "6.0.0.254", 8, "peer64516-eth1" )
-    peer64516.setMAC( '00:00:00:00:00:66', 'peer64516-eth1' )
+    pr64514.setIP( "4.0.0.254", 8, "pr64514-eth1" )
+    pr64514.setMAC( '00:00:00:00:00:44', 'pr64514-eth1' )
+    pr64515.setIP( "5.0.0.254", 8, "pr64515-eth1" )
+    pr64515.setMAC( '00:00:00:00:00:55', 'pr64515-eth1' )
+    pr64516.setIP( "6.0.0.254", 8, "pr64516-eth1" )
+    pr64516.setMAC( '00:00:00:00:00:66', 'pr64516-eth1' )
 
     # enable forwarding on BGP peer hosts
-    peer64514.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
-    peer64515.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
-    peer64516.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+    pr64514.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+    pr64515.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+    pr64516.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
 
     # config interface for control plane connectivity
-    peer64514.setIP( "192.168.0.4", 24, "peer64514-eth2" )
-    peer64515.setIP( "192.168.0.5", 24, "peer64515-eth2" )
-    peer64516.setIP( "192.168.0.6", 24, "peer64516-eth2" )
+    pr64514.setIP( "192.168.0.4", 24, "pr64514-eth2" )
+    pr64515.setIP( "192.168.0.5", 24, "pr64515-eth2" )
+    pr64516.setIP( "192.168.0.6", 24, "pr64516-eth2" )
 
     # Setup hosts in each non-SDN AS
     host64514, host64515, host64516 = \
@@ -368,9 +368,9 @@
     '''
 
     # Start Quagga on border routers
-    startquagga( peer64514, 64514, 'quagga64514.conf' )
-    startquagga( peer64515, 64515, 'quagga64515.conf' )
-    startquagga( peer64516, 64516, 'quagga64516.conf' )
+    startquagga( pr64514, 64514, 'quagga64514.conf' )
+    startquagga( pr64515, 64515, 'quagga64515.conf' )
+    startquagga( pr64516, 64516, 'quagga64516.conf' )
 
     # start Quagga in SDN network
     startquagga( speaker1, 64513, 'quagga-sdn.conf' )
@@ -393,7 +393,7 @@
 
     stopsshd()
 
-    hosts = [ peer64514, peer64515, peer64516, host64514];
+    hosts = [ pr64514, pr64515, pr64516, host64514];
     startsshds( hosts )
 
 
diff --git a/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.params b/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.params
index 097361d..2a5f0c2 100644
--- a/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.params
+++ b/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.params
@@ -11,6 +11,9 @@
         <ip1>OC1</ip1>
         <ip2>OC2</ip2>
         <ip3>OC3</ip3>
+        <ipN>OCN</ipN>
+        <fsfwIp>10.128.10.12</fsfwIp>
+        <fsfwPort>6633</fsfwPort>
         <port1>6653</port1>
     </CTRL>
 
diff --git a/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.py b/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.py
index 7b95479..15bdd8c 100644
--- a/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.py
+++ b/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.py
@@ -5,10 +5,12 @@
         self.default = ''
         global branchName
 
+    # This case is to setup Mininet testbed
     def CASE100( self, main ):
         """
             Start mininet
         """
+        import os
         import imp
         main.log.case( "Setup the Mininet testbed" )
         main.dependencyPath = main.testDir + \
@@ -26,19 +28,18 @@
         if not topoResult:
             main.cleanup()
             main.exit()
-        main.step( "Connect switches to controllers" )
+        main.step( "Connect switches to FSFW" )
 
-        # connect all switches to controllers
         swResult = main.TRUE
         for i in range ( 1, int( main.params['config']['switchNum'] ) + 1 ):
             sw = "sw%s" % ( i )
-            swResult = swResult and main.Mininet.assignSwController( sw,
-                                                 [ONOS1Ip, ONOS2Ip, ONOS3Ip] )
+            swResult = swResult and main.Mininet.assignSwController( sw, fsfwIp,
+                                                                     port = fsfwPort )
 
         utilities.assert_equals( expect = main.TRUE,
                              actual = swResult,
-                             onpass = "Successfully connect all switches to ONOS",
-                             onfail = "Failed to connect all switches to ONOS" )
+                             onpass = "Successfully connect all switches to FSFW",
+                             onfail = "Failed to connect all switches to FSFW" )
         if not swResult:
             main.cleanup()
             main.exit()
@@ -69,12 +70,17 @@
         ONOS2Ip = os.getenv( main.params[ 'CTRL' ][ 'ip2' ] )
         ONOS3Ip = os.getenv( main.params[ 'CTRL' ][ 'ip3' ] )
 
-        global peer64514
-        global peer64515
-        global peer64516
-        peer64514 = main.params['config']['peer64514']
-        peer64515 = main.params['config']['peer64515']
-        peer64516 = main.params['config']['peer64516']
+        global pr64514
+        global pr64515
+        global pr64516
+        pr64514 = main.params['config']['pr64514']
+        pr64515 = main.params['config']['pr64515']
+        pr64516 = main.params['config']['pr64516']
+
+        global fsfwIp
+        global fsfwPort
+        fsfwIp = main.params[ 'CTRL' ][ 'fsfwIp' ]
+        fsfwPort = main.params[ 'CTRL' ][ 'fsfwPort' ]
 
         main.step( "Applying cell variable to environment" )
         cellResult = main.ONOSbench.setCell( cellName )
@@ -231,10 +237,10 @@
 
         main.case( "Ping tests between BGP peers and speakers" )
         main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
+                       peers = ["pr64514", "pr64515", "pr64516"],
                        expectAllSuccess = True )
         main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [peer64514, peer64515, peer64516],
+                       peers = [pr64514, pr64515, pr64516],
                        expectAllSuccess = True )
 
 
@@ -330,7 +336,7 @@
         import time
         main.case( "Bring down links and check routes/intents" )
         main.step( "Bring down the link between sw32 and peer64514" )
-        linkResult1 = main.Mininet.link( END1 = "sw32", END2 = "peer64514",
+        linkResult1 = main.Mininet.link( END1 = "sw32", END2 = "pr64514",
                                          OPTION = "down" )
         utilities.assertEquals( expect = main.TRUE,
                                 actual = linkResult1,
@@ -347,7 +353,7 @@
             main.exit()
 
         main.step( "Bring down the link between sw8 and peer64515" )
-        linkResult2 = main.Mininet.link( END1 = "sw8", END2 = "peer64515",
+        linkResult2 = main.Mininet.link( END1 = "sw8", END2 = "pr64515",
                                          OPTION = "down" )
         utilities.assertEquals( expect = main.TRUE,
                                 actual = linkResult2,
@@ -363,7 +369,7 @@
             main.exit()
 
         main.step( "Bring down the link between sw28 and peer64516" )
-        linkResult3 = main.Mininet.link( END1 = "sw28", END2 = "peer64516",
+        linkResult3 = main.Mininet.link( END1 = "sw28", END2 = "pr64516",
                                          OPTION = "down" )
         utilities.assertEquals( expect = main.TRUE,
                                 actual = linkResult3,
@@ -387,7 +393,7 @@
 
         # Ping test
         main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
+                       peers = ["pr64514", "pr64515", "pr64516"],
                        expectAllSuccess = False )
         main.Functions.pingHostToHost( main,
                         hosts = ["host64514", "host64515", "host64516"],
@@ -401,7 +407,7 @@
         import time
         main.case( "Bring up links and check routes/intents" )
         main.step( "Bring up the link between sw32 and peer64514" )
-        linkResult1 = main.Mininet.link( END1 = "sw32", END2 = "peer64514",
+        linkResult1 = main.Mininet.link( END1 = "sw32", END2 = "pr64514",
                                          OPTION = "up" )
         utilities.assertEquals( expect = main.TRUE,
                                 actual = linkResult1,
@@ -417,7 +423,7 @@
             main.exit()
 
         main.step( "Bring up the link between sw8 and peer64515" )
-        linkResult2 = main.Mininet.link( END1 = "sw8", END2 = "peer64515",
+        linkResult2 = main.Mininet.link( END1 = "sw8", END2 = "pr64515",
                                          OPTION = "up" )
         utilities.assertEquals( expect = main.TRUE,
                                 actual = linkResult2,
@@ -433,7 +439,7 @@
             main.exit()
 
         main.step( "Bring up the link between sw28 and peer64516" )
-        linkResult3 = main.Mininet.link( END1 = "sw28", END2 = "peer64516",
+        linkResult3 = main.Mininet.link( END1 = "sw28", END2 = "pr64516",
                                          OPTION = "up" )
         utilities.assertEquals( expect = main.TRUE,
                                 actual = linkResult3,
@@ -457,7 +463,7 @@
 
         # Ping test
         main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
+                       peers = ["pr64514", "pr64515", "pr64516"],
                        expectAllSuccess = True )
         main.Functions.pingHostToHost( main,
                         hosts = ["host64514", "host64515", "host64516"],
@@ -502,9 +508,9 @@
             main.exit()
 
         main.step( "Check ping between BGP peers and speaker1" )
-        result4 = main.Mininet.pingHost( src = "speaker1", target = "peer64514" )
-        result5 = main.Mininet.pingHost( src = "speaker1", target = "peer64515" )
-        result6 = main.Mininet.pingHost( src = "speaker1", target = "peer64516" )
+        result4 = main.Mininet.pingHost( src = "speaker1", target = "pr64514" )
+        result5 = main.Mininet.pingHost( src = "speaker1", target = "pr64515" )
+        result6 = main.Mininet.pingHost( src = "speaker1", target = "pr64516" )
 
         pingResult2 = ( result4 == main.FALSE ) and ( result5 == main.TRUE ) \
                       and ( result6 == main.TRUE )
@@ -518,9 +524,9 @@
 
         main.step( "Check ping between BGP peers and speaker2" )
         # TODO
-        result7 = main.Mininet.pingHost( src = "speaker2", target = peer64514 )
-        result8 = main.Mininet.pingHost( src = "speaker2", target = peer64515 )
-        result9 = main.Mininet.pingHost( src = "speaker2", target = peer64516 )
+        result7 = main.Mininet.pingHost( src = "speaker2", target = pr64514 )
+        result8 = main.Mininet.pingHost( src = "speaker2", target = pr64515 )
+        result9 = main.Mininet.pingHost( src = "speaker2", target = pr64516 )
 
         pingResult3 = ( result7 == main.FALSE ) and ( result8 == main.TRUE ) \
                                                 and ( result9 == main.TRUE )
@@ -581,10 +587,10 @@
 
         # Ping test
         main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
+                       peers = ["pr64514", "pr64515", "pr64516"],
                        expectAllSuccess = True )
         main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [peer64514, peer64515, peer64516],
+                       peers = [pr64514, pr64515, pr64516],
                        expectAllSuccess = True )
         main.Functions.pingHostToHost( main,
                         hosts = ["host64514", "host64515", "host64516"],
@@ -631,10 +637,10 @@
             onfail = "Flow status is wrong!" )
         # Ping test
         main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
+                       peers = ["pr64514", "pr64515", "pr64516"],
                        expectAllSuccess = True )
         main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [peer64514, peer64515, peer64516],
+                       peers = [pr64514, pr64515, pr64516],
                        expectAllSuccess = True )
         main.Functions.pingHostToHost( main,
                         hosts = ["host64514", "host64515", "host64516"],
@@ -686,10 +692,10 @@
             onfail = "Flow status is wrong!" )
         # Ping test
         main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
+                       peers = ["pr64514", "pr64515", "pr64516"],
                        expectAllSuccess = True )
         main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [peer64514, peer64515, peer64516],
+                       peers = [pr64514, pr64515, pr64516],
                        expectAllSuccess = True )
         main.Functions.pingHostToHost( main,
                         hosts = ["host64514", "host64515", "host64516"],
@@ -712,10 +718,10 @@
             onfail = "Flow status is wrong!" )
 
         main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
+                       peers = ["pr64514", "pr64515", "pr64516"],
                        expectAllSuccess = True )
         main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [peer64514, peer64515, peer64516],
+                       peers = [pr64514, pr64515, pr64516],
                        expectAllSuccess = True )
         main.Functions.pingHostToHost( main,
                         hosts = ["host64514", "host64515", "host64516"],
@@ -760,11 +766,11 @@
 
         '''
         main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
+                       peers = ["pr64514", "pr64515", "pr64516"],
                        expectAllSuccess = False )
         '''
         main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [peer64514, peer64515, peer64516],
+                       peers = [pr64514, pr64515, pr64516],
                        expectAllSuccess = True )
         main.Functions.pingHostToHost( main,
                         hosts = ["host64514", "host64515", "host64516"],
@@ -827,10 +833,10 @@
                 onfail = "Flow status is wrong!" )
 
         main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
+                       peers = ["pr64514", "pr64515", "pr64516"],
                        expectAllSuccess = True )
         main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [peer64514, peer64515, peer64516],
+                       peers = [pr64514, pr64515, pr64516],
                        expectAllSuccess = True )
         main.Functions.pingHostToHost( main,
                         hosts = ["host64514", "host64515", "host64516"],
diff --git a/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/sdnip_multiple_instance_VM b/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/sdnip_multiple_instance_VM
index 070e366..3a5aec7 100644
--- a/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/sdnip_multiple_instance_VM
+++ b/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/sdnip_multiple_instance_VM
@@ -1,4 +1,4 @@
-export ONOS_CELL="sdnip_single_instance"
+export ONOS_CELL="sdnip_multiple_instance_VM"
 
 export ONOS_INSTALL_DIR="/opt/onos"
 export ONOS_NIC=10.128.20.*
@@ -10,7 +10,4 @@
 export ONOS_USER="sdn"                  # ONOS user on remote system
 export ONOS_PWD="rocks"
 
-#export ONOS_APPS="drivers,openflow,config,proxyarp"
 export ONOS_APPS="drivers,openflow,proxyarp"
-
-
diff --git a/TestON/tests/USECASE_SdnipFunction_fsfw/USECASE_SdnipFunction_fsfw.py b/TestON/tests/USECASE_SdnipFunction_fsfw/USECASE_SdnipFunction_fsfw.py
index 976472c..e7c5f9d 100644
--- a/TestON/tests/USECASE_SdnipFunction_fsfw/USECASE_SdnipFunction_fsfw.py
+++ b/TestON/tests/USECASE_SdnipFunction_fsfw/USECASE_SdnipFunction_fsfw.py
@@ -28,7 +28,7 @@
         if not topoResult:
             main.cleanup()
             main.exit()
-        main.step( "Connect switches to controller" )
+        main.step( "Connect switches to FSFW" )
 
         global ONOS1Ip
         ONOS1Ip = os.getenv( main.params[ 'CTRL' ][ 'ip1' ] )
@@ -45,7 +45,6 @@
             sw = "sw%s" % ( i )
             swResult = swResult and main.Mininet.assignSwController( sw, fsfwIp,
                                                                      port = fsfwPort )
-            # swResult = swResult and main.Mininet.assignSwController( sw, ONOS1Ip, port = "6633" )
         utilities.assert_equals( expect = main.TRUE,
                              actual = swResult,
                              onpass = "Successfully connect all switches to ONOS",