Remove all references to fabric-tofino from tost image

Transition to fabric-tna has been completed. We no longer deploy
fabric-tofino pipeconfs.

Change-Id: Ia605f5f5ea55a55039a22af73a57c521fa5b1c3f
diff --git a/.gitignore b/.gitignore
index 5b30fd6..978c440 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,7 +5,6 @@
 onos/
 trellis-control/
 trellis-t3/
-fabric-tofino/
 up4/
 kafka-onos/
 fabric-tna/
diff --git a/Dockerfile.tost b/Dockerfile.tost
index 984d1bb..609d85d 100644
--- a/Dockerfile.tost
+++ b/Dockerfile.tost
@@ -70,7 +70,6 @@
 ARG org_onosproject_onos_version=unknown
 ARG org_onosproject_trellis_control_version=unknown
 ARG org_onosproject_trellis_t3_version=unknown
-ARG org_opencord_fabric_tofino_version=unknown
 ARG org_omecproject_up4_version=unknown
 ARG org_opencord_kafka_onos_version=unknown
 ARG org_stratumproject_fabric_tna_version=unknown
@@ -84,7 +83,6 @@
       org.onosproject.onos.version=$org_onosproject_onos_version \
       org.onosproject.trellis-control.version=$org_onosproject_trellis_control_version \
       org.onosproject.trellis-t3.version=$org_onosproject_trellis_t3_version \
-      org.opencord.fabric-tofino.version=$org_opencord_fabric_tofino_version \
       org.omecproject.up4.version=$org_omecproject_up4_version \
       org.opencord.kafka-onos.version=$org_opencord_kafka_onos_version \
       org.stratumproject.fabric-tna.version=$org_stratumproject_fabric_tna_version
diff --git a/Makefile b/Makefile
index 1ad7ec8..fe0d932 100644
--- a/Makefile
+++ b/Makefile
@@ -72,10 +72,6 @@
 export TRELLIS_T3_ROOT       := $(shell pwd)/trellis-t3
 export TRELLIS_T3_REPO       := https://gerrit.onosproject.org/trellis-t3
 
-# Fabric-Tofino related
-export FABRIC_TOFINO_ROOT    := $(shell pwd)/fabric-tofino
-export FABRIC_TOFINO_REPO    := https://gerrit.opencord.org/fabric-tofino
-
 # Up4 related
 export UP4_ROOT              := $(shell pwd)/up4
 export UP4_REPO              := git@github.com:omec-project/up4.git
@@ -88,7 +84,7 @@
 export FABRIC_TNA_ROOT       := $(shell pwd)/fabric-tna
 export FABRIC_TNA_REPO       := git@github.com:stratum/fabric-tna.git
 
-.PHONY: onos trellis-control trellis-t3 fabric-tofino up4 kafka-onos fabric-tna
+.PHONY: onos trellis-control trellis-t3 up4 kafka-onos fabric-tna
 
 .SILENT: up4 fabric-tna
 
@@ -104,7 +100,6 @@
 	@echo "ONOS_VERSION              : Override to use a specific branch/commit/tag/release to build the image"
 	@echo "TRELLIS_CONTROL_VERSION   : Override to use a specific branch/commit/tag/release to build the image"
 	@echo "TRELLIS_T3_VERSION        : Override to use a specific branch/commit/tag/release to build the image"
-	@echo "FABRIC_TOFINO_VERSION     : Override to use a specific branch/commit/tag/release to build the image"
 	@echo "UP4_VERSION               : Override to use a specific branch/commit/tag/release to build the image"
 	@echo "KAFKA_ONOS_VERSION        : Override to use a specific branch/commit/tag/release to build the image"
 	@echo "FABRIC_TNA_VERSION        : Override to use a specific branch/commit/tag/release to build the image"
@@ -173,29 +168,6 @@
 trellis-t3-build: mvn_settings.xml local-apps trellis-t3  ## : Builds trellis-t3 using local app or mvn
 	@./app-build.sh $@
 
-fabric-tofino: ## : Checkout fabric-tofino code
-	if [ ! -d "fabric-tofino" ]; then \
-		git clone ${FABRIC_TOFINO_REPO}; \
-	fi
-
-	@modified=$$(cd ${FABRIC_TOFINO_ROOT} && git status --porcelain); \
-	if [ ! -z "$${modified}" ]; then \
-		echo "Unable to checkout, you have pending changes in fabric-tofino repository"; \
-		exit 1; \
-	fi
-
-	cd ${FABRIC_TOFINO_ROOT} && git remote update
-
-	if ! (cd ${FABRIC_TOFINO_ROOT} && (git checkout origin/${FABRIC_TOFINO_VERSION} || git checkout ${FABRIC_TOFINO_VERSION})); then \
-	if ! (cd ${FABRIC_TOFINO_ROOT} && git fetch ${FABRIC_TOFINO_REPO} ${FABRIC_TOFINO_VERSION} && git checkout FETCH_HEAD); then \
-		echo "Unable to fetch the changes from the fabric-tofino repository"; \
-		exit 1; \
-	fi \
-	fi
-
-fabric-tofino-build: mvn_settings.xml local-apps fabric-tofino  ## : Builds fabric-tofino using local app or mvn
-	@./app-build.sh $@
-
 up4: ## : Checkout up4 code
 	if [ ! -d "up4" ]; then \
 		git clone ${UP4_REPO}; \
@@ -264,9 +236,9 @@
 fabric-tna-build: mvn_settings.xml local-apps fabric-tna  ## : Builds fabric-tna using local app
 	@./app-build.sh $@
 
-apps: trellis-control trellis-t3 fabric-tofino up4 kafka-onos fabric-tna ## : downloads commits, files, and refs from remotes
+apps: trellis-control trellis-t3 up4 kafka-onos fabric-tna ## : downloads commits, files, and refs from remotes
 
-apps-build: trellis-control-build trellis-t3-build fabric-tofino-build up4-build kafka-onos-build fabric-tna-build ## : Build the onos apps
+apps-build: trellis-control-build trellis-t3-build up4-build kafka-onos-build fabric-tna-build ## : Build the onos apps
 
 onos: ## : Checkout onos code
 	if [ ! -d "onos" ]; then \
@@ -309,7 +281,6 @@
     --build-arg org_onosproject_onos_version="$(shell cd ${ONOS_ROOT} && git rev-parse HEAD)"\
     --build-arg org_onosproject_trellis_control_version="$(shell cd ${TRELLIS_CONTROL_ROOT} && git rev-parse HEAD)"\
     --build-arg org_onosproject_trellis_t3_version="$(shell cd ${TRELLIS_T3_ROOT} && git rev-parse HEAD)"\
-    --build-arg org_opencord_fabric_tofino_version="$(shell cd ${FABRIC_TOFINO_ROOT} && git rev-parse HEAD)"\
     --build-arg org_omecproject_up4_version="$(shell cd ${UP4_ROOT} && git rev-parse HEAD)"\
     --build-arg org_opencord_kafka_onos_version="$(shell cd ${KAFKA_ONOS_ROOT} && git rev-parse HEAD)"\
     --build-arg org_stratumproject_fabric_tna_version="$(shell cd ${FABRIC_TNA_ROOT} && git rev-parse HEAD)"\
@@ -331,7 +302,6 @@
 	rm -rf ${ONOS_ROOT}
 	rm -rf ${TRELLIS_CONTROL_ROOT}
 	rm -rf ${TRELLIS_T3_ROOT}
-	rm -rf ${FABRIC_TOFINO_ROOT}
 	rm -rf ${UP4_ROOT}
 	rm -rf ${KAFKA_ONOS_ROOT}
 	rm -rf ${FABRIC_TNA_ROOT}
diff --git a/Makefile.vars.master b/Makefile.vars.master
index 58ab187..93d8033 100644
--- a/Makefile.vars.master
+++ b/Makefile.vars.master
@@ -29,7 +29,6 @@
 export ONOS_VERSION            ?= onos-2.5
 export TRELLIS_CONTROL_VERSION ?= 3.0.1-SNAPSHOT
 export TRELLIS_T3_VERSION      ?= 4.0.0-SNAPSHOT
-export FABRIC_TOFINO_VERSION   ?= master
 export UP4_VERSION             ?= master
 export KAFKA_ONOS_VERSION      ?= 2.6.0-SNAPSHOT
 export FABRIC_TNA_VERSION      ?= main
diff --git a/Makefile.vars.stable b/Makefile.vars.stable
index 04f4601..d781003 100644
--- a/Makefile.vars.stable
+++ b/Makefile.vars.stable
@@ -29,7 +29,6 @@
 export ONOS_VERSION            ?= 2.5.1
 export TRELLIS_CONTROL_VERSION ?= a3989be6892ec25e99a2caf7b63ea4226dfda39d
 export TRELLIS_T3_VERSION      ?= 4fd3b46d76d1738c3d69d5fdc56603ac77fbfdc0
-export FABRIC_TOFINO_VERSION   ?= e1cf4551b4ab74bb82a7cecf19d197698ffbc1cb
 export UP4_VERSION             ?= 61ba80779a0f38f43da05dea9a124955a596841f
 export KAFKA_ONOS_VERSION      ?= 2.5.0
 export FABRIC_TNA_VERSION      ?= bb46f389ce3800a94c0cf6d5ce5f1a86e97e286f
diff --git a/README.md b/README.md
index 0895de4..7a02cad 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@
 make ONOS_VERSION=ref/changes/72/12345/1 onos-build
 ```
 
-Makefile will build also the apps. These are the apps currently integrated in the script: **trellis-control**, **trellis-t3**, **fabric-tofino**, **up4**, **kafka-onos** and **fabric-tna**. For each one, there is a **build** target.
+Makefile will build also the apps. These are the apps currently integrated in the script: **trellis-control**, **trellis-t3**, **up4**, **kafka-onos** and **fabric-tna**. For each one, there is a **build** target.
 
 `appname-build` builds with the version specified in the `Makefile.vars.DOCKER_TAG`, using the following sources in order: (1) Maven central (for released versions or snapshots); (2) Local source code (for local branch not yet pushed); (3) Gerrit/Github (for pending review in the form of refs/changes/... or pending pull request). As a prerequisite, the script prepares `mvn_settings.xml` file, creates the `local-apps` folder and checks out the code if it is not present (relies on `appname` target). **APPNAME_VERSION**, defined in `Makefile.vars.DOCKER_TAG` file, can be overridden at runtime.
 
@@ -39,11 +39,6 @@
 make up4-build
 ```
 
-```sh
-# Build fabric-tofino app from the tag 1.1.0.
-make FABRIC_TOFINO_VERSION=1.1.0 fabric-tofino-build
-```
-
 `apps-build` is an additional target that automates the build process of the apps building one by one all the apps.
 
 ```sh
diff --git a/app-build.sh b/app-build.sh
index 917d5ad..49f2f40 100755
--- a/app-build.sh
+++ b/app-build.sh
@@ -42,15 +42,6 @@
 TRELLIS_T3_ARTIFACT=${TRELLIS_T3_GROUPID}:${TRELLIS_T3_ARTIFACTID}
 TRELLIS_T3_OAR=${TRELLIS_T3_ROOT}/app/target/${TRELLIS_T3_ARTIFACTID}-${TRELLIS_T3_VERSION}.oar
 
-# Fabric-tofino related vars
-FABRIC_TOFINO_GROUPID=org.opencord
-FABRIC_TOFINO_ARTIFACTID=fabric-tofino
-FABRIC_TOFINO_ARTIFACT=${FABRIC_TOFINO_GROUPID}:${FABRIC_TOFINO_ARTIFACTID}
-FABRIC_TOFINO_TARGETS=(fabric-spgw)
-FABRIC_TOFINO_SDE_DOCKER_IMG=opennetworking/bf-sde:9.0.0-p4c
-FABRIC_TOFINO_P4CFLAGS="-DS1U_SGW_PREFIX='(8w192++8w0++8w0++8w0)' -DS1U_SGW_PREFIX_LEN=8"
-FABRIC_TOFINO_OAR=${FABRIC_TOFINO_ROOT}/target/${FABRIC_TOFINO_ARTIFACTID}-${FABRIC_TOFINO_VERSION}.oar
-
 # UP4 related vars
 UP4_GROUPID=org.omecproject
 UP4_ARTIFACTID=up4-app
@@ -164,25 +155,6 @@
 	cp "${TRELLIS_T3_OAR}" "${LOCAL_APPS}"/
 }
 
-function fabric-tofino-build {
-	# This workaround is temporary - typically we need to build only the pipeconf
-	cd "${FABRIC_TOFINO_ROOT}" || exit 1 && make "${FABRIC_TOFINO_TARGETS[@]}" SDE_DOCKER_IMG="${FABRIC_TOFINO_SDE_DOCKER_IMG}" P4CFLAGS="${FABRIC_TOFINO_P4CFLAGS}"
-	cd ../
-	build_app "${FABRIC_TOFINO_ROOT}"/target \
-	"${FABRIC_TOFINO_ROOT}"/ "fabric-tofino" \
-	"${FABRIC_TOFINO_ARTIFACT}" "${FABRIC_TOFINO_VERSION}" \
-	"target" "${FABRIC_TOFINO_OAR}" "${FABRIC_TOFINO_REPO}"
-	if [ "$MVN" -eq "0" ]; then
-		extract_version "${FABRIC_TOFINO_ROOT}"
-		FABRIC_TOFINO_OAR="${FABRIC_TOFINO_ROOT}"/target/"${FABRIC_TOFINO_ARTIFACTID}"-"${PROJECT_VERSION}".oar
-	fi
-	cp "${FABRIC_TOFINO_OAR}" "${LOCAL_APPS}"/
-	# Extra step to avoid build failure; clean up artifacts to ensure
-	# the release process won't complain about uncommitted changes.
-	cd "${FABRIC_TOFINO_ROOT}" || exit 1 && git checkout .
-	cd ../
-}
-
 function up4-build {
 	# Prepares app folder
 	cd "${UP4_ROOT}" || exit 1 && make "${UP4_TARGETS}"