Skip to content

Instantly share code, notes, and snippets.

@jfontan
Created October 6, 2016 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfontan/be52701783c69b24f26ea6415957fda2 to your computer and use it in GitHub Desktop.
Save jfontan/be52701783c69b24f26ea6415957fda2 to your computer and use it in GitHub Desktop.
get_config.sh
#!/bin/bash
COMMANDS="acl cluster datastore group host image market marketapp template user vnet secgroup"
for name in $COMMANDS; do
cmd=one${name}
${cmd} list > ${cmd}.list
${cmd} list -x > ${cmd}.list.xml
ids=$(${cmd} list | grep -v ID | awk '{print $1}')
for i in $ids; do
${cmd} show $i > ${cmd}.show.${i}
${cmd} show -x $i > ${cmd}.show.${i}.xml
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment