summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/overcloud-deploy-functions.sh6
-rw-r--r--lib/python/apex/network_environment.py12
-rw-r--r--lib/utility-functions.sh13
3 files changed, 21 insertions, 10 deletions
diff --git a/lib/overcloud-deploy-functions.sh b/lib/overcloud-deploy-functions.sh
index 067a6417..992d22af 100755
--- a/lib/overcloud-deploy-functions.sh
+++ b/lib/overcloud-deploy-functions.sh
@@ -36,7 +36,11 @@ function overcloud_deploy {
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight-external.yaml"
SDN_IMAGE=opendaylight
elif [ "${deploy_options_array['sdn_controller']}" == 'onos' ]; then
- DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/onos.yaml"
+ if [ "${deploy_options_array['sfc']}" == 'True' ]; then
+ DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/onos_sfc.yaml"
+ else
+ DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/onos.yaml"
+ fi
SDN_IMAGE=onos
elif [ "${deploy_options_array['sdn_controller']}" == 'opencontrail' ]; then
echo -e "${red}ERROR: OpenContrail is currently unsupported...exiting${reset}"
diff --git a/lib/python/apex/network_environment.py b/lib/python/apex/network_environment.py
index fec6299d..bf4bdc79 100644
--- a/lib/python/apex/network_environment.py
+++ b/lib/python/apex/network_environment.py
@@ -9,11 +9,13 @@
import yaml
import re
-from .common.constants import ADMIN_NETWORK
-from .common.constants import PRIVATE_NETWORK
-from .common.constants import STORAGE_NETWORK
-from .common.constants import PUBLIC_NETWORK
-from .common.constants import API_NETWORK
+from .common.constants import (
+ ADMIN_NETWORK,
+ PRIVATE_NETWORK,
+ STORAGE_NETWORK,
+ PUBLIC_NETWORK,
+ API_NETWORK,
+)
PORTS = '/ports'
# Resources defined by <resource name>: <prefix>
diff --git a/lib/utility-functions.sh b/lib/utility-functions.sh
index 93050701..f73a2d85 100644
--- a/lib/utility-functions.sh
+++ b/lib/utility-functions.sh
@@ -15,14 +15,19 @@ function undercloud_connect {
fi
if [ -z "$2" ]; then
- ssh ${SSH_OPTIONS[@]} ${user}@$(arp -a | grep $(virsh domiflist undercloud | grep default |\
- awk '{print $5}') | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+")
+ ssh ${SSH_OPTIONS[@]} ${user}@$(get_undercloud_ip)
else
- ssh ${SSH_OPTIONS[@]} -T ${user}@$(arp -a | grep $(virsh domiflist undercloud | grep default \
- | awk '{print $5}') | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+") "$2"
+ ssh ${SSH_OPTIONS[@]} -T ${user}@$(get_undercloud_ip) "$2"
fi
}
+##outputs the Undercloud's IP address
+##params: none
+function get_undercloud_ip {
+ echo $(arp -a | grep $(virsh domiflist undercloud | grep default |\
+ awk '{print $5}') | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+")
+}
+
##connects to overcloud nodes
##params: node to login to, command to execute on overcloud (optional)
function overcloud_connect {