File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 1+
2+ # The PTF image built from different branches may be incompatible. The ptf_imagetag variable added here is to
3+ # support using different PTF images for different branches. When the ptf_imagetag variable is not specified,
4+ # the PTF image with default "201811" tag will be used in this sonic-mgmt 201811 branch. When a different PTF
5+ # image version is required, we can specify a different value for the ptf_imagetag variable somewhere to
6+ # override the default value, for example, specify from command line:
7+ # ./testbed-cli.sh add-topo <testbed_name>-<topo> vault -e ptf_imagetag=myversion
8+ # By using this practice, we suggest to add different tags for different PTF image versions in docker registry.
9+ # And we suggest to add tag "201811" for PTF image built from the 201811 branch.
10+ - name : Set default value for ptf_imagetag
11+ set_fact :
12+ ptf_imagetag : " 201811"
13+ when : ptf_imagetag is not defined
14+
115- name : Create a docker container ptf_{{ vm_set_name }}
216 docker :
317 registry : " {{ docker_registry_host }}"
418 username : " {{ docker_registry_username }}"
519 password : " {{ docker_registry_password }}"
620 name : ptf_{{ vm_set_name }}
7- image : " {{ docker_registry_host }}/{{ ptf_imagename }}"
21+ image : " {{ docker_registry_host }}/{{ ptf_imagename }}:{{ ptf_imagetag }} "
822 pull : always
923 state : reloaded
1024 net : none
Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ function usage
3434 echo " $0 start-vms server-name vault-password-file -e autostart=yes"
3535 echo " To stop VMs on a server: $0 stop-vms 'server-name' ~/.password"
3636 echo " To deploy a topology on a server: $0 add-topo 'topo-name' ~/.password"
37+ echo " Optional argument for add-topo:"
38+ echo " -e ptf_imagetag=<tag> # Use PTF image with specified tag for creating PTF container"
3739 echo " To remove a topology on a server: $0 remove-topo 'topo-name' ~/.password"
3840 echo " To renumber a topology on a server: $0 renumber-topo 'topo-name' ~/.password"
3941 echo " To connect a topology: $0 connect-topo 'topo-name' ~/.password"
You can’t perform that action at this time.
0 commit comments