summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksandr Didenko <adidenko@mirantis.com>2016-08-03 19:05:49 +0200
committerAleksandr Didenko <adidenko@mirantis.com>2016-08-03 19:05:49 +0200
commita332949d41cf966206527f8325a06ec6fb38447c (patch)
treed83ce8fb89c4d586703654263fbf9fe561618230
parentd8c88d2d9d84585d8d4bd510e9d4ed84d716aa62 (diff)
Update generate_yamls.sh to match current Fuel master
Output of fuel cli commands has been changed so we need to adjust generate_yamls.sh script to make it work properly. Change-Id: I0900838f62b1bc0bb77bef504ea3ee3557c6d05c
Notes
Notes (review): Verified+1: Fuel CI <fuel-ci-bot@mirantis.com> Code-Review+1: Oleksiy Molchanov <omolchanov@mirantis.com> Code-Review+2: Bogdan Dobrelya <bdobrelia@mirantis.com> Workflow+1: Bogdan Dobrelya <bdobrelia@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Thu, 04 Aug 2016 11:07:11 +0000 Reviewed-on: https://review.openstack.org/350694 Project: openstack/fuel-noop-fixtures Branch: refs/heads/master
-rwxr-xr-xutils/generate_yamls.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/utils/generate_yamls.sh b/utils/generate_yamls.sh
index 36db372..1ff4622 100755
--- a/utils/generate_yamls.sh
+++ b/utils/generate_yamls.sh
@@ -21,12 +21,12 @@ function create_fake_nodes {
21} 21}
22 22
23function clean_fake_nodes { 23function clean_fake_nodes {
24 fuel nodes | grep -q 'discover | fnode-' && 24 fuel2 node list | grep 'discover' | grep -q 'fnode-' &&
25 fuel nodes | awk '/discover \| fnode-/{ print $1 }' | xargs fuel node --delete-from-db --force --node 25 fuel2 node list | awk '/fnode-.* discover /{ print $2 }'
26} 26}
27 27
28function admin_net_tpl { 28function admin_net_tpl {
29 fuel network-group list | awk '/^1 /{print $9}' | sed -e 's/\.[[:digit:]]\+$//' 29 ruby -rjson -e 'print JSON.parse(ARGV[0]).find{|i| i["id"] == 1}["cidr"]' "`fuel network-group list --json`"
30} 30}
31 31
32function id_of_role { 32function id_of_role {
@@ -124,7 +124,7 @@ function enable_public_ssl {
124} 124}
125 125
126function enable_vms_conf { 126function enable_vms_conf {
127 virt_node_ids=`fuel nodes --env $1 2>/dev/null | grep virt | awk '{print $1}'` 127 virt_node_ids=`fuel2 node list --env $1 2>/dev/null | grep virt | awk '{print $2}'`
128 for id in $virt_node_ids ; do 128 for id in $virt_node_ids ; do
129 fuel2 node create-vms-conf $id --conf '{"id":3,"ram":2,"cpu":2}' 129 fuel2 node create-vms-conf $id --conf '{"id":3,"ram":2,"cpu":2}'
130 done 130 done
@@ -133,9 +133,9 @@ function enable_vms_conf {
133function list_free_nodes { 133function list_free_nodes {
134 # list unused nodes from the list of fake nodes 134 # list unused nodes from the list of fake nodes
135 if [ -n "$1" ] ; then 135 if [ -n "$1" ] ; then
136 fuel nodes 2>/dev/null | grep discover | grep None | grep 'fnode-' | grep $1 | awk '{print $1}' 136 fuel2 node list 2>/dev/null | grep discover | grep None | grep 'fnode-' | grep $1 | awk '{print $2}'
137 else 137 else
138 fuel nodes 2>/dev/null | grep discover | grep None | grep 'fnode-' | awk '{print $1}' 138 fuel2 node list 2>/dev/null | grep discover | grep None | grep 'fnode-' | awk '{print $2}'
139 fi 139 fi
140} 140}
141 141