Delete unused neutron port

For purpose of creating fake baremetal nodes environment for ironic
functional/integration testing the unused neutron port to be created.
Adding the removal part and helpful comments.

Change-Id: I855ba1dbbf13f343d513ba387716996d6e4c20a6
This commit is contained in:
Alexander Gordeev
2014-04-03 16:17:58 +04:00
parent 1bb9ef63c5
commit 1ab92d9f22

View File

@@ -315,8 +315,13 @@ function enroll_vms {
IRONIC_NET_ID=$(neutron net-list | grep private | get_field 1)
local idx=0
# work around; need to know what netns neutron uses for private network
neutron port-create private
# work around; need to know what netns neutron uses for private network.
# Without knowing how to interconnect the networks, PXE won't work properly
# for fake baremetal instances. The network should be configured prior all
# the instances operation. If we don't do this, the first port creation
# only happens in the middle of fake baremetal instance's spawning by nova,
# so we'll end up with unbootable fake baremetal VM due to broken PXE.
PORT_ID=$(neutron port-create private | grep " id " | get_field 2)
while read MAC; do
@@ -357,6 +362,10 @@ function enroll_vms {
sudo ovs-vsctl -- --if-exists del-port ovs-tap1 -- add-port br-int ovs-tap1 tag=$TAG_ID
sudo ovs-vsctl -- --if-exists del-port brbm-tap1 -- add-port $IRONIC_VM_NETWORK_BRIDGE brbm-tap1
# Remove the port needed only for workaround. For additional info read the
# comment at the beginning of this function
neutron port-delete $PORT_ID
}
function configure_tftpd {