OpenStack: flavor

List all flavors

openstack flavor list --sort-column Name --all

Formated output

for FLAVOR in $(openstack flavor list --sort-column Name -c Name -f value); do
    echo ${FLAVOR}
    openstack flavor show ${FLAVOR}
    echo
done

Delete all flavors

openstack flavor list --all -c ID -f value | xargs openstack flavor delete

Resize / switch flavor
https://docs.openstack.org/mitaka/user-guide/cli_change_the_size_of_your_server.html

nova resize ${VMID} 4
 
nova resize-confirm ${VMID}
# or
nova resize-revert ${VMID}