provider/openstack: OpenStack Mitaka Patches
This commit patches a few acceptance tests in order to get them to pass under OpenStack Mitaka. The devstack dev environment script has also been updated to reflect OpenStack Mitaka as well as the new Terraform dependency vendoring.
This commit is contained in:
parent
a3db93245c
commit
b70b4487bf
|
@ -1,30 +1,36 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cd
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y git make mercurial
|
sudo apt-get install -y git make mercurial
|
||||||
|
|
||||||
GOPKG=go1.5.2.linux-amd64.tar.gz
|
sudo wget -O /usr/local/bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
|
||||||
wget https://storage.googleapis.com/golang/$GOPKG
|
sudo chmod +x /usr/local/bin/gimme
|
||||||
sudo tar -xvf $GOPKG -C /usr/local/
|
gimme 1.6 >> .bashrc
|
||||||
|
|
||||||
mkdir ~/go
|
mkdir ~/go
|
||||||
|
eval "$(/usr/local/bin/gimme 1.6)"
|
||||||
echo 'export GOPATH=$HOME/go' >> .bashrc
|
echo 'export GOPATH=$HOME/go' >> .bashrc
|
||||||
echo 'export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin' >> .bashrc
|
|
||||||
source .bashrc
|
|
||||||
export GOPATH=$HOME/go
|
export GOPATH=$HOME/go
|
||||||
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
|
|
||||||
|
|
||||||
|
export PATH=$PATH:$HOME/terraform:$HOME/go/bin
|
||||||
|
echo 'export PATH=$PATH:$HOME/terraform:$HOME/go/bin' >> .bashrc
|
||||||
|
source .bashrc
|
||||||
|
|
||||||
|
go get github.com/tools/godep
|
||||||
go get github.com/hashicorp/terraform
|
go get github.com/hashicorp/terraform
|
||||||
cd $GOPATH/src/github.com/hashicorp/terraform
|
cd $GOPATH/src/github.com/hashicorp/terraform
|
||||||
make updatedeps
|
godep restore
|
||||||
|
|
||||||
cd
|
cd
|
||||||
git clone https://git.openstack.org/openstack-dev/devstack -b stable/liberty
|
git clone https://git.openstack.org/openstack-dev/devstack -b stable/mitaka
|
||||||
cd devstack
|
cd devstack
|
||||||
cat >local.conf <<EOF
|
cat >local.conf <<EOF
|
||||||
[[local|localrc]]
|
[[local|localrc]]
|
||||||
# OpenStack version
|
# OpenStack version
|
||||||
OPENSTACK_VERSION="liberty"
|
OPENSTACK_VERSION="mitaka"
|
||||||
|
|
||||||
# devstack password
|
# devstack password
|
||||||
DEVSTACK_PASSWORD="password"
|
DEVSTACK_PASSWORD="password"
|
||||||
|
@ -68,7 +74,11 @@ enable_service q-metering
|
||||||
enable_service q-lbaas
|
enable_service q-lbaas
|
||||||
enable_service q-fwaas
|
enable_service q-fwaas
|
||||||
|
|
||||||
# Disable Tempest
|
# Enable Trove
|
||||||
|
enable_plugin trove git://git.openstack.org/openstack/trove.git stable/\$OPENSTACK_VERSION
|
||||||
|
enable_service trove,tr-api,tr-tmgr,tr-cond
|
||||||
|
|
||||||
|
# Disable Temptest
|
||||||
disable_service tempest
|
disable_service tempest
|
||||||
|
|
||||||
# Disable Horizon
|
# Disable Horizon
|
||||||
|
@ -91,6 +101,7 @@ disable_service horizon
|
||||||
# For more information on Heat and DevStack see
|
# For more information on Heat and DevStack see
|
||||||
# http://docs.openstack.org/developer/heat/getting_started/on_devstack.html
|
# http://docs.openstack.org/developer/heat/getting_started/on_devstack.html
|
||||||
#IMAGE_URLS+=",http://cloud.fedoraproject.org/fedora-20.x86_64.qcow2"
|
#IMAGE_URLS+=",http://cloud.fedoraproject.org/fedora-20.x86_64.qcow2"
|
||||||
|
#IMAGE_URLS+=",https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img"
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
LOGDAYS=1
|
LOGDAYS=1
|
||||||
|
@ -113,13 +124,10 @@ echo export OS_POOL_NAME="public" >> openrc
|
||||||
echo export OS_FLAVOR_ID=99 >> openrc
|
echo export OS_FLAVOR_ID=99 >> openrc
|
||||||
source openrc demo
|
source openrc demo
|
||||||
|
|
||||||
cd $GOPATH/src/github.com/hashicorp/terraform
|
|
||||||
make updatedeps
|
|
||||||
|
|
||||||
# Replace the below lines with the repo/branch you want to test
|
# Replace the below lines with the repo/branch you want to test
|
||||||
#git remote add jtopjian https://github.com/jtopjian/terraform
|
#git remote add jtopjian https://github.com/jtopjian/terraform
|
||||||
#git fetch jtopjian
|
#git fetch jtopjian
|
||||||
#git checkout --track jtopjian/openstack-acctest-fixes
|
#git checkout --track jtopjian/openstack-secgroup-safe-delete
|
||||||
#make testacc TEST=./builtin/providers/openstack TESTARGS='-run=AccBlockStorageV1'
|
#make testacc TEST=./builtin/providers/openstack TESTARGS='-run=AccBlockStorageV1'
|
||||||
#make testacc TEST=./builtin/providers/openstack TESTARGS='-run=AccCompute'
|
#make testacc TEST=./builtin/providers/openstack TESTARGS='-run=AccCompute'
|
||||||
#make testacc TEST=./builtin/providers/openstack
|
#make testacc TEST=./builtin/providers/openstack
|
||||||
|
|
|
@ -128,9 +128,10 @@ resource "openstack_fw_policy_v1" "accept_test_policy_1" {
|
||||||
|
|
||||||
const testFirewallConfigUpdated = `
|
const testFirewallConfigUpdated = `
|
||||||
resource "openstack_fw_firewall_v1" "accept_test" {
|
resource "openstack_fw_firewall_v1" "accept_test" {
|
||||||
name = "accept_test"
|
name = "accept_test"
|
||||||
description = "terraform acceptance test"
|
description = "terraform acceptance test"
|
||||||
policy_id = "${openstack_fw_policy_v1.accept_test_policy_2.id}"
|
policy_id = "${openstack_fw_policy_v1.accept_test_policy_2.id}"
|
||||||
|
admin_state_up = true
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "openstack_fw_policy_v1" "accept_test_policy_2" {
|
resource "openstack_fw_policy_v1" "accept_test_policy_2" {
|
||||||
|
|
|
@ -109,6 +109,7 @@ var testAccLBV1Member_basic = fmt.Sprintf(`
|
||||||
pool_id = "${openstack_lb_pool_v1.pool_1.id}"
|
pool_id = "${openstack_lb_pool_v1.pool_1.id}"
|
||||||
address = "192.168.199.10"
|
address = "192.168.199.10"
|
||||||
port = 80
|
port = 80
|
||||||
|
admin_state_up = true
|
||||||
}`)
|
}`)
|
||||||
|
|
||||||
var testAccLBV1Member_update = fmt.Sprintf(`
|
var testAccLBV1Member_update = fmt.Sprintf(`
|
||||||
|
|
|
@ -246,9 +246,10 @@ var testAccLBV1Pool_fullstack = fmt.Sprintf(`
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "openstack_lb_vip_v1" "vip_1" {
|
resource "openstack_lb_vip_v1" "vip_1" {
|
||||||
name = "vip_1"
|
name = "vip_1"
|
||||||
subnet_id = "${openstack_networking_subnet_v2.subnet_1.id}"
|
subnet_id = "${openstack_networking_subnet_v2.subnet_1.id}"
|
||||||
protocol = "TCP"
|
protocol = "TCP"
|
||||||
port = 80
|
port = 80
|
||||||
pool_id = "${openstack_lb_pool_v1.pool_1.id}"
|
pool_id = "${openstack_lb_pool_v1.pool_1.id}"
|
||||||
|
admin_state_up = true
|
||||||
}`)
|
}`)
|
||||||
|
|
|
@ -116,6 +116,7 @@ var testAccLBV1VIP_basic = fmt.Sprintf(`
|
||||||
protocol = "HTTP"
|
protocol = "HTTP"
|
||||||
port = 80
|
port = 80
|
||||||
pool_id = "${openstack_lb_pool_v1.pool_1.id}"
|
pool_id = "${openstack_lb_pool_v1.pool_1.id}"
|
||||||
|
admin_state_up = true
|
||||||
persistence {
|
persistence {
|
||||||
type = "SOURCE_IP"
|
type = "SOURCE_IP"
|
||||||
}
|
}
|
||||||
|
@ -154,5 +155,6 @@ var testAccLBV1VIP_update = fmt.Sprintf(`
|
||||||
persistence {
|
persistence {
|
||||||
type = "SOURCE_IP"
|
type = "SOURCE_IP"
|
||||||
}
|
}
|
||||||
|
admin_state_up = true
|
||||||
}`,
|
}`,
|
||||||
OS_REGION_NAME, OS_REGION_NAME, OS_REGION_NAME)
|
OS_REGION_NAME, OS_REGION_NAME, OS_REGION_NAME)
|
||||||
|
|
Loading…
Reference in New Issue