Test Bandwidth Allocation with Intents
Change-Id: I5f47cdd8a50d34f12a2cb4b16de3a4f3b0b64043
diff --git a/TestON/tests/FUNC/FUNCintent/FUNCintent.py b/TestON/tests/FUNC/FUNCintent/FUNCintent.py
index f96ef73..8c9f07d 100644
--- a/TestON/tests/FUNC/FUNCintent/FUNCintent.py
+++ b/TestON/tests/FUNC/FUNCintent/FUNCintent.py
@@ -1433,6 +1433,41 @@
onpass=main.assertReturnString,
onfail=main.assertReturnString )
+ main.step( "BANDWIDTH ALLOCATION: Checking bandwidth allocation for point intents between h1 and h9" )
+ main.assertReturnString = "Assertion Result for BANDWIDTH ALLOCATION for point intent\n"
+ senders = [
+ { "name":"h1","device":"of:0000000000000005/1" }
+ ]
+ recipients = [
+ { "name":"h9","device":"of:0000000000000006/1" }
+ ]
+ testResult = main.FALSE
+ installResult = main.intentFunction.installPointIntent(
+ main,
+ name="NOOPTION",
+ senders=senders,
+ recipients=recipients,
+ bandwidth=100,
+ bandwidthFlag=True )
+
+ if installResult:
+ testResult = main.intentFunction.testPointIntent(
+ main,
+ intentId=installResult,
+ name="NOOPTION",
+ senders=senders,
+ recipients=recipients,
+ sw1="s5",
+ sw2="s2",
+ expectedLink=18 )
+ else:
+ main.CLIs[ 0 ].removeAllIntents( purge=True )
+
+ utilities.assert_equals( expect=main.TRUE,
+ actual=testResult,
+ onpass=main.assertReturnString,
+ onfail=main.assertReturnString )
+
# Testing MPLS would require kernel version of 4.1 or higher (Current version is 3.13)
# main.step( "Add point to point intents using MPLS Encapsulation" )
# main.assertReturnString = "Assertion Result for MPLS Encapsulation Point Intent"