Skip to content

Instantly share code, notes, and snippets.

@johnpmitsch
Last active August 4, 2017 15:49
Show Gist options
  • Save johnpmitsch/9d7f80844a8863c915e63662cb547d93 to your computer and use it in GitHub Desktop.
Save johnpmitsch/9d7f80844a8863c915e63662cb547d93 to your computer and use it in GitHub Desktop.
hammer csv host seed
Name,Count,Organization,Environment,Content View,Host Collections,Virtual,Guest of Host,OS,Arch,Sockets,RAM,Cores,SLA,Products,Subscriptions
fake%d,1000,Default Organization,Library,Default Organization View,"",Yes,,RHEL 6.4,x86_64,1,4 GB,1,"",69|Red Hat Enterprise Linux Server,""
host0,1,Default Organization,Library,Default Organization View,"",No,,RHEL 6.4,x86_64,1,4 GB,1,"","69|Red Hat Enterprise Linux Server,83|Red Hat Enterprise Linux High Availability (for RHEL Server)",

hammer csv content-hosts -v --file /tmp/hosts.csv

attach subs

#!/usr/bin/ruby
num = 1000
(1..num).to_a.each do |n|
  puts n
  `hammer host subscription attach --host fake#{n} --subscription-id 4028f9b05c6a2ce3015c8d1117670f4c`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment