Skip to content

Commit

Permalink
Fix CSR1000v and c8000v (#269)
Browse files Browse the repository at this point in the history
* Remove whitespaces from IMG_NAME and IMG_VENDOR

* Fix Cisco CSR1000v

* Fix Cisco c8000v
  • Loading branch information
Arthur-K-99 authored Oct 14, 2024
1 parent b3a1ab5 commit 3e8578d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
9 changes: 4 additions & 5 deletions c8000v/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
VENDOR=Cisco
VENDOR=cisco
NAME=c8000v
IMAGE_FORMAT=qcow2
IMAGE_GLOB=*.qcow2

# match versions like:
# csr1000v-universalk9.16.03.01a.qcow2
# csr1000v-universalk9.16.04.01.qcow2
# c8000v-17.11.01a.qcow2
VERSION=$(shell echo $(IMAGE) | sed -e 's/.\+[^0-9]\([0-9]\+\.[0-9]\+\.[0-9]\+[a-z]\?\)\([^0-9].*\|$$\)/\1/')

-include ../makefile-sanity.include
-include ../makefile.include
-include ../makefile-install.include

docker-build: docker-build-common
docker run --cidfile cidfile --privileged $(REGISTRY)vr-$(VR_NAME):$(VERSION) --trace --install
docker commit --change='ENTRYPOINT ["/launch.py"]' $$(cat cidfile) $(REGISTRY)vr-$(VR_NAME):$(VERSION)
docker run --cidfile cidfile --privileged $(REGISTRY)$(VENDOR)_$(NAME):$(VERSION) --trace --install
docker commit --change='ENTRYPOINT ["/launch.py"]' $$(cat cidfile) $(REGISTRY)$(VENDOR)_$(NAME):$(VERSION)
docker rm -f $$(cat cidfile)
8 changes: 4 additions & 4 deletions csr/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VENDOR=Cisco
NAME=CSR1000v
VENDOR=cisco
NAME=csr1000v
IMAGE_FORMAT=qcow2
IMAGE_GLOB=*.qcow2

Expand All @@ -16,6 +16,6 @@ docker-pre-build:
-rm cidfile

docker-build: docker-build-common
docker run --cidfile cidfile --privileged $(REGISTRY)vr-$(VR_NAME):$(VERSION) --trace --install
docker commit --change='ENTRYPOINT ["/launch.py"]' $$(cat cidfile) $(REGISTRY)vr-$(VR_NAME):$(VERSION)
docker run --cidfile cidfile --privileged $(REGISTRY)$(VENDOR)_$(NAME):$(VERSION) --trace --install
docker commit --change='ENTRYPOINT ["/launch.py"]' $$(cat cidfile) $(REGISTRY)$(VENDOR)_$(NAME):$(VERSION)
docker rm -f $$(cat cidfile)
4 changes: 2 additions & 2 deletions makefile.include
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
IMG_NAME=$(shell echo $(NAME) | tr '[:upper:]' '[:lower:]')
IMG_VENDOR=$(shell echo $(VENDOR) | tr '[:upper:]' '[:lower:]')
IMG_NAME=$(shell echo $(NAME) | tr '[:upper:]' '[:lower:]' | tr -d '[:space:]')
IMG_VENDOR=$(shell echo $(VENDOR) | tr '[:upper:]' '[:lower:]' | tr -d '[:space:]')
IMAGES=$(shell ls $(IMAGE_GLOB) 2>/dev/null)
NUM_IMAGES=$(shell ls $(IMAGES) | wc -l)
VRNETLAB_VERION=$$(git log -1 --format=format:"Commit: %H from %aD")
Expand Down

0 comments on commit 3e8578d

Please sign in to comment.