Merge "[ONOS-7369] Proof-of-concept testing for network driver to manage physical switches/hosts"
diff --git a/TestON/JenkinsFile/scripts/testCategoryBuildStats.R b/TestON/JenkinsFile/scripts/testCategoryBuildStats.R
index 0b4d4b5..94c3572 100644
--- a/TestON/JenkinsFile/scripts/testCategoryBuildStats.R
+++ b/TestON/JenkinsFile/scripts/testCategoryBuildStats.R
@@ -1,4 +1,4 @@
-# Copyright 2017 Open Networking Foundation (ONF)
+# Copyright 2018 Open Networking Foundation (ONF)
#
# Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
# the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
@@ -40,9 +40,7 @@
branchName <- 6
testsToInclude <- 7
buildToShow <- 8
-displayStatus <- 9
-scaleOfPercent <- 10
-saveDirectory <- 11
+saveDirectory <- 9
# ----------------
# Import Libraries
@@ -61,17 +59,15 @@
if ( is.na( args[ saveDirectory ] ) ){
- print( paste( "Usage: Rscript testCategoryTrend.R",
+ print( paste( "Usage: Rscript testCategoryBuildStats.R",
"<database-host>",
"<database-port>",
"<database-user-id>",
"<database-password>",
"<test-suite-name>",
"<branch-name>",
- "<tests-to-include-(as-one-string)>",
+ "<tests-to-include-(as-one-string-sep-groups-by-semicolon-title-as-first-group-item-sep-by-dash)>",
"<build-to-show>",
- "<pass/fail/plan>",
- "<percent-scale>",
"<directory-to-save-graphs>",
sep=" " ) )
@@ -94,6 +90,7 @@
# ---------------------
# Test Case SQL Command
# ---------------------
+
print( "Generating Test Case SQL command." )
tests <- "'"
@@ -104,37 +101,56 @@
fileBuildToShow <- args[ buildToShow ]
operator <- "= "
+buildTitle <- ""
if ( args[ buildToShow ] == "latest" ){
+ buildTitle <- "\nLatest Test Results"
operator <- ">= "
args[ buildToShow ] <- "1000"
+} else {
+ buildTitle <- paste( " \n Build #", args[ buildToShow ] , sep="" )
}
-command <- paste( "SELECT * ",
- "FROM executed_test_tests a ",
- "WHERE ( SELECT COUNT( * ) FROM executed_test_tests b ",
- "WHERE b.branch='",
- args[ branchName ],
- "' AND b.actual_test_name IN (",
- tests,
- ") AND a.actual_test_name = b.actual_test_name AND a.date <= b.date AND b.build ", operator,
- args[ buildToShow ],
- " ) = ",
- 1,
- " AND a.branch='",
- args[ branchName ],
- "' AND a.actual_test_name IN (",
- tests,
- ") AND a.build ", operator,
- args[ buildToShow ],
- " ORDER BY a.actual_test_name DESC, a.date DESC",
- sep="")
+tests <- strsplit( args[ testsToInclude ], ";" )
+dbResults <- list()
+titles <- list()
-print( "Sending SQL command:" )
-print( command )
-dbResult <- dbGetQuery( con, command )
+for ( i in 1:length( tests[[1]] ) ){
+ splitTestList <- strsplit( tests[[1]][ i ], "-" )
+ testList <- splitTestList[[1]][2]
+ titles[[i]] <- splitTestList[[1]][1]
-maxBuild <- max( dbResult[ 'build' ] )
-dbResult <- dbResult[ which( dbResult[,4]>=maxBuild ), ]
+ testsCommand <- "'"
+ for ( test in as.list( strsplit( testList, "," )[[1]] ) ){
+ testsCommand <- paste( testsCommand, test, "','", sep="" )
+ }
+ testsCommand <- substr( testsCommand, 0, nchar( testsCommand ) - 2 )
+
+ command <- paste( "SELECT * ",
+ "FROM executed_test_tests a ",
+ "WHERE ( SELECT COUNT( * ) FROM executed_test_tests b ",
+ "WHERE b.branch='",
+ args[ branchName ],
+ "' AND b.actual_test_name IN (",
+ testsCommand,
+ ") AND a.actual_test_name = b.actual_test_name AND a.date <= b.date AND b.build ", operator,
+ args[ buildToShow ],
+ " ) = ",
+ 1,
+ " AND a.branch='",
+ args[ branchName ],
+ "' AND a.actual_test_name IN (",
+ testsCommand,
+ ") AND a.build ", operator,
+ args[ buildToShow ],
+ " ORDER BY a.actual_test_name DESC, a.date DESC",
+ sep="")
+ print( "Sending SQL command:" )
+ print( command )
+ dbResults[[i]] <- dbGetQuery( con, command )
+}
+
+print( "dbResult:" )
+print( dbResults )
# -------------------------------
# Create Title and Graph Filename
@@ -142,25 +158,15 @@
print( "Creating title of graph." )
-titleDisplayStatus <- ""
-if ( args[ displayStatus ] == "fail" ){
- titleDisplayStatus <- "Failed"
-} else if ( args[ displayStatus ] == "plan" ){
- titleDisplayStatus <- "Executed"
-} else if ( args[ displayStatus ] == "pass" ){
- titleDisplayStatus <- "Succeeded"
-} else {
- print( paste( "[ERROR]: Invalid histogram display status: ", args[ displayStatus ], sep="" ) )
- quit( status = 1 )
+titlePrefix <- paste( args[ testSuiteName ], " ", sep="" )
+if ( args[ testSuiteName ] == "ALL" ){
+ titlePrefix <- ""
}
-title <- paste( args[ testSuiteName ],
- " Tests ",
- titleDisplayStatus,
- " - ",
+title <- paste( titlePrefix,
+ "Summary of Test Suites - ",
args[ branchName ],
- " \n Build #",
- max( dbResult[ 'build' ] ),
+ buildTitle,
sep="" )
print( "Creating graph filename." )
@@ -171,16 +177,9 @@
args[ branchName ],
"_build-",
fileBuildToShow,
- "_",
- args[ scaleOfPercent ],
- "-scaling",
- "_",
- args[ displayStatus ],
- "_histogram.jpg",
+ "_test-suite-summary.jpg",
sep="" )
-print( dbResult )
-
# **********************************************************
# STEP 2: Organize data.
# **********************************************************
@@ -189,23 +188,94 @@
print( "STEP 2: Organize Data." )
print( "**********************************************************" )
-t <- subset( dbResult, select=c( "actual_test_name", "num_passed", "num_failed", "num_planned" ) )
-t$passed_percent <- t$num_passed / t$num_planned * 100
-t$failed_percent <- t$num_failed / t$num_planned * 100
-t$planned_percent <- ( t$num_passed + t$num_failed ) / t$num_planned * 100
+passNum <- list()
+failNum <- list()
+exeNum <- list()
+skipNum <- list()
+totalNum <- list()
+
+passPercent <- list()
+failPercent <- list()
+exePercent <- list()
+nonExePercent <- list()
+
+actualPassPercent <- list()
+actualFailPercent <- list()
+
+appName <- c()
+afpName <- c()
+nepName <- c()
+
+tmpPos <- c()
+tmpCases <- c()
+
+for ( i in 1:length( dbResults ) ){
+ t <- dbResults[[i]]
+
+ passNum[[i]] <- sum( t$num_passed )
+ failNum[[i]] <- sum( t$num_failed )
+ exeNum[[i]] <- passNum[[i]] + failNum[[i]]
+ totalNum[[i]] <- sum( t$num_planned )
+ skipNum[[i]] <- totalNum[[i]] - exeNum[[i]]
+
+ passPercent[[i]] <- passNum[[i]] / exeNum[[i]]
+ failPercent[[i]] <- failNum[[i]] / exeNum[[i]]
+ exePercent[[i]] <- exeNum[[i]] / totalNum[[i]]
+ nonExePercent[[i]] <- ( 1 - exePercent[[i]] ) * 100
+
+ actualPassPercent[[i]] <- passPercent[[i]] * exePercent[[i]] * 100
+ actualFailPercent[[i]] <- failPercent[[i]] * exePercent[[i]] * 100
+
+ appName <- c( appName, "Passed" )
+ afpName <- c( afpName, "Failed" )
+ nepName <- c( nepName, "Skipped/Unexecuted" )
+
+ tmpPos <- c( tmpPos, 100 - ( nonExePercent[[i]] / 2 ), actualPassPercent[[i]] + actualFailPercent[[i]] - ( actualFailPercent[[i]] / 2 ), actualPassPercent[[i]] - ( actualPassPercent[[i]] / 2 ) )
+ tmpCases <- c( tmpCases, skipNum[[i]], failNum[[i]], passNum[[i]] )
+}
+
+relativePosLength <- length( dbResults ) * 3
+
+relativePos <- c()
+relativeCases <- c()
+
+for ( i in 1:3 ){
+ relativePos <- c( relativePos, tmpPos[ seq( i, relativePosLength, 3 ) ] )
+ relativeCases <- c( relativeCases, tmpCases[ seq( i, relativePosLength, 3 ) ] )
+}
+names( actualPassPercent ) <- appName
+names( actualFailPercent ) <- afpName
+names( nonExePercent ) <- nepName
+
+labels <- paste( titles, "\n", totalNum, " Test Cases", sep="" )
# --------------------
# Construct Data Frame
# --------------------
-dataFrame <- aggregate( t$passed_percent, by=list( Category=t$actual_test_name ), FUN=sum )
-if ( args[ displayStatus ] == "fail" ){
- dataFrame <- aggregate( t$failed_percent, by=list( Category=t$actual_test_name ), FUN=sum )
-} else if ( args[ displayStatus ] == "plan" ){
- dataFrame <- aggregate( t$planned_percent, by=list( Category=t$actual_test_name ), FUN=sum )
-}
+print( "Constructing Data Frame" )
-colnames( dataFrame ) <- c( "Test", paste( titleDisplayStatus, "%", sep="" ) )
+dataFrame <- melt( c( nonExePercent, actualFailPercent, actualPassPercent ) )
+dataFrame$title <- seq( 1, length( dbResults ), by = 1 )
+colnames( dataFrame ) <- c( "perc", "key", "suite" )
+
+dataFrame$xtitles <- labels
+dataFrame$relativePos <- relativePos
+dataFrame$relativeCases <- relativeCases
+dataFrame$valueDisplay <- c( paste( round( dataFrame$perc, digits = 2 ), "% - ", relativeCases, " Tests", sep="" ) )
+
+dataFrame$key <- factor( dataFrame$key, levels=unique( dataFrame$key ) )
+
+dataFrame$willDisplayValue <- dataFrame$perc > 15.0 / length( dbResults )
+
+for ( i in 1:nrow( dataFrame ) ){
+ if ( relativeCases[[i]] == "1" ){
+ dataFrame[ i, "valueDisplay" ] <- c( paste( round( dataFrame$perc[[i]], digits = 2 ), "% - ", relativeCases[[i]], " Test", sep="" ) )
+ }
+ if ( !dataFrame[ i, "willDisplayValue" ] ){
+ dataFrame[ i, "valueDisplay" ] <- ""
+ }
+}
print( "Data Frame Results:" )
print( dataFrame )
@@ -231,13 +301,14 @@
# - y: y-axis values (usually tests)
# - color: the category of the colored lines (usually status of test)
-mainPlot <- ggplot( data = dataFrame, aes( dataFrame[ ,2 ] ) )
-
# -------------------
# Main Plot Formatted
# -------------------
print( "Formatting main plot." )
+mainPlot <- ggplot( data = dataFrame, aes( x = suite,
+ y = perc,
+ fill = key ) )
# ------------------------------
# Fundamental Variables Assigned
@@ -247,11 +318,13 @@
theme_set( theme_grey( base_size = 26 ) ) # set the default text size of the graph.
-xScaleConfig <- scale_x_continuous( breaks = seq( 0, 100, by = 10 ) )
-yScaleConfig <- scale_y_continuous( breaks = seq( 0, nrow( dbResult ), by = 1 ), limits = c( 0, nrow( dbResult ) ) )
+xScaleConfig <- scale_x_continuous( breaks = dataFrame$suite,
+ label = dataFrame$xtitles )
+yScaleConfig <- scale_y_continuous( breaks = seq( 0, 100,
+ by = 10 ) )
-xLabel <- xlab( paste( titleDisplayStatus, "%" ) )
-yLabel <- ylab( "Frequency" )
+xLabel <- xlab( "" )
+yLabel <- ylab( "Total Test Cases (%)" )
imageWidth <- 15
imageHeight <- 10
@@ -259,7 +332,7 @@
# Set other graph configurations here.
theme <- theme( plot.title = element_text( hjust = 0.5, size = 32, face ='bold' ),
- axis.text.x = element_text( angle = 0, size = 14 ),
+ axis.text.x = element_text( angle = 0, size = 25 - 1.25 * length( dbResults ) ),
legend.position = "bottom",
legend.text = element_text( size = 22 ),
legend.title = element_blank(),
@@ -279,26 +352,31 @@
theme +
title
-# ----------------------------
-# Generating Line Graph Format
-# ----------------------------
+# ---------------------------
+# Generating Bar Graph Format
+# ---------------------------
-print( "Generating line graph." )
+print( "Generating bar graph." )
-barColor <- "#00B208"
-if ( args[ displayStatus ] == "fail" ){
- barColor <- "#E80000"
-} else if ( args[ displayStatus ] == "plan" ){
- barColor <- "#00A5FF"
-}
+unexecutedColor <- "#CCCCCC" # Gray
+failedColor <- "#E02020" # Red
+passedColor <- "#16B645" # Green
-histogramFormat <- geom_histogram( col = "#000000",
- fill = barColor,
- breaks = seq( 0, 100, by = strtoi( args[ scaleOfPercent ] ) ),
- lwd = 0.5 )
+colors <- scale_fill_manual( values=c( if ( "Skipped/Unexecuted" %in% dataFrame$key ){ unexecutedColor },
+ if ( "Failed" %in% dataFrame$key ){ failedColor },
+ if ( "Passed" %in% dataFrame$key ){ passedColor } ) )
+
+barGraphFormat <- geom_bar( stat = "identity", width = 0.8 )
+
+barGraphValues <- geom_text( aes( x = dataFrame$suite,
+ y = dataFrame$relativePos,
+ label = format( paste( dataFrame$valueDisplay ) ) ),
+ size = 15.50 / length( dbResults ) + 2.33, fontface = "bold" )
result <- fundamentalGraphData +
- histogramFormat
+ colors +
+ barGraphFormat +
+ barGraphValues
# -----------------------
# Exporting Graph to File
diff --git a/TestON/JenkinsFile/scripts/testCategoryPiePassFail.R b/TestON/JenkinsFile/scripts/testCategoryPiePassFail.R
new file mode 100644
index 0000000..0b731b5
--- /dev/null
+++ b/TestON/JenkinsFile/scripts/testCategoryPiePassFail.R
@@ -0,0 +1,341 @@
+# Copyright 2018 Open Networking Foundation (ONF)
+#
+# Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+# the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+# or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
+#
+# TestON is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# TestON is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with TestON. If not, see <http://www.gnu.org/licenses/>.
+#
+# If you have any questions, or if you don't understand R,
+# please contact Jeremy Ronquillo: j_ronquillo@u.pacific.edu
+
+# **********************************************************
+# STEP 1: Data management.
+# **********************************************************
+
+print( "**********************************************************" )
+print( "STEP 1: Data management." )
+print( "**********************************************************" )
+
+# Command line arguments are read. Args include the database credentials, test name, branch name, and the directory to output files.
+print( "Reading commmand-line args." )
+args <- commandArgs( trailingOnly=TRUE )
+
+databaseHost <- 1
+databasePort <- 2
+databaseUserID <- 3
+databasePassword <- 4
+testSuiteName <- 5
+branchName <- 6
+testsToInclude <- 7
+buildToShow <- 8
+isDisplayingPlan <- 9
+saveDirectory <- 10
+
+# ----------------
+# Import Libraries
+# ----------------
+
+print( "Importing libraries." )
+library( ggplot2 )
+library( reshape2 )
+library( RPostgreSQL )
+
+# -------------------
+# Check CLI Arguments
+# -------------------
+
+print( "Verifying CLI args." )
+
+if ( is.na( args[ saveDirectory ] ) ){
+
+ print( paste( "Usage: Rscript testCategoryPiePassFail.R",
+ "<database-host>",
+ "<database-port>",
+ "<database-user-id>",
+ "<database-password>",
+ "<test-suite-name>",
+ "<branch-name>",
+ "<tests-to-include-(as-one-string)>",
+ "<build-to-show>",
+ "<is-displaying-plan>",
+ "<directory-to-save-graphs>",
+ sep=" " ) )
+
+ quit( status = 1 ) # basically exit(), but in R
+}
+
+# ------------------
+# SQL Initialization
+# ------------------
+
+print( "Initializing SQL" )
+
+con <- dbConnect( dbDriver( "PostgreSQL" ),
+ dbname = "onostest",
+ host = args[ databaseHost ],
+ port = strtoi( args[ databasePort ] ),
+ user = args[ databaseUserID ],
+ password = args[ databasePassword ] )
+
+# ---------------------
+# Test Case SQL Command
+# ---------------------
+
+print( "Generating Test Case SQL command." )
+
+tests <- "'"
+for ( test in as.list( strsplit( args[ testsToInclude ], "," )[[1]] ) ){
+ tests <- paste( tests, test, "','", sep="" )
+}
+tests <- substr( tests, 0, nchar( tests ) - 2 )
+
+fileBuildToShow <- args[ buildToShow ]
+operator <- "= "
+buildTitle <- ""
+if ( args[ buildToShow ] == "latest" ){
+ buildTitle <- "\nLatest Test Results"
+ operator <- ">= "
+ args[ buildToShow ] <- "1000"
+} else {
+ buildTitle <- paste( " \n Build #", args[ buildToShow ], sep="" )
+}
+
+command <- paste( "SELECT * ",
+ "FROM executed_test_tests a ",
+ "WHERE ( SELECT COUNT( * ) FROM executed_test_tests b ",
+ "WHERE b.branch='",
+ args[ branchName ],
+ "' AND b.actual_test_name IN (",
+ tests,
+ ") AND a.actual_test_name = b.actual_test_name AND a.date <= b.date AND b.build ", operator,
+ args[ buildToShow ],
+ " ) = ",
+ 1,
+ " AND a.branch='",
+ args[ branchName ],
+ "' AND a.actual_test_name IN (",
+ tests,
+ ") AND a.build ", operator,
+ args[ buildToShow ],
+ " ORDER BY a.actual_test_name DESC, a.date DESC",
+ sep="")
+
+print( "Sending SQL command:" )
+print( command )
+
+dbResult <- dbGetQuery( con, command )
+
+print( "dbResult:" )
+print( dbResult )
+
+# -------------------------------
+# Create Title and Graph Filename
+# -------------------------------
+
+print( "Creating title of graph." )
+
+typeOfPieTitle <- "Executed Results"
+typeOfPieFile <- "_passfail"
+isPlannedPie <- FALSE
+if ( args[ isDisplayingPlan ] == "y" ){
+ typeOfPieTitle <- "Test Execution"
+ typeOfPieFile <- "_executed"
+ isPlannedPie <- TRUE
+}
+
+title <- paste( args[ testSuiteName ],
+ " Tests: Summary of ",
+ typeOfPieTitle,
+ "",
+ " - ",
+ args[ branchName ],
+ buildTitle,
+ sep="" )
+
+print( "Creating graph filename." )
+
+outputFile <- paste( args[ saveDirectory ],
+ args[ testSuiteName ],
+ "_",
+ args[ branchName ],
+ "_build-",
+ fileBuildToShow,
+ typeOfPieFile,
+ "_pieChart.jpg",
+ sep="" )
+
+# **********************************************************
+# STEP 2: Organize data.
+# **********************************************************
+
+print( "**********************************************************" )
+print( "STEP 2: Organize Data." )
+print( "**********************************************************" )
+
+t <- subset( dbResult, select=c( "actual_test_name", "num_passed", "num_failed", "num_planned" ) )
+
+executedTests <- sum( t$num_passed ) + sum( t$num_failed )
+
+# --------------------
+# Construct Data Frame
+# --------------------
+
+print( "Constructing Data Frame." )
+
+if ( isPlannedPie ){
+
+ nonExecutedTests <- sum( t$num_planned ) - executedTests
+ totalTests <- sum( t$num_planned )
+
+ executedPercent <- round( executedTests / totalTests * 100, digits = 2 )
+ nonExecutedPercent <- 100 - executedPercent
+
+ dfData <- c( nonExecutedPercent, executedPercent )
+
+ labels <- c( "Executed Test Cases", "Skipped Test Cases" )
+
+ dataFrame <- data.frame(
+ rawData <- dfData,
+ displayedData <- c( paste( nonExecutedPercent, "%\n", nonExecutedTests, " / ", totalTests, " Tests", sep="" ), paste( executedPercent, "%\n", executedTests, " / ", totalTests," Tests", sep="" ) ),
+ names <- factor( rev( labels ), levels = labels ) )
+} else {
+
+ sumPassed <- sum( t$num_passed )
+ sumFailed <- sum( t$num_failed )
+ sumExecuted <- sumPassed + sumFailed
+
+ percentPassed <- sumPassed / sumExecuted
+ percentFailed <- sumFailed / sumExecuted
+
+ dfData <- c( percentFailed, percentPassed )
+ labels <- c( "Failed Test Cases", "Passed Test Cases" )
+
+ dataFrame <- data.frame(
+ rawData <- dfData,
+ displayedData <- c( paste( round( percentFailed * 100, 2 ), "%\n", sumFailed, " / ", sumExecuted, " Tests", sep="" ), paste( round( percentPassed * 100, 2 ), "%\n", sumPassed, " / ", sumExecuted, " Tests", sep="" ) ),
+ names <- factor( labels, levels = rev( labels ) ) )
+}
+
+print( "Data Frame Results:" )
+print( dataFrame )
+
+# **********************************************************
+# STEP 3: Generate graphs.
+# **********************************************************
+
+print( "**********************************************************" )
+print( "STEP 3: Generate Graph." )
+print( "**********************************************************" )
+
+# -------------------
+# Main Plot Generated
+# -------------------
+
+print( "Creating main plot." )
+# Create the primary plot here.
+# ggplot contains the following arguments:
+# - data: the data frame that the graph will be based off of
+# - aes: the asthetics of the graph which require:
+# - x: x-axis values (usually iterative, but it will become build # later)
+# - y: y-axis values (usually tests)
+# - color: the category of the colored lines (usually status of test)
+
+mainPlot <- ggplot( data = dataFrame,
+ aes( x = "", y=rawData, fill = names ) )
+
+# -------------------
+# Main Plot Formatted
+# -------------------
+
+print( "Formatting main plot." )
+
+# ------------------------------
+# Fundamental Variables Assigned
+# ------------------------------
+
+print( "Generating fundamental graph data." )
+
+theme_set( theme_grey( base_size = 26 ) ) # set the default text size of the graph.
+
+imageWidth <- 12
+imageHeight <- 10
+imageDPI <- 200
+
+# Set other graph configurations here.
+theme <- theme( plot.title = element_text( hjust = 0.5, size = 30, face ='bold' ),
+ axis.text.x = element_blank(),
+ axis.title.x = element_blank(),
+ axis.title.y = element_blank(),
+ axis.ticks = element_blank(),
+ panel.border = element_blank(),
+ panel.grid=element_blank(),
+ legend.position = "bottom",
+ legend.text = element_text( size = 22 ),
+ legend.title = element_blank(),
+ legend.key.size = unit( 1.5, 'lines' ),
+ plot.subtitle = element_text( size=16, hjust=1.0 ) )
+
+subtitle <- paste( "Last Updated: ", format( Sys.time(), format = "%b %d, %Y at %I:%M %p %Z" ), sep="" )
+
+title <- labs( title = title, subtitle = subtitle )
+
+# Store plot configurations as 1 variable
+fundamentalGraphData <- mainPlot +
+ theme +
+ title
+
+# ----------------------------
+# Generating Line Graph Format
+# ----------------------------
+
+print( "Generating line graph." )
+
+if ( isPlannedPie ){
+ executedColor <- "#00A5FF" # Blue
+ nonExecutedColor <- "#CCCCCC" # Gray
+ pieColors <- scale_fill_manual( values = c( executedColor, nonExecutedColor ) )
+} else {
+ passColor <- "#16B645" # Green
+ failColor <- "#E02020" # Red
+ pieColors <- scale_fill_manual( values = c( passColor, failColor ) )
+}
+
+pieFormat <- geom_bar( width = 1, stat = "identity" )
+pieLabels <- geom_text( aes( y = rawData / length( rawData ) + c( 0, cumsum( rawData )[ -length( rawData ) ] ) ),
+ label = dataFrame$displayedData,
+ size = 7, fontface = "bold" )
+
+
+result <- fundamentalGraphData +
+ pieFormat + coord_polar( "y" ) + pieLabels + pieColors
+# -----------------------
+# Exporting Graph to File
+# -----------------------
+
+print( paste( "Saving result graph to", outputFile ) )
+
+tryCatch( ggsave( outputFile,
+ width = imageWidth,
+ height = imageHeight,
+ dpi = imageDPI ),
+ error = function( e ){
+ print( "[ERROR] There was a problem saving the graph due to a graph formatting exception. Error dump:" )
+ print( e )
+ quit( status = 1 )
+ }
+ )
+
+print( paste( "[SUCCESS] Successfully wrote result graph out to", outputFile ) )
+quit( status = 0 )
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index db0b48c..f60fc4e 100755
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -280,8 +280,8 @@
# Not in CLI so login
if waitForStart:
- # Wait for onos start ( -w ) and enter onos cli
- startCliCommand = "onos -w "
+ # Wait for onos start ( onos-wait-for-start ) and enter onos cli
+ startCliCommand = "onos-wait-for-start "
else:
startCliCommand = "onos "
self.handle.sendline( startCliCommand + str( ONOSIp ) )
@@ -362,7 +362,7 @@
main.log.info( "ONOS cli is already running" )
return main.TRUE
- # Wait for onos start ( -w ) and enter onos cli
+ # Wait for onos start ( onos-wait-for-start ) and enter onos cli
self.handle.sendline( "/opt/onos/bin/onos" )
i = self.handle.expect( [
"onos>",
diff --git a/TestON/drivers/common/cli/onosdriver.py b/TestON/drivers/common/cli/onosdriver.py
index 5b12d0c..ffcd080 100755
--- a/TestON/drivers/common/cli/onosdriver.py
+++ b/TestON/drivers/common/cli/onosdriver.py
@@ -1,6 +1,8 @@
#!/usr/bin/env python
"""
+Copyright 2014 Open Networking Foundation (ONF)
+
This driver interacts with ONOS bench, the OSGi platform
that configures the ONOS nodes. ( aka ONOS-next )
@@ -950,7 +952,10 @@
self.handle.sendline( "" )
self.handle.expect( self.prompt )
- self.handle.sendline( "onos -w " + ONOSIp + " " + cmdstr )
+ self.handle.sendline( "onos-wait-for-start " + ONOSIp )
+ self.handle.expect( self.prompt )
+
+ self.handle.sendline( "onos " + ONOSIp + " " + cmdstr )
self.handle.expect( self.prompt )
handleBefore = self.handle.before
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.params b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.params
index 6ce7f81..b53b863 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.params
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.params
@@ -1,5 +1,5 @@
<PARAMS>
- <testcases>1, 2</testcases>
+ <testcases>1,2</testcases>
<GRAPH>
<nodeCluster>VM</nodeCluster>
@@ -13,7 +13,8 @@
<DEPENDENCY>
<topology>comcast_fabric.py</topology>
- <lib>routinglib.py,trellislib.py,trellis_fabric.py, dhcpd.conf</lib>
+ <lib>routinglib.py,trellislib.py,trellis_fabric.py,dhcpd.conf</lib>
+ <testConf>bgpdbgp1.conf,bgpdbgp2.conf,bgpdr1.conf,bgpdr2.conf,dhcpd6.conf,dhcpd.conf,zebradbgp1.conf,zebradbgp2.conf</testConf>
</DEPENDENCY>
<ENV>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py
index b3d61f3..c24ca81 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py
@@ -13,7 +13,7 @@
SRRoutingTest.runTest( main,
test_idx = 1,
onosNodes = 3,
- dhcp=0,
+ dhcp=1,
routers=0,
ipv4=1,
ipv6=0,
@@ -29,7 +29,7 @@
SRRoutingTest.runTest( main,
test_idx = 2,
onosNodes = 3,
- dhcp=0,
+ dhcp=1,
routers=0,
ipv4=0,
ipv6=1,
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
index 0f0caac..b1c8ea1 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
@@ -67,7 +67,10 @@
pass
# wait some time for onos to install the rules!
- time.sleep(15)
+ time.sleep(25)
+
+ if (dhcp):
+ time.sleep(60)
# ping hosts
run.pingAllBasedOnIp( main, 'CASE%02d' % test_idx )
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/bgpdbgp1.conf b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/bgpdbgp1.conf
new file mode 100644
index 0000000..2dd22b3
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/bgpdbgp1.conf
@@ -0,0 +1,107 @@
+log file /var/log/quagga/bgpdbgp1.log
+hostname bgp1
+password quagga
+!
+! Different next hop for IPv4
+!
+ip prefix-list 1 seq 10 permit 10.0.2.0/24
+ip prefix-list 1 seq 20 permit 10.1.2.0/24
+ip prefix-list 1 seq 30 permit 10.0.3.0/24
+ip prefix-list 1 seq 40 permit 10.0.4.0/24
+
+ip prefix-list 1 seq 50 permit 10.1.0.0/24
+ip prefix-list 1 seq 70 permit 10.1.10.0/24
+ip prefix-list 1 seq 80 permit 10.2.0.0/24
+ip prefix-list 1 seq 90 permit 10.2.30.0/24
+ip prefix-list 1 seq 100 permit 10.2.20.0/24
+ip prefix-list 1 seq 110 permit 10.2.10.0/24
+ip prefix-list 1 seq 120 permit 10.2.40.0/24
+ip prefix-list 1 seq 130 permit 10.3.0.0/24
+ip prefix-list 1 seq 140 permit 10.3.30.0/24
+ip prefix-list 1 seq 150 permit 10.3.10.0/24
+ip prefix-list 1 seq 160 permit 10.3.20.0/24
+
+!
+route-map NEXTHOP41 permit 10
+match ip address prefix-list 1
+set ip next-hop 10.0.1.254
+!
+!
+route-map NEXTHOP47 permit 10
+match ip address prefix-list 1
+set ip next-hop 10.0.7.254
+!
+! Different next hop for IPv6
+!
+ipv6 prefix-list 2 seq 10 permit 2000::200/120
+ipv6 prefix-list 2 seq 20 permit 2000::300/120
+!
+route-map NEXTHOP61 permit 10
+match ipv6 address prefix-list 2
+set ipv6 next-hop global 2000::1ff
+set ipv6 next-hop local 2000::1ff
+!
+!
+route-map NEXTHOP67 permit 10
+match ipv6 address prefix-list 2
+set ipv6 next-hop global 2000::7ff
+set ipv6 next-hop local 2000::7ff
+!
+! Basic router config
+!
+router bgp 65003
+bgp router-id 172.16.0.3
+timers bgp 3 9
+!
+! IPv4
+!
+neighbor 10.0.1.1 remote-as 65001
+neighbor 10.0.1.1 ebgp-multihop
+neighbor 10.0.1.1 timers connect 5
+neighbor 10.0.1.1 advertisement-interval 5
+neighbor 10.0.1.1 route-map NEXTHOP41 out
+!
+neighbor 2000::101 remote-as 65001
+neighbor 2000::101 timers connect 5
+neighbor 2000::101 advertisement-interval 1
+no neighbor 2000::101 activate
+!
+neighbor 10.0.7.1 remote-as 65002
+neighbor 10.0.7.1 ebgp-multihop
+neighbor 10.0.7.1 timers connect 5
+neighbor 10.0.7.1 advertisement-interval 5
+neighbor 10.0.7.1 route-map NEXTHOP47 out
+!
+neighbor 2000::701 remote-as 65002
+neighbor 2000::701 timers connect 5
+neighbor 2000::701 advertisement-interval 1
+no neighbor 2000::701 activate
+!
+
+network 10.1.0.0/24
+network 10.1.10.0/24
+network 10.2.0.0/24
+network 10.2.30.0/24
+network 10.2.20.0/24
+network 10.2.10.0/24
+network 10.2.40.0/24
+network 10.3.0.0/24
+network 10.3.30.0/24
+network 10.3.10.0/24
+network 10.3.20.0/24
+
+network 10.0.2.0/24
+network 10.1.2.0/24
+network 10.0.3.0/24
+network 10.0.4.0/24
+!
+! IPv6
+!
+address-family ipv6
+network 2000::200/120
+network 2000::300/120
+neighbor 2000::101 activate
+neighbor 2000::101 route-map NEXTHOP61 out
+neighbor 2000::701 activate
+neighbor 2000::701 route-map NEXTHOP67 out
+exit-address-family
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/bgpdbgp2.conf b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/bgpdbgp2.conf
new file mode 100644
index 0000000..0acb1df
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/bgpdbgp2.conf
@@ -0,0 +1,108 @@
+log file /var/log/quagga/bgpdbgp2.log
+hostname bgp2
+password quagga
+!
+! Different next hop for IPv4
+!
+ip prefix-list 1 seq 10 permit 10.0.2.0/24
+ip prefix-list 1 seq 20 permit 10.1.2.0/24
+ip prefix-list 1 seq 30 permit 10.0.3.0/24
+ip prefix-list 1 seq 40 permit 10.0.4.0/24
+
+ip prefix-list 1 seq 50 permit 10.1.0.0/24
+ip prefix-list 1 seq 60 permit 10.1.10.0/24
+ip prefix-list 1 seq 70 permit 10.2.0.0/24
+ip prefix-list 1 seq 80 permit 10.2.30.0/24
+ip prefix-list 1 seq 90 permit 10.2.20.0/24
+ip prefix-list 1 seq 100 permit 10.2.10.0/24
+ip prefix-list 1 seq 110 permit 10.2.40.0/24
+ip prefix-list 1 seq 120 permit 10.3.0.0/24
+ip prefix-list 1 seq 130 permit 10.3.30.0/24
+ip prefix-list 1 seq 140 permit 10.3.10.0/24
+ip prefix-list 1 seq 150 permit 10.3.20.0/24
+
+!
+route-map NEXTHOP45 permit 10
+match ip address prefix-list 1
+set ip next-hop 10.0.5.254
+!
+!
+route-map NEXTHOP46 permit 10
+match ip address prefix-list 1
+set ip next-hop 10.0.6.254
+!
+! Different next hop for IPv6
+!
+ipv6 prefix-list 2 seq 10 permit 2000::200/120
+ipv6 prefix-list 2 seq 20 permit 2000::300/120
+!
+route-map NEXTHOP65 permit 10
+match ipv6 address prefix-list 2
+set ipv6 next-hop global 2000::5ff
+set ipv6 next-hop local 2000::5ff
+!
+!
+route-map NEXTHOP66 permit 10
+match ipv6 address prefix-list 2
+set ipv6 next-hop global 2000::6ff
+set ipv6 next-hop local 2000::6ff
+!
+! Basic router config
+!
+router bgp 65003
+bgp router-id 172.16.0.4
+timers bgp 3 9
+!
+! IPv4
+!
+neighbor 10.0.5.1 remote-as 65001
+neighbor 10.0.5.1 ebgp-multihop
+neighbor 10.0.5.1 timers connect 5
+neighbor 10.0.5.1 advertisement-interval 5
+neighbor 10.0.5.1 route-map NEXTHOP45 out
+!
+neighbor 2000::501 remote-as 65001
+neighbor 2000::501 timers connect 5
+neighbor 2000::501 advertisement-interval 1
+no neighbor 2000::501 activate
+!
+neighbor 10.0.6.1 remote-as 65002
+neighbor 10.0.6.1 ebgp-multihop
+neighbor 10.0.6.1 timers connect 5
+neighbor 10.0.6.1 advertisement-interval 5
+neighbor 10.0.6.1 route-map NEXTHOP46 out
+!
+neighbor 2000::601 remote-as 65002
+neighbor 2000::601 timers connect 5
+neighbor 2000::601 advertisement-interval 1
+no neighbor 2000::601 activate
+!
+
+network 10.1.0.0/24
+network 10.1.10.0/24
+network 10.2.0.0/24
+network 10.2.30.0/24
+network 10.2.20.0/24
+network 10.2.10.0/24
+network 10.2.40.0/24
+network 10.3.0.0/24
+network 10.3.30.0/24
+network 10.3.10.0/24
+network 10.3.20.0/24
+
+network 10.1.0.0/24
+network 10.0.2.0/24
+network 10.1.2.0/24
+network 10.0.3.0/24
+network 10.0.4.0/24
+!
+! IPv6
+!
+address-family ipv6
+network 2000::200/120
+network 2000::300/120
+neighbor 2000::501 activate
+neighbor 2000::501 route-map NEXTHOP65 out
+neighbor 2000::601 activate
+neighbor 2000::601 route-map NEXTHOP66 out
+exit-address-family
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/bgpdr1.conf b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/bgpdr1.conf
new file mode 100644
index 0000000..9e526b8
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/bgpdr1.conf
@@ -0,0 +1,42 @@
+log file /var/log/quagga/bgpdr1.log
+hostname r1
+password quagga
+!
+! Basic router config
+!
+router bgp 65001
+bgp router-id 10.0.1.1
+timers bgp 3 9
+!
+! IPv4
+!
+neighbor 10.0.1.2 remote-as 65003
+neighbor 10.0.1.2 ebgp-multihop
+neighbor 10.0.1.2 timers connect 5
+neighbor 10.0.1.2 advertisement-interval 5
+!
+neighbor 2000::102 remote-as 65003
+neighbor 2000::102 timers connect 5
+neighbor 2000::102 advertisement-interval 1
+no neighbor 2000::102 activate
+!
+neighbor 10.0.5.2 remote-as 65003
+neighbor 10.0.5.2 ebgp-multihop
+neighbor 10.0.5.2 timers connect 5
+neighbor 10.0.5.2 advertisement-interval 5
+!
+neighbor 2000::502 remote-as 65003
+neighbor 2000::502 timers connect 5
+neighbor 2000::502 advertisement-interval 1
+no neighbor 2000::502 activate
+!
+network 10.0.99.0/24
+!
+! IPv6
+!
+address-family ipv6
+network 2000::7700/120
+network 2000::9900/120
+neighbor 2000::102 activate
+neighbor 2000::502 activate
+exit-address-family
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/bgpdr2.conf b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/bgpdr2.conf
new file mode 100644
index 0000000..49553e2
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/bgpdr2.conf
@@ -0,0 +1,42 @@
+log file /var/log/quagga/bgpdr2.log
+hostname r2
+password quagga
+!
+! Basic router config
+!
+router bgp 65002
+bgp router-id 10.0.6.1
+timers bgp 3 9
+!
+! IPv4
+!
+neighbor 10.0.6.2 remote-as 65003
+neighbor 10.0.6.2 ebgp-multihop
+neighbor 10.0.6.2 timers connect 5
+neighbor 10.0.6.2 advertisement-interval 5
+!
+neighbor 2000::602 remote-as 65003
+neighbor 2000::602 timers connect 5
+neighbor 2000::602 advertisement-interval 1
+no neighbor 2000::602 activate
+!
+neighbor 10.0.7.2 remote-as 65003
+neighbor 10.0.7.2 ebgp-multihop
+neighbor 10.0.7.2 timers connect 5
+neighbor 10.0.7.2 advertisement-interval 5
+!
+neighbor 2000::702 remote-as 65003
+neighbor 2000::702 timers connect 5
+neighbor 2000::702 advertisement-interval 1
+no neighbor 2000::702 activate
+!
+network 10.0.99.0/24
+!
+! IPv6
+!
+address-family ipv6
+network 2000::8800/120
+network 2000::9900/120
+neighbor 2000::602 activate
+neighbor 2000::702 activate
+exit-address-family
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/dhcpd.conf b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/dhcpd.conf
new file mode 100644
index 0000000..acc48f4
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/dhcpd.conf
@@ -0,0 +1,124 @@
+ddns-update-style none;
+
+default-lease-time 600;
+max-lease-time 7200;
+
+option domain-name-servers 8.8.8.8, 8.8.4.4;
+option domain-name "trellis.local";
+
+subnet 10.0.3.0 netmask 255.255.255.0 {
+ range 10.0.3.100 10.0.3.240;
+ option routers 10.0.3.254;
+}
+
+subnet 10.1.0.0 netmask 255.255.255.0 {
+ range 10.1.0.1 10.1.0.100;
+ option routers 10.1.0.254;
+}
+
+subnet 10.1.10.0 netmask 255.255.255.0 {
+ range 10.1.10.1 10.1.10.100;
+ option routers 10.1.10.254;
+}
+
+subnet 10.2.0.0 netmask 255.255.255.0 {
+ range 10.2.0.1 10.2.0.100;
+ option routers 10.2.0.254;
+}
+
+subnet 10.2.30.0 netmask 255.255.255.0 {
+ range 10.2.30.1 10.2.30.100;
+ option routers 10.2.30.254;
+}
+
+subnet 10.2.20.0 netmask 255.255.255.0 {
+ range 10.2.20.1 10.2.20.100;
+ option routers 10.2.20.254;
+}
+
+subnet 10.2.10.0 netmask 255.255.255.0 {
+ range 10.2.10.1 10.2.10.100;
+ option routers 10.2.10.254;
+}
+
+subnet 10.2.40.0 netmask 255.255.255.0 {
+ range 10.2.40.1 10.2.40.100;
+ option routers 10.2.40.254;
+}
+
+subnet 10.3.0.0 netmask 255.255.255.0 {
+ range 10.3.0.1 10.3.0.100;
+ option routers 10.3.0.254;
+}
+
+subnet 10.3.10.0 netmask 255.255.255.0 {
+ range 10.3.10.1 10.3.10.100;
+ option routers 10.3.10.254;
+}
+
+subnet 10.3.30.0 netmask 255.255.255.0 {
+ range 10.3.30.1 10.3.30.100;
+ option routers 10.3.30.254;
+}
+
+subnet 10.3.20.0 netmask 255.255.255.0 {
+ range 10.3.20.1 10.3.20.100;
+ option routers 10.3.20.254;
+}
+
+host h1v4 {
+ hardware ethernet 00:aa:00:00:00:01;
+ fixed-address 10.1.0.1;
+}
+
+host h2v4 {
+ hardware ethernet 00:aa:00:00:01:01;
+ fixed-address 10.1.10.1;
+}
+
+host h3v4 {
+ hardware ethernet 00:aa:00:00:00:02;
+ fixed-address 10.2.0.1;
+}
+
+host h4v4 {
+ hardware ethernet 00:aa:00:00:00:03;
+ fixed-address 10.2.30.1;
+}
+
+host h5v4 {
+ hardware ethernet 00:aa:00:00:00:04;
+ fixed-address 10.2.20.1;
+}
+
+host h6v4 {
+ hardware ethernet 00:aa:00:00:00:05;
+ fixed-address 10.2.10.1;
+}
+
+host h7v4 {
+ hardware ethernet 00:aa:00:00:01:05;
+ fixed-address 10.2.40.1;
+}
+
+host h8v4 {
+ hardware ethernet 00:aa:00:00:00:06;
+ fixed-address 10.3.0.1;
+}
+
+host h9v4 {
+ hardware ethernet 00:aa:00:00:00:07;
+ fixed-address 10.3.10.1;
+}
+
+host h10v4 {
+ hardware ethernet 00:aa:00:00:00:08;
+ fixed-address 10.3.30.1;
+}
+
+host h11v4 {
+ hardware ethernet 00:aa:00:00:00:0a;
+ fixed-address 10.3.20.1;
+}
+
+
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/dhcpd6.conf b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/dhcpd6.conf
new file mode 100644
index 0000000..3595d5f
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/dhcpd6.conf
@@ -0,0 +1,129 @@
+default-lease-time 600;
+max-lease-time 7200;
+
+option dhcp6.next-hop code 242 = ip6-address;
+
+subnet6 2000::300/120 {
+ range6 2000::360 2000::3fe;
+ option dhcp6.next-hop 2000::03ff;
+}
+
+subnet6 1000::300/120 {
+ range6 1000::360 1000::3fe;
+ option dhcp6.next-hop 1000::03ff;
+}
+
+subnet6 1001::300/120 {
+ range6 1001::360 1001::3fe;
+ option dhcp6.next-hop 1001::03ff;
+}
+
+subnet6 1002::300/120 {
+ range6 1002::360 1002::3fe;
+ option dhcp6.next-hop 1002::03ff;
+}
+
+subnet6 1003::300/120 {
+ range6 1003::360 1003::3fe;
+ option dhcp6.next-hop 1003::03ff;
+}
+
+subnet6 1004::300/120 {
+ range6 1004::360 1004::3fe;
+ option dhcp6.next-hop 1004::03ff;
+}
+
+subnet6 1005::300/120 {
+ range6 1005::360 1005::3fe;
+ option dhcp6.next-hop 1005::03ff;
+}
+
+subnet6 1006::300/120 {
+ range6 1006::360 1006::3fe;
+ option dhcp6.next-hop 1006::03ff;
+}
+
+subnet6 1007::300/120 {
+ range6 1007::360 1007::3fe;
+ option dhcp6.next-hop 1007::03ff;
+}
+
+subnet6 1008::300/120 {
+ range6 1008::360 1008::3fe;
+ option dhcp6.next-hop 1008::03ff;
+}
+
+subnet6 1009::300/120 {
+ range6 1009::360 1009::3fe;
+ option dhcp6.next-hop 1009::03ff;
+}
+
+subnet6 1010::300/120 {
+ range6 1010::360 1010::3fe;
+ option dhcp6.next-hop 1010::03ff;
+}
+
+host h1v6 {
+ hardware ethernet 00:bb:00:00:00:01;
+ fixed-address6 1000::3fe;
+}
+
+host h2v6 {
+ hardware ethernet 00:bb:00:00:01:01;
+ fixed-address6 1001::3fe;
+}
+
+host h3v6 {
+ hardware ethernet 00:bb:00:00:00:02;
+ fixed-address6 1002::3fe;
+}
+
+host h4v6 {
+ hardware ethernet 00:bb:00:00:00:03;
+ fixed-address6 1003::3fe;
+}
+
+host h5v6 {
+ hardware ethernet 00:bb:00:00:00:04;
+ fixed-address6 1004::3fe;
+}
+
+host h6v6 {
+ hardware ethernet 00:bb:00:00:00:05;
+ fixed-address6 1005::3fe;
+}
+
+host h7v6 {
+ hardware ethernet 00:bb:00:00:01:05;
+ fixed-address6 1006::3fe;
+}
+
+host h8v6 {
+ hardware ethernet 00:bb:00:00:00:06;
+ fixed-address6 1007::3fe;
+}
+
+host h9v6 {
+ hardware ethernet 00:bb:00:00:00:07;
+ fixed-address6 1008::3fe;
+}
+
+host h10v6 {
+ hardware ethernet 00:bb:00:00:00:08;
+ fixed-address6 1009::3fe;
+}
+
+host h11v6 {
+ hardware ethernet 00:bb:00:00:00:0a;
+ fixed-address6 1010::3fe;
+}
+
+
+
+
+
+
+
+
+
+
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/zebradbgp1.conf b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/zebradbgp1.conf
new file mode 100644
index 0000000..d4f09ea
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/zebradbgp1.conf
@@ -0,0 +1,9 @@
+log file /var/log/quagga/zebradbgp1.log
+hostname zebra-bgp1
+password quagga
+!
+! Default route via virtual management switch
+!
+ip route 0.0.0.0/0 172.16.0.1
+!
+fpm connection ip 10.128.100.67 port 2620
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/zebradbgp2.conf b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/zebradbgp2.conf
new file mode 100644
index 0000000..9ecb6f6
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/conf/zebradbgp2.conf
@@ -0,0 +1,9 @@
+log file /var/log/quagga/zebradbgp2.log
+hostname zebra-bgp2
+password quagga
+!
+! Default route via virtual management switch
+!
+ip route 0.0.0.0/0 172.16.0.1
+!
+fpm connection ip 10.128.100.67 port 2620
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=0_routers=0.json b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=0_routers=0.json
index da381ab..52624f7 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=0_routers=0.json
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=0_routers=0.json
@@ -122,67 +122,67 @@
}
},
"hosts" : {
- "00:aa:00:00:00:01/None" : {
+ "00:bb:00:00:00:01/None" : {
"basic": {
"locations": ["of:0000000000000001/3"],
"ips": ["1000::3fe"]
}
},
- "00:aa:00:00:01:01/None" : {
+ "00:bb:00:00:01:01/None" : {
"basic": {
"locations": ["of:0000000000000001/4"],
"ips": ["1001::3fe"]
}
},
- "00:aa:00:00:00:02/None" : {
+ "00:bb:00:00:00:02/None" : {
"basic": {
"locations": ["of:0000000000000002/6"],
"ips": ["1002::3fe"]
}
},
- "00:aa:00:00:00:03/None" : {
+ "00:bb:00:00:00:03/None" : {
"basic": {
"locations": ["of:0000000000000002/7", "of:0000000000000003/6"],
"ips": ["1003::3fe"]
}
},
- "00:aa:00:00:00:04/30" : {
+ "00:bb:00:00:00:04/30" : {
"basic": {
"locations": ["of:0000000000000003/7","of:0000000000000002/8"],
"ips": ["1004::3fe"]
}
},
- "00:aa:00:00:00:05/20" : {
+ "00:bb:00:00:00:05/20" : {
"basic": {
"locations": ["of:0000000000000003/8"],
"ips": ["1005::3fe"]
}
},
- "00:aa:00:00:01:05/40" : {
+ "00:bb:00:00:01:05/40" : {
"basic": {
"locations": ["of:0000000000000003/9"],
"ips": ["1006::3fe"]
}
},
- "00:aa:00:00:00:06/30" : {
+ "00:bb:00:00:00:06/30" : {
"basic": {
"locations": ["of:0000000000000004/6"],
"ips": ["1007::3fe"]
}
},
- "00:aa:00:00:00:07/40" : {
+ "00:bb:00:00:00:07/40" : {
"basic": {
"locations": ["of:0000000000000005/6", "of:0000000000000004/7"],
"ips": ["1008::3fe"]
}
},
- "00:aa:00:00:00:08/40" : {
+ "00:bb:00:00:00:08/40" : {
"basic": {
"locations": ["of:0000000000000004/8","of:0000000000000005/7"],
"ips": ["1009::3fe"]
}
},
- "00:aa:00:00:00:0A/40" : {
+ "00:bb:00:00:00:0A/40" : {
"basic": {
"locations": ["of:0000000000000005/8"],
"ips": ["1010::3fe"]
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=0.chart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=0.chart
new file mode 100644
index 0000000..e77d1c5
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=0.chart
@@ -0,0 +1,4 @@
+{
+ "ipv6": {"expect": "True",
+ "hosts":["h1v6", "h2v6" ,"h3v6", "h4v6", "h5v6", "h6v6", "h7v6", "h8v6", "h9v6", "h10v6", "h11v6"]}
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=0.json b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=0.json
index d4f36ea..70f1894 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=0.json
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=0.json
@@ -119,70 +119,54 @@
"vlan-tagged": [40]
}
]
- }
+ } ,
+ "of:0000000000000102/10" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-untagged": 15
+ }
+ ]
+ }
},
"hosts" : {
- "00:aa:00:00:00:01/None" : {
- "basic": {
- "locations": ["of:0000000000000001/3"],
- "ips": ["1000::3fe"]
- }
- },
- "00:aa:00:00:01:01/None" : {
- "basic": {
- "locations": ["of:0000000000000001/4"],
- "ips": ["1001::3fe"]
- }
- },
- "00:aa:00:00:00:02/None" : {
- "basic": {
- "locations": ["of:0000000000000002/6"],
- "ips": ["1002::3fe"]
- }
- },
- "00:aa:00:00:00:03/None" : {
- "basic": {
- "locations": ["of:0000000000000002/7", "of:0000000000000003/6"],
- "ips": ["1003::3fe"]
- }
- },
- "00:aa:00:00:00:04/30" : {
+ "00:bb:00:00:00:04/30" : {
"basic": {
"locations": ["of:0000000000000003/7","of:0000000000000002/8"],
"ips": ["1004::3fe"]
}
},
- "00:aa:00:00:00:05/20" : {
+ "00:bb:00:00:00:05/20" : {
"basic": {
"locations": ["of:0000000000000003/8"],
"ips": ["1005::3fe"]
}
},
- "00:aa:00:00:01:05/40" : {
+ "00:bb:00:00:01:05/40" : {
"basic": {
"locations": ["of:0000000000000003/9"],
"ips": ["1006::3fe"]
}
},
- "00:aa:00:00:00:06/30" : {
+ "00:bb:00:00:00:06/30" : {
"basic": {
"locations": ["of:0000000000000004/6"],
"ips": ["1007::3fe"]
}
},
- "00:aa:00:00:00:07/40" : {
+ "00:bb:00:00:00:07/40" : {
"basic": {
"locations": ["of:0000000000000005/6", "of:0000000000000004/7"],
"ips": ["1008::3fe"]
}
},
- "00:aa:00:00:00:08/40" : {
+ "00:bb:00:00:00:08/40" : {
"basic": {
"locations": ["of:0000000000000004/8","of:0000000000000005/7"],
"ips": ["1009::3fe"]
}
},
- "00:aa:00:00:00:0A/40" : {
+ "00:bb:00:00:00:0A/40" : {
"basic": {
"locations": ["of:0000000000000005/8"],
"ips": ["1010::3fe"]
@@ -319,14 +303,13 @@
}
},
"apps" : {
- "org.onosproject.dhcprelay" : {
- "default" : [
- {
- "dhcpServerConnectPoint": "of:0000000000000102/7",
- "serverIps": ["10.0.3.253", "2000::3fd"]
- }
- ]
- }
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000102/10",
+ "serverIps": ["2000::3fd"]
+ }
+ ]
+ }
}
-
}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1.json b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1.json
new file mode 100644
index 0000000..e5f1856
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1.json
@@ -0,0 +1,366 @@
+{
+ "ports" : {
+ "of:0000000000000001/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1000::3ff/120" ],
+ "vlan-untagged": 10
+ }
+ ]
+ },
+ "of:0000000000000001/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1001::3ff/120" ],
+ "vlan-untagged": 10
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1002::3ff/120" ],
+ "vlan-untagged": 10
+ }
+ ]
+ },
+ "of:0000000000000002/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1003::3ff/120" ],
+ "vlan-untagged": 15
+ }
+ ]
+ },
+ "of:0000000000000002/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1004::3ff/120" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000003/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1005::3ff/120" ],
+ "vlan-tagged": [20]
+ }
+ ]
+ },
+ "of:0000000000000003/9" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1006::3ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000003/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1003::3ff/120" ],
+ "vlan-untagged": 15
+ }
+ ]
+ },
+ "of:0000000000000003/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1004::3ff/120" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000004/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1007::3ff/120" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000004/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1008::3ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000004/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1009::3ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000005/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1010::3ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000005/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1008::3ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000005/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1009::3ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ } ,
+ "of:0000000000000102/10" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-untagged": 15
+ }
+ ]
+ },
+ "of:0000000000000004/9" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24", "10.0.7.254/24", "2000::1ff/120", "2000::7ff/120" ],
+ "vlan-tagged": [110, 170]
+
+ }
+ ]
+ },
+ "of:0000000000000004/10" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24", "2000::1ff/120"],
+ "vlan-untagged": 110
+
+ }
+ ]
+ },
+ "of:0000000000000004/11" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.7.254/24", "2000::7ff/120" ],
+ "vlan-untagged": 170
+
+ }
+ ]
+ },
+ "of:0000000000000005/9" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.5.254/24", "10.0.6.254/24", "2000::5ff/120", "2000::6ff/120" ],
+ "vlan-tagged": [150, 160]
+ }
+ ]
+ },
+ "of:0000000000000005/10" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.5.254/24", "2000::5ff/120"],
+ "vlan-untagged": 150
+ }
+ ]
+ },
+ "of:0000000000000005/11" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.6.254/24", "2000::6ff/120" ],
+ "vlan-untagged": 160
+ }
+ ]
+ }
+ },
+ "hosts" : {
+ "00:bb:00:00:00:04/30" : {
+ "basic": {
+ "locations": ["of:0000000000000003/7","of:0000000000000002/8"],
+ "ips": ["1004::3fe"]
+ }
+ },
+ "00:bb:00:00:00:05/20" : {
+ "basic": {
+ "locations": ["of:0000000000000003/8"],
+ "ips": ["1005::3fe"]
+ }
+ },
+ "00:bb:00:00:01:05/40" : {
+ "basic": {
+ "locations": ["of:0000000000000003/9"],
+ "ips": ["1006::3fe"]
+ }
+ },
+ "00:bb:00:00:00:06/30" : {
+ "basic": {
+ "locations": ["of:0000000000000004/6"],
+ "ips": ["1007::3fe"]
+ }
+ },
+ "00:bb:00:00:00:07/40" : {
+ "basic": {
+ "locations": ["of:0000000000000005/6", "of:0000000000000004/7"],
+ "ips": ["1008::3fe"]
+ }
+ },
+ "00:bb:00:00:00:08/40" : {
+ "basic": {
+ "locations": ["of:0000000000000004/8","of:0000000000000005/7"],
+ "ips": ["1009::3fe"]
+ }
+ },
+ "00:bb:00:00:00:0A/40" : {
+ "basic": {
+ "locations": ["of:0000000000000005/8"],
+ "ips": ["1010::3fe"]
+ }
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "name" : "s001",
+ "ipv4NodeSid" : 1,
+ "ipv6NodeSid" : 101,
+ "ipv6Loopback" : "2000::c0a8:0001",
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-105
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "name" : "s002",
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.2",
+ "ipv6NodeSid" : 102,
+ "ipv6Loopback" : "2000::c0a8:0002",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "pairLocalPort" : 5,
+ "pairDeviceId": "of:0000000000000003",
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-95
+ }
+ },
+ "of:0000000000000003" : {
+ "segmentrouting" : {
+ "name" : "s003",
+ "ipv4NodeSid" : 3,
+ "ipv4Loopback" : "192.168.0.3",
+ "ipv6NodeSid" : 103,
+ "ipv6Loopback" : "2000::c0a8:0003",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "pairLocalPort" : 5,
+ "pairDeviceId": "of:0000000000000002",
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-90
+ }
+ },
+ "of:0000000000000004" : {
+ "segmentrouting" : {
+ "name" : "s004",
+ "ipv4NodeSid" : 4,
+ "ipv4Loopback" : "192.168.0.4",
+ "ipv6NodeSid" : 104,
+ "ipv6Loopback" : "2000::c0a8:0004",
+ "routerMac" : "00:00:00:00:00:04",
+ "isEdgeRouter" : true,
+ "pairLocalPort" : 5,
+ "pairDeviceId": "of:0000000000000005",
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-85
+ }
+ },
+ "of:0000000000000005" : {
+ "segmentrouting" : {
+ "name" : "s005",
+ "ipv4NodeSid" : 5,
+ "ipv4Loopback" : "192.168.0.5",
+ "ipv6NodeSid" : 105,
+ "ipv6Loopback" : "2000::c0a8:0005",
+ "routerMac" : "00:00:00:00:00:04",
+ "isEdgeRouter" : true,
+ "pairLocalPort" : 5,
+ "pairDeviceId": "of:0000000000000004",
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-80
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "name" : "s101",
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "ipv6NodeSid" : 201,
+ "ipv6Loopback" : "2000::c0a8:0101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":42,
+ "longitude":-100
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "name" : "s102",
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "ipv6NodeSid" : 202,
+ "ipv6Loopback" : "2000::c0a8:0202",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":42,
+ "longitude":-95
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000102/10",
+ "serverIps": ["2000::3fd"]
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=0.chart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=0.chart
new file mode 100644
index 0000000..8fc87ff
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=0.chart
@@ -0,0 +1,4 @@
+{
+ "ipv4": {"expect": "True",
+ "hosts":["h1v4", "h2v4" ,"h3v4", "h4v4", "h5v4", "h6v4", "h7v4", "h8v4", "h9v4", "h10v4", "h11v4"]}
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=0.json b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=0.json
index f943f35..968884f 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=0.json
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=0.json
@@ -119,76 +119,16 @@
"vlan-tagged": [40]
}
]
+ } ,
+ "of:0000000000000102/10" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 15
+ }
+ ]
}
},
- "hosts" : {
- "00:aa:00:00:00:01/None" : {
- "basic": {
- "locations": ["of:0000000000000001/3"],
- "ips": ["10.1.0.1"]
- }
- },
- "00:aa:00:00:01:01/None" : {
- "basic": {
- "locations": ["of:0000000000000001/4"],
- "ips": ["10.1.10.1"]
- }
- },
- "00:aa:00:00:00:02/None" : {
- "basic": {
- "locations": ["of:0000000000000002/6"],
- "ips": ["10.2.0.1"]
- }
- },
- "00:aa:00:00:00:03/None" : {
- "basic": {
- "locations": ["of:0000000000000002/7", "of:0000000000000003/6"],
- "ips": ["10.2.30.1"]
- }
- },
- "00:aa:00:00:00:04/30" : {
- "basic": {
- "locations": ["of:0000000000000003/7","of:0000000000000002/8"],
- "ips": ["10.2.20.1"]
- }
- },
- "00:aa:00:00:00:05/20" : {
- "basic": {
- "locations": ["of:0000000000000003/8"],
- "ips": ["10.2.10.1"]
- }
- },
- "00:aa:00:00:01:05/40" : {
- "basic": {
- "locations": ["of:0000000000000003/9"],
- "ips": ["10.2.40.1"]
- }
- },
- "00:aa:00:00:00:06/30" : {
- "basic": {
- "locations": ["of:0000000000000004/6"],
- "ips": ["10.3.0.1"]
- }
- },
- "00:aa:00:00:00:07/40" : {
- "basic": {
- "locations": ["of:0000000000000005/6", "of:0000000000000004/7"],
- "ips": ["10.3.10.1"]
- }
- },
- "00:aa:00:00:00:08/40" : {
- "basic": {
- "locations": ["of:0000000000000004/8","of:0000000000000005/7"],
- "ips": ["10.3.30.1"]
- }
- },
- "00:aa:00:00:00:0A/40" : {
- "basic": {
- "locations": ["of:0000000000000005/8"],
- "ips": ["10.3.20.1"]
- }
- }
- },
"devices" : {
"of:0000000000000001" : {
"segmentrouting" : {
@@ -305,14 +245,13 @@
}
},
"apps" : {
- "org.onosproject.dhcprelay" : {
- "default" : [
- {
- "dhcpServerConnectPoint": "of:0000000000000102/10",
- "serverIps": ["10.0.3.253"]
- }
- ]
- }
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000102/10",
+ "serverIps": ["10.0.3.253"]
+ }
+ ]
+ }
}
-
}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1.json b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1.json
new file mode 100644
index 0000000..e06e3ab
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1.json
@@ -0,0 +1,308 @@
+{
+ "ports" : {
+ "of:0000000000000001/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.1.0.254/24" ],
+ "vlan-untagged": 10
+ }
+ ]
+ },
+ "of:0000000000000001/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.1.10.254/24" ],
+ "vlan-untagged": 10
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.2.0.254/24" ],
+ "vlan-untagged": 10
+ }
+ ]
+ },
+ "of:0000000000000002/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.2.30.254/24" ],
+ "vlan-untagged": 15
+ }
+ ]
+ },
+ "of:0000000000000002/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.2.20.254/24" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000003/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.2.10.254/24" ],
+ "vlan-tagged": [20]
+ }
+ ]
+ },
+ "of:0000000000000003/9" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.2.40.254/24" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000003/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.2.30.254/24" ],
+ "vlan-untagged": 15
+ }
+ ]
+ },
+ "of:0000000000000003/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.2.20.254/24" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000004/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.3.0.254/24" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000004/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.3.10.254/24" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000004/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.3.30.254/24" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000005/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.3.20.254/24" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000005/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.3.10.254/24" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000005/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.3.30.254/24" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ } ,
+ "of:0000000000000102/10" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 15
+ }
+ ]
+ },
+ "of:0000000000000004/9" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24", "10.0.7.254/24", "2000::1ff/120", "2000::7ff/120" ],
+ "vlan-tagged": [110, 170]
+
+ }
+ ]
+ },
+ "of:0000000000000004/10" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24", "2000::1ff/120"],
+ "vlan-untagged": 110
+
+ }
+ ]
+ },
+ "of:0000000000000004/11" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.7.254/24", "2000::7ff/120" ],
+ "vlan-untagged": 170
+
+ }
+ ]
+ },
+ "of:0000000000000005/9" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.5.254/24", "10.0.6.254/24", "2000::5ff/120", "2000::6ff/120" ],
+ "vlan-tagged": [150, 160]
+ }
+ ]
+ },
+ "of:0000000000000005/10" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.5.254/24", "2000::5ff/120"],
+ "vlan-untagged": 150
+ }
+ ]
+ },
+ "of:0000000000000005/11" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.6.254/24", "2000::6ff/120" ],
+ "vlan-untagged": 160
+ }
+ ]
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "name" : "s001",
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-105
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "name" : "s002",
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.2",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "pairLocalPort" : 5,
+ "pairDeviceId": "of:0000000000000003",
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-95
+ }
+ },
+ "of:0000000000000003" : {
+ "segmentrouting" : {
+ "name" : "s003",
+ "ipv4NodeSid" : 3,
+ "ipv4Loopback" : "192.168.0.3",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "pairLocalPort" : 5,
+ "pairDeviceId": "of:0000000000000002",
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-90
+ }
+ },
+ "of:0000000000000004" : {
+ "segmentrouting" : {
+ "name" : "s004",
+ "ipv4NodeSid" : 4,
+ "ipv4Loopback" : "192.168.0.4",
+ "routerMac" : "00:00:00:00:00:04",
+ "isEdgeRouter" : true,
+ "pairLocalPort" : 5,
+ "pairDeviceId": "of:0000000000000005",
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-85
+ }
+ },
+ "of:0000000000000005" : {
+ "segmentrouting" : {
+ "name" : "s005",
+ "ipv4NodeSid" : 5,
+ "ipv4Loopback" : "192.168.0.5",
+ "routerMac" : "00:00:00:00:00:04",
+ "isEdgeRouter" : true,
+ "pairLocalPort" : 5,
+ "pairDeviceId": "of:0000000000000004",
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-80
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "name" : "s101",
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":42,
+ "longitude":-100
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "name" : "s102",
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":42,
+ "longitude":-95
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000102/10",
+ "serverIps": ["10.0.3.253"]
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
index 8d929ad..bc021c6 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
@@ -58,10 +58,12 @@
main.apps = main.params[ 'ENV' ][ 'cellApps' ]
main.path = os.path.dirname( main.testFile )
main.topoPath = main.path + "/../dependencies/"
- main.configPath = main.path + "/../dependencies/"
+ main.configPath = main.path + "/../dependencies/conf/"
+ main.testConfPath = main.path + "/dependencies/conf/"
main.topology = main.params[ 'DEPENDENCY' ][ 'topology' ]
main.topologyLib = main.params[ 'DEPENDENCY' ][ 'lib' ] if 'lib' in main.params[ 'DEPENDENCY' ] else None
main.topologyConf = main.params[ 'DEPENDENCY' ][ 'conf' ] if 'conf' in main.params[ 'DEPENDENCY' ] else None
+ main.testConf = main.params[ 'DEPENDENCY' ][ 'testConf' ] if 'testConf' in main.params[ 'DEPENDENCY' ] else None
main.scale = ( main.params[ 'SCALE' ][ 'size' ] ).split( "," )
main.maxNodes = int( main.params[ 'SCALE' ][ 'max' ] )
main.startUpSleep = int( main.params[ 'SLEEP' ][ 'startup' ] )
@@ -135,7 +137,13 @@
if main.topologyConf:
for conf in main.topologyConf.split(","):
copyResult = copyResult and main.ONOSbench.scp( main.Mininet1,
- main.topoPath + "conf/" + conf,
+ main.configPath + conf,
+ "~/",
+ direction="to" )
+ if main.testConf:
+ for conf in main.testConf.split(","):
+ copyResult = copyResult and main.ONOSbench.scp( main.Mininet1,
+ main.testConfPath + conf,
"~/",
direction="to" )
stepResult = copyResult
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/comcast_fabric.py b/TestON/tests/USECASE/SegmentRouting/dependencies/comcast_fabric.py
index e08e5a6..0345375 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/comcast_fabric.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/comcast_fabric.py
@@ -121,59 +121,67 @@
def createIpv6Hosts(self, dhcp):
h1 = self.addHost('h1v6', cls=TrellisHost,
- mac='00:aa:00:00:00:01', ips=["1000::3fe/120"],
- gateway='1000::3ff', dhcpClient=dhcp)
+ mac='00:bb:00:00:00:01', ips=["1000::3fe/120"],
+ gateway='1000::3ff', dhcpClient=dhcp, ipv6=1)
self.addLink(h1, self.leafs[0])
self.hosts_dict['h1v6'] = h1
h2 = self.addHost('h2v6', cls=TrellisHost,
- mac='00:aa:00:00:01:01', ips=['1001::3fe/120'],
- gateway='1001::3ff', dhcpClient=dhcp)
+ mac='00:bb:00:00:01:01', ips=['1001::3fe/120'],
+ gateway='1001::3ff', dhcpClient=dhcp, ipv6=1)
self.addLink(h2, self.leafs[0])
self.hosts_dict['h2v6'] = h2
h3 = self.addHost('h3v6', cls=TrellisHost,
- mac='00:aa:00:00:00:02', ips=['1002::3fe/120'],
- gateway='1002::3ff', dhcpClient=dhcp)
+ mac='00:bb:00:00:00:02', ips=['1002::3fe/120'],
+ gateway='1002::3ff', dhcpClient=dhcp, ipv6=1)
self.addLink(h3, self.leafs[1])
self.hosts_dict['h3v6'] = h3
h4 = self.addHost('h4v6', cls=TrellisHost,
- mac='00:aa:00:00:00:03', ips=['1003::3fe/120'],
- gateway='1003::3ff', dhcpClient=dhcp,
+ mac='00:bb:00:00:00:03', ips=['1003::3fe/120'],
+ gateway='1003::3ff', dhcpClient=dhcp, ipv6=1,
dualHomed=True)
self.addLink(h4, self.leafs[1])
self.addLink(h4, self.leafs[2])
self.hosts_dict['h4v6'] = h4
+ # TODO: Remove this line when we
+ # find WHY dhcpv6 with tagged clients
+ # does not work.
+ dhcp = False
+
h5 = self.addHost('h5v6', cls=TrellisHost,
- mac='00:aa:00:00:00:04', ips=['1004::3fe/120'],
- gateway='1004::3ff', dhcpClient=dhcp, vlan=30,
+ mac='00:bb:00:00:00:04', ips=['1004::3fe/120'],
+ gateway='1004::3ff', dhcpClient=dhcp, ipv6=1,
+ vlan=30,
dualHomed=True)
self.addLink(h5, self.leafs[1])
self.addLink(h5, self.leafs[2])
self.hosts_dict['h5v6'] = h5
h6 = self.addHost('h6v6', cls=TrellisHost,
- mac='00:aa:00:00:00:05', ips=['1005::3fe/120'],
- gateway='1005::3ff', dhcpClient=dhcp, vlan=20)
+ mac='00:bb:00:00:00:05', ips=['1005::3fe/120'],
+ gateway='1005::3ff', dhcpClient=dhcp, vlan=20,
+ ipv6=1)
self.addLink(h6, self.leafs[2])
self.hosts_dict['h6v6'] = h6
h7 = self.addHost('h7v6', cls=TrellisHost,
- mac='00:aa:00:00:01:05', ips=['1006::3fe/120'],
- gateway='1006::3ff', dhcpClient=dhcp, vlan=40)
+ mac='00:bb:00:00:01:05', ips=['1006::3fe/120'],
+ gateway='1006::3ff', dhcpClient=dhcp, ipv6=1,
+ vlan=40)
self.addLink(h7, self.leafs[2])
self.hosts_dict['h7v6'] = h7
h8 = self.addHost('h8v6', cls=TrellisHost,
- mac='00:aa:00:00:00:06', ips=['1007::3fe/120'],
+ mac='00:bb:00:00:00:06', ips=['1007::3fe/120'],
gateway='1007::3ff', dhcpClient=dhcp, vlan=30)
self.addLink(h8, self.leafs[3])
self.hosts_dict['h8v6'] = h8
h9 = self.addHost('h9v6', cls=TrellisHost,
- mac='00:aa:00:00:00:07', ips=['1008::3fe/120'],
+ mac='00:bb:00:00:00:07', ips=['1008::3fe/120'],
gateway='1008::3ff', dhcpClient=dhcp, vlan=40,
dualHomed=True)
self.addLink(h9, self.leafs[3])
@@ -181,7 +189,7 @@
self.hosts_dict['h9v6'] = h9
h10 = self.addHost('h10v6', cls=TrellisHost,
- mac='00:aa:00:00:00:08', ips=['1009::3fe/120'],
+ mac='00:bb:00:00:00:08', ips=['1009::3fe/120'],
gateway='1009::3ff', dhcpClient=dhcp, vlan=40,
dualHomed=True)
self.addLink(h10, self.leafs[3])
@@ -189,7 +197,7 @@
self.hosts_dict['h10v6'] = h10
h11 = self.addHost('h11v6', cls=TrellisHost,
- mac='00:aa:00:00:00:0a', ips=['1010::3fe/120'],
+ mac='00:bb:00:00:00:0a', ips=['1010::3fe/120'],
gateway='1010::3ff', dhcpClient=dhcp, vlan=40)
self.addLink(h11, self.leafs[4])
self.hosts_dict['h11v6'] = h11
@@ -212,7 +220,6 @@
def __init__(self, dhcp=False, routers=False, ipv4=False, ipv6=False, **opts):
Topo.__init__(self, **opts)
- # TODO: support IPv6 hosts
linkopts = dict( bw=10 )
spine = 2
@@ -249,13 +256,10 @@
gateway="10.0.3.254", dhcpServer=True)
self.addLink(self.spines[1], dhcp4, **linkopts)
if ipv6:
- dhcp6 = self.addHost( 'dhcp', cls=TrellisHost,
- mac="00:bb:00:00:00:02", ips=["2000::3fd/120"],
- gateway="2000::3ff")
- self.addLink(self.spines[1], dhcp4, **linkopts)
- # creatte quagga routers
- if routers:
- print("NYI (quagga)!")
+ dhcp6 = self.addHost( 'dhcp6', cls=TrellisHost,
+ mac="00:cc:00:00:00:01", ips=["2000::3fd/120"],
+ gateway="2000::3ff", dhcpServer=True, ipv6=True)
+ self.addLink(self.spines[1], dhcp6, **linkopts)
# create hosts
if ipv6:
@@ -267,6 +271,91 @@
if not ipv4 and not ipv6:
print("No hosts were created!")
+ # create quagga routers
+ if routers:
+ last_ls = self.leafs[4]
+ last_paired_ls = self. leafs[3]
+
+ # Control plane switch (for quagga fpm)
+ cs0 = self.addSwitch('cs0', cls=OVSBridge)
+
+ # Control plane NAT (for quagga fpm)
+ nat = self.addHost('nat', cls=NAT,
+ ip='172.16.0.1/12',
+ subnet=str(ip_network(u'172.16.0.0/12')), inNamespace=False)
+ self.addLink(cs0, nat)
+
+ # Internal Quagga bgp1
+ intfs = {'bgp1-eth0': [{'ipAddrs': ['10.0.1.2/24', '2000::102/120'], 'mac': '00:88:00:00:00:03', 'vlan': '110'},
+ {'ipAddrs': ['10.0.7.2/24', '2000::702/120'], 'mac': '00:88:00:00:00:03', 'vlan': '170'}],
+ 'bgp1-eth1': {'ipAddrs': ['172.16.0.3/12']}}
+ bgp1 = self.addHost('bgp1', cls=BgpRouter,
+ interfaces=intfs,
+ quaggaConfFile='./bgpdbgp1.conf',
+ zebraConfFile='./zebradbgp1.conf')
+ self.addLink(bgp1, last_paired_ls)
+ self.addLink(bgp1, cs0)
+
+ # Internal Quagga bgp2
+ intfs = {'bgp2-eth0': [{'ipAddrs': ['10.0.5.2/24', '2000::502/120'], 'mac': '00:88:00:00:00:04', 'vlan': '150'},
+ {'ipAddrs': ['10.0.6.2/24', '2000::602/120'], 'mac': '00:88:00:00:00:04', 'vlan': '160'}],
+ 'bgp2-eth1': {'ipAddrs': ['172.16.0.4/12']}}
+ bgp2 = self.addHost('bgp2', cls=BgpRouter,
+ interfaces=intfs,
+ quaggaConfFile='./bgpdbgp2.conf',
+ zebraConfFile='./zebradbgp2.conf')
+ self.addLink(bgp2, last_ls)
+ self.addLink(bgp2, cs0)
+
+ # External Quagga r1
+ intfs = {'r1-eth0': {'ipAddrs': ['10.0.1.1/24', '2000::101/120'], 'mac': '00:88:00:00:00:01'},
+ 'r1-eth1': {'ipAddrs': ['10.0.5.1/24', '2000::501/120'], 'mac': '00:88:00:00:00:11'},
+ 'r1-eth2': {'ipAddrs': ['10.0.99.1/16']},
+ 'r1-eth3': {'ipAddrs': ['2000::9901/120']},
+ 'r1-eth4': {'ipAddrs': ['2000::7701/120']}}
+ r1 = self.addHost('r1', cls=BgpRouter,
+ interfaces=intfs,
+ quaggaConfFile='./bgpdr1.conf')
+ self.addLink(r1, last_paired_ls)
+ self.addLink(r1, last_ls)
+
+ # External IPv4 Host behind r1
+ rh1 = self.addHost('rh1', cls=RoutedHost, ips=['10.0.99.2/24'], gateway='10.0.99.1')
+ self.addLink(r1, rh1)
+
+ # External IPv6 Host behind r1
+ rh1v6 = self.addHost('rh1v6', cls=RoutedHost, ips=['2000::9902/120'], gateway='2000::9901')
+ self.addLink(r1, rh1v6)
+
+ # Another external IPv6 Host behind r1
+ rh11v6 = self.addHost('rh11v6', cls=RoutedHost, ips=['2000::7702/120'], gateway='2000::7701')
+ self.addLink(r1, rh11v6)
+
+ # External Quagga r2
+ intfs = {'r2-eth0': {'ipAddrs': ['10.0.6.1/24', '2000::601/120'], 'mac': '00:88:00:00:00:02'},
+ 'r2-eth1': {'ipAddrs': ['10.0.7.1/24', '2000::701/120'], 'mac': '00:88:00:00:00:22'},
+ 'r2-eth2': {'ipAddrs': ['10.0.99.1/16']},
+ 'r2-eth3': {'ipAddrs': ['2000::9901/120']},
+ 'r2-eth4': {'ipAddrs': ['2000::8801/120']}}
+ r2 = self.addHost('r2', cls=BgpRouter,
+ interfaces=intfs,
+ quaggaConfFile='./bgpdr2.conf')
+ self.addLink(r2, last_ls)
+ self.addLink(r2, last_paired_ls)
+
+ # External IPv4 Host behind r2
+ rh2 = self.addHost('rh2', cls=RoutedHost, ips=['10.0.99.2/24'], gateway='10.0.99.1')
+ self.addLink(r2, rh2)
+
+ # External IPv6 Host behind r2
+ rh2v6 = self.addHost('rh126', cls=RoutedHost, ips=['2000::9902/120'], gateway='2000::9901')
+ self.addLink(r2, rh2v6)
+
+ # Another external IPv6 Host behind r1
+ rh22v6 = self.addHost('rh22v6', cls=RoutedHost, ips=['2000::8802/120'], gateway='2000::8801')
+ self.addLink(r2, rh22v6)
+
+
def config( opts ):
dhcp = bool(opts.dhcp)
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/routinglib.py b/TestON/tests/USECASE/SegmentRouting/dependencies/routinglib.py
index 81ed5ec..621b372 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/routinglib.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/routinglib.py
@@ -146,6 +146,9 @@
self.cmd('%s/zebra -d -f %s -z %s -i %s'
% (QuaggaRouter.binDir, self.zebraConfFile, self.socket, self.zebraPidFile))
+ print("\n")
+ print('%s/zebra -d -f %s -z %s -i %s'
+ % (QuaggaRouter.binDir, self.zebraConfFile, self.socket, self.zebraPidFile))
for p in self.protocols:
p.config(**kwargs)
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/trellislib.py b/TestON/tests/USECASE/SegmentRouting/dependencies/trellislib.py
index 4c827f0..f4c1df0 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/trellislib.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/trellislib.py
@@ -307,11 +307,7 @@
self.nameToIntf[self.vlanIntf] = defaultIntf
if self.dhcpClient:
- if self.vlan or self.dualHomed:
- # Why leaseFile is not required here?
- self.cmd('dhclient -q -%s -nw -pf %s %s' % (6 if self.ipv6 else 4, self.pidFile, self.defaultIntf()))
- else:
- self.cmd('dhclient -q -%s -nw -pf %s -lf %s %s' % (6 if self.ipv6 else 4, self.pidFile, self.leaseFile, self.defaultIntf()))
+ self.cmd('dhclient -q -%s -nw -pf %s -lf %s %s' % (6 if self.ipv6 else 4, self.pidFile, self.leaseFile, self.defaultIntf()))
else:
# Setup IP addresses
for ip in self.ips: