diff --git a/.gitignore b/.gitignore index 07ee36e..be29be6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,12 @@ prime stage *.snap .tox + +# Snapcraft +.snapcraft +__pycache__ +.cache + +# emacs +*~ +\#* diff --git a/tests/etc/snap-neutron/neutron/neutron.conf.d/database.conf b/tests/etc/snap-neutron/neutron/neutron.conf.d/database.conf new file mode 100644 index 0000000..1028c5c --- /dev/null +++ b/tests/etc/snap-neutron/neutron/neutron.conf.d/database.conf @@ -0,0 +1,2 @@ +[database] +connection = mysql+pymysql://neutron:neutron@localhost/neutron diff --git a/tests/etc/snap-neutron/neutron/neutron.conf.d/keystone.conf b/tests/etc/snap-neutron/neutron/neutron.conf.d/keystone.conf new file mode 100644 index 0000000..2a77ab0 --- /dev/null +++ b/tests/etc/snap-neutron/neutron/neutron.conf.d/keystone.conf @@ -0,0 +1,13 @@ +[DEFAULT] +auth_strategy = keystone + +[keystone_authtoken] +auth_uri = http://localhost:5000 +auth_url = http://localhost:35357 +memcached_servers = localhost:11211 +auth_type = password +project_domain_name = default +user_domain_name = default +project_name = service +username = neutron +password = neutron diff --git a/tests/etc/snap-neutron/neutron/neutron.conf.d/nova.conf b/tests/etc/snap-neutron/neutron/neutron.conf.d/nova.conf new file mode 100644 index 0000000..5eac5aa --- /dev/null +++ b/tests/etc/snap-neutron/neutron/neutron.conf.d/nova.conf @@ -0,0 +1,13 @@ +[DEFAULT] +notify_nova_on_port_status_changes = True +notify_nova_on_port_data_changes = True + +[nova] +auth_url = http://localhost:35357 +auth_type = password +project_domain_name = default +user_domain_name = default +region_name = RegionOne +project_name = service +username = nova +password = nova diff --git a/tests/neutron.sh b/tests/neutron.sh index ad7f4e6..3ef4827 100755 --- a/tests/neutron.sh +++ b/tests/neutron.sh @@ -2,6 +2,12 @@ set -ex +sudo mysql -u root << EOF +CREATE DATABASE IF NOT EXISTS neutron; +GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' \ + IDENTIFIED BY 'neutron'; +EOF + source $BASE_DIR/admin-openrc openstack user show neutron || { diff --git a/tests/neutron_cleanup.sh b/tests/neutron_cleanup.sh new file mode 100755 index 0000000..7886a0b --- /dev/null +++ b/tests/neutron_cleanup.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -x + +sudo mysql -u root << EOF +DROP DATABASE neutron; +EOF