Started work on Multi to Single Endpoint Failure Test.
-Test is uncompletable due to ONOS Bug that causes multi to single point intents
to fail if one or more senders are disconnected.
Initial Implementation of Endpoint Failure Test
-Created testcase for Multi to Single and Single to Multi Endpoint Failures
-Tests same topologies as the Multi to Single Point and Single to Multi Point Intent Tests
-Currently fails due to bug in ONOS causing the intent to fail when in
the following situation:
-host A and B are sending to host C. There is no longer a path from A to C,
but there is still a path from B to C.
Change-Id: Id0c00fd6bc69c754783c223b1dc0df8e2bc41ffd
diff --git a/TestON/tests/FUNCintent/Dependency/FuncIntentFunction.py b/TestON/tests/FUNCintent/Dependency/FuncIntentFunction.py
index 067ed3e..0419583 100644
--- a/TestON/tests/FUNCintent/Dependency/FuncIntentFunction.py
+++ b/TestON/tests/FUNCintent/Dependency/FuncIntentFunction.py
@@ -869,22 +869,22 @@
return main.FALSE
def testPointIntent( main,
- name,
- intentId,
- senders,
- recipients,
- badSenders={},
- badRecipients={},
- onosNode=0,
- ethType="",
- bandwidth="",
- lambdaAlloc=False,
- ipProto="",
- ipAddresses="",
- tcp="",
- sw1="s5",
- sw2="s2",
- expectedLink=0):
+ name,
+ intentId,
+ senders,
+ recipients,
+ badSenders={},
+ badRecipients={},
+ onosNode=0,
+ ethType="",
+ bandwidth="",
+ lambdaAlloc=False,
+ ipProto="",
+ ipAddresses="",
+ tcp="",
+ sw1="s5",
+ sw2="s2",
+ expectedLink=0):
"""
Test a Point Intent
@@ -1087,6 +1087,261 @@
return testResult
+def testEndPointFail( main,
+ name,
+ intentId,
+ senders,
+ recipients,
+ isolatedSenders,
+ isolatedRecipients,
+ onosNode=0,
+ ethType="",
+ bandwidth="",
+ lambdaAlloc=False,
+ ipProto="",
+ ipAddresses="",
+ tcp="",
+ sw1="",
+ sw2="",
+ sw3="",
+ sw4="",
+ sw5="",
+ expectedLink1=0,
+ expectedLink2=0 ):
+ """
+ Test Single to Multipoint Topology for Endpoint failures
+ """
+
+ # Parameter Validity Check
+ assert main, "There is no main variable"
+ assert senders, "You must specify a sender"
+ assert recipients, "You must specify a recipient"
+
+ global itemName
+ itemName = name
+ tempHostsData = {}
+ onosNode = int( onosNode )
+
+ main.log.info( itemName + ": Testing Point Intent" )
+
+ # Names for scapy
+ senderNames = [ x.get( "name" ) for x in senders ]
+ recipientNames = [ x.get( "name" ) for x in recipients ]
+ isolatedSenderNames = [ x.get( "name" ) for x in isolatedSenders ]
+ isolatedRecipientNames = [ x.get( "name" ) for x in isolatedRecipients ]
+ connectedSenderNames = [x.get("name") for x in senders if x.get("name") not in isolatedSenderNames]
+ connectedRecipientNames = [x.get("name") for x in recipients if x.get("name") not in isolatedRecipientNames]
+
+ for sender in senders:
+ if not sender.get( "device" ):
+ main.log.warn( "Device not given for sender {0}. Loading from main.hostData".format( sender.get( "name" ) ) )
+ sender[ "device" ] = main.hostsData.get( sender.get( "name" ) ).get( "location" )
+
+ for recipient in recipients:
+ if not recipient.get( "device" ):
+ main.log.warn( "Device not given for recipient {0}. Loading from\
+ main.hostData".format( recipient.get( "name" ) ) )
+ recipient[ "device" ] = main.hostsData.get( recipient.get( "name" ) ).get( "location" )
+
+ testResult = main.TRUE
+ main.log.info( itemName + ": Adding multi point to single point intents" )
+
+ # Check intent state
+ if utilities.retry( f=checkIntentState, retValue=main.FALSE,
+ args=( main, [ intentId ] ), sleep=main.checkIntentSleep ):
+ main.assertReturnString += 'Initial Intent State Passed\n'
+ else:
+ main.assertReturnString += 'Initial Intent State Failed\n'
+ testResult = main.FALSE
+
+ # Check flows count in each node
+ if utilities.retry( f=checkFlowsCount, retValue=main.FALSE,
+ args=[ main ] ) and utilities.retry( f=checkFlowsState,
+ retValue=main.FALSE,
+ args=[ main ] ):
+ main.assertReturnString += 'Initial Flow State Passed\n'
+ else:
+ main.assertReturnString += 'Intial Flow State Failed\n'
+ testResult = main.FALSE
+
+ # Check Connectivity
+ if utilities.retry( f=scapyCheckConnection, retValue=main.FALSE,
+ args=( main, senderNames, recipientNames ) ):
+ main.assertReturnString += 'Initial Connectivity Check Passed\n'
+ else:
+ main.assertReturnString += 'Initial Connectivity Check Failed\n'
+ testResult = main.FALSE
+
+ # Take two links down
+ # Take first link down
+ if utilities.retry( f=link, retValue=main.FALSE, args=( main, sw1, sw2, "down" ) ):
+ main.assertReturnString += 'Link Down Passed\n'
+ else:
+ main.assertReturnString += 'Link Down Failed\n'
+ testResult = main.FALSE
+
+ # Take second link down
+ if utilities.retry( f=link, retValue=main.FALSE, args=( main, sw3, sw4, "down" ) ):
+ main.assertReturnString += 'Link Down Passed\n'
+ else:
+ main.assertReturnString += 'Link Down Failed\n'
+ testResult = main.FALSE
+
+ # Check intent state
+ if utilities.retry( f=checkIntentState, retValue=main.FALSE,
+ args=( main, [ intentId ] ), sleep=main.checkIntentSleep ):
+ main.assertReturnString += 'Link Down Intent State Passed\n'
+ else:
+ main.assertReturnString += 'Link Down Intent State Failed\n'
+ testResult = main.FALSE
+
+ # Check flows count in each node
+ if utilities.retry( f=checkFlowsCount, retValue=main.FALSE,
+ args=[ main ] ) and utilities.retry( f=checkFlowsState,
+ retValue=main.FALSE, args=[ main ] ):
+ main.assertReturnString += 'Link Down Flow State Passed\n'
+ else:
+ main.assertReturnString += 'Link Down Flow State Failed\n'
+ testResult = main.FALSE
+
+ # Check OnosTopology
+ if utilities.retry( f=checkTopology, retValue=main.FALSE, args=( main, expectedLink1 ) ):
+ main.assertReturnString += 'Link Down Topology State Passed\n'
+ else:
+ main.assertReturnString += 'Link Down Topology State Failed\n'
+ testResult = main.FALSE
+
+ # Check Connection
+ if utilities.retry( f=scapyCheckConnection, retValue=main.FALSE,
+ args=( main, senderNames, recipientNames ) ):
+ main.assertReturnString += 'Link Down Connectivity Check Passed\n'
+ else:
+ main.assertReturnString += 'Link Down Connectivity Check Failed\n'
+ testResult = main.FALSE
+
+ # Take a third link down to isolate one node
+ if utilities.retry( f=link, retValue=main.FALSE, args=( main, sw3, sw5, "down" ) ):
+ main.assertReturnString += 'Isolation link Down Passed\n'
+ else:
+ main.assertReturnString += 'Isolation link Down Failed\n'
+ testResult = main.FALSE
+
+ # Check intent state
+ if utilities.retry( f=checkIntentState, retValue=main.FALSE,
+ args=( main, [ intentId ] ), sleep=main.checkIntentSleep ):
+ main.assertReturnString += 'Isolation link Down Intent State Passed\n'
+ else:
+ main.assertReturnString += 'Isolation link Down Intent State Failed\n'
+ testResult = main.FALSE
+
+ # Check flows count in each node
+ if utilities.retry( f=checkFlowsCount, retValue=main.FALSE,
+ args=[ main ] ) and utilities.retry( f=checkFlowsState,
+ retValue=main.FALSE, args=[ main ] ):
+ main.assertReturnString += 'Isolation link Down Flow State Passed\n'
+ else:
+ main.assertReturnString += 'Isolation link Down Flow State Failed\n'
+ testResult = main.FALSE
+
+ # Check OnosTopology
+ if utilities.retry( f=checkTopology, retValue=main.FALSE, args=( main, expectedLink2 ) ):
+ main.assertReturnString += 'Isolation link Down Topology State Passed\n'
+ else:
+ main.assertReturnString += 'Isolation link Down Topology State Failed\n'
+ testResult = main.FALSE
+
+ # Check Connectivity
+ # First check connectivity of any isolated senders to recipients
+ if isolatedSenderNames:
+ if scapyCheckConnection( main, isolatedSenderNames, recipientNames, None, None, main.TRUE ):
+ main.assertReturnString += 'Isolation link Down Connectivity Check Passed\n'
+ else:
+ main.assertReturnString += 'Isolation link Down Connectivity Check Failed\n'
+ testResult = main.FALSE
+
+ # Next check connectivity of senders to any isolated recipients
+ if isolatedRecipientNames:
+ if scapyCheckConnection( main, senderNames, isolatedRecipientNames, None, None, main.TRUE ):
+ main.assertReturnString += 'Isolation link Down Connectivity Check Passed\n'
+ else:
+ main.assertReturnString += 'Isolation link Down Connectivity Check Failed\n'
+ testResult = main.FALSE
+
+ # Next check connectivity of connected senders and recipients
+ if utilities.retry( f=scapyCheckConnection, retValue=main.FALSE,
+ args=( main, connectedSenderNames , connectedRecipientNames ) ):
+ main.assertReturnString += 'Isolation link Down Connectivity Check Passed\n'
+ else:
+ main.assertReturnString += 'Isolation link Down Connectivity Check Failed\n'
+ testResult = main.FALSE
+
+ # Bring the links back up
+ # Bring first link up
+ if utilities.retry( f=link, retValue=main.FALSE, args=( main, sw1, sw2, "up" ) ):
+ main.assertReturnString += 'Link Up Passed\n'
+ else:
+ main.assertReturnString += 'Link Up Failed\n'
+ testResult = main.FALSE
+
+ # Bring second link up
+ if utilities.retry( f=link, retValue=main.FALSE, args=( main, sw3, sw5, "up" ) ):
+ main.assertReturnString += 'Link Up Passed\n'
+ else:
+ main.assertReturnString += 'Link Up Failed\n'
+ testResult = main.FALSE
+
+ # Bring third link up
+ if utilities.retry( f=link, retValue=main.FALSE, args=( main, sw3, sw4, "up" ) ):
+ main.assertReturnString += 'Link Up Passed\n'
+ else:
+ main.assertReturnString += 'Link Up Failed\n'
+ testResult = main.FALSE
+
+ # Wait for reroute
+ time.sleep( main.rerouteSleep )
+
+ # Check Intents
+ if utilities.retry( f=checkIntentState, retValue=main.FALSE,
+ args=( main, [ intentId ] ), sleep=main.checkIntentSleep ):
+ main.assertReturnString += 'Link Up Intent State Passed\n'
+ else:
+ main.assertReturnString += 'Link Up Intent State Failed\n'
+ testResult = main.FALSE
+
+ # Check flows count in each node
+ if utilities.retry( f=checkFlowsCount, retValue=main.FALSE,
+ args=[ main ] ) and utilities.retry( f=checkFlowsState,
+ retValue=main.FALSE, args=[ main ] ):
+ main.assertReturnString += 'Link Up Flow State Passed\n'
+ else:
+ main.assertReturnString += 'Link Up Flow State Failed\n'
+ testResult = main.FALSE
+
+ # Check OnosTopology
+ if utilities.retry( f=checkTopology, retValue=main.FALSE, args=( main, main.numLinks ) ):
+ main.assertReturnString += 'Link Up Topology State Passed\n'
+ else:
+ main.assertReturnString += 'Link Up Topology State Failed\n'
+ testResult = main.FALSE
+
+ # Check Connection
+ if utilities.retry( f=scapyCheckConnection, retValue=main.FALSE,
+ args=( main, senderNames, recipientNames ) ):
+ main.assertReturnString += 'Link Up Scapy Packet Received Passed\n'
+ else:
+ main.assertReturnString += 'Link Up Scapy Packet Recieved Failed\n'
+ testResult = main.FALSE
+
+ # Remove all intents
+ if utilities.retry( f=removeAllIntents, retValue=main.FALSE, args=( main, [ intentId ] ) ):
+ main.assertReturnString += 'Remove Intents Passed'
+ else:
+ main.assertReturnString += 'Remove Intents Failed'
+ testResult = main.FALSE
+
+ return testResult
+
+
def pingallHosts( main, hostList ):
"""
Ping all host in the hosts list variable
diff --git a/TestON/tests/FUNCintent/FUNCintent.params b/TestON/tests/FUNCintent/FUNCintent.params
index 843848b..f061c67 100644
--- a/TestON/tests/FUNCintent/FUNCintent.params
+++ b/TestON/tests/FUNCintent/FUNCintent.params
@@ -16,8 +16,9 @@
# 3000 - Test single to multi point intents
# 4000 - Test multi to single point intents
# 5000 - Test host mobility
+ # 6000 - Test multi to single end point failure
- <testcases>1,[2,10,12,13,15,2000,3000,4000,16]*2,[2,11,12,13,15,2000,3000,4000,16]*2</testcases>
+ <testcases>1,[2,10,12,13,15,1000,2000,3000,4000,5000,6000,16]*2,[2,11,12,13,15,1000,2000,3000,4000,5000,6000,16]*2</testcases>
<SCALE>
<size>1,3,1,3</size>
diff --git a/TestON/tests/FUNCintent/FUNCintent.py b/TestON/tests/FUNCintent/FUNCintent.py
index 9660fdc..b4ca8af 100644
--- a/TestON/tests/FUNCintent/FUNCintent.py
+++ b/TestON/tests/FUNCintent/FUNCintent.py
@@ -1343,7 +1343,7 @@
senders=senders,
recipients=recipients,
sw1="s5",
- sw2="s2")
+ sw2="s2" )
if installResult:
testResult = main.intentFunction.testPointIntent(
@@ -1356,7 +1356,7 @@
badRecipients=badRecipients,
sw1="s5",
sw2="s2",
- expectedLink=18)
+ expectedLink=18 )
utilities.assert_equals( expect=main.TRUE,
actual=testResult,
@@ -1496,7 +1496,7 @@
main.step( "Testing host mobility by moving h1 from s5 to s6" )
h1PreMove = main.hostsData[ "h1" ][ "location" ][ 0:19 ]
- main.log.info( "Moving h1 from s5 to s6")
+ main.log.info( "Moving h1 from s5 to s6" )
main.Mininet1.moveHost( "h1","s5","s6" )
# Send discovery ping from moved host
@@ -1529,7 +1529,7 @@
name='IPV4 Mobility IPV4',
onosNode='0',
host1=host1,
- host2=host2)
+ host2=host2 )
testResult = main.intentFunction.testHostIntent( main,
name='Host Mobility IPV4',
@@ -1547,3 +1547,381 @@
onfail=main.assertReturnString )
main.intentFunction.report( main )
+
+ def CASE6000( self, main ):
+ """
+ Tests Multi to Single Point Intent and Single to Multi Point Intent End Point Failure
+ """
+ assert main, "There is no main"
+ assert main.CLIs, "There is no main.CLIs"
+ assert main.Mininet1, "Mininet handle should be named Mininet1"
+ assert main.numSwitch, "Placed the total number of switch topology in \
+ main.numSwitch"
+ main.case( "Test Multi to Single End Point Failure" )
+ main.step( "Installing Multi to Single Point intents" )
+
+ main.assertReturnString = "Assertion results for IPV4 multi to single \
+ point intent end point failure with no options set\n"
+ senders = [
+ { "name":"h16", "device":"of:0000000000000006/8" },
+ { "name":"h24", "device":"of:0000000000000007/8" }
+ ]
+ recipients = [
+ { "name":"h8", "device":"of:0000000000000005/8" }
+ ]
+ isolatedSenders = [
+ { "name":"h24"}
+ ]
+ isolatedRecipients = []
+ testResult = main.FALSE
+ installResult = main.intentFunction.installMultiToSingleIntent(
+ main,
+ name="NOOPTION",
+ senders=senders,
+ recipients=recipients,
+ sw1="s5",
+ sw2="s2" )
+
+ if installResult:
+ testResult = main.intentFunction.testEndPointFail(
+ main,
+ intentId=installResult,
+ name="NOOPTION",
+ senders=senders,
+ recipients=recipients,
+ isolatedSenders=isolatedSenders,
+ isolatedRecipients=isolatedRecipients,
+ sw1="s6",
+ sw2="s2",
+ sw3="s4",
+ sw4="s1",
+ sw5="s3",
+ expectedLink1=16,
+ expectedLink2=14 )
+
+ utilities.assert_equals( expect=main.TRUE,
+ actual=testResult,
+ onpass=main.assertReturnString,
+ onfail=main.assertReturnString )
+
+ main.step( "IPV4: Add multi point to single point intents" )
+ main.assertReturnString = "Assertion results for IPV4 multi to single \
+ point intent end point failure with IPV4 type and MAC addresses\n"
+ senders = [
+ { "name":"h16", "device":"of:0000000000000006/8", "mac":"00:00:00:00:00:10" },
+ { "name":"h24", "device":"of:0000000000000007/8", "mac":"00:00:00:00:00:18" }
+ ]
+ recipients = [
+ { "name":"h8", "device":"of:0000000000000005/8", "mac":"00:00:00:00:00:08" }
+ ]
+ isolatedSenders = [
+ { "name":"h24"}
+ ]
+ isolatedRecipients = []
+ testResult = main.FALSE
+ installResult = main.intentFunction.installMultiToSingleIntent(
+ main,
+ name="IPV4",
+ senders=senders,
+ recipients=recipients,
+ ethType="IPV4",
+ sw1="s5",
+ sw2="s2")
+
+ if installResult:
+ testResult = main.intentFunction.testEndPointFail(
+ main,
+ intentId=installResult,
+ name="IPV4",
+ senders=senders,
+ recipients=recipients,
+ isolatedSenders=isolatedSenders,
+ isolatedRecipients=isolatedRecipients,
+ sw1="s6",
+ sw2="s2",
+ sw3="s4",
+ sw4="s1",
+ sw5="s3",
+ expectedLink1=16,
+ expectedLink2=14 )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=testResult,
+ onpass=main.assertReturnString,
+ onfail=main.assertReturnString )
+
+ main.step( "IPV4_2: Add multi point to single point intents" )
+ main.assertReturnString = "Assertion results for IPV4 multi to single \
+ point intent end point failure with IPV4 type and no MAC addresses\n"
+ senders = [
+ { "name":"h16", "device":"of:0000000000000006/8" },
+ { "name":"h24", "device":"of:0000000000000007/8" }
+ ]
+ recipients = [
+ { "name":"h8", "device":"of:0000000000000005/8" }
+ ]
+ isolatedSenders = [
+ { "name":"h24"}
+ ]
+ isolatedRecipients = []
+ testResult = main.FALSE
+ installResult = main.intentFunction.installMultiToSingleIntent(
+ main,
+ name="IPV4_2",
+ senders=senders,
+ recipients=recipients,
+ ethType="IPV4",
+ sw1="s5",
+ sw2="s2")
+
+ if installResult:
+ testResult = main.intentFunction.testEndPointFail(
+ main,
+ intentId=installResult,
+ name="IPV4_2",
+ senders=senders,
+ recipients=recipients,
+ isolatedSenders=isolatedSenders,
+ isolatedRecipients=isolatedRecipients,
+ sw1="s6",
+ sw2="s2",
+ sw3="s4",
+ sw4="s1",
+ sw5="s3",
+ expectedLink1=16,
+ expectedLink2=14 )
+
+ utilities.assert_equals( expect=main.TRUE,
+ actual=testResult,
+ onpass=main.assertReturnString,
+ onfail=main.assertReturnString )
+
+ main.step( "VLAN: Add multi point to single point intents" )
+ main.assertReturnString = "Assertion results for IPV4 multi to single \
+ point intent end point failure with IPV4 type and no MAC addresses in the same VLAN\n"
+ senders = [
+ { "name":"h13", "device":"of:0000000000000006/5" },
+ { "name":"h21", "device":"of:0000000000000007/5" }
+ ]
+ recipients = [
+ { "name":"h5", "device":"of:0000000000000005/5" }
+ ]
+ isolatedSenders = [
+ { "name":"h21"}
+ ]
+ isolatedRecipients = []
+ testResult = main.FALSE
+ installResult = main.intentFunction.installMultiToSingleIntent(
+ main,
+ name="VLAN",
+ senders=senders,
+ recipients=recipients,
+ ethType="IPV4",
+ sw1="s5",
+ sw2="s2")
+
+ if installResult:
+ testResult = main.intentFunction.testEndPointFail(
+ main,
+ intentId=installResult,
+ name="VLAN",
+ senders=senders,
+ recipients=recipients,
+ isolatedSenders=isolatedSenders,
+ isolatedRecipients=isolatedRecipients,
+ sw1="s6",
+ sw2="s2",
+ sw3="s4",
+ sw4="s1",
+ sw5="s3",
+ expectedLink1=16,
+ expectedLink2=14 )
+
+ utilities.assert_equals( expect=main.TRUE,
+ actual=testResult,
+ onpass=main.assertReturnString,
+ onfail=main.assertReturnString )
+
+ main.step( "NOOPTION: Install and test single point to multi point intents" )
+ main.assertReturnString = "Assertion results for IPV4 single to multi \
+ point intent end point failure with no options set\n"
+ senders = [
+ { "name":"h8", "device":"of:0000000000000005/8" }
+ ]
+ recipients = [
+ { "name":"h16", "device":"of:0000000000000006/8" },
+ { "name":"h24", "device":"of:0000000000000007/8" }
+ ]
+ isolatedSenders = []
+ isolatedRecipients = [
+ { "name":"h24" }
+ ]
+ testResult = main.FALSE
+ installResult = main.intentFunction.installSingleToMultiIntent(
+ main,
+ name="NOOPTION",
+ senders=senders,
+ recipients=recipients,
+ sw1="s5",
+ sw2="s2")
+
+ if installResult:
+ testResult = main.intentFunction.testEndPointFail(
+ main,
+ intentId=installResult,
+ name="NOOPTION",
+ senders=senders,
+ recipients=recipients,
+ isolatedSenders=isolatedSenders,
+ isolatedRecipients=isolatedRecipients,
+ sw1="s6",
+ sw2="s2",
+ sw3="s4",
+ sw4="s1",
+ sw5="s3",
+ expectedLink1=16,
+ expectedLink2=14 )
+
+ utilities.assert_equals( expect=main.TRUE,
+ actual=testResult,
+ onpass=main.assertReturnString,
+ onfail=main.assertReturnString )
+
+ main.step( "IPV4: Install and test single point to multi point intents" )
+ main.assertReturnString = "Assertion results for IPV4 single to multi \
+ point intent end point failure with IPV4 type and no MAC addresses\n"
+ senders = [
+ { "name":"h8", "device":"of:0000000000000005/8","mac":"00:00:00:00:00:08" }
+ ]
+ recipients = [
+ { "name":"h16", "device":"of:0000000000000006/8", "mac":"00:00:00:00:00:10" },
+ { "name":"h24", "device":"of:0000000000000007/8", "mac":"00:00:00:00:00:18" }
+ ]
+ isolatedSenders = []
+ isolatedRecipients = [
+ { "name":"h24" }
+ ]
+ testResult = main.FALSE
+ installResult = main.intentFunction.installSingleToMultiIntent(
+ main,
+ name="IPV4",
+ senders=senders,
+ recipients=recipients,
+ ethType="IPV4",
+ sw1="s5",
+ sw2="s2")
+
+ if installResult:
+ testResult = main.intentFunction.testEndPointFail(
+ main,
+ intentId=installResult,
+ name="IPV4",
+ senders=senders,
+ recipients=recipients,
+ isolatedSenders=isolatedSenders,
+ isolatedRecipients=isolatedRecipients,
+ sw1="s6",
+ sw2="s2",
+ sw3="s4",
+ sw4="s1",
+ sw5="s3",
+ expectedLink1=16,
+ expectedLink2=14 )
+
+ utilities.assert_equals( expect=main.TRUE,
+ actual=testResult,
+ onpass=main.assertReturnString,
+ onfail=main.assertReturnString )
+
+ main.step( "IPV4_2: Add single point to multi point intents" )
+ main.assertReturnString = "Assertion results for IPV4 single to multi\
+ point intent endpoint failure with IPV4 type and no MAC addresses\n"
+ senders = [
+ { "name":"h8", "device":"of:0000000000000005/8" }
+ ]
+ recipients = [
+ { "name":"h16", "device":"of:0000000000000006/8" },
+ { "name":"h24", "device":"of:0000000000000007/8" }
+ ]
+ isolatedSenders = []
+ isolatedRecipients = [
+ { "name":"h24" }
+ ]
+ testResult = main.FALSE
+ installResult = main.intentFunction.installSingleToMultiIntent(
+ main,
+ name="IPV4_2",
+ senders=senders,
+ recipients=recipients,
+ ethType="IPV4",
+ sw1="s5",
+ sw2="s2")
+
+ if installResult:
+ testResult = main.intentFunction.testEndPointFail(
+ main,
+ intentId=installResult,
+ name="IPV4_2",
+ senders=senders,
+ recipients=recipients,
+ isolatedSenders=isolatedSenders,
+ isolatedRecipients=isolatedRecipients,
+ sw1="s6",
+ sw2="s2",
+ sw3="s4",
+ sw4="s1",
+ sw5="s3",
+ expectedLink1=16,
+ expectedLink2=14 )
+
+ utilities.assert_equals( expect=main.TRUE,
+ actual=testResult,
+ onpass=main.assertReturnString,
+ onfail=main.assertReturnString )
+
+ main.step( "VLAN: Add single point to multi point intents" )
+ main.assertReturnString = "Assertion results for IPV4 single to multi point\
+ intent endpoint failure with IPV4 type and MAC addresses in the same VLAN\n"
+ senders = [
+ { "name":"h4", "device":"of:0000000000000005/4", "mac":"00:00:00:00:00:04" }
+ ]
+ recipients = [
+ { "name":"h12", "device":"of:0000000000000006/4", "mac":"00:00:00:00:00:0C" },
+ { "name":"h20", "device":"of:0000000000000007/4", "mac":"00:00:00:00:00:14" }
+ ]
+ isolatedSenders = []
+ isolatedRecipients = [
+ { "name":"h20" }
+ ]
+ testResult = main.FALSE
+ installResult = main.intentFunction.installSingleToMultiIntent(
+ main,
+ name="IPV4",
+ senders=senders,
+ recipients=recipients,
+ ethType="IPV4",
+ sw1="s5",
+ sw2="s2")
+
+ if installResult:
+ testResult = main.intentFunction.testEndPointFail(
+ main,
+ intentId=installResult,
+ name="IPV4",
+ senders=senders,
+ recipients=recipients,
+ isolatedSenders=isolatedSenders,
+ isolatedRecipients=isolatedRecipients,
+ sw1="s6",
+ sw2="s2",
+ sw3="s4",
+ sw4="s1",
+ sw5="s3",
+ expectedLink1=16,
+ expectedLink2=14 )
+
+ utilities.assert_equals( expect=main.TRUE,
+ actual=testResult,
+ onpass=main.assertReturnString,
+ onfail=main.assertReturnString )
+
+ main.intentFunction.report( main )