[VOL-4590] Added support for enableMacLearning in TT bbsim jobs
Change-Id: I67d687b7cc579d065ce5f2019fd4f625442934c5
diff --git a/vars/volthaDeploy.groovy b/vars/volthaDeploy.groovy
index d8d679f..7936e5a 100644
--- a/vars/volthaDeploy.groovy
+++ b/vars/volthaDeploy.groovy
@@ -14,6 +14,7 @@
stackName: "voltha",
stackId: 1,
workflow: "att",
+ withMacLearning: false,
extraHelmFlags: "",
localCharts: false, // wether to use locally cloned charts or upstream one (for local we assume they are stored in $WORKSPACE/voltha-helm-charts)
dockerRegistry: "", // use a different docker registry for all images, eg: "mirror.registry.opennetworking.org"
diff --git a/vars/volthaInfraDeploy.groovy b/vars/volthaInfraDeploy.groovy
index be2f759..fd03e51 100644
--- a/vars/volthaInfraDeploy.groovy
+++ b/vars/volthaInfraDeploy.groovy
@@ -18,6 +18,7 @@
etcdReplica: 1,
infraNamespace: "infra",
workflow: "att",
+ withMacLearning: false,
extraHelmFlags: "",
localCharts: false,
kubeconfig: null, // location of the kubernetes config file, if null we assume it's stored in the $KUBECONFIG environment variable
@@ -53,6 +54,11 @@
kubectl create configmap -n ${cfg.infraNamespace} kube-config "--from-file=kube_config=${kubeconfig}" || true
"""
+ def serviceConfigFile = cfg.workflow
+ if (cfg.withMacLearning && cfg.workflow == 'tt') {
+ serviceConfigFile = "tt-maclearner"
+ }
+
// bitnamic/etch has change the replica format between the currently used 5.4.2 and the latest 6.2.5
// for now put both values in the extra helm chart flags
sh """
@@ -61,6 +67,6 @@
--set kafka.replicaCount=${cfg.kafkaReplica},kafka.zookeeper.replicaCount=${cfg.kafkaReplica} \
--set etcd.statefulset.replicaCount=${cfg.etcdReplica} \
--set etcd.replicaCount=${cfg.etcdReplica} \
- -f $WORKSPACE/voltha-helm-charts/examples/${cfg.workflow}-values.yaml ${cfg.extraHelmFlags}
+ -f $WORKSPACE/voltha-helm-charts/examples/${serviceConfigFile}-values.yaml ${cfg.extraHelmFlags}
"""
}
diff --git a/vars/volthaStackDeploy.groovy b/vars/volthaStackDeploy.groovy
index 0f96796..37a00d2 100644
--- a/vars/volthaStackDeploy.groovy
+++ b/vars/volthaStackDeploy.groovy
@@ -53,7 +53,11 @@
"""
if (cfg.workflow == "att" || cfg.workflow == "tt") {
def startingStag = 900
- def bbsimCfg = readYaml file: "$WORKSPACE/voltha-helm-charts/examples/${cfg.workflow}-values.yaml"
+ def serviceConfigFile = cfg.workflow
+ if (cfg.withMacLearning && cfg.workflow == 'tt') {
+ serviceConfigFile = "tt-maclearner"
+ }
+ def bbsimCfg = readYaml file: "$WORKSPACE/voltha-helm-charts/examples/${serviceConfigFile}-values.yaml"
// NOTE we assume that the only service that needs a different s_tag is the first one in the list
bbsimCfg["servicesConfig"]["services"][0]["s_tag"] = startingStag + i
println "Using BBSim Service config ${bbsimCfg['servicesConfig']}"