X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=snaps%2Fopenstack%2Ftests%2Fopenstack_tests.py;h=a1b78811632623e3f45145c05635d110689a202b;hb=5b6162af4d93530339e92e09ee6df9608e93abd5;hp=dab2ea2fe656303c3aee0738051bf2598ce9a713;hpb=57777f3df521553a06cd01a3861b415d2905ceca;p=snaps.git diff --git a/snaps/openstack/tests/openstack_tests.py b/snaps/openstack/tests/openstack_tests.py index dab2ea2..a1b7881 100644 --- a/snaps/openstack/tests/openstack_tests.py +++ b/snaps/openstack/tests/openstack_tests.py @@ -92,9 +92,10 @@ def get_credentials(os_env_file=None, proxy_settings_str=None, ssh_proxy_cmd=Non return os_creds -def cirros_url_image(name): - return ImageSettings(name=name, image_user='cirros', img_format='qcow2', - url='http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img') +def cirros_url_image(name, url=None): + if not url: + url='http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img' + return ImageSettings(name=name, image_user='cirros', img_format='qcow2', url=url) def file_image_test_settings(name, file_path): @@ -102,16 +103,17 @@ def file_image_test_settings(name, file_path): image_file=file_path) -def centos_url_image(name): - return ImageSettings(name=name, image_user='centos', img_format='qcow2', - url='http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2', - nic_config_pb_loc='./provisioning/ansible/centos-network-setup/playbooks/configure_host.yml') +def centos_url_image(name, url=None): + if not url: + url='http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2' + return ImageSettings(name=name, image_user='centos', img_format='qcow2', url=url, + nic_config_pb_loc='./provisioning/ansible/centos-network-setup/playbooks/configure_host.yml') -def ubuntu_url_image(name): - return ImageSettings( - name=name, image_user='ubuntu', img_format='qcow2', - url='http://uec-images.ubuntu.com/releases/trusty/14.04/ubuntu-14.04-server-cloudimg-amd64-disk1.img', +def ubuntu_url_image(name, url=None): + if not url: + url='http://uec-images.ubuntu.com/releases/trusty/14.04/ubuntu-14.04-server-cloudimg-amd64-disk1.img' + return ImageSettings(name=name, image_user='ubuntu', img_format='qcow2', url=url, nic_config_pb_loc='./provisioning/ansible/ubuntu-network-setup/playbooks/configure_host.yml')