Skip to content

Instantly share code, notes, and snippets.

@ehelms
Created April 23, 2013 20:49
Show Gist options
  • Save ehelms/5447264 to your computer and use it in GitHub Desktop.
Save ehelms/5447264 to your computer and use it in GitHub Desktop.
#!/bin/sh
for (( i = 0; i <= $1; i++ ))
do
r=$(printf "%.6d" $RANDOM)
original='{"name":"XXX","cp_type":"system","facts":{"cpu.cpu_socket(s)":2,"network.hostname":"XXX"}}'
d=${original//XXX/system_$i_$r}
curl -k -u admin:admin -X POST -H "Content-Type: application/json" -d $d http://localhost:3000/katello/api/environments/2/systems > /dev/null
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment