Skip to content

Commit

Permalink
tests/run: Change required IMAGE_PATH to an optional IMAGE_URL on lib…
Browse files Browse the repository at this point in the history
…virt

Since 9ee45fb (*: provide a default OS image for libvirt, 2018-09-17, openshift#271),
example/libvirt.yaml has a reasonable default.  This commit allows the
caller to use it instead of needing their own opinion ;).

I've also changed _PATH to _URL to allow the caller to point at other
remote images, although this means existing callers will have to
update (and add an explicit file:// prefix).
  • Loading branch information
wking committed Sep 19, 2018
1 parent c922030 commit bf577f3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ aws)
CONFIGURE_AWS_ROLES=False
;;
libvirt)
[ -z ${IMAGE_PATH+x} ] && (echo "Please set libvirt IMAGE_PATH" >&2; exit 1)
;;
*)
echo "unrecognized backend: ${BACKEND}" >&2
Expand Down Expand Up @@ -100,8 +99,8 @@ python <<-EOF >"${CLUSTER_NAME}.yaml"
if ${CONFIGURE_AWS_ROLES:-False}:
config['aws']['master']['iamRoleName'] = 'tf-tectonic-master-node'
config['aws']['worker']['iamRoleName'] = 'tf-tectonic-worker-node'
elif '${BACKEND}' == 'libvirt':
config['libvirt']['image'] = 'file://${IMAGE_PATH}'
elif '${BACKEND}' == 'libvirt' and '${IMAGE_URL}':
config['libvirt']['image'] = '${IMAGE_URL}'
yaml.safe_dump(config, sys.stdout)
EOF

Expand Down

0 comments on commit bf577f3

Please sign in to comment.