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 ${SERVER_ID} 4
 
nova resize-confirm ${SERVER_ID}
# or
nova resize-revert ${SERVER_ID}