Project

General

Profile

Download (20.1 KB) Statistics
| Branch: | Tag: | Revision:

hammer-cli-csv / README.md @ 561a8ac9

1 98034f92 David Davis
# hammer-cli-csv ![Travis # Status](https://travis-ci.org/Katello/hammer-cli-csv.svg?branch=master)
2 ab134b85 Tom McKay
3 a389840d Tom McKay
## Introduction
4
5
[Hammer](https://github.com/theforeman/hammer-cli/blob/master/README.md) is a command line interface (CLI) framework which provides a core to which plugins may be added. This plugin, hammer-cli-csv, adds commands to interact with the following products: [Foreman](https://theforeman.org) standalone, [Foreman](https://theforeman.org) with [Katello](http://www.katello.org/) (Foretello), Red Hat's Satellite-6, and Red Hat's Subscription Asset Manager (SAM).
6
7
The purpose of this plugin's commands are to allow a convenient mechanism to both export to and import from CSV files (comma separated values). Each of the server's supported resource types, such as organizations and users, are handled.
8
9
Some possible uses include
10
11
* Import demo or development data easily and consistently
12
* Export another server's data and then import into elsewhere for testing and debug
13
* Export for backup and auditing
14
* Export from SAM-1.3 to import into Satellite-6
15
16
The following sections will cover installation, usage, and examples. All of the resource types are follow in the order which generally is required for dependency resolution (eg. roles must exist to assign to users so the role section comes first).
17
18
## Installation
19
20
## Usage
21
22
## Examples
23
24
## Organizations
25
26
**Overview**
27
* [Open Issues](https://github.com/Katello/hammer-cli-csv/issues?labels=organizations&state=open)
28
* [Tests](https://github.com/Katello/hammer-cli-csv/blob/master/test/organizations_test.rb)
29
* Sample data
30
  * [Mega Corporation](https://github.com/Katello/hammer-cli-csv/blob/master/test/data/organizations.csv)
31
* Supported products and version
32
  * Foreman-1.5, Foreman-nightly
33
  * Foreman-nightly w/ Katello-nightly
34
  * Satellite-6.0.3
35
  * SAM-1.3, SAM-1.4
36
37
**CSV Columns**
38
39
*Note: % column indicates Count substituion*
40
41
| Column Title | Column Description | % | Foreman | Foretello | Satellite | SAM |
42
| :----------- | :----------------- | :-: | :-: | :-: | :-: | :-: |
43
| Name         | Name of the organization to update or create | x | x | x | x |   |
44
| Count | Number of times to iterate this CSV row, incrementing value for substitution |   | x | x | x |   |
45
| Label | Unique organization label | x |   | x | x |   |
46
| Description | Organization description |   | x | x | x |   |
47
48
## Locations
49
50
**Overview**
51
* [Open Issues](https://github.com/Katello/hammer-cli-csv/issues?labels=locations&state=open)
52
* [Tests](https://github.com/Katello/hammer-cli-csv/blob/master/test/locations_test.rb)
53
* Sample data
54
  * [Mega Corporation](https://github.com/Katello/hammer-cli-csv/blob/master/test/data/locations.csv)
55
* Supported products and version
56
  * Foreman-1.5, Foreman-nightly
57
  * Foreman-nightly w/ Katello-nightly
58
  * Satellite-6.0.3
59
  * SAM-1.3, SAM-1.4
60
61
**CSV Columns**
62
63
*Note: % column indicates Count substituion*
64
65
| Column Title | Column Description | % | Foreman | Foretello | Satellite | SAM |
66
| :----------- | :----------------- | :-: | :-: | :-: | :-: | :-: |
67
| Name         | Name of the location to update or create | x | x | x | x |   |
68
| Count | Number of times to iterate this CSV row, incrementing value for substitution |   | x | x | x |   |
69
| Parent Location | Parent location |   | x | x | x |   |
70
71
## Puppet Environments
72
73
**Overview**
74
* [Open Issues](https://github.com/Katello/hammer-cli-csv/issues?labels=puppet-environments&state=open)
75
* [Tests](https://github.com/Katello/hammer-cli-csv/blob/master/test/puppet_environments_test.rb)
76
* Sample data
77
  * [Mega Corporation](https://github.com/Katello/hammer-cli-csv/blob/master/test/data/puppet-environments.csv)
78
* Supported products and version
79
  * Foreman-1.5, Foreman-nightly
80
  * Foreman-nightly w/ Katello-nightly
81
  * Satellite-6.0.3
82
  * SAM-1.3, SAM-1.4
83
84
**CSV Columns**
85
86
*Note: % column indicates Count substituion*
87
88
| Column Title | Column Description | % | Foreman | Foretello | Satellite | SAM |
89
| :----------- | :----------------- | :-: | :-: | :-: | :-: | :-: |
90
| Name         | Name of the puppet environments to update or create | x | x | x | x |   |
91
| Count | Number of times to iterate this CSV row, incrementing value for substitution |   | x | x | x |   |
92
| Organizations | Comma separated list of organizations |   | x | x | x |   |
93
94
## Operating Systems
95
96
**Overview**
97
* [Open Issues](https://github.com/Katello/hammer-cli-csv/issues?labels=operating-systems&state=open)
98
* [Tests](https://github.com/Katello/hammer-cli-csv/blob/master/test/operating_systems_test.rb)
99
* Sample data
100
  * [Mega Corporation](https://github.com/Katello/hammer-cli-csv/blob/master/test/data/operating-systems.csv)
101
* Supported products and version
102
  * Foreman-1.5, Foreman-nightly
103
  * Foreman-nightly w/ Katello-nightly
104
  * Satellite-6.0.3
105
  * SAM-1.3, SAM-1.4
106
107
**CSV Columns**
108
109
*Note: % column indicates Count substituion*
110
111
| Column Title | Column Description | % | Foreman | Foretello | Satellite | SAM |
112
| :----------- | :----------------- | :-: | :-: | :-: | :-: | :-: |
113
| Name         | Name of the operating systems to update or create | x | x | x | x |   |
114
| Count | Number of times to iterate this CSV row, incrementing value for substitution |   | x | x | x |   |
115
| Family | Operating system family |   | x | x | x |   |
116
117
## Domains
118
119
**Overview**
120
* [Open Issues](https://github.com/Katello/hammer-cli-csv/issues?labels=domains&state=open)
121
* [Tests](https://github.com/Katello/hammer-cli-csv/blob/master/test/domains_test.rb)
122
* Sample data
123
  * [Mega Corporation](https://github.com/Katello/hammer-cli-csv/blob/master/test/data/domains.csv)
124
* Supported products and version
125
  * Foreman-1.5, Foreman-nightly
126
  * Foreman-nightly w/ Katello-nightly
127
  * Satellite-6.0.3
128
  * SAM-1.3, SAM-1.4
129
130
**CSV Columns**
131
132
*Note: % column indicates Count substituion*
133
134
| Column Title | Column Description | % | Foreman | Foretello | Satellite | SAM |
135
| :----------- | :----------------- | :-: | :-: | :-: | :-: | :-: |
136
| Name         | Name of the domains to update or create | x | x | x | x |   |
137
| Count | Number of times to iterate this CSV row, incrementing value for substitution |   | x | x | x |   |
138
| Full Name | Full name of the domain |   | x | x | x |   |
139
| Organizations | Comma separated list of organizations |   | x | x | x |   |
140
141
## Architectures
142
143
**Overview**
144
* [Open Issues](https://github.com/Katello/hammer-cli-csv/issues?labels=architectures&state=open)
145
* [Tests](https://github.com/Katello/hammer-cli-csv/blob/master/test/architectures_test.rb)
146
* Sample data
147
  * [Mega Corporation](https://github.com/Katello/hammer-cli-csv/blob/master/test/data/architectures.csv)
148
* Supported products and version
149
  * Foreman-1.5, Foreman-nightly
150
  * Foreman-nightly w/ Katello-nightly
151
  * Satellite-6.0.3
152
  * SAM-1.3, SAM-1.4
153
154
**CSV Columns**
155
156
*Note: % column indicates Count substituion*
157
158
| Column Title | Column Description | % | Foreman | Foretello | Satellite | SAM |
159
| :----------- | :----------------- | :-: | :-: | :-: | :-: | :-: |
160
| Name         | Name of the architectures to update or create | x | x | x | x |   |
161
| Count | Number of times to iterate this CSV row, incrementing value for substitution |   | x | x | x |   |
162
| Operating Systems | Comma separated list of operating system names |   | x | x | x |   |
163
164
## Partition Tables
165
166
**Overview**
167
* [Open Issues](https://github.com/Katello/hammer-cli-csv/issues?labels=partition-tables&state=open)
168
* [Tests](https://github.com/Katello/hammer-cli-csv/blob/master/test/partition_tables_test.rb)
169
* Sample data
170
  * [Mega Corporation](https://github.com/Katello/hammer-cli-csv/blob/master/test/data/partition-tables.csv)
171
* Supported products and version
172
  * Foreman-1.5, Foreman-nightly
173
  * Foreman-nightly w/ Katello-nightly
174
  * Satellite-6.0.3
175
  * SAM-1.3, SAM-1.4
176
177
**CSV Columns**
178
179
*Note: % column indicates Count substituion*
180
181
| Column Title | Column Description | % | Foreman | Foretello | Satellite | SAM |
182
| :----------- | :----------------- | :-: | :-: | :-: | :-: | :-: |
183
| Name         | Name of the partition tables to update or create | x | x | x | x |   |
184
| Count | Number of times to iterate this CSV row, incrementing value for substitution |   | x | x | x |   |
185
| OS Family | Operating system family |   | x | x | x |   |
186
| Operating Systems | Comma separated list of operating system names |   | x | x | x |   |
187
| Layout | Disk layout |   | x | x | x |   |
188
189
## Lifecycle Environments
190
191
**Overview**
192
* [Open Issues](https://github.com/Katello/hammer-cli-csv/issues?labels=lifecycle-environments&state=open)
193
* [Tests](https://github.com/Katello/hammer-cli-csv/blob/master/test/lifecycle_environments_test.rb)
194
* Sample data
195
  * [Mega Corporation](https://github.com/Katello/hammer-cli-csv/blob/master/test/data/lifecycle-environments.csv)
196
* Supported products and version
197
  * Foreman-1.5, Foreman-nightly
198
  * Foreman-nightly w/ Katello-nightly
199
  * Satellite-6.0.3
200
  * SAM-1.3, SAM-1.4
201
202
**CSV Columns**
203
204
*Note: % column indicates Count substituion*
205
206
| Column Title | Column Description | % | Foreman | Foretello | Satellite | SAM |
207
| :----------- | :----------------- | :-: | :-: | :-: | :-: | :-: |
208
| Name         | Name of the lifecycle environments to update or create | x | x | x | x |   |
209
| Count | Number of times to iterate this CSV row, incrementing value for substitution |   | x | x | x |   |
210
| Organization | Organization name |   | x | x | x |   |
211
| Prior Environment | Previous organization name in path |   | x | x | x |   |
212
| Description | Lifecycle environment description |   | x | x | x |   |
213
214
## Host Collections
215
216
**Overview**
217
* [Open Issues](https://github.com/Katello/hammer-cli-csv/issues?labels=host-collections&state=open)
218
* [Tests](https://github.com/Katello/hammer-cli-csv/blob/master/test/host_collections_test.rb)
219
* Sample data
220
  * [Mega Corporation](https://github.com/Katello/hammer-cli-csv/blob/master/test/data/host-collections.csv)
221
* Supported products and version
222
  * Foreman-1.5, Foreman-nightly
223
  * Foreman-nightly w/ Katello-nightly
224
  * Satellite-6.0.3
225
  * SAM-1.3, SAM-1.4
226
227
**CSV Columns**
228
229
*Note: % column indicates Count substituion*
230
231
| Column Title | Column Description | % | Foreman | Foretello | Satellite | SAM |
232
| :----------- | :----------------- | :-: | :-: | :-: | :-: | :-: |
233
| Name         | Name of the host collections to update or create | x | x | x | x |   |
234
| Count | Number of times to iterate this CSV row, incrementing value for substitution |   | x | x | x |   |
235
| Organization | Organization name |   | x | x | x |   |
236
| Limit | Usage limit |   | x | x | x |   |
237
| Description | Host collection description |   | x | x | x |   |
238
239
## Provisioning Templates
240
241
**Overview**
242
* [Open Issues](https://github.com/Katello/hammer-cli-csv/issues?labels=provisionings&state=open)
243
* [Tests](https://github.com/Katello/hammer-cli-csv/blob/master/test/provisionings_test.rb)
244
* Sample data
245
  * [Mega Corporation](https://github.com/Katello/hammer-cli-csv/blob/master/test/data/provisionings.csv)
246
* Supported products and version
247
  * Foreman-1.5, Foreman-nightly
248
  * Foreman-nightly w/ Katello-nightly
249
  * Satellite-6.0.3
250
  * SAM-1.3, SAM-1.4
251
252
**CSV Columns**
253
254
*Note: % column indicates Count substituion*
255
256
| Column Title | Column Description | % | Foreman | Foretello | Satellite | SAM |
257
| :----------- | :----------------- | :-: | :-: | :-: | :-: | :-: |
258
| Name         | Name of the provisioning templates to update or create | x | x | x | x |   |
259
| Count | Number of times to iterate this CSV row, incrementing value for substitution |   | x | x | x |   |
260
261
## Subscriptions
262
263
**Overview**
264
* [Open Issues](https://github.com/Katello/hammer-cli-csv/issues?labels=subscriptions&state=open)
265
* [Tests](https://github.com/Katello/hammer-cli-csv/blob/master/test/subscriptions_test.rb)
266
* Sample data
267
  * [Mega Corporation](https://github.com/Katello/hammer-cli-csv/blob/master/test/data/subscriptions.csv)
268
* Supported products and version
269
  * Foreman-1.5, Foreman-nightly
270
  * Foreman-nightly w/ Katello-nightly
271
  * Satellite-6.0.3
272
  * SAM-1.3, SAM-1.4
273
274
**CSV Columns**
275
276
*Note: % column indicates Count substituion*
277
278
| Column Title | Column Description | % | Foreman | Foretello | Satellite | SAM |
279
| :----------- | :----------------- | :-: | :-: | :-: | :-: | :-: |
280
| Name         | Name of the subscriptions to update or create | x | x | x | x |   |
281
| Count | Number of times to iterate this CSV row, incrementing value for substitution |   | x | x | x |   |
282
| Organization | Organization name |   | x | x | x |   |
283
| Manifest File | Path to manifest file |   | x | x | x |   |
284
| Content Set | Repository content set to enable |   | x | x | x |   |
285
| Arch | Architecture |   | x | x | x |   |
286
| Release | Release version |   | x | x | x |   |
287
288
## Activation Keys
289
290
**Overview**
291
* [Open Issues](https://github.com/Katello/hammer-cli-csv/issues?labels=activation-keys&state=open)
292
* [Tests](https://github.com/Katello/hammer-cli-csv/blob/master/test/activation_keys_test.rb)
293
* Sample data
294
  * [Mega Corporation](https://github.com/Katello/hammer-cli-csv/blob/master/test/data/activation-keys.csv)
295
* Supported products and version
296
  * Foreman-1.5, Foreman-nightly
297
  * Foreman-nightly w/ Katello-nightly
298
  * Satellite-6.0.3
299
  * SAM-1.3, SAM-1.4
300
301
**CSV Columns**
302
303
*Note: % column indicates Count substituion*
304
305
| Column Title | Column Description | % | Foreman | Foretello | Satellite | SAM |
306
| :----------- | :----------------- | :-: | :-: | :-: | :-: | :-: |
307
| Name         | Name of the activation keys to update or create | x | x | x | x |   |
308
| Count | Number of times to iterate this CSV row, incrementing value for substitution |   | x | x | x |   |
309
| Organization | Parent organization name |   | x | x | x |   |
310
| Description | Activation key description |   | x | x | x |   |
311
| Limit | Usage limit |   | x | x | x |   |
312
| Environment | Lifecycle environment name |   | x | x | x |   |
313
| Content View | Content view name |   | x | x | x |   |
314
| Host Collections | Comma separated list of host collections |   | x | x | x |   |
315
| Subscriptions | Comma separated list of subscriptions |   | x | x | x |   |
316
317
## Hosts
318
319
**Overview**
320
* [Open Issues](https://github.com/Katello/hammer-cli-csv/issues?labels=hosts&state=open)
321
* [Tests](https://github.com/Katello/hammer-cli-csv/blob/master/test/hosts_test.rb)
322
* Sample data
323
  * [Mega Corporation](https://github.com/Katello/hammer-cli-csv/blob/master/test/data/hosts.csv)
324
* Supported products and version
325
  * Foreman-1.5, Foreman-nightly
326
  * Foreman-nightly w/ Katello-nightly
327
  * Satellite-6.0.3
328
  * SAM-1.3, SAM-1.4
329
330
**CSV Columns**
331
332
*Note: % column indicates Count substituion*
333
334
| Column Title | Column Description | % | Foreman | Foretello | Satellite | SAM |
335
| :----------- | :----------------- | :-: | :-: | :-: | :-: | :-: |
336
| Name         | Name of the hosts to update or create | x | x | x | x |   |
337
| Count | Number of times to iterate this CSV row, incrementing value for substitution |   | x | x | x |   |
338
| Organization | Organization name |   | x | x | x |   |
339
| Environment | Puppet environment name |   | x | x | x |   |
340
| Operating System | Operating system name |   | x | x | x |   |
341
| Architecture | Architecture name |   | x | x | x |   |
342
| MAC Address | Unique MAC address | x | x | x | x |   |
343
| Domain | Domain name |   | x | x | x |   |
344
| Partition Table | Partition table name |   | x | x | x |   |
345
346
## Content Hosts
347
348
**Overview**
349
* [Open Issues](https://github.com/Katello/hammer-cli-csv/issues?labels=content-hosts&state=open)
350
* [Tests](https://github.com/Katello/hammer-cli-csv/blob/master/test/content_hosts_test.rb)
351
* Sample data
352
  * [Mega Corporation](https://github.com/Katello/hammer-cli-csv/blob/master/test/data/content-hosts.csv)
353
* Supported products and version
354
  * Foreman-1.5, Foreman-nightly
355
  * Foreman-nightly w/ Katello-nightly
356
  * Satellite-6.0.3
357
  * SAM-1.3, SAM-1.4
358
359
**CSV Columns**
360
361
*Note: % column indicates Count substituion*
362
363
| Column Title | Column Description | % | Foreman | Foretello | Satellite | SAM |
364
| :----------- | :----------------- | :-: | :-: | :-: | :-: | :-: |
365
| Name         | Name of the content hosts to update or create | x | x | x | x |   |
366
| Count | Number of times to iterate this CSV row, incrementing value for substitution |   | x | x | x |   |
367
| Organization | Organization name |   | x | x | x |   |
368
| Environment | Puppet environment name |   | x | x | x |   |
369
| Content View | Content view name |   | x | x | x |   |
370
| Host Collections | Comma separate list of host collectoins |   | x | x | x |   |
371
| Virtual | Virtual (Yes or No) |   | x | x | x |   |
372
| Host | Virtual content host name |   | x | x | x |   |
373
| OS | Operating system name |   | x | x | x |   |
374
| Arch | Architecture name |   | x | x | x |   |
375
| Sockets | Number of sockets |   | x | x | x |   |
376
| RAM | Amount of RAM with units |   | x | x | x |   |
377
| Cores | Number of cores |   | x | x | x |   |
378
| SLA | Service Level Agreement |   | x | x | x |   |
379
| Products | Comma separated list of subscriptions |   | x | x | x |   |
380
| Subscriptions | Comma separated list of subscriptions |   | x | x | x |   |
381
382
## Reports
383
384
**Overview**
385
* [Open Issues](https://github.com/Katello/hammer-cli-csv/issues?labels=reports&state=open)
386
* [Tests](https://github.com/Katello/hammer-cli-csv/blob/master/test/reports_test.rb)
387
* Sample data
388
  * [Mega Corporation](https://github.com/Katello/hammer-cli-csv/blob/master/test/data/reports.csv)
389
* Supported products and version
390
  * Foreman-1.5, Foreman-nightly
391
  * Foreman-nightly w/ Katello-nightly
392
  * Satellite-6.0.3
393
  * SAM-1.3, SAM-1.4
394
395
**CSV Columns**
396
397
*Note: % column indicates Count substituion*
398
399
| Column Title | Column Description | % | Foreman | Foretello | Satellite | SAM |
400
| :----------- | :----------------- | :-: | :-: | :-: | :-: | :-: |
401
| Name         | Name of the reports to update or create | x | x | x | x |   |
402
| Count | Number of times to iterate this CSV row, incrementing value for substitution |   | x | x | x |   |
403
| Time | Time of report |   | x | x | x |   |
404
| Applied |  |   | x | x | x |   |
405
| Restarted |  |   | x | x | x |   |
406
| Failed |  |   | x | x | x |   |
407
| Failed Restarts |  |   | x | x | x |   |
408
| Skipped |  |   | x | x | x |   |
409
| Pending |  |   | x | x | x |   |
410
| Metrics |  |   | x | x | x |   |
411
412
## Roles
413
414
**Overview**
415
* [Open Issues](https://github.com/Katello/hammer-cli-csv/issues?labels=roles&state=open)
416
* [Tests](https://github.com/Katello/hammer-cli-csv/blob/master/test/roles_test.rb)
417
* Sample data
418
  * [Mega Corporation](https://github.com/Katello/hammer-cli-csv/blob/master/test/data/roles.csv)
419
* Supported products and version
420 561a8ac9 Tom McKay
  * Foreman-1.6, Foreman-nightly
421 a389840d Tom McKay
  * Foreman-nightly w/ Katello-nightly
422 561a8ac9 Tom McKay
  * Satellite-6.0.4
423 a389840d Tom McKay
424
**CSV Columns**
425
426
*Note: % column indicates Count substituion*
427
428
| Column Title | Column Description | % | Foreman | Foretello | Satellite | SAM |
429
| :----------- | :----------------- | :-: | :-: | :-: | :-: | :-: |
430
| Name         | Name of the roles to update or create | x | x | x | x |   |
431
| Count | Number of times to iterate this CSV row, incrementing value for substitution |   | x | x | x |   |
432
| Resource | Resource to apply role to |   | x | x | x |   |
433
| Search | Search string |   | x | x | x |   |
434
| Permissions | Role permission |   | x | x | x |   |
435
| Organizations | Comma separated list of organizations |   | x | x | x |   |
436
| Locations | Comma separated list of locations |   | x | x | x |   |
437
438
## Users
439
440
**Overview**
441
* [Open Issues](https://github.com/Katello/hammer-cli-csv/issues?labels=users&state=open)
442
* [Tests](https://github.com/Katello/hammer-cli-csv/blob/master/test/users_test.rb)
443
* Sample data
444
  * [Mega Corporation](https://github.com/Katello/hammer-cli-csv/blob/master/test/data/users.csv)
445
* Supported products and version
446
  * Foreman-1.5, Foreman-nightly
447
  * Foreman-nightly w/ Katello-nightly
448
  * Satellite-6.0.3
449
  * SAM-1.3, SAM-1.4
450
451
**CSV Columns**
452
453
*Note: % column indicates Count substituion*
454
455
| Column Title | Column Description | % | Foreman | Foretello | Satellite | SAM |
456
| :----------- | :----------------- | :-: | :-: | :-: | :-: | :-: |
457
| Name         | Name of the users to update or create | x | x | x | x |   |
458
| Count | Number of times to iterate this CSV row, incrementing value for substitution |   | x | x | x |   |
459
| First Name | First name of user |   | x | x | x |   |
460
| Last Name | Last name of user |   | x | x | x |   |
461
| email | Email address |   | x | x | x |   |
462
| Organizations | Comma separated list of organizations |   | x | x | x |   |
463
| Locations | Comma separated list of locations |   | x | x | x |   |
464
| Roles | Comma separated list of role names for user |   | x | x | x |   |