diff --git a/Vagrantfile b/Vagrantfile index 06141fe..a402637 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -39,7 +39,7 @@ TOX_ENVLIST = ENV.fetch('TOX_ENVLIST', '') TOX_EXTRA_ARGS = ENV.fetch('TOX_EXTRA_ARGS', '--notest') # Allow to switch configuration -DEVSTACK_CONF_NAME = ENV.fetch('DEVSTACK_CONF_NAME', 'ovs') +DEVSTACK_CONF_NAME = ENV.fetch('DEVSTACK_CONF_NAME', 'ovn') DEVSTACK_LOCAL_CONF_FILE = ENV.fetch( 'DEVSTACK_LOCAL_CONF_FILE', @@ -57,10 +57,16 @@ DEVSTACK_PROJECTS = { 'src_dir' => ENV.fetch("DEVSTACK_PLUGIN_TOBIKO_SRC_DIR", VAGRANTFILE_DIR), }, + # Local directory from where look for OpenStack requirements project files + 'requirements' => { + 'src_dir' => ENV.fetch("REQUIREMENTS_DIR", "#{PROJECTS_DIR}/requirements"), + }, + # Local directory from where looking for Tobiko project files 'tobiko' => { 'src_dir' => ENV.fetch("TOBIKO_SRC_DIR", "#{PROJECTS_DIR}/tobiko"), }, + } diff --git a/devstack/plugin.sh b/devstack/plugin.sh index dbea0f4..c7a353c 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -149,11 +149,20 @@ function configure_tobiko_nova { echo_summary "Write [nova] section to ${TOBIKO_CONF_FILE}" local tobiko_conf_file=$1 - # Write key_file - local key_file=${TOBIKO_NOVA_KEY_FILE:-} - if [ "${key_file}" != "" ]; then - iniset "${tobiko_conf_file}" nova key_file "${key_file}" - fi + ( + cd $(dirname "${tobiko_conf_file}") + local key_file=${TOBIKO_NOVA_KEY_FILE} + if [ "${key_file}" != "" ]; then + iniset "${tobiko_conf_file}" nova key_file "${key_file}" + else + # Use the default keyfile name + key_file=~/.ssh/id_rsa + fi + if ! [ -r "${key_file}" ]; then + mkdir -p $(dirname "${key_file}") + ssh-keygen -f "${key_file}" -N "" + fi + ) } diff --git a/playbooks/vagrant/ovs/local.conf b/playbooks/vagrant/ovs/local.conf index f7d5ce3..0fe87cc 100644 --- a/playbooks/vagrant/ovs/local.conf +++ b/playbooks/vagrant/ovs/local.conf @@ -16,6 +16,8 @@ disable_service tempest # Configure Neutron ----------------------------------------------------------- +enable_plugin neutron https://opendev.org/openstack/neutron.git + HOST_IP=192.168.33.10 IP_VERSION=4