hammer_cli_csv 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/config/cli_config.yml +30 -0
- data/config/csv.yml +2 -0
- data/lib/hammer_cli_csv.rb +5 -0
- data/lib/hammer_cli_csv/activation_keys.rb +36 -33
- data/lib/hammer_cli_csv/base.rb +82 -17
- data/lib/hammer_cli_csv/content_hosts.rb +100 -98
- data/lib/hammer_cli_csv/content_view_filters.rb +6 -0
- data/lib/hammer_cli_csv/content_views.rb +58 -37
- data/lib/hammer_cli_csv/export.rb +1 -1
- data/lib/hammer_cli_csv/host_collections.rb +21 -31
- data/lib/hammer_cli_csv/import.rb +13 -10
- data/lib/hammer_cli_csv/lifecycle_environments.rb +9 -3
- data/lib/hammer_cli_csv/products.rb +44 -23
- data/lib/hammer_cli_csv/provisioning_templates.rb +61 -29
- data/lib/hammer_cli_csv/roles.rb +8 -8
- data/lib/hammer_cli_csv/splice.rb +376 -0
- data/lib/hammer_cli_csv/subscriptions.rb +6 -16
- data/lib/hammer_cli_csv/sync_plans.rb +122 -0
- data/lib/hammer_cli_csv/users.rb +6 -2
- data/lib/hammer_cli_csv/version.rb +1 -1
- data/test/data/content-hosts.csv +3 -3
- data/test/data/content-view-filters.csv +1 -1
- data/test/data/organizations.csv +0 -1
- data/test/data/roles.csv +0 -1
- data/test/data/subscriptions.csv +0 -2
- metadata +6 -2
@@ -9,21 +9,6 @@
|
|
9
9
|
# have received a copy of GPLv2 along with this software; if not, see
|
10
10
|
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
11
11
|
|
12
|
-
#
|
13
|
-
# -= Systems CSV =-
|
14
|
-
#
|
15
|
-
# Columns
|
16
|
-
# Name
|
17
|
-
# - System name
|
18
|
-
# - May contain '%d' which will be replaced with current iteration number of Count
|
19
|
-
# - eg. "os%d" -> "os1"
|
20
|
-
# Count
|
21
|
-
# - Number of times to iterate on this line of the CSV file
|
22
|
-
|
23
|
-
require 'hammer_cli'
|
24
|
-
require 'json'
|
25
|
-
require 'csv'
|
26
|
-
require 'uri'
|
27
12
|
|
28
13
|
module HammerCLICsv
|
29
14
|
class CsvCommand
|
@@ -31,6 +16,8 @@ module HammerCLICsv
|
|
31
16
|
command_name 'subscriptions'
|
32
17
|
desc 'import or export subscriptions'
|
33
18
|
|
19
|
+
option %w(--organization), 'ORGANIZATION', 'Only process organization matching this name'
|
20
|
+
|
34
21
|
ORGANIZATION = 'Organization'
|
35
22
|
MANIFEST = 'Manifest File'
|
36
23
|
CONTENT_SET = 'Content Set'
|
@@ -41,6 +28,7 @@ module HammerCLICsv
|
|
41
28
|
CSV.open(option_csv_file || '/dev/stdout', 'wb', {:force_quotes => false}) do |csv|
|
42
29
|
csv << [NAME, COUNT, ORGANIZATION, MANIFEST, CONTENT_SET, ARCH, RELEASE]
|
43
30
|
@api.resource(:organizations).call(:index, {:per_page => 999999})['results'].each do |organization|
|
31
|
+
next if option_organization && organization['name'] != option_organization
|
44
32
|
@api.resource(:products).call(:index, {
|
45
33
|
'per_page' => 999999,
|
46
34
|
'organization_id' => organization['id'],
|
@@ -78,6 +66,8 @@ module HammerCLICsv
|
|
78
66
|
end
|
79
67
|
|
80
68
|
def enable_products_from_csv(line)
|
69
|
+
return if option_organization && line[ORGANIZATION] != option_organization
|
70
|
+
|
81
71
|
results = @api.resource(:products).call(:index, {
|
82
72
|
'per_page' => 999999,
|
83
73
|
'organization_id' => foreman_organization(:name => line[ORGANIZATION]),
|
@@ -122,7 +112,7 @@ module HammerCLICsv
|
|
122
112
|
|
123
113
|
def import_manifest_from_csv(line)
|
124
114
|
args = %W{
|
125
|
-
--server #{ @server } --username #{ @username } --password #{ @
|
115
|
+
--server #{ @server } --username #{ @username } --password #{ @password }
|
126
116
|
subscription upload --file #{ line[MANIFEST] }
|
127
117
|
--organization-id #{ foreman_organization(:name => line[ORGANIZATION]) }
|
128
118
|
}
|
@@ -0,0 +1,122 @@
|
|
1
|
+
# Copyright 2013-2014 Red Hat, Inc.
|
2
|
+
#
|
3
|
+
# This software is licensed to you under the GNU General Public
|
4
|
+
# License as published by the Free Software Foundation; either version
|
5
|
+
# 2 of the License (GPLv2) or (at your option) any later version.
|
6
|
+
# There is NO WARRANTY for this software, express or implied,
|
7
|
+
# including the implied warranties of MERCHANTABILITY,
|
8
|
+
# NON-INFRINGEMENT, or FITNESS FOR A PARTICULAR PURPOSE. You should
|
9
|
+
# have received a copy of GPLv2 along with this software; if not, see
|
10
|
+
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
11
|
+
|
12
|
+
|
13
|
+
module HammerCLICsv
|
14
|
+
class CsvCommand
|
15
|
+
class SyncPlansCommand < BaseCommand
|
16
|
+
command_name 'sync-plans'
|
17
|
+
desc 'import or export repository sync plans'
|
18
|
+
|
19
|
+
option %w(--organization), 'ORGANIZATION', 'Only process organization matching this name'
|
20
|
+
|
21
|
+
ORGANIZATION = 'Organization'
|
22
|
+
DESCRIPTION = 'Description'
|
23
|
+
ENABLED = 'Enabled'
|
24
|
+
STARTDATE = 'Start Date'
|
25
|
+
INTERVAL = 'Interval'
|
26
|
+
PRODUCTS = 'Products'
|
27
|
+
|
28
|
+
def export
|
29
|
+
CSV.open(option_csv_file || '/dev/stdout', 'wb', {:force_quotes => false}) do |csv|
|
30
|
+
csv << [NAME, COUNT, ORGANIZATION, DESCRIPTION, ENABLED, STARTDATE, INTERVAL, PRODUCTS]
|
31
|
+
|
32
|
+
@api.resource(:organizations).call(:index, {:per_page => 999999})['results'].each do |organization|
|
33
|
+
next if option_organization && organization['name'] != option_organization
|
34
|
+
|
35
|
+
@api.resource(:sync_plans).call(:index, {
|
36
|
+
'per_page' => 999999,
|
37
|
+
'organization_id' => foreman_organization(:name => organization['name'])
|
38
|
+
})['results'].each do |sync_plan|
|
39
|
+
name = sync_plan['name']
|
40
|
+
count = 1
|
41
|
+
organization_name = organization['name']
|
42
|
+
description = sync_plan['description']
|
43
|
+
enabled = sync_plan['enabled'] ? 'Yes' : 'No'
|
44
|
+
start_date = sync_plan['sync_date']
|
45
|
+
interval = sync_plan['interval']
|
46
|
+
products = CSV.generate do |column|
|
47
|
+
column << sync_plan['products'].collect do |product|
|
48
|
+
product['name']
|
49
|
+
end
|
50
|
+
end
|
51
|
+
products.delete!("\n")
|
52
|
+
csv << [name, count, organization_name, description, enabled, start_date, interval,
|
53
|
+
products]
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
def import
|
60
|
+
@existing = {}
|
61
|
+
|
62
|
+
thread_import do |line|
|
63
|
+
create_content_hosts_from_csv(line)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def create_content_hosts_from_csv(line)
|
68
|
+
return if option_organization && line[ORGANIZATION] != option_organization
|
69
|
+
|
70
|
+
if !@existing[line[ORGANIZATION]]
|
71
|
+
@existing[line[ORGANIZATION]] = {}
|
72
|
+
@api.resource(:sync_plans).call(:index, {
|
73
|
+
'per_page' => 999999,
|
74
|
+
'organization_id' => foreman_organization(:name => line[ORGANIZATION])
|
75
|
+
})['results'].each do |sync_plan|
|
76
|
+
@existing[line[ORGANIZATION]][sync_plan['name']] = sync_plan['id']
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
line[COUNT].to_i.times do |number|
|
81
|
+
name = namify(line[NAME], number)
|
82
|
+
if !@existing[line[ORGANIZATION]].include? name
|
83
|
+
print "Creating sync plan '#{name}'..." if option_verbose?
|
84
|
+
@api.resource(:sync_plans).call(:create, {
|
85
|
+
'organization_id' => foreman_organization(:name => line[ORGANIZATION]),
|
86
|
+
'name' => name,
|
87
|
+
'description' => line[DESCRIPTION],
|
88
|
+
'enabled' => line[ENABLED] == 'Yes' ? true : false,
|
89
|
+
'sync_date' => line[STARTDATE],
|
90
|
+
'interval' => line[INTERVAL],
|
91
|
+
'products' => products(line)
|
92
|
+
})
|
93
|
+
else
|
94
|
+
print "Updating sync plan '#{name}'..." if option_verbose?
|
95
|
+
# TODO
|
96
|
+
# @api.resource(:host_collections).call(:update, {
|
97
|
+
# 'organization_id' => line[ORGANIZATION],
|
98
|
+
# 'id' => @existing[line[ORGANIZATION]][name],
|
99
|
+
# 'name' => name,
|
100
|
+
# 'max_systems' => (line[LIMIT] == 'Unlimited') ? -1 : line[LIMIT],
|
101
|
+
# 'description' => line[DESCRIPTION]
|
102
|
+
# })
|
103
|
+
end
|
104
|
+
puts "done" if option_verbose?
|
105
|
+
end
|
106
|
+
|
107
|
+
rescue RuntimeError => e
|
108
|
+
raise "#{e}\n #{line}"
|
109
|
+
end
|
110
|
+
|
111
|
+
private
|
112
|
+
|
113
|
+
def products(line)
|
114
|
+
return nil if !line[PRODUCTS] || line[PRODUCTS].empty?
|
115
|
+
CSV.parse_line(line[PRODUCTS]).collect do |name|
|
116
|
+
katello_product(line[ORGANIZATION], :name => name)
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
data/lib/hammer_cli_csv/users.rb
CHANGED
@@ -20,11 +20,12 @@ module HammerCLICsv
|
|
20
20
|
EMAIL = 'Email'
|
21
21
|
ORGANIZATIONS = 'Organizations'
|
22
22
|
LOCATIONS = 'Locations'
|
23
|
+
ADMIN = 'Administrator'
|
23
24
|
ROLES = 'Roles'
|
24
25
|
|
25
26
|
def export
|
26
27
|
CSV.open(option_csv_file || '/dev/stdout', 'wb', {:force_quotes => true}) do |csv|
|
27
|
-
csv << [NAME, COUNT, FIRSTNAME, LASTNAME, EMAIL, ORGANIZATIONS, LOCATIONS, ROLES]
|
28
|
+
csv << [NAME, COUNT, FIRSTNAME, LASTNAME, EMAIL, ORGANIZATIONS, LOCATIONS, ADMIN, ROLES]
|
28
29
|
@api.resource(:users).call(:index, {:per_page => 999999})['results'].each do |user|
|
29
30
|
if user['organizations']
|
30
31
|
organizations = CSV.generate do |column|
|
@@ -50,9 +51,10 @@ module HammerCLICsv
|
|
50
51
|
end
|
51
52
|
roles.delete!("\n")
|
52
53
|
end
|
54
|
+
admin = user['admin'] ? 'Yes' : 'No'
|
53
55
|
if user['login'] != 'admin' && !user['login'].start_with?('hidden-')
|
54
56
|
csv << [user['login'], 1, user['firstname'], user['lastname'], user['mail'],
|
55
|
-
organizations, locations, roles]
|
57
|
+
organizations, locations, admin, roles]
|
56
58
|
end
|
57
59
|
end
|
58
60
|
end
|
@@ -104,6 +106,7 @@ module HammerCLICsv
|
|
104
106
|
'mail' => line[EMAIL],
|
105
107
|
'password' => 'redhat',
|
106
108
|
'auth_source_id' => 1, # INTERNAL auth
|
109
|
+
'admin' => line[ADMIN] == 'Yes' ? true : false,
|
107
110
|
'role_ids' => roles,
|
108
111
|
'organization_ids' => organizations,
|
109
112
|
'location_ids' => locations
|
@@ -122,6 +125,7 @@ module HammerCLICsv
|
|
122
125
|
'password' => 'redhat',
|
123
126
|
'mail' => line[EMAIL],
|
124
127
|
'role_ids' => roles,
|
128
|
+
'admin' => line[ADMIN] == 'Yes' ? true : false,
|
125
129
|
'organization_ids' => organizations,
|
126
130
|
'location_ids' => locations
|
127
131
|
}
|
data/test/data/content-hosts.csv
CHANGED
@@ -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
|
-
host%d,1,Mega Corporation,Library,Default Organization View,"Mega Corp HQ",No,,RHEL 6.4,x86_64,1,
|
3
|
-
guest%d,
|
4
|
-
dhcp129-%03d.megacorp.com,
|
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
|
+
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",
|
@@ -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,tzdata|=|
|
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"
|
data/test/data/organizations.csv
CHANGED
data/test/data/roles.csv
CHANGED
@@ -15,7 +15,6 @@ chelseacalaway,1,ActivationKey,name = chelsea.calaway@megacorp.com,"view_activat
|
|
15
15
|
cinthiacadieux,1,ActivationKey,name = cinthia.cadieux@megacorp.com,"view_activation_keys",Mega Corporation,
|
16
16
|
coraleeculbert,1,ActivationKey,name = coralee.culbert@megacorp.com,"view_activation_keys",Mega Corporation,
|
17
17
|
damondials,1,ActivationKey,name = damon.dials@megacorp.com,"view_activation_keys",Mega Corporation,
|
18
|
-
damondials,1,Organization,"name = ""Mega Corporation""","view_organizations",,
|
19
18
|
danaedrayer,1,ActivationKey,name = danae.drayer@megacorp.com,"view_activation_keys",Mega Corporation,
|
20
19
|
danettedewitt,1,ActivationKey,name = danette.dewitt@megacorp.com,"view_activation_keys",Mega Corporation,
|
21
20
|
danilodilbeck,1,ActivationKey,name = danilo.dilbeck@megacorp.com,"view_activation_keys",Mega Corporation,
|
data/test/data/subscriptions.csv
CHANGED
@@ -6,7 +6,6 @@ Red Hat Enterprise Linux Server,1,Mega Corporation,,Red Hat Enterprise Linux 6 S
|
|
6
6
|
Red Hat Enterprise Linux Server,1,Mega Corporation,,Red Hat Enterprise Linux 6 Server (RPMs),x86_64,6.3
|
7
7
|
Red Hat Enterprise Linux Server,1,Mega Corporation,,Red Hat Enterprise Linux 6 Server (RPMs),x86_64,6.4
|
8
8
|
Red Hat Enterprise Linux Server,1,Mega Corporation,,Red Hat Enterprise Linux 6 Server (RPMs),x86_64,6.5
|
9
|
-
Red Hat Enterprise Linux Server,1,Mega Corporation,,Red Hat Enterprise Linux 6 Server (Kickstart),x86_64,6Server
|
10
9
|
Red Hat Enterprise Linux Server,1,Mega Corporation,,Red Hat Enterprise Linux 6 Server (Kickstart),x86_64,6.1
|
11
10
|
Red Hat Enterprise Linux Server,1,Mega Corporation,,Red Hat Enterprise Linux 6 Server (Kickstart),x86_64,6.2
|
12
11
|
Red Hat Enterprise Linux Server,1,Mega Corporation,,Red Hat Enterprise Linux 6 Server (Kickstart),x86_64,6.3
|
@@ -15,5 +14,4 @@ Red Hat Enterprise Linux Server,1,Mega Corporation,,Red Hat Enterprise Linux 6 S
|
|
15
14
|
Red Hat Enterprise Linux Server,1,Mega Corporation,,Red Hat Enterprise Linux 7 Server (RPMs),x86_64,7Server
|
16
15
|
Red Hat Enterprise Linux Server,1,Mega Corporation,,Red Hat Enterprise Linux 7 Server (RPMs),x86_64,7.0
|
17
16
|
Red Hat Enterprise Linux Server,1,Mega Corporation,,Red Hat Enterprise Linux 7 Server (Kickstart),x86_64,7.0
|
18
|
-
Red Hat Enterprise Linux Server,1,Mega Corporation,,Red Hat Enterprise Linux 7 Server (Kickstart),x86_64,7Server
|
19
17
|
|
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.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom McKay
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hammer_cli_katello
|
@@ -60,6 +60,8 @@ executables: []
|
|
60
60
|
extensions: []
|
61
61
|
extra_rdoc_files: []
|
62
62
|
files:
|
63
|
+
- config/cli_config.yml
|
64
|
+
- config/csv.yml
|
63
65
|
- lib/hammer_cli_csv.rb
|
64
66
|
- lib/hammer_cli_csv/activation_keys.rb
|
65
67
|
- lib/hammer_cli_csv/architectures.rb
|
@@ -92,8 +94,10 @@ files:
|
|
92
94
|
- lib/hammer_cli_csv/reports.rb
|
93
95
|
- lib/hammer_cli_csv/roles.rb
|
94
96
|
- lib/hammer_cli_csv/smart_proxies.rb
|
97
|
+
- lib/hammer_cli_csv/splice.rb
|
95
98
|
- lib/hammer_cli_csv/subnets.rb
|
96
99
|
- lib/hammer_cli_csv/subscriptions.rb
|
100
|
+
- lib/hammer_cli_csv/sync_plans.rb
|
97
101
|
- lib/hammer_cli_csv/users.rb
|
98
102
|
- lib/hammer_cli_csv/version.rb
|
99
103
|
- test/activation_keys_test.rb
|