hammer_cli_csv 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +8 -8
  2. data/config/cli_config.yml +2 -0
  3. data/lib/hammer_cli_csv.rb +4 -11
  4. data/lib/hammer_cli_csv/activation_keys.rb +7 -21
  5. data/lib/hammer_cli_csv/architectures.rb +6 -37
  6. data/lib/hammer_cli_csv/base.rb +177 -21
  7. data/lib/hammer_cli_csv/compute_profiles.rb +4 -21
  8. data/lib/hammer_cli_csv/compute_resources.rb +4 -16
  9. data/lib/hammer_cli_csv/containers.rb +65 -0
  10. data/lib/hammer_cli_csv/content_hosts.rb +22 -26
  11. data/lib/hammer_cli_csv/content_view_filters.rb +90 -60
  12. data/lib/hammer_cli_csv/content_views.rb +4 -17
  13. data/lib/hammer_cli_csv/csv.rb +0 -12
  14. data/lib/hammer_cli_csv/domains.rb +74 -38
  15. data/lib/hammer_cli_csv/exception_handler.rb +0 -11
  16. data/lib/hammer_cli_csv/export.rb +14 -20
  17. data/lib/hammer_cli_csv/headpin_api.rb +0 -11
  18. data/lib/hammer_cli_csv/host_collections.rb +5 -23
  19. data/lib/hammer_cli_csv/host_groups.rb +115 -0
  20. data/lib/hammer_cli_csv/hosts.rb +32 -56
  21. data/lib/hammer_cli_csv/import.rb +46 -24
  22. data/lib/hammer_cli_csv/installation_medias.rb +4 -15
  23. data/lib/hammer_cli_csv/job_templates.rb +142 -0
  24. data/lib/hammer_cli_csv/lifecycle_environments.rb +5 -38
  25. data/lib/hammer_cli_csv/locations.rb +4 -33
  26. data/lib/hammer_cli_csv/operating_systems.rb +17 -33
  27. data/lib/hammer_cli_csv/organizations.rb +13 -41
  28. data/lib/hammer_cli_csv/partition_tables.rb +66 -54
  29. data/lib/hammer_cli_csv/products.rb +12 -24
  30. data/lib/hammer_cli_csv/provisioning_templates.rb +4 -18
  31. data/lib/hammer_cli_csv/puppet_environments.rb +36 -59
  32. data/lib/hammer_cli_csv/puppet_facts.rb +36 -58
  33. data/lib/hammer_cli_csv/puppet_reports.rb +4 -38
  34. data/lib/hammer_cli_csv/reports.rb +4 -15
  35. data/lib/hammer_cli_csv/roles.rb +4 -15
  36. data/lib/hammer_cli_csv/settings.rb +49 -0
  37. data/lib/hammer_cli_csv/smart_proxies.rb +9 -24
  38. data/lib/hammer_cli_csv/splice.rb +0 -12
  39. data/lib/hammer_cli_csv/subnets.rb +10 -21
  40. data/lib/hammer_cli_csv/subscriptions.rb +21 -24
  41. data/lib/hammer_cli_csv/sync_plans.rb +4 -19
  42. data/lib/hammer_cli_csv/users.rb +4 -15
  43. data/lib/hammer_cli_csv/version.rb +1 -12
  44. data/test/content_hosts_test.rb +1 -1
  45. data/test/content_views_test.rb +52 -0
  46. data/test/data/content-hosts.csv +1 -1
  47. data/test/data/content-view-filters.csv +1 -1
  48. data/test/data/content-views.csv +5 -5
  49. data/test/data/hosts.csv +2 -2
  50. data/test/data/operating-systems.csv +16 -16
  51. data/test/data/products.csv +1 -1
  52. data/test/data/settings.csv +5 -0
  53. data/test/import_test.rb +79 -0
  54. metadata +14 -18
@@ -1,4 +1,4 @@
1
1
  Name,Count,Organization,Environment,Content View,Host Collections,Virtual,Host,OS,Arch,Sockets,RAM,Cores,SLA,Products,Subscriptions
2
2
  host%d,1,Mega Corporation,Library,Default Organization View,"Mega Corp HQ",No,,RHEL 6.4,x86_64,1,4 GB,1,Standard,"69|Red Hat Enterprise Linux Server",
3
3
  guest%d,4,Mega Corporation,Library,Default Organization View,"Mega Corp HQ,Accounting",Yes,host0,RHEL 6.4,x86_64,1,4 GB,1,Standard,"69|Red Hat Enterprise Linux Server",
4
- dhcp129-%03d.megacorp.com,999,Mega Corporation,Library,Default Organization View,"Mega Corp HQ",No,,RHEL 6.4,x86_64,1,4 GB,1,Standard,"69|Red Hat Enterprise Linux Server",
4
+ dhcp129-%03d.megacorp.com,100,Mega Corporation,Library,Default Organization View,"Mega Corp HQ",No,,RHEL 6.4,x86_64,1,4 GB,1,Standard,"69|Red Hat Enterprise Linux Server",
@@ -1,2 +1,2 @@
1
1
  Name,Count,Content View,Organization,Type,Description,Repositories,Rules
2
- Minimal Package Set,1,RHEL 6Server (Minimal),Mega Corporation,Include RPM,"Specific list of packages making up minimal server install",,"setup|=|2.8.14-20.el6_4.1,tzdata|=|2014g-1.el6,ncurses-base|=|5.7-3.20090208.el6,nss-softokn-freebl|=|3.14.3-17.el6,ncurses-libs|=|5.7-3.20090208.el6,libattr|=|2.4.44-7.el6,zlib|=|1.2.3-29.el6,audit-libs|=|2.3.7-5.el6,chkconfig|=|1.3.49.3-2.el6_4.1,libcom_err|=|1.41.12-21.el6,bzip2-libs|=|1.0.5-7.el6_0,nss-util|=|3.16.1-3.el6,libselinux|=|2.0.94-5.8.el6,shadow-utils|=|4.1.4.2-19.el6,libxml2|=|2.7.6-14.el6_5.2,elfutils-libelf|=|0.158-3.2.el6,dbus-libs|=|1.2.24-7.el6_3,file-libs|=|5.04-21.el6,libgpg-error|=|1.7-4.el6,grep|=|2.6.3-6.el6,sqlite|=|3.6.20-1.el6,libidn|=|1.18-2.el6,libblkid|=|2.17.2-12.18.el6,nss-softokn|=|3.14.3-17.el6,findutils|=|4.4.2-6.el6,bzip2|=|1.0.5-7.el6_0,tcp_wrappers-libs|=|7.6-57.el6,pth|=|2.0.7-9.3.el6,p11-kit|=|0.18.5-2.el6_5.2,ca-certificates|=|2014.1.98-65.1.el6,device-mapper-persistent-data|=|0.3.2-1.el6,file|=|5.04-21.el6,upstart|=|0.6.5-13.el6_5.3,snappy|=|1.1.0-1.el6,bc|=|1.06.95-1.el6,MAKEDEV|=|3.24-6.el6,procps|=|3.2.8-30.el6,net-tools|=|1.60-110.el6_2,tar|=|1.23-11.el6,e2fsprogs-libs|=|1.41.12-21.el6,pinentry|=|0.7.6-6.el6,which|=|2.19-6.el6,make|=|3.81-20.el6,dash|=|0.5.5.1-4.el6,groff|=|1.18.1.4-21.el6,coreutils-libs|=|8.4-37.el6,cracklib|=|2.8.16-4.el6,coreutils|=|8.4-37.el6,module-init-tools|=|3.9-24.el6,redhat-logos|=|60.0.14-1.el6,libpciaccess|=|0.13.3-0.1.el6,nss|=|3.16.1-14.el6,nss-tools|=|3.16.1-14.el6,pciutils-libs|=|3.1.10-4.el6,mingetty|=|1.08-5.el6,keyutils-libs|=|1.4-5.el6,openssl|=|1.0.1e-30.el6,libcurl|=|7.19.7-37.el6_5.3,rpm-libs|=|4.8.0-37.el6,openldap|=|2.4.39-8.el6,gpgme|=|1.1.8-3.el6,fipscheck-lib|=|1.2.0-7.el6,ustr|=|1.0.4-9.1.el6,libnl|=|1.1.4-2.el6,plymouth-core-libs|=|0.8.3-27.el6_5.1,gdbm|=|1.8.0-36.el6,python-libs|=|2.6.6-52.el6,python-dateutil|=|1.4.1-6.el6,m2crypto|=|0.20.2-9.el6,python-ethtool|=|0.6-5.el6,python-dmidecode|=|3.10.13-3.el6_4,python-rhsm|=|1.12.5-2.el6,python-pycurl|=|7.19.0-8.el6,pyOpenSSL|=|0.10-2.el6,pkgconfig|=|0.23-9.1.el6,glib2|=|2.28.8-4.el6,libuser|=|0.56.13-5.el6,dbus-python|=|0.83.0-6.1.el6,passwd|=|0.77-4.el6_2.2,yum-metadata-parser|=|1.1.2-16.el6,libgudev1|=|147-2.57.el6,slang|=|2.2.1-1.el6,newt-python|=|0.52.11-3.el6,busybox|=|1.15.1-20.el6,redhat-release-server|=|6Server-6.6.0.2.el6,iptables|=|1.4.7-14.el6,iputils|=|20071127-17.el6_4.2,initscripts|=|9.03.46-1.el6,device-mapper-libs|=|1.02.90-2.el6,device-mapper-event-libs|=|1.02.90-2.el6,rhnsd|=|4.9.3-2.el6,yum-rhn-plugin|=|0.9.1-50.el6,device-mapper-event|=|1.02.90-2.el6,kpartx|=|0.4.9-80.el6,libdrm|=|2.4.52-4.el6,rsyslog|=|5.8.10-8.el6,dracut|=|004-356.el6,openssh|=|5.3p1-104.el6,postfix|=|2.6.6-6.el6_5,cronie|=|1.4.4-12.el6,virt-what|=|1.11-1.2.el6,dhcp-common|=|4.1.1-43.P1.el6,kernel|=|2.6.32-504.el6,selinux-policy-targeted|=|3.7.19-260.el6,openssh-server|=|5.3p1-104.el6,lvm2|=|2.02.111-2.el6,iwl5150-firmware|=|8.24.2.2-1.el6,iwl6050-firmware|=|41.28.5.1-2.el6,iwl6000g2a-firmware|=|17.168.5.3-1.el6,iwl6000-firmware|=|9.221.4.1-1.el6,iptables-ipv6|=|1.4.7-14.el6,grub|=|0.97-93.el6,efibootmgr|=|0.5.4-12.el6,e2fsprogs|=|1.41.12-21.el6,attr|=|2.4.44-7.el6,iwl5000-firmware|=|8.83.5.1_1-1.el6_1.1,ivtv-firmware|=|20080701-20.2,xorg-x11-drv-ati-firmware|=|7.3.99-2.el6,atmel-firmware|=|1.3-7.el6,iwl4965-firmware|=|228.61.2.24-2.1.el6,iwl3945-firmware|=|15.32.2.9-4.el6,rt73usb-firmware|=|1.8-7.el6,ql23xx-firmware|=|3.03.27-3.1.el6,rootfiles|=|8.1-6.1.el6,katello-ca-consumer-katello-dev-katello.example.com|=|1.0-1,libgcc|=|4.4.7-11.el6,filesystem|=|2.4.30-3.el6,basesystem|=|10.0-4.el6,glibc-common|=|2.12-1.149.el6,glibc|=|2.12-1.149.el6,bash|=|4.1.2-29.el6,libcap|=|2.16-5.5.el6,info|=|4.13a-8.el6,popt|=|1.13-7.el6,libacl|=|2.2.49-6.el6,db4|=|4.7.25-18.el6_4,nspr|=|4.10.6-1.el6_5,libsepol|=|2.0.41-4.el6,sed|=|4.2.1-10.el6,readline|=|6.0-4.el6,libstdc++|=|4.4.7-11.el6,libudev|=|147-2.57.el6,gawk|=|3.1.7-10.el6,xz-libs|=|4.999.9-0.5.beta.20091007git.el6,pcre|=|7.8-6.el6,lua|=|5.1.4-4.1.el6,cyrus-sasl-lib|=|2.1.23-15.el6,libuuid|=|2.17.2-12.18.el6,expat|=|2.0.1-11.el6_2,libgcrypt|=|1.4.5-11.el6_4,checkpolicy|=|2.0.22-1.el6,cpio|=|2.10-12.el6_5,sysvinit-tools|=|2.87-5.dsf.el6,libtasn1|=|2.3-6.el6_5,p11-kit-trust|=|0.18.5-2.el6_5.2,libxslt|=|1.1.26-2.el6_3.1,elfutils-libs|=|0.158-3.2.el6,libnih|=|1.0.1-7.el6,gmp|=|4.3.1-7.el6_2.2,libusb|=|0.1.12-23.el6,libutempter|=|1.1.5-4.1.el6,vim-minimal|=|7.2.411-1.8.el6,psmisc|=|22.6-19.el6_5,libselinux-utils|=|2.0.94-5.8.el6,db4-utils|=|4.7.25-18.el6_4,libss|=|1.41.12-21.el6,diffutils|=|2.8.1-28.el6,binutils|=|2.20.51.0.2-5.42.el6,m4|=|1.4.13-5.el6,ncurses|=|5.7-3.20090208.el6,less|=|436-13.el6,gzip|=|1.3.12-22.el6,cracklib-dicts|=|2.8.16-4.el6,pam|=|1.1.1-20.el6,hwdata|=|0.233-11.1.el6,plymouth-scripts|=|0.8.3-27.el6_5.1,logrotate|=|3.7.8-17.el6,nss-sysinit|=|3.16.1-14.el6,libcap-ng|=|0.6.4-3.el6_0.1,ethtool|=|3.5-5.el6,lzo|=|2.03-3.1.el6_5.1,krb5-libs|=|1.10.3-33.el6,libssh2|=|1.4.2-1.el6,curl|=|7.19.7-37.el6_5.3,rpm|=|4.8.0-37.el6,gnupg2|=|2.0.14-8.el6,mysql-libs|=|5.1.73-3.el6_5,fipscheck|=|1.2.0-7.el6,libsemanage|=|2.0.43-4.2.el6,dmidecode|=|2.12-5.el6_5,libffi|=|3.0.5-3.2.el6,python|=|2.6.6-52.el6,rpm-python|=|4.8.0-37.el6,python-iniparse|=|0.3.1-2.1.el6,python-lxml|=|2.2.3-1.1.el6,libxml2-python|=|2.7.6-14.el6_5.2,redhat-support-lib-python|=|0.9.6-1.el6,pygpgme|=|0.1-18.20090824bzr68.el6,python-urlgrabber|=|3.9.1-9.el6,rhnlib|=|2.5.22-15.el6,gamin|=|0.1.10-9.el6,shared-mime-info|=|0.70-6.el6,dbus-glib|=|0.86-6.el6_4,pygobject2|=|2.20.0-5.el6,grubby|=|7.0.15-7.el6,yum|=|3.2.29-60.el6,python-gudev|=|147.1-4.el6_0.1,newt|=|0.52.11-3.el6,rhn-client-tools|=|1.0.0.1-18.el6,kbd-misc|=|1.15-11.el6,policycoreutils|=|2.0.83-19.47.el6,iproute|=|2.6.32-32.el6_5,util-linux-ng|=|2.17.2-12.18.el6,udev|=|147-2.57.el6,device-mapper|=|1.02.90-2.el6,usermode|=|1.102-3.el6,rhn-setup|=|1.0.0.1-18.el6,rhn-check|=|1.0.0.1-18.el6,lvm2-libs|=|2.02.111-2.el6,mdadm|=|3.3-6.el6,plymouth|=|0.8.3-27.el6_5.1,kbd|=|1.15-11.el6,dracut-kernel|=|004-356.el6,cyrus-sasl|=|2.1.23-15.el6,cronie-anacron|=|1.4.4-12.el6,crontabs|=|1.10-33.el6,selinux-policy|=|3.7.19-260.el6,kernel-firmware|=|2.6.32-504.el6,dhclient|=|4.1.1-43.P1.el6,subscription-manager|=|1.12.14-7.el6,kexec-tools|=|2.0.0-280.el6,bfa-firmware|=|3.2.23.0-2.el6,iwl100-firmware|=|39.31.5.1-1.el6,b43-openfwwf|=|5.2-4.el6,aic94xx-firmware|=|30-2.el6,iwl1000-firmware|=|39.31.5.1-1.el6,redhat-support-tool|=|0.9.6-2.el6,sudo|=|1.8.6p3-15.el6,audit|=|2.3.7-5.el6,acl|=|2.2.49-6.el6,ql2400-firmware|=|7.03.00-1.el6,ql2100-firmware|=|1.19.38-3.1.el6,libertas-usb8388-firmware|=|5.110.22.p23-3.1.el6,ql2500-firmware|=|7.03.00-1.el6,zd1211-firmware|=|1.4-4.el6,rt61pci-firmware|=|1.2-7.el6,ql2200-firmware|=|2.02.08-3.1.el6,ipw2100-firmware|=|1.3-11.el6,ipw2200-firmware|=|3.1-4.el6,candlepin-cert-consumer-thomasmckay-vm5.released-el7.satellite.lab.eng.rdu2.redhat.com|=|1.0-1"
2
+ Minimal Package Set,1,RHEL 6Server (Minimal),Mega Corporation,Include Packages,"Specific list of packages making up minimal server install",,"setup|=|2.8.14-20.el6_4.1,tzdata|=|2014g-1.el6,ncurses-base|=|5.7-3.20090208.el6,nss-softokn-freebl|=|3.14.3-17.el6,ncurses-libs|=|5.7-3.20090208.el6,libattr|=|2.4.44-7.el6,zlib|=|1.2.3-29.el6,audit-libs|=|2.3.7-5.el6,chkconfig|=|1.3.49.3-2.el6_4.1,libcom_err|=|1.41.12-21.el6,bzip2-libs|=|1.0.5-7.el6_0,nss-util|=|3.16.1-3.el6,libselinux|=|2.0.94-5.8.el6,shadow-utils|=|4.1.4.2-19.el6,libxml2|=|2.7.6-14.el6_5.2,elfutils-libelf|=|0.158-3.2.el6,dbus-libs|=|1.2.24-7.el6_3,file-libs|=|5.04-21.el6,libgpg-error|=|1.7-4.el6,grep|=|2.6.3-6.el6,sqlite|=|3.6.20-1.el6,libidn|=|1.18-2.el6,libblkid|=|2.17.2-12.18.el6,nss-softokn|=|3.14.3-17.el6,findutils|=|4.4.2-6.el6,bzip2|=|1.0.5-7.el6_0,tcp_wrappers-libs|=|7.6-57.el6,pth|=|2.0.7-9.3.el6,p11-kit|=|0.18.5-2.el6_5.2,ca-certificates|=|2014.1.98-65.1.el6,device-mapper-persistent-data|=|0.3.2-1.el6,file|=|5.04-21.el6,upstart|=|0.6.5-13.el6_5.3,snappy|=|1.1.0-1.el6,bc|=|1.06.95-1.el6,MAKEDEV|=|3.24-6.el6,procps|=|3.2.8-30.el6,net-tools|=|1.60-110.el6_2,tar|=|1.23-11.el6,e2fsprogs-libs|=|1.41.12-21.el6,pinentry|=|0.7.6-6.el6,which|=|2.19-6.el6,make|=|3.81-20.el6,dash|=|0.5.5.1-4.el6,groff|=|1.18.1.4-21.el6,coreutils-libs|=|8.4-37.el6,cracklib|=|2.8.16-4.el6,coreutils|=|8.4-37.el6,module-init-tools|=|3.9-24.el6,redhat-logos|=|60.0.14-1.el6,libpciaccess|=|0.13.3-0.1.el6,nss|=|3.16.1-14.el6,nss-tools|=|3.16.1-14.el6,pciutils-libs|=|3.1.10-4.el6,mingetty|=|1.08-5.el6,keyutils-libs|=|1.4-5.el6,openssl|=|1.0.1e-30.el6,libcurl|=|7.19.7-37.el6_5.3,rpm-libs|=|4.8.0-37.el6,openldap|=|2.4.39-8.el6,gpgme|=|1.1.8-3.el6,fipscheck-lib|=|1.2.0-7.el6,ustr|=|1.0.4-9.1.el6,libnl|=|1.1.4-2.el6,plymouth-core-libs|=|0.8.3-27.el6_5.1,gdbm|=|1.8.0-36.el6,python-libs|=|2.6.6-52.el6,python-dateutil|=|1.4.1-6.el6,m2crypto|=|0.20.2-9.el6,python-ethtool|=|0.6-5.el6,python-dmidecode|=|3.10.13-3.el6_4,python-rhsm|=|1.12.5-2.el6,python-pycurl|=|7.19.0-8.el6,pyOpenSSL|=|0.10-2.el6,pkgconfig|=|0.23-9.1.el6,glib2|=|2.28.8-4.el6,libuser|=|0.56.13-5.el6,dbus-python|=|0.83.0-6.1.el6,passwd|=|0.77-4.el6_2.2,yum-metadata-parser|=|1.1.2-16.el6,libgudev1|=|147-2.57.el6,slang|=|2.2.1-1.el6,newt-python|=|0.52.11-3.el6,busybox|=|1.15.1-20.el6,redhat-release-server|=|6Server-6.6.0.2.el6,iptables|=|1.4.7-14.el6,iputils|=|20071127-17.el6_4.2,initscripts|=|9.03.46-1.el6,device-mapper-libs|=|1.02.90-2.el6,device-mapper-event-libs|=|1.02.90-2.el6,rhnsd|=|4.9.3-2.el6,yum-rhn-plugin|=|0.9.1-50.el6,device-mapper-event|=|1.02.90-2.el6,kpartx|=|0.4.9-80.el6,libdrm|=|2.4.52-4.el6,rsyslog|=|5.8.10-8.el6,dracut|=|004-356.el6,openssh|=|5.3p1-104.el6,postfix|=|2.6.6-6.el6_5,cronie|=|1.4.4-12.el6,virt-what|=|1.11-1.2.el6,dhcp-common|=|4.1.1-43.P1.el6,kernel|=|2.6.32-504.el6,selinux-policy-targeted|=|3.7.19-260.el6,openssh-server|=|5.3p1-104.el6,lvm2|=|2.02.111-2.el6,iwl5150-firmware|=|8.24.2.2-1.el6,iwl6050-firmware|=|41.28.5.1-2.el6,iwl6000g2a-firmware|=|17.168.5.3-1.el6,iwl6000-firmware|=|9.221.4.1-1.el6,iptables-ipv6|=|1.4.7-14.el6,grub|=|0.97-93.el6,efibootmgr|=|0.5.4-12.el6,e2fsprogs|=|1.41.12-21.el6,attr|=|2.4.44-7.el6,iwl5000-firmware|=|8.83.5.1_1-1.el6_1.1,ivtv-firmware|=|20080701-20.2,xorg-x11-drv-ati-firmware|=|7.3.99-2.el6,atmel-firmware|=|1.3-7.el6,iwl4965-firmware|=|228.61.2.24-2.1.el6,iwl3945-firmware|=|15.32.2.9-4.el6,rt73usb-firmware|=|1.8-7.el6,ql23xx-firmware|=|3.03.27-3.1.el6,rootfiles|=|8.1-6.1.el6,katello-ca-consumer-katello-dev-katello.example.com|=|1.0-1,libgcc|=|4.4.7-11.el6,filesystem|=|2.4.30-3.el6,basesystem|=|10.0-4.el6,glibc-common|=|2.12-1.149.el6,glibc|=|2.12-1.149.el6,bash|=|4.1.2-29.el6,libcap|=|2.16-5.5.el6,info|=|4.13a-8.el6,popt|=|1.13-7.el6,libacl|=|2.2.49-6.el6,db4|=|4.7.25-18.el6_4,nspr|=|4.10.6-1.el6_5,libsepol|=|2.0.41-4.el6,sed|=|4.2.1-10.el6,readline|=|6.0-4.el6,libstdc++|=|4.4.7-11.el6,libudev|=|147-2.57.el6,gawk|=|3.1.7-10.el6,xz-libs|=|4.999.9-0.5.beta.20091007git.el6,pcre|=|7.8-6.el6,lua|=|5.1.4-4.1.el6,cyrus-sasl-lib|=|2.1.23-15.el6,libuuid|=|2.17.2-12.18.el6,expat|=|2.0.1-11.el6_2,libgcrypt|=|1.4.5-11.el6_4,checkpolicy|=|2.0.22-1.el6,cpio|=|2.10-12.el6_5,sysvinit-tools|=|2.87-5.dsf.el6,libtasn1|=|2.3-6.el6_5,p11-kit-trust|=|0.18.5-2.el6_5.2,libxslt|=|1.1.26-2.el6_3.1,elfutils-libs|=|0.158-3.2.el6,libnih|=|1.0.1-7.el6,gmp|=|4.3.1-7.el6_2.2,libusb|=|0.1.12-23.el6,libutempter|=|1.1.5-4.1.el6,vim-minimal|=|7.2.411-1.8.el6,psmisc|=|22.6-19.el6_5,libselinux-utils|=|2.0.94-5.8.el6,db4-utils|=|4.7.25-18.el6_4,libss|=|1.41.12-21.el6,diffutils|=|2.8.1-28.el6,binutils|=|2.20.51.0.2-5.42.el6,m4|=|1.4.13-5.el6,ncurses|=|5.7-3.20090208.el6,less|=|436-13.el6,gzip|=|1.3.12-22.el6,cracklib-dicts|=|2.8.16-4.el6,pam|=|1.1.1-20.el6,hwdata|=|0.233-11.1.el6,plymouth-scripts|=|0.8.3-27.el6_5.1,logrotate|=|3.7.8-17.el6,nss-sysinit|=|3.16.1-14.el6,libcap-ng|=|0.6.4-3.el6_0.1,ethtool|=|3.5-5.el6,lzo|=|2.03-3.1.el6_5.1,krb5-libs|=|1.10.3-33.el6,libssh2|=|1.4.2-1.el6,curl|=|7.19.7-37.el6_5.3,rpm|=|4.8.0-37.el6,gnupg2|=|2.0.14-8.el6,mysql-libs|=|5.1.73-3.el6_5,fipscheck|=|1.2.0-7.el6,libsemanage|=|2.0.43-4.2.el6,dmidecode|=|2.12-5.el6_5,libffi|=|3.0.5-3.2.el6,python|=|2.6.6-52.el6,rpm-python|=|4.8.0-37.el6,python-iniparse|=|0.3.1-2.1.el6,python-lxml|=|2.2.3-1.1.el6,libxml2-python|=|2.7.6-14.el6_5.2,redhat-support-lib-python|=|0.9.6-1.el6,pygpgme|=|0.1-18.20090824bzr68.el6,python-urlgrabber|=|3.9.1-9.el6,rhnlib|=|2.5.22-15.el6,gamin|=|0.1.10-9.el6,shared-mime-info|=|0.70-6.el6,dbus-glib|=|0.86-6.el6_4,pygobject2|=|2.20.0-5.el6,grubby|=|7.0.15-7.el6,yum|=|3.2.29-60.el6,python-gudev|=|147.1-4.el6_0.1,newt|=|0.52.11-3.el6,rhn-client-tools|=|1.0.0.1-18.el6,kbd-misc|=|1.15-11.el6,policycoreutils|=|2.0.83-19.47.el6,iproute|=|2.6.32-32.el6_5,util-linux-ng|=|2.17.2-12.18.el6,udev|=|147-2.57.el6,device-mapper|=|1.02.90-2.el6,usermode|=|1.102-3.el6,rhn-setup|=|1.0.0.1-18.el6,rhn-check|=|1.0.0.1-18.el6,lvm2-libs|=|2.02.111-2.el6,mdadm|=|3.3-6.el6,plymouth|=|0.8.3-27.el6_5.1,kbd|=|1.15-11.el6,dracut-kernel|=|004-356.el6,cyrus-sasl|=|2.1.23-15.el6,cronie-anacron|=|1.4.4-12.el6,crontabs|=|1.10-33.el6,selinux-policy|=|3.7.19-260.el6,kernel-firmware|=|2.6.32-504.el6,dhclient|=|4.1.1-43.P1.el6,subscription-manager|=|1.12.14-7.el6,kexec-tools|=|2.0.0-280.el6,bfa-firmware|=|3.2.23.0-2.el6,iwl100-firmware|=|39.31.5.1-1.el6,b43-openfwwf|=|5.2-4.el6,aic94xx-firmware|=|30-2.el6,iwl1000-firmware|=|39.31.5.1-1.el6,redhat-support-tool|=|0.9.6-2.el6,sudo|=|1.8.6p3-15.el6,audit|=|2.3.7-5.el6,acl|=|2.2.49-6.el6,ql2400-firmware|=|7.03.00-1.el6,ql2100-firmware|=|1.19.38-3.1.el6,libertas-usb8388-firmware|=|5.110.22.p23-3.1.el6,ql2500-firmware|=|7.03.00-1.el6,zd1211-firmware|=|1.4-4.el6,rt61pci-firmware|=|1.2-7.el6,ql2200-firmware|=|2.02.08-3.1.el6,ipw2100-firmware|=|1.3-11.el6,ipw2200-firmware|=|3.1-4.el6,candlepin-cert-consumer-thomasmckay-vm5.released-el7.satellite.lab.eng.rdu2.redhat.com|=|1.0-1"
@@ -1,6 +1,6 @@
1
- Name,Count,Organization,Description,Composite,Repositories
2
- Katello,1,Mega Corporation,"Katello - The Sysadmin's Fortress",No,katello-1.4
3
- Katello,1,Mega Corporation,"Katello - The Sysadmin's Fortress",No,katello-1.4-client
4
- RHEL 6Server (Minimal),1,Mega Corporation,"RHEL 6Server - minimal installation",No,Red Hat Enterprise Linux 6 Server RPMs x86_64 6Server
5
- RHEL 6.1 Kickstart,1,Mega Corporation,"RHEL 6.1 Kickstart",No,Red Hat Enterprise Linux 6 Server Kickstart x86_64 6.1
1
+ Name,Count,Organization,Description,Composite,Repositories,Lifecycle Environments
2
+ Katello,1,Mega Corporation,"Katello - The Sysadmin's Fortress",No,katello-1.4,Library
3
+ Katello,1,Mega Corporation,"Katello - The Sysadmin's Fortress",No,katello-1.4-client,Library
4
+ RHEL 6Server (Minimal),1,Mega Corporation,"RHEL 6Server - minimal installation",No,Red Hat Enterprise Linux 6 Server RPMs x86_64 6Server,Library
5
+ RHEL 6.1 Kickstart,1,Mega Corporation,"RHEL 6.1 Kickstart",No,Red Hat Enterprise Linux 6 Server Kickstart x86_64 6.1,Library
6
6
 
@@ -1,5 +1,5 @@
1
- Name,Count,Organization,Environment,Operating System,Architecture,MAC Address,Domain,Partition Table
2
- dhcp130-%03d.megacorp.com,255,Mega Corporation,Development,RHEL 6.4,x86_64,"02:FE:B5:E0:70:%02x",megacorp.com,RedHat default
1
+ Name,Count,Organization,Location,Environment,Operating System,Architecture,MAC Address,Domain,Partition Table
2
+ dhcp130-%03d.megacorp.com,255,Mega Corporation,Asia Pacific,Development,RHEL 6.4,x86_64,"02:FE:B5:E0:70:%02x",megacorp.com,RedHat default
3
3
  dhcp129-%03d.megacorp.com,255,Mega Corporation,Development,RHEL 6.4,x86_64,"01:FE:B5:E0:70:%02x",megacorp.com,RedHat default
4
4
  # dhcp129-1%02d.megacorp.com,255,Mega Corporation,Development,RHEL 6.4,x86_64,"01:FE:B5:E1:70:%02x",megacorp.com,RedHat default
5
5
  # dhcp129-2%02d.megacorp.com,255,Mega Corporation,Development,RHEL 6.4,x86_64,"01:FE:B5:E2:70:%02x",megacorp.com,RedHat default
@@ -1,16 +1,16 @@
1
- "Name","Count","Family"
2
- "CentOS 6.4","1","Redhat"
3
- "Debian 6.0","1","Debian"
4
- "Debian 7.0","1","Debian"
5
- "Fedora 14","1","Redhat"
6
- "Fedora 17","1","Redhat"
7
- "Fedora 18","1","Redhat"
8
- "Fedora 19","1","Redhat"
9
- "OpenSuSE 11.4","1","Suse"
10
- "RHEL 5.8","1","Redhat"
11
- "RHEL 6.3","1","Redhat"
12
- "RHEL 5.7","1","Redhat"
13
- "RHEL 6.4","1","Redhat"
14
- "Solaris 5.10","1","Solaris"
15
- "Ubuntu 12.10","1","Debian"
16
- "Windows 6.1","1","Windows"
1
+ Name,Count,Description,Family
2
+ CentOS 6.4,1,,Redhat
3
+ Debian 6.0,1,,Debian
4
+ Debian 7.0,1,,Debian
5
+ Fedora 14,1,,Redhat
6
+ Fedora 17,1,,Redhat
7
+ Fedora 18,1,,Redhat
8
+ Fedora 19,1,,Redhat
9
+ OpenSuSE 11.4,1,,Suse
10
+ RHEL 5.8,1,,Redhat
11
+ RHEL 6.3,1,,Redhat
12
+ RHEL 5.7,1,,Redhat
13
+ RHEL 6.4,1,,Redhat
14
+ Solaris 5.10,1,,Solaris
15
+ Ubuntu 12.10,1,,Debian
16
+ Windows 6.1,1,,Windows
@@ -14,6 +14,6 @@ Red Hat Enterprise Linux Server,1,Red_Hat_Enterprise_Linux_Server,Mega Corporati
14
14
  Red Hat Enterprise Linux Server,1,Red_Hat_Enterprise_Linux_Server,Mega Corporation,Red Hat Enterprise Linux 6 Server RPMs x86_64 6.5,Red Hat Yum,https://cdn.redhat.com/content/dist/rhel/server/6/6.5/x86_64/os
15
15
  Red Hat Enterprise Linux Server,1,Red_Hat_Enterprise_Linux_Server,Mega Corporation,Red Hat Enterprise Linux 6 Server RPMs x86_64 6Server,Red Hat Yum,https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/os
16
16
  Red Hat Enterprise Linux Server,1,Red_Hat_Enterprise_Linux_Server,Mega Corporation,Red Hat Enterprise Linux 7 Server Kickstart x86_64 7.0,Red Hat Yum,https://cdn.redhat.com/content/dist/rhel/server/7/7.0/x86_64/kickstart
17
- Red Hat Enterprise Linux Server,1,Red_Hat_Enterprise_Linux_Server,Mega Corporation,Red Hat Enterprise Linux 7 Server Kickstart x86_64 7Server,Red Hat Yum,https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/kickstart
17
+ Red Hat Enterprise Linux Server,1,Red_Hat_Enterprise_Linux_Server,Mega Corporation,Red Hat Enterprise Linux 7 Server Kickstart) x86_64 7Server,Red Hat Yum,https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/kickstart
18
18
  Red Hat Enterprise Linux Server,1,Red_Hat_Enterprise_Linux_Server,Mega Corporation,Red Hat Enterprise Linux 7 Server RPMs x86_64 7.0,Red Hat Yum,https://cdn.redhat.com/content/dist/rhel/server/7/7.0/x86_64/os
19
19
  Red Hat Enterprise Linux Server,1,Red_Hat_Enterprise_Linux_Server,Mega Corporation,Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server,Red Hat Yum,https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/os
@@ -0,0 +1,5 @@
1
+ Name,Count,Value
2
+ administrator,1,root@example.com
3
+ idle_timeout,1,60000
4
+ remote_execution_global_proxy,1,true
5
+ require_ssl_smart_proxies,1,false
@@ -0,0 +1,79 @@
1
+ require File.join(File.dirname(__FILE__), 'csv_test_helper')
2
+
3
+ require 'stringio'
4
+ require 'tempfile'
5
+
6
+ describe 'import' do
7
+ extend CommandTestHelper
8
+
9
+ before :each do
10
+ HammerCLI::Settings.load_from_file 'test/config.yml'
11
+ end
12
+
13
+ context "--dir" do
14
+ it "hammer csv import --verbose --dir does-not-exist" do
15
+ stdout,stderr = capture {
16
+ hammer.run(%W{--debug csv import --verbose --dir does-not-exist})
17
+ }
18
+ stderr.must_equal ''
19
+ stdout.must_equal(
20
+ <<-eos
21
+ Skipping settings because 'does-not-exist/settings.csv' does not exist
22
+ Skipping organizations because 'does-not-exist/organizations.csv' does not exist
23
+ Skipping locations because 'does-not-exist/locations.csv' does not exist
24
+ Skipping puppet_environments because 'does-not-exist/puppet-environments.csv' does not exist
25
+ Skipping operating_systems because 'does-not-exist/operating-systems.csv' does not exist
26
+ Skipping domains because 'does-not-exist/domains.csv' does not exist
27
+ Skipping architectures because 'does-not-exist/architectures.csv' does not exist
28
+ Skipping partition_tables because 'does-not-exist/partition-tables.csv' does not exist
29
+ Skipping lifecycle_environments because 'does-not-exist/lifecycle-environments.csv' does not exist
30
+ Skipping host_collections because 'does-not-exist/host-collections.csv' does not exist
31
+ Skipping provisioning_templates because 'does-not-exist/provisioning-templates.csv' does not exist
32
+ Skipping subscriptions because 'does-not-exist/subscriptions.csv' does not exist
33
+ Skipping products because 'does-not-exist/products.csv' does not exist
34
+ Skipping content_views because 'does-not-exist/content-views.csv' does not exist
35
+ Skipping content_view_filters because 'does-not-exist/content-view_filters.csv' does not exist
36
+ Skipping activation_keys because 'does-not-exist/activation-keys.csv' does not exist
37
+ Skipping hosts because 'does-not-exist/hosts.csv' does not exist
38
+ Skipping content_hosts because 'does-not-exist/content-hosts.csv' does not exist
39
+ Skipping reports because 'does-not-exist/reports.csv' does not exist
40
+ Skipping roles because 'does-not-exist/roles.csv' does not exist
41
+ Skipping users because 'does-not-exist/users.csv' does not exist
42
+ eos
43
+ )
44
+ end
45
+
46
+ it "hammer csv import --verbose --organizations does-not-exist.csv" do
47
+ stdout,stderr = capture {
48
+ hammer.run(%W{csv import --verbose --organizations does-not-exist.csv})
49
+ }
50
+ stdout.must_equal ''
51
+ stderr[0..-2].must_equal 'Error: File for organizations \'does-not-exist.csv\' does not exist'
52
+ end
53
+
54
+ it "hammer csv import --verbose --organization unknown-org --organizations test/data/organizations.csv" do
55
+ stdout,stderr = capture {
56
+ hammer.run(%W{csv import --verbose --organization unknown-org --organizations test/data/organizations.csv})
57
+ }
58
+ stderr.must_equal ''
59
+ stdout[0..-2].must_equal 'Importing organizations from \'test/data/organizations.csv\''
60
+ end
61
+
62
+ it "hammer csv import --verbose --organization unknown-org --organizations test/data/organizations.csv" do
63
+ stdout,stderr = capture {
64
+ hammer.run(%W{csv import --verbose --organization unknown-org --organizations test/data/organizations.csv})
65
+ }
66
+ stderr.must_equal ''
67
+ stdout[0..-2].must_equal 'Importing organizations from \'test/data/organizations.csv\''
68
+ end
69
+
70
+ it "hammer csv import --verbose --prefix $rand --organizations test/data/organizations.csv" do
71
+ prefix = rand(10000)
72
+ stdout,stderr = capture {
73
+ hammer.run(%W{csv import --verbose --prefix #{prefix} --organizations test/data/organizations.csv})
74
+ }
75
+ stderr.must_equal ''
76
+ stdout[0..-2].must_equal "Importing organizations from 'test/data/organizations.csv'\nCreating organization '#{prefix}Mega Corporation'... done"
77
+ end
78
+ end
79
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hammer_cli_csv
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
- - Tom McKay
7
+ - Thomas McKay
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-27 00:00:00.000000000 Z
11
+ date: 2015-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hammer_cli_katello
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ! '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: gettext
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ~>
32
- - !ruby/object:Gem::Version
33
- version: '2.0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ~>
39
- - !ruby/object:Gem::Version
40
- version: '2.0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: rubocop
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -68,6 +54,7 @@ files:
68
54
  - lib/hammer_cli_csv/base.rb
69
55
  - lib/hammer_cli_csv/compute_profiles.rb
70
56
  - lib/hammer_cli_csv/compute_resources.rb
57
+ - lib/hammer_cli_csv/containers.rb
71
58
  - lib/hammer_cli_csv/content_hosts.rb
72
59
  - lib/hammer_cli_csv/content_view_filters.rb
73
60
  - lib/hammer_cli_csv/content_views.rb
@@ -77,10 +64,12 @@ files:
77
64
  - lib/hammer_cli_csv/export.rb
78
65
  - lib/hammer_cli_csv/headpin_api.rb
79
66
  - lib/hammer_cli_csv/host_collections.rb
67
+ - lib/hammer_cli_csv/host_groups.rb
80
68
  - lib/hammer_cli_csv/hosts.rb
81
69
  - lib/hammer_cli_csv/i18n.rb
82
70
  - lib/hammer_cli_csv/import.rb
83
71
  - lib/hammer_cli_csv/installation_medias.rb
72
+ - lib/hammer_cli_csv/job_templates.rb
84
73
  - lib/hammer_cli_csv/lifecycle_environments.rb
85
74
  - lib/hammer_cli_csv/locations.rb
86
75
  - lib/hammer_cli_csv/operating_systems.rb
@@ -93,6 +82,7 @@ files:
93
82
  - lib/hammer_cli_csv/puppet_reports.rb
94
83
  - lib/hammer_cli_csv/reports.rb
95
84
  - lib/hammer_cli_csv/roles.rb
85
+ - lib/hammer_cli_csv/settings.rb
96
86
  - lib/hammer_cli_csv/smart_proxies.rb
97
87
  - lib/hammer_cli_csv/splice.rb
98
88
  - lib/hammer_cli_csv/subnets.rb
@@ -104,6 +94,7 @@ files:
104
94
  - test/apipie_resource_mock.rb
105
95
  - test/config.template.yml
106
96
  - test/content_hosts_test.rb
97
+ - test/content_views_test.rb
107
98
  - test/csv_test_helper.rb
108
99
  - test/data/activation-keys.csv
109
100
  - test/data/architectures.csv
@@ -124,19 +115,21 @@ files:
124
115
  - test/data/puppet-facts.csv
125
116
  - test/data/reports.csv
126
117
  - test/data/roles.csv
118
+ - test/data/settings.csv
127
119
  - test/data/smart-proxies.csv
128
120
  - test/data/subscriptions.csv
129
121
  - test/data/users.csv
130
122
  - test/helpers/command.rb
131
123
  - test/helpers/resource_disabled.rb
132
124
  - test/hosts_test.rb
125
+ - test/import_test.rb
133
126
  - test/organizations_test.rb
134
127
  - test/roles_test.rb
135
128
  - test/setup_test.rb
136
129
  - test/users_test.rb
137
130
  homepage: http://github.com/Katello/hammer-cli-csv
138
131
  licenses:
139
- - GPL-2
132
+ - GPL-3
140
133
  metadata: {}
141
134
  post_install_message:
142
135
  rdoc_options: []
@@ -163,6 +156,7 @@ test_files:
163
156
  - test/apipie_resource_mock.rb
164
157
  - test/config.template.yml
165
158
  - test/content_hosts_test.rb
159
+ - test/content_views_test.rb
166
160
  - test/csv_test_helper.rb
167
161
  - test/data/activation-keys.csv
168
162
  - test/data/architectures.csv
@@ -183,12 +177,14 @@ test_files:
183
177
  - test/data/puppet-facts.csv
184
178
  - test/data/reports.csv
185
179
  - test/data/roles.csv
180
+ - test/data/settings.csv
186
181
  - test/data/smart-proxies.csv
187
182
  - test/data/subscriptions.csv
188
183
  - test/data/users.csv
189
184
  - test/helpers/command.rb
190
185
  - test/helpers/resource_disabled.rb
191
186
  - test/hosts_test.rb
187
+ - test/import_test.rb
192
188
  - test/organizations_test.rb
193
189
  - test/roles_test.rb
194
190
  - test/setup_test.rb