blob: a60944baff5ae563617ab007040c7e2a521be253 [file] [log] [blame]
Alex Savatieiev8cabb342020-08-25 09:09:25 -05001#!/bin/bash
2# ol1 is short for openstack list with 1 param. Also grep and cut
3# "ol1 network public" will list all networks, grep by name public and return IDs
4function olcID1() { echo $(openstack $1 list $2 -c ID -f value | wc -l); }
5# same as ol1 but with 2 initial commands before list
6function olcID2() { echo $(openstack $1 $2 list $3 -c ID -f value | wc -l); }
7function olc2() { echo $(openstack $1 $2 list $4 -c $3 -f value | wc -l); }
8
9echo "### Cloud totals"
10printf "Projects:\t%s\n" $(olcID1 project)
11printf "Users:\t\t%s\n" $(olcID1 user)
12printf "Flavors:\t%s\n" $(olcID1 flavor)
13printf "Zones:\t\t%s\n" $(openstack availability zone list -c "Zone Name" -f value | sort | uniq | wc -l)
14printf "Servers:\t%s\n" $(olcID1 server --all)
15printf "Networks:\t%s\n" $(olcID1 network)
16printf "Subnets:\t%s\n" $(olcID1 subnet)
17printf "Ports:\t\t%s\n" $(olcID1 port)
18printf "Volumes:\t%s\n" $(olcID1 volume --all)
19printf "Snapshots:\t%s\n" $(olcID2 volume snapshot --all)
20printf "Images:\t\t%s\n" $(olcID1 image)
21