summaryrefslogtreecommitdiffstats
path: root/ci/02-deploybundle.sh
diff options
context:
space:
mode:
authorGuo Ruijing <ruijing.guo@intel.com>2017-10-18 19:56:15 -0400
committerNarinder Gupta <narinder.gupta@canonical.com>2017-12-13 16:36:50 +0000
commitd27608283966794e0b93cd9ce12412f6ab8d16e4 (patch)
tree3901bc662f47e6ada1cc335322edddcb0bd9fbf2 /ci/02-deploybundle.sh
parent06afa960e508c999b9dd96488c1aef01f222fba0 (diff)
cleanup code
1. remove unused code due to juju>2 & maas>2.2 in Ubuntu16.04 2. remove deprecated 03-maasdeploy.sh 3. remove other unused code Change-Id: I20fd0e96400db1262b0df3ef2b502c8001dd5b76 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com> (cherry picked from commit 2819ba063c1a9896ccf437f85ca4c2ee463d7e80)
Diffstat (limited to 'ci/02-deploybundle.sh')
-rwxr-xr-xci/02-deploybundle.sh22
1 files changed, 3 insertions, 19 deletions
diff --git a/ci/02-deploybundle.sh b/ci/02-deploybundle.sh
index 2eff3f0d..edfd1334 100755
--- a/ci/02-deploybundle.sh
+++ b/ci/02-deploybundle.sh
@@ -12,9 +12,6 @@ opnfvfeature=$5
opnfvdistro=$6
opnfvmodel=$7
-jujuver=`juju --version`
-maasver=`apt-cache policy maas | grep Installed | cut -d ':' -f 2 | sed -e 's/ //'`
-
if [[ "$opnfvmodel" = "openstack" ]]; then
#copy and download charms
./$opnfvsdn/fetch-charms.sh $opnfvdistro
@@ -54,19 +51,10 @@ check_status() {
PROFILE=maas
MAAS_IP=$(grep " ip_address" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //')
API_SERVERMAAS="http://$MAAS_IP:5240/MAAS/"
-if [[ "$maasver" > "2" ]]; then
- API_KEY=`sudo maas-region apikey --username=ubuntu || true`
-else
- API_KEY=`sudo maas-region-admin apikey --username=ubuntu || true`
-fi
-
+API_KEY=`sudo maas-region apikey --username=ubuntu || true`
if [[ "$API_KEY" = "" ]]; then
- if [[ "$maasver" > "2" ]]; then
- API_KEY=`sshpass -p ubuntu ssh ubuntu@$MAAS_IP 'sudo maas-region apikey --username=ubuntu'`
- else
- API_KEY=`sshpass -p ubuntu ssh ubuntu@$MAAS_IP 'sudo maas-region-admin apikey --username=ubuntu'`
- fi
+ API_KEY=`sshpass -p ubuntu ssh ubuntu@$MAAS_IP 'sudo maas-region apikey --username=ubuntu'`
fi
maas login $PROFILE $API_SERVERMAAS $API_KEY
@@ -80,11 +68,7 @@ if [[ "$opnfvmodel" = "openstack" ]]; then
osdomname=`grep "os-domain-name" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //'`
fi
- if [[ "$maasver" > "2" ]]; then
- workmutiple=`maas maas nodes read | grep "cpu_count" | cut -d ':' -f 2 | sed -e 's/ //' | tr ',' ' '`
- else
- workmutiple=`maas maas nodes list | grep "cpu_count" | cut -d ':' -f 2 | sed -e 's/ //' | tr ',' ' '`
- fi
+ workmutiple=`maas maas nodes read | grep "cpu_count" | cut -d ':' -f 2 | sed -e 's/ //' | tr ',' ' '`
max=0
for v in ${workmutiple[@]}; do
if (( $v > $max )); then max=$v; fi;