Skip to content
Snippets Groups Projects
Commit dd78d78b authored by František Řezníček's avatar František Řezníček
Browse files

refactor: reduce code duplicity around network entity ID detection

parent 24818483
No related branches found
No related tags found
No related merge requests found
......@@ -92,12 +92,11 @@ openstack security group rule create --egress --proto tcp --remote-ip 0.0.0.0/0
if [ "${project_type}" == "group" ]; then
log_section_keypress "Create cloud private network and subnet, so far isolated (CIDR:${SUBNET_CIDR})"
openstack network create "${NETWORK_NAME}"
NETWORK_ID=$(openstack network show "${NETWORK_NAME}" -f value -c id)
openstack subnet create "${SUBNET_NAME}" --network "${NETWORK_ID}" --subnet-range "${SUBNET_CIDR}" --dns-nameserver 8.8.4.4 --dns-nameserver 8.8.8.8
else
log_section_keypress "Re-use existing network (${NETWORK_NAME}) and subnet (${SUBNET_NAME})"
NETWORK_ID=$(openstack network show "${NETWORK_NAME}" -f value -c id)
fi
NETWORK_ID=$(openstack network show "${NETWORK_NAME}" -f value -c id)
# ---------------------------------------------------------------------------
if [ "${EXTRA_VOLUME_SIZE_GB}" -gt 0 ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment