blob: fbf2abc619d2eb271217d40b44535d97ea2bdb6e [file] [log] [blame]
Alexa4437742022-02-16 14:42:38 -06001#!/bin/bash
2export OS_INTERFACE='admin'
3
Ievgeniia Zadorozhna2bbb1cc2024-02-29 18:48:21 +01004# Prepare clouds.yaml file for the future cleanup, with original admin creds
5sed -i "s#AUTH_URL#${OS_AUTH_URL}#g; s#USERNAME#${OS_USERNAME}#g; s#USER_PASSWORD#${OS_PASSWORD}#g; s#PROJECT_NAME#${OS_PROJECT_NAME}#g; s#PROJECT_DOMAIN_NAME#${OS_PROJECT_DOMAIN_NAME}#g; s#USER_DOMAIN_NAME#${OS_USER_DOMAIN_NAME}#g; s#REGION_NAME#${OS_REGION_NAME}#g" /opt/res-files/clouds.yaml
6
Alexa4437742022-02-16 14:42:38 -06007# local vars
8name_prefix=cvp
9filename=${name_prefix}.manifest
10rcfile=${name_prefix}rc
11huge_pages=false
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +020012set_gw_heat_router=false
Ievgeniia Zadorozhnae83b9612024-12-24 16:02:23 +010013raw_disk_format=false
Alexa4437742022-02-16 14:42:38 -060014logfile=prepare.log
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +020015working_folder=$(pwd)
16
17# Cloud admin details
18admin_username=${OS_USERNAME}
Alexa4437742022-02-16 14:42:38 -060019
20# Project, User, Roles
21project=${name_prefix}.project
22user=${name_prefix}.user
23admin=${name_prefix}.admin
24password=mcp1234
Ievgeniia Zadorozhna24e7e852024-08-06 17:32:44 +020025domain=${OS_PROJECT_DOMAIN_NAME}
Alexa4437742022-02-16 14:42:38 -060026
27# Security group
28sg_all=${name_prefix}.sg.all
29sg_icmp=${name_prefix}.sg.icmp
30sg_ssh=${name_prefix}.sg.ssh
31sg_iperf=${name_prefix}.sg.perf
32
33# Testkey
34key=${name_prefix}_testkey
35
36# Flavors: tiny, small (cirrus and migration), medium (ubuntu and volume/stress activities)
37flavor_t=${name_prefix}.tiny
38flavor_s=${name_prefix}.small
39flavor_m=${name_prefix}.medium
40flavor_h=${name_prefix}.high
41
42# Fixed Networks (2, for testing router interconnection)
43net_left=${name_prefix}.net.1
44net_right=${name_prefix}.net.2
45subnet1=${name_prefix}.subnet.1
46subnet2=${name_prefix}.subnet.2
47
48# Router
49router=${name_prefix}.router
50
Ievgeniia Zadorozhna1cb5b102024-01-19 04:31:09 +010051# Images: cirros (6.0, 6.2), ubuntu (16.04, 20.04)
52cirros61=${name_prefix}.cirros.61
53cirros62=${name_prefix}.cirros.62
Alexa4437742022-02-16 14:42:38 -060054ubuntu16=${name_prefix}.ubuntu.1604
Alexdb7786b2022-02-21 17:58:29 -060055ubuntu20=${name_prefix}.ubuntu.2004
Alexa4437742022-02-16 14:42:38 -060056
Ievgeniia Zadorozhna1cb5b102024-01-19 04:31:09 +010057cirros61_link=https://download.cirros-cloud.net/0.6.1/cirros-0.6.1-x86_64-disk.img
58cirros62_link=https://download.cirros-cloud.net/0.6.2/cirros-0.6.2-x86_64-disk.img
Alexa4437742022-02-16 14:42:38 -060059ubuntu16_link=https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
Alexdb7786b2022-02-21 17:58:29 -060060ubuntu20_link=https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
Alexa4437742022-02-16 14:42:38 -060061
62# Volume (2GB)
63volume=${name_prefix}.volume
64
65function show_help {
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +020066 printf "QA verification: Resources creation script\n\t-h, -?\t\tShow this help\n"
Alexa4437742022-02-16 14:42:38 -060067 printf "\t-H\t\tAdds '--property hw:mem_page_size=large' to flavors, i.e. huge_pages for DPDK\n"
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +020068 printf "\t-w <path>\tSets working folder (default: ${working_folder})\n"
69 printf "\t-g\t\tTo set external_gateway_info to heat-router with the external network (if not set yet)\n"
Ievgeniia Zadorozhnae83b9612024-12-24 16:02:23 +010070 printf "\t-r\t\tTo create the images in RAW disk format instead of the QCOW2\n"
Alexa4437742022-02-16 14:42:38 -060071}
72
73OPTIND=1 # Reset in case getopts has been used previously in the shell.
Ievgeniia Zadorozhnae83b9612024-12-24 16:02:23 +010074while getopts ":grHw:h?" opt; do
Alexa4437742022-02-16 14:42:38 -060075 case "$opt" in
76 h|\?)
77 show_help
78 exit 0
79 ;;
80 w) working_folder=${OPTARG}
81 printf "# Working folder is ${working_folder}\n"
82 ;;
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +020083 H) huge_pages=true
Alexa4437742022-02-16 14:42:38 -060084 printf "# Using 'huge_pages' property in flavors\n"
85 ;;
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +020086 g) set_gw_heat_router=true
87 printf "# Setting external_gateway_info to heat-router with the external network (if not set yet)\n\n"
88 ;;
Ievgeniia Zadorozhnae83b9612024-12-24 16:02:23 +010089 r) raw_disk_format=true
90 printf "# Creating the images in RAW disk format instead of the QCOW2\n"
91 ;;
Alexa4437742022-02-16 14:42:38 -060092 esac
93done
94
95shift $((OPTIND-1))
96[ "${1:-}" = "--" ] && shift
97
98function put() {
99 echo "$1=$2" | tee -a ${filename}
100}
101
102# now, some hard to understand stuff...
103# f1 $(<command with output to cut>)
104function f1() { echo $1 | cut -d' ' -f1; };
105# <commands with output to cut> | p1
106function p1() { while read input; do echo ${input} | cut -d' ' -f1; done; };
107# ol1 is short for openstack list with 1 param. Also grep and cut
108# "ol1 network public" will list all networks, grep by name public and return IDs
109function ol1() { echo $(openstack $1 list -c ID -c Name -f value | grep $2 | cut -d' ' -f1); }
110# same as ol1 but with 2 initial commands before list
111function ol2() { echo $(openstack $1 $2 list -c ID -c Name -f value | grep $3 | cut -d' ' -f1); }
112
113function print_manifest() {
114 touch ./${filename}
115 truncate -s 0 ${filename}
116 printf "\n\n# Checking and filling manifest: $(pwd)/${filename}\n"
117 put project_name ${project}
118 put project_id $(ol1 project ${project})
119 put user_name ${user}
120 put user_id $(ol1 user ${user})
121 put admin_name ${admin}
122 put admin_id $(ol1 user ${admin})
123 # sg
124 put secgroup_all_name ${sg_all}
125 put secgroup_all_id $(ol2 security group ${sg_all})
126 put secgroup_icmp_name ${sg_icmp}
127 put secgroup_icmp_id $(ol2 security group ${sg_icmp})
128 put secgroup_ssh_name ${sg_ssh}
129 put secgroup_ssh_id $(ol2 security group ${sg_ssh})
130 put secgroup_iperf_name ${sg_iperf}
131 put secgroup_iperf_id $(ol2 security group ${sg_iperf})
132
133 # keypair
134 put keypair_name ${key}
135 put keypair_id $(ol1 keypair ${key})
136
137 # flavors
138 put flavor_tiny_name ${flavor_t}
139 put flavor_tiny_id $(ol1 flavor ${flavor_t})
140 put flavor_small_name ${flavor_s}
141 put flavor_small_id $(ol1 flavor ${flavor_s})
142 put flavor_medium_name ${flavor_m}
143 put flavor_medium_id $(ol1 flavor ${flavor_m})
144 put flavor_high_name ${flavor_h}
145 put flavor_high_id $(ol1 flavor ${flavor_h})
146
147 # fixed nets
148 put fixed_net_left_name ${net_left}
149 put fixed_net_left_id $(ol1 network ${net_left})
150 put fixed_net_right_name ${net_right}
151 put fixed_net_right_id $(ol1 network ${net_right})
152 put fixed_net_left_subnet_name ${subnet1}
153 put fixed_net_left_subnet_id $(openstack subnet list --network ${net_left} -c ID -f value | p1)
154 put fixed_net_right_subnet_name ${subnet2}
155 put fixed_net_right_subnet_id $(openstack subnet list --network ${net_right} -c ID -f value | p1)
156
157 # router
158 put router_name ${router}
159 put router_id $(ol1 router ${router})
160
161 # volumes
162 put volume_name ${volume}
163 put volume_id $(ol1 volume ${volume})
164
165 # images
Ievgeniia Zadorozhna1cb5b102024-01-19 04:31:09 +0100166 put cirros61_name ${cirros61}
167 put cirros61_id $(ol1 image ${cirros61})
168 put cirros62_name ${cirros62}
169 put cirros62_id $(ol1 image ${cirros62})
Alexa4437742022-02-16 14:42:38 -0600170 put ubuntu16_name ${ubuntu16}
171 put ubuntu16_id $(ol1 image ${ubuntu16})
Alexdb7786b2022-02-21 17:58:29 -0600172 put ubuntu20_name ${ubuntu20}
173 put ubuntu20_id $(ol1 image ${ubuntu20})
Alexa4437742022-02-16 14:42:38 -0600174}
175
176# create rc file out of current ENV vars
177function putrc() {
178 printf "# Saving ${1} file\n"
179 echo "export OS_IDENTITY_API_VERSION=${OS_IDENTITY_API_VERSION:-3}" >${1}
180 echo "export OS_AUTH_URL=${OS_AUTH_URL}" >>${1}
181 echo "export OS_PROJECT_DOMAIN_NAME=${OS_PROJECT_DOMAIN_NAME}" >>${1}
182 echo "export OS_USER_DOMAIN_NAME=${OS_USER_DOMAIN_NAME}" >>${1}
183 echo "export OS_PROJECT_NAME=${OS_PROJECT_NAME}" >>${1}
184 echo "export OS_TENANT_NAME=${OS_TENANT_NAME}" >>${1}
185 echo "export OS_USERNAME=${OS_USERNAME}" >>${1}
186 echo "export OS_PASSWORD=${OS_PASSWORD}" >>${1}
187 echo "export OS_REGION_NAME=${OS_REGION_NAME}" >>${1}
188 echo "export OS_INTERFACE=${OS_INTERFACE}" >>${1}
189 echo "export OS_ENDPOINT_TYPE=${OS_ENDPOINT_TYPE}" >>${1}
190 echo "export OS_CACERT=${OS_CACERT}" >>${1}
191}
192
193# update ENV vars to newly created project
194function updatesession() {
195 export OS_PROJECT_NAME=${project}
196 export OS_TENANT_NAME=${project}
197 export OS_USERNAME=${admin}
198 export OS_PASSWORD=${password}
199}
200
201function process_cmds() {
202 if [ -s ${cmds} ]; then
203 cat ${cmds} | tr '\n' '\0' | xargs -P 1 -n 1 -0 echo | tee /dev/tty | openstack -v 2>&1 >>${logfile}
204 truncate -s 0 ${cmds}
205 fi
206}
207
208function _project() {
209 echo project create ${project} >>${cmds}
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +0200210 # admin_username=$(openstack user list --project admin --domain ${domain} -c Name -f value | grep admin)
211 # user admin_username from the initial env vars of the pod
Ievgeniia Zadorozhnaa76c8522023-08-03 17:00:54 +0300212 echo role add --user ${admin_username} --project ${project} admin >>${cmds}
Alexa4437742022-02-16 14:42:38 -0600213}
214
215function _users() {
216 echo user create --project ${project} --password ${password} ${user} >>${cmds}
217 echo user create --project ${project} --password ${password} ${admin} >>${cmds}
218 echo role add --user ${admin} --project ${project} admin >>${cmds}
219 echo role add --user ${admin} --project ${project} creator >>${cmds}
220 echo role add --user ${user} --project ${project} member >>${cmds}
221 echo role add --user ${user} --project ${project} creator >>${cmds}
Ievgeniia Zadorozhna5452a372023-07-10 20:54:13 +0300222 echo role add --user ${user} --project ${project} load-balancer_member >>${cmds}
Alexa4437742022-02-16 14:42:38 -0600223
224}
225
226function _sg_all() {
227 echo security group create --project ${project} ${sg_all} >>${cmds}
228 # icmp
229 echo security group rule create --protocol icmp ${sg_all} >>${cmds}
230 # ssh
231 echo security group rule create --protocol tcp --dst-port 22 ${sg_all} >>${cmds}
232 # iperf
233 echo security group rule create --protocol tcp --dst-port 5001 ${sg_all} >>${cmds}
234 # iperf3
235 echo security group rule create --protocol tcp --dst-port 5201 ${sg_all} >>${cmds}
236 # nc connectivity
237 echo security group rule create --protocol tcp --dst-port 3000 ${sg_all} >>${cmds}
238 # http
239 echo security group rule create --protocol tcp --dst-port 80 ${sg_all} >>${cmds}
240 # https
241 echo security group rule create --protocol tcp --dst-port 443 ${sg_all} >>${cmds}
242}
243
244function _sg_icmp() {
245 echo security group create --project ${project} ${sg_icmp} >>${cmds}
246 echo security group rule create --protocol icmp ${sg_icmp} >>${cmds}
247}
248
249function _sg_ssh() {
250 echo security group create --project ${project} ${sg_ssh} >>${cmds}
251 # icmp
252 echo security group rule create --protocol icmp ${sg_ssh} >>${cmds}
253 # ssh
254 echo security group rule create --protocol tcp --dst-port 22 ${sg_ssh} >>${cmds}
255}
256
257function _sg_iperf() {
258 echo security group create --project ${project} ${sg_iperf} >>${cmds}
259 # icmp
260 echo security group rule create --protocol icmp ${sg_iperf} >>${cmds}
261 # iperf
262 echo security group rule create --protocol tcp --dst-port 5001 ${sg_iperf} >>${cmds}
263 # iperf3
264 echo security group rule create --protocol tcp --dst-port 5201 ${sg_iperf} >>${cmds}
265}
266
267function create_keypair() {
268 echo "# Creating keypair"
269 openstack keypair create ${key} >${key}
270 chmod 600 ${key}
271 echo "-> created keyfile: $(pwd)/${key}"
272}
273
274function _flavors() {
275 # huge paged flavors
276 if [ "$huge_pages" = true ]; then
Alexc7f187c2022-04-28 10:02:27 -0500277 echo flavor create --id 1 --ram 256 --disk 5 --vcpus 1 ${flavor_t} --property hw:mem_page_size=large >>${cmds}
278 echo flavor create --id 2 --ram 512 --disk 10 --vcpus 2 ${flavor_s} --property hw:mem_page_size=large >>${cmds}
279 echo flavor create --id 3 --ram 2048 --disk 20 --vcpus 4 ${flavor_m} --property hw:mem_page_size=large >>${cmds}
280 echo flavor create --id 4 --ram 4096 --disk 30 --vcpus 6 ${flavor_h} --property hw:mem_page_size=large >>${cmds}
Alexa4437742022-02-16 14:42:38 -0600281 else
Alexc7f187c2022-04-28 10:02:27 -0500282 echo flavor create --id 1 --ram 256 --disk 5 --vcpus 1 ${flavor_t} >>${cmds}
283 echo flavor create --id 2 --ram 512 --disk 10 --vcpus 2 ${flavor_s} >>${cmds}
284 echo flavor create --id 3 --ram 2048 --disk 20 --vcpus 4 ${flavor_m} >>${cmds}
285 echo flavor create --id 4 --ram 4096 --disk 30 --vcpus 6 ${flavor_h} >>${cmds}
Alexa4437742022-02-16 14:42:38 -0600286 fi
287}
288
289function _volumes() {
290 echo volume create --size 2 ${volume} >>${cmds}
291}
292
293function create_fixed_nets() {
294 echo "# Creating fixed networks"
295 echo network create --project ${project} ${net_left} >>${cmds}
296 echo subnet create ${subnet1} --network ${net_left} --subnet-range 10.10.11.0/24 >>${cmds}
297 echo network set --share ${net_left} >>${cmds}
298 echo network create --project ${project} ${net_right} >>${cmds}
299 echo subnet create ${subnet2} --network ${net_right} --subnet-range 10.10.12.0/24 >>${cmds}
300 echo network set --share ${net_right} >>${cmds}
301 process_cmds
302
303 # get subnet ids
304 subnet1_id=$(openstack subnet list --network ${net_left} -c ID -f value)
305 subnet2_id=$(openstack subnet list --network ${net_right} -c ID -f value)
306
307 echo router create --project ${project} ${router} >>${cmds}
308 process_cmds
309
310 router_id=$(openstack router list -c ID -c Name -f value | grep ${router} | cut -d' ' -f1)
311 echo router add subnet ${router_id} ${subnet1_id} >>${cmds}
312 echo router add subnet ${router_id} ${subnet2_id} >>${cmds}
313 process_cmds
314
Ievgeniia Zadorozhnadbf166a2022-03-09 18:52:36 +0300315 # get external network name
Ievgeniia Zadorozhna7bc54052024-02-20 00:15:35 +0100316 if [ -n "${CUSTOM_PUBLIC_NET_NAME:-}" ]; then
317 # if CUSTOM_PUBLIC_NET_NAME is set to some specific net, check it is present on the cloud and use it
318 echo "# Checking that the external network ${CUSTOM_PUBLIC_NET_NAME} is present on the cloud"
319 network_exists=$(openstack network show "$CUSTOM_PUBLIC_NET_NAME" -c id -f value 2>/dev/null)
320 if [ -n "$network_exists" ]; then
Ievgeniia Zadorozhnac21d5522024-07-26 18:42:49 +0200321 TEST_PUBLIC_NET=${CUSTOM_PUBLIC_NET_NAME}
Ievgeniia Zadorozhna7bc54052024-02-20 00:15:35 +0100322 echo router set ${router} --external-gateway ${CUSTOM_PUBLIC_NET_NAME} >>${cmds}
323 process_cmds
324 else
325 echo "# The network ${CUSTOM_PUBLIC_NET_NAME} does not exist"
326 CUSTOM_PUBLIC_NET_NAME=""
327 fi
328 fi
329 if [ -z "${CUSTOM_PUBLIC_NET_NAME:-}" ]; then
330 echo "# Selecting a random external network as an external gateway for the router"
331 # if the custom network is not set or is empty, select the first external network
332 external=$(openstack network list --external -c Name -f value | head -n1)
Ievgeniia Zadorozhnac21d5522024-07-26 18:42:49 +0200333 TEST_PUBLIC_NET=${external}
Ievgeniia Zadorozhna7bc54052024-02-20 00:15:35 +0100334 echo router set ${router} --external-gateway ${external} >>${cmds}
335 process_cmds
336 fi
Ievgeniia Zadorozhnac21d5522024-07-26 18:42:49 +0200337
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +0200338 if [ "$set_gw_heat_router" = true ]; then
339 echo "# Variable 'set_gw_heat_router' is true; setting the external gateway info for heat-router (if not set yet)..."
340 # set external gateway info for the Heat router if it is not set (required for Heat Tempest tests)
341 external_gateway_info=$(openstack router show heat-router -f json -c external_gateway_info | jq -r '.external_gateway_info')
342 if [[ "$external_gateway_info" == "null" ]]; then
343 echo "# Setting external gw info for heat-router using ${TEST_PUBLIC_NET}"
344 openstack router set --external-gateway ${TEST_PUBLIC_NET} heat-router
345 if [[ $? -eq 0 ]]; then
346 echo "# External gateway set successfully for heat-router"
347 openstack router show heat-router -c external_gateway_info
348 else
349 echo "# Failed to set external gateway for heat-router"
350 fi
Ievgeniia Zadorozhnac21d5522024-07-26 18:42:49 +0200351 else
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +0200352 echo "# Router heat-router already has an external gateway"
353 openstack router show heat-router -c external_gateway_info
Ievgeniia Zadorozhnac21d5522024-07-26 18:42:49 +0200354 fi
355 else
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +0200356 echo "# Variable 'set_gw_heat_router' is not true, skipping setting external_gateway_info for heat-router..."
Ievgeniia Zadorozhnac21d5522024-07-26 18:42:49 +0200357 fi
Alexa4437742022-02-16 14:42:38 -0600358}
359
360function _get_image() {
361 # build vars for name and link
362 name="${1}"
363 link="${1}_link"
364 which wget >/dev/null
365 if [ $? -ne 0 ]; then
366 printf "\nERROR: 'wget' not detected. Download skipped: ${!name}\n"
367 else
368 # no redownloads, quet, save named and show progress
369 r=$(wget --no-check-certificate -nc -q -O ./${!name} --show-progress ${!link})
370 if [ $? -ne 0 ]; then
371 # non-empty output on error
372 echo ${r}
373 fi
374 fi
375}
376
377function create_image() {
378 name="${1}"
379 # Check if image is in the cloud
380 echo "# Checking image '${!name}'"
381 ids=( $(ol1 image ${!name}) )
382 # if array is empty, download and upload it
383 if [ ${#ids[@]} -eq 0 ]; then
384 # check and download
385 if [ ! -f ${!name} ]; then
386 r=$(_get_image ${1})
387 else
388 r=""
389 fi
390 # check if output is not empty
391 if [ ${#r} -eq 0 ]; then
Ievgeniia Zadorozhnae83b9612024-12-24 16:02:23 +0100392 if [ "$raw_disk_format" = true ]; then
393 qemu-img convert -f qcow2 -O raw ${!name} ${!name}.raw
394 image_id=$(openstack image create --public --disk-format raw --container-format bare --file ${!name}.raw ${!name} -c id -f value)
395 echo "-> created ${!name} (${image_id})"
396 rm ${!name}.raw
397 else
Alexa4437742022-02-16 14:42:38 -0600398 image_id=$(openstack image create --public --disk-format qcow2 --container-format bare --file ${!name} ${!name} -c id -f value)
399 echo "-> created ${!name} (${image_id})"
Ievgeniia Zadorozhnae83b9612024-12-24 16:02:23 +0100400 fi
Alexa4437742022-02-16 14:42:38 -0600401 else
402 printf "\n-> Error detected, creation skipped\n"
403 fi
404 else
405 # image(s) already there, list them
406 for id in ${ids[@]}; do
407 echo "-> found ${!name} with ID of '${id}'"
408 done
409 fi
410}
411
412###################
413### Main
414###################
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +0200415echo "Using working folder: ${working_folder}"
Alexa4437742022-02-16 14:42:38 -0600416if [[ -z ${working_folder+x} ]]; then
417 # cwd into working dir
418 cd ${working_folder}
419fi
420
421cmds=$(mktemp)
422trap "rm -f ${cmds}" EXIT
423echo "Using tempfile: '${cmds}'"
424
425touch ${logfile}
426echo "Using log file: '${logfile}'"
427
428# Create
429echo "# Creating project and users"
430_project
431_users
432process_cmds
433
434echo "# Creating 'rc' and switching"
435putrc "./adminrc"
436updatesession
437putrc "./${rcfile}"
438
439echo "# Creating basic resources"
440# not dependent stuff
441_sg_all
442_sg_icmp
443_sg_ssh
444_sg_iperf
445_flavors
446_volumes
447process_cmds
448
449# sophisticated, step dependent stuff
450create_keypair
451create_fixed_nets
452
453# images
Ievgeniia Zadorozhna1cb5b102024-01-19 04:31:09 +0100454create_image cirros61
455create_image cirros62
Alexdb7786b2022-02-21 17:58:29 -0600456create_image ubuntu16
457create_image ubuntu20
Alexa4437742022-02-16 14:42:38 -0600458
459### Manifest and fall back to original rc
460print_manifest
461printf ="\n\nSetting quota\n"
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +0200462openstack quota set --cores -1 --ram -1 --instances -1 --volumes -1 --gigabytes -1 --server-groups -1 --server-group-members -1 cvp.project
Alexa4437742022-02-16 14:42:38 -0600463source "./adminrc"
464printf "\n\nOriginal rc preserved and backed up in 'adminrc'\nNew rc is '${rcfile}'\n"