aboutsummaryrefslogtreecommitdiffstats
path: root/environments/net-single-nic-with-vlans-no-external.yaml
blob: 65d381379487271175b22288ffb444b34bad38b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# This template configures each role to use Vlans on a single nic for
# each isolated network.
# This template assumes use of network-isolation.yaml and should be specified
# last on the CLI as a Heat environment so as to override specific
# registry settings in the network-isolation registry.
#
# FIXME: if/when we add functionality to heatclient to include heat
# environment files we should think about using it here to automatically
# include network-isolation.yaml.
resource_registry:

  # Set external ports to noop
  OS::TripleO::Network::External: OS::Heat::None
  OS::TripleO::Controller::Ports::ExternalPort: ../network/ports/noop.yaml

  # Configure other ports as normal
  OS::TripleO::BlockStorage::Net::SoftwareConfig: ../network/config/single-nic-vlans/cinder-storage.yaml
  OS::TripleO::Compute::Net::SoftwareConfig: ../network/config/single-nic-vlans/compute.yaml
  OS::TripleO::Controller::Net::SoftwareConfig: ../network/config/single-nic-vlans/controller-no-external.yaml
  OS::TripleO::ObjectStorage::Net::SoftwareConfig: ../network/config/single-nic-vlans/swift-storage.yaml
  OS::TripleO::CephStorage::Net::SoftwareConfig: ../network/config/single-nic-vlans/ceph-storage.yaml
.sh if [ $1 == "debug" ]; then set -x #echo on fi source ~/admin-openrc.sh <<EOF openstack EOF echo "Get Congress policy 'test' ID" test_policy_ID=$(openstack congress policy show test | awk "/ id / { print \$4 }") echo "Delete Congress policy 'test' if it exists" if [ "$test_policy_ID" != "" ]; then openstack congress policy delete $test_policy_ID echo "Existing policy 'test' deleted" fi echo "Delete cirros1 instance" instance=$(nova list | awk "/ cirros1 / { print \$2 }") if [ "$instance" != "" ]; then nova delete $instance fi echo "Delete cirros2 instance" instance=$(nova list | awk "/ cirros2 / { print \$2 }") if [ "$instance" != "" ]; then nova delete $instance fi echo "Delete 'dmz' security group" sg=$(neutron security-group-list | awk "/ dmz / { print \$2 }") neutron security-group-delete $sg echo "Get 'test_router' ID" router=$(neutron router-list | awk "/ test_router / { print \$2 }") echo "Get internal port ID with subnet 10.0.0.1 on 'test_router'" test_internal_interface=$(neutron router-port-list $router | grep 10.0.0.1 | awk '{print $2}') echo "If found, delete the port with subnet 10.0.0.1 on 'test_router'" if [ "$test_internal_interface" != "" ]; then neutron router-interface-delete $router port=$test_internal_interface fi echo "Get public port ID with fixed_ip 192.168.10.2 on 'test_router'" test_public_interface=$(neutron router-port-list $router | grep 192.168.10.2 | awk '{print $2}') echo "If found, delete the port with fixed_ip 192.168.10.2 on 'test_router'" if [ "$test_public_interface" != "" ]; then neutron router-interface-delete $router port=$test_public_interface fi echo "Delete the router internal interface" neutron router-interface-delete $router $test_internal_interface echo "Clear the router gateway" neutron router-gateway-clear test_router echo "Delete the router" neutron router-delete test_router echo "Delete neutron port with fixed_ip 10.0.0.1" port=$(neutron port-list | awk "/ 10.0.0.1 / { print \$2 }") if [ "$port" != "" ]; then neutron port-delete $port fi echo "Delete neutron port with fixed_ip 10.0.0.2" port=$(neutron port-list | awk "/ 10.0.0.2 / { print \$2 }") if [ "$port" != "" ]; then neutron port-delete $port fi echo "Delete internal subnet" neutron subnet-delete test_internal echo "Delete internal network" neutron net-delete test_internal echo "Delete public subnet" neutron subnet-delete test_public echo "Delete public network" neutron net-delete test_public set +x #echo off