Project

General

Profile

Revision 8c7ba4af

Added by Thomas McKay about 8 years ago

updates to csv

fixed lifecycle-env

ship it

View differences:

lib/hammer_cli_csv/activation_keys.rb
100 100
            print "Creating activation key '#{name}'..." if option_verbose?
101 101
            activationkey = @api.resource(:activation_keys).call(:create, {
102 102
                                        'name' => name,
103
                                        'environment_id' => katello_environment(line[ORGANIZATION],
103
                                        'environment_id' => lifecycle_environment(line[ORGANIZATION],
104 104
                                                                                :name => line[ENVIRONMENT]),
105 105
                                        'content_view_id' => katello_contentview(line[ORGANIZATION],
106 106
                                                                                 :name => line[CONTENTVIEW]),
......
113 113
            activationkey = @api.resource(:activation_keys).call(:update, {
114 114
                                          'id' => @existing[line[ORGANIZATION]][name],
115 115
                                          'name' => name,
116
                                          'environment_id' => katello_environment(line[ORGANIZATION],
116
                                          'environment_id' => lifecycle_environment(line[ORGANIZATION],
117 117
                                                                                  :name => line[ENVIRONMENT]),
118 118
                                          'content_view_id' => katello_contentview(line[ORGANIZATION],
119 119
                                                                                   :name => line[CONTENTVIEW]),
lib/hammer_cli_csv/base.rb
393 393
      result
394 394
    end
395 395

  
396
    def katello_environment(organization, options = {})
397
      @environments ||= {}
398
      @environments[organization] ||= {
396
    def lifecycle_environment(organization, options = {})
397
      @lifecycle_environments ||= {}
398
      @lifecycle_environments[organization] ||= {
399 399
      }
400 400

  
401 401
      if options[:name]
402 402
        return nil if options[:name].nil? || options[:name].empty?
403
        options[:id] = @environments[organization][options[:name]]
403
        options[:id] = @lifecycle_environments[organization][options[:name]]
404 404
        if !options[:id]
405 405
          @api.resource(:lifecycle_environments).call(:index, {
406 406
                                                        :per_page => 999999,
407 407
                                                        'organization_id' => foreman_organization(:name => organization),
408
                                                        'library' => true
409 408
                                                      })['results'].each do |environment|
410
            @environments[organization][environment['name']] = environment['id']
409
            @lifecycle_environments[organization][environment['name']] = environment['id']
411 410
          end
412
          options[:id] = @environments[organization][options[:name]]
411
          options[:id] = @lifecycle_environments[organization][options[:name]]
413 412
          raise "Lifecycle environment '#{options[:name]}' not found" if !options[:id]
414 413
        end
415 414
        result = options[:id]
416 415
      else
417 416
        return nil if options[:id].nil?
418
        options[:name] = @environments.key(options[:id])
417
        options[:name] = @lifecycle_environments.key(options[:id])
419 418
        if !options[:name]
420 419
          environment = @api.resource(:lifecycle_environments).call(:show, {'id' => options[:id]})
421 420
          raise "Lifecycle environment '#{options[:name]}' not found" if !environment || environment.empty?
422 421
          options[:name] = environment['name']
423
          @environments[options[:name]] = options[:id]
422
          @lifecycle_environments[options[:name]] = options[:id]
424 423
        end
425 424
        result = options[:name]
426 425
      end
lib/hammer_cli_csv/content_hosts.rb
148 148
            system_id = @api.resource(:systems).call(:create, {
149 149
                                                       'name' => name,
150 150
                                                       'organization_id' => foreman_organization(:name => line[ORGANIZATION]),
151
                                                       'environment_id' => katello_environment(line[ORGANIZATION], :name => line[ENVIRONMENT]),
151
                                                       'environment_id' => lifecycle_environment(line[ORGANIZATION], :name => line[ENVIRONMENT]),
152 152
                                                       'content_view_id' => katello_contentview(line[ORGANIZATION], :name => line[CONTENTVIEW]),
153 153
                                                       'facts' => facts(name, line),
154 154
                                                       'installed_products' => products(line),
......
161 161
                                                       'id' => @existing[line[ORGANIZATION]][name],
162 162
                                                       'system' => {
163 163
                                                         'name' => name,
164
                                                         'environment_id' => katello_environment(line[ORGANIZATION], :name => line[ENVIRONMENT]),
164
                                                         'environment_id' => lifecycle_environment(line[ORGANIZATION], :name => line[ENVIRONMENT]),
165 165
                                                         'content_view_id' => katello_contentview(line[ORGANIZATION], :name => line[CONTENTVIEW]),
166 166
                                                         'facts' => facts(name, line),
167 167
                                                         'installed_products' => products(line)
......
187 187

  
188 188
      def facts(name, line)
189 189
        facts = {}
190
        facts['network.hostname'] = name
190 191
        facts['cpu.core(s)_per_socket'] = line[CORES]
191 192
        facts['cpu.cpu_socket(s)'] = line[SOCKETS]
192 193
        facts['memory.memtotal'] = line[RAM]
lib/hammer_cli_csv/hosts.rb
84 84
          if !@existing.include? name
85 85
            print "Creating host '#{name}'..." if option_verbose?
86 86
            @api.resource(:hosts).call(:create, {
87
                               'host' => {
88 87
                                 'name' => name,
89 88
                                 'root_pass' => 'changeme',
90 89
                                 'mac' => namify(line[MACADDRESS], number),
......
94 93
                                 'architecture_id' => foreman_architecture(:name => line[ARCHITECTURE]),
95 94
                                 'domain_id' => foreman_domain(:name => line[DOMAIN]),
96 95
                                 'ptable_id' => foreman_partitiontable(:name => line[PARTITIONTABLE])
97
                               }
98 96
                             })
99 97
          else
100 98
            print "Updating host '#{name}'..." if option_verbose?
101 99
            @api.resource(:hosts).call(:update, {
102 100
                                 'id' => @existing[name],
103
                                 'host' => {
104 101
                                   'name' => name,
105 102
                                   'mac' => namify(line[MACADDRESS], number),
106 103
                                   'organization_id' => foreman_organization(:name => line[ORGANIZATION]),
......
109 106
                                   'architecture_id' => foreman_architecture(:name => line[ARCHITECTURE]),
110 107
                                   'domain_id' => foreman_domain(:name => line[DOMAIN]),
111 108
                                   'ptable_id' => foreman_partitiontable(:name => line[PARTITIONTABLE])
112
                                 }
113 109
                               })
114 110
          end
115 111
          print "done\n" if option_verbose?
lib/hammer_cli_csv/import.rb
28 28
      option %w(-u --username), 'USERNAME', 'Username to access server'
29 29
      option %w(-p --password), 'PASSWORD', 'Password to access server'
30 30
      option '--dir', 'DIRECTORY', 'directory to import from'
31
      option '--roles', 'FILE', 'source to import roles'
32
      option '--users', 'FILE', 'source to import users'
33
      option '--hosts', 'FILE', 'source to import hosts'
34
      option '--organizations', 'FILE', 'source to import organizations'
35
      option '--locations', 'FILE', 'source to import locations'
36
      option '--puppet-environments', 'FILE', 'source to puppet environments'
37
      option '--operating-systems', 'FILE', 'source to operating systems'
38
      option '--architectures', 'FILE', 'source to architectures'
39
      option '--domains', 'FILE', 'source to domains'
40
      option '--architectures', 'FILE', 'source to architectures'
41
      option '--partition-tables', 'FILE', 'source to partition-tables'
31

  
32
      RESOURCES = %w( organizations locations roles users puppet_environments operating_systems
33
            domains architectures partition_tables lifecycle_environments host_collections
34
            subscriptions activation_keys hosts content_hosts reports )
35
      RESOURCES.each do |resource|
36
        dashed = resource.sub('_', '-')
37
        option "--#{dashed}", 'FILE', "csv file for #{dashed}"
38
      end
42 39

  
43 40
      def ctx
44 41
        {
......
61 58
                                       })
62 59

  
63 60
        # Swing the hammers
64
        %w( organizations locations roles users puppet_environments operating_systems
65
            hosts domains architectures partition_tables ).each do |resource|
66
          swing(resource)
61
        RESOURCES.each do |resource|
62
          hammer_resource(resource)
67 63
        end
68 64

  
69 65
        HammerCLI::EX_OK
70 66
      end
71 67

  
72
      def swing(resource)
68
      def hammer_resource(resource)
73 69
        return if !self.send("option_#{resource}") && !option_dir
74 70
        options_file = self.send("option_#{resource}") || "#{option_dir}/#{resource.sub('_', '-')}.csv"
75
        raise "File for #{resource} '#{options_file}' does not exist" unless File.exists? options_file
76
        args = %W{ csv #{resource.sub('_', '-')} --csv-file #{options_file} }
71
        if !File.exists? options_file
72
          return if option_dir
73
          raise "File for #{resource} '#{options_file}' does not exist"
74
        end
75

  
76
        args = %W( csv #{resource.sub('_', '-')} --csv-file #{options_file} )
77 77
        args << '-v' if option_verbose?
78 78
        hammer.run(args)
79 79
      end
lib/hammer_cli_csv/lifecycle_environments.rb
31 31
      command_name 'lifecycle-environments'
32 32
      desc         'import or export lifecycle environments'
33 33

  
34
      LABEL = 'Label'
35 34
      ORGANIZATION = 'Organization'
36 35
      PRIORENVIRONMENT = 'Prior Environment'
37 36
      DESCRIPTION = 'Description'
38 37

  
39 38
      def export
40 39
        CSV.open(option_csv_file || '/dev/stdout', 'wb', {:force_quotes => true}) do |csv|
41
          csv << [NAME, COUNT, LABEL, ORGANIZATION, PRIORENVIRONMENT, DESCRIPTION]
40
          csv << [NAME, COUNT, ORGANIZATION, PRIORENVIRONMENT, DESCRIPTION]
42 41
          @api.resource(:organizations).call(:index, {'per_page' => 999999})['results'].each do |organization|
43
            @api.resource(:environments).call(:index, {
42
            @api.resource(:lifecycle_environments).call(:index, {
44 43
                                       'per_page' => 999999,
45 44
                                       'organization_id' => organization['id']
46 45
                                     })['results'].each do |environment|
47
              if environment['label'] != 'Library'
46
              if environment['name'] != 'Library'
48 47
                name = environment['name']
49 48
                count = 1
50
                label = environment['label']
51 49
                prior = environment['prior']
52 50
                description = environment['description']
53
                csv << [name, count, label, organization['name'], prior, description]
51
                csv << [name, count, organization['name'], prior, description]
54 52
              end
55 53
            end
56 54
          end
......
60 58
      def import
61 59
        @existing = {}
62 60
        @api.resource(:organizations).call(:index, {'per_page' => 999999})['results'].each do |organization|
63
          @api.resource(:environments).call(:index, {
61
          @api.resource(:lifecycle_environments).call(:index, {
64 62
                                     'per_page' => 999999,
65 63
                                     'organization_id' => foreman_organization(:name => organization['name']),
66
                                     'library' => true
67 64
                                   })['results'].each do |environment|
68 65
            @existing[organization['name']] ||= {}
69 66
            @existing[organization['name']][environment['name']] = environment['id'] if environment
......
78 75
      def create_environments_from_csv(line)
79 76
        line[COUNT].to_i.times do |number|
80 77
          name = namify(line[NAME], number)
81
          label = namify(line[LABEL], number)
82 78
          prior = namify(line[PRIORENVIRONMENT], number)
83 79
          raise "Organization '#{line[ORGANIZATION]}' does not exist" if !@existing.include? line[ORGANIZATION]
84 80
          if !@existing[line[ORGANIZATION]].include? name
85 81
            print "Creating environment '#{name}'..." if option_verbose?
86
            @api.resource(:environments).call(:create, {
82
            @api.resource(:lifecycle_environments).call(:create, {
87 83
                                        'organization_id' => foreman_organization(:name => line[ORGANIZATION]),
88 84
                                        'name' => name,
89
                                        'label' => label,
90
                                        'prior' => katello_environment(line[ORGANIZATION], :name => prior),
85
                                        'prior' => lifecycle_environment(line[ORGANIZATION], :name => prior),
91 86
                                        'description' => line[DESCRIPTION]
92 87
                                      })
93 88
          else
94 89
            print "Updating environment '#{name}'..." if option_verbose?
95
            @api.resource(:environments).call(:update, {
90
            @api.resource(:lifecycle_environments).call(:update, {
96 91
                                        'id' => @existing[line[ORGANIZATION]][name],
97 92
                                        'name' => name,
98 93
                                        'new_name' => name,
lib/hammer_cli_csv/puppet_reports.rb
143 143
            system_id = @api.resource(:systems).call(:create, {
144 144
                                   'name' => name,
145 145
                                   'organization_id' => line[ORGANIZATION],
146
                                   'environment_id' => katello_environment(line[ORGANIZATION], :name => line[ENVIRONMENT]),
147
                                   'content_view_id' => katello_contentview(line[ORGANIZATION], :name => line[CONTENTVIEW]),
146
                                   'environment_id' => lifecycle_environment(line[ORGANIZATION], :name => line[ENVIRONMENT]),
147
                                   'content_view_id' => lifecycle_contentview(line[ORGANIZATION], :name => line[CONTENTVIEW]),
148 148
                                   'facts' => facts(line),
149 149
                                   'installed_products' => products(line),
150 150
                                   'type' => 'system'
lib/hammer_cli_csv/subscriptions.rb
45 45
      end
46 46

  
47 47
      def create_subscriptions_from_csv(line)
48
        puts "TODO: import #{line[MANIFEST]} into organization #{line[ORGANIZATION]}"
48
        args = %W{ subscription upload --file #{ line[MANIFEST] }
49
                   --organization-id #{ foreman_organization(:name => line[ORGANIZATION]) } }
50
        hammer.run(args)
49 51
      rescue RuntimeError => e
50 52
        raise "#{e}\n       #{line}"
51 53
      end
54

  
55
      def ctx
56
        {
57
          :interactive => false,
58
          :username => 'admin',
59
          :password => 'changeme'
60
        }
61
      end
62

  
63
      def hammer(context = nil)
64
        HammerCLI::MainCommand.new('', context || ctx)
65
      end
66

  
52 67
    end
53 68
  end
54 69
end
test/data/content-hosts.csv
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,1,Standard,"69|Red Hat Enterprise Linux Server,79|Red Hat Enterprise Linux Server",RH0103708|Red Hat Enterprise Linux Server Premium (8 sockets) (Up to 4 guests)
3 3
guest%d,1,Mega Corporation,Library,Default Organization View,"Mega Corp HQ,Accounting",Yes,host0,RHEL 6.4,x86_64,1,4,1,Standard,"69|Red Hat Enterprise Linux Server,79|Red Hat Enterprise Linux Server",RH0103708|Red Hat Enterprise Linux Server Premium (8 sockets) (Up to 4 guests)
4

  
4
dhcp129-%03d.megacorp.com,255,Mega Corporation,Library,Default Organization View,"Mega Corp HQ",No,,RHEL 6.4,x86_64,1,4,1,Standard,"69|Red Hat Enterprise Linux Server,79|Red Hat Enterprise Linux Server",RH0103708|Red Hat Enterprise Linux Server Premium (8 sockets) (Up to 4 guests)
test/data/lifecycle-environments.csv
1
"Name","Count","Label","Organization","Prior Environment","Description"
2
"Development","1","Development","Mega Corporation","Library",""
3
"Testing","1","Testing","Mega Corporation","Development",""
4
"Stage","1","Stage","Mega Corporation","Testing",""
5
"Production","1","Production","Mega Corporation","Stage",""
6
"OpenStack","1","OpenStack","Mega Corporation","Library",""
1
"Name","Count","Organization","Prior Environment","Description"
2
"Development","1","Mega Corporation","Library",""
3
"Testing","1","Mega Corporation","Development",""
4
"Stage","1","Mega Corporation","Testing",""
5
"Production","1","Mega Corporation","Stage",""
6
"OpenStack","1","Mega Corporation","Library",""
test/data/products.csv
1 1
Name,Count,Organization,Repository,Repository Type,Repository Url
2
Point of Sale,1,Mega Corporation,katello-1.4-client,yum,http://fedorapeople.org/groups/katello/releases/yum/1.4-client/RHEL/6Server/x86_64/
2
katello-client-1.4,1,Mega Corporation,katello-1.4-client,yum,http://fedorapeople.org/groups/katello/releases/yum/1.4-client/RHEL/6Server/x86_64/
3 3
katello-1.4,1,Mega Corporation,katello-1.4,yum,http://fedorapeople.org/groups/katello/releases/yum/1.4/RHEL/6Server/x86_64/
test/data/roles.csv
45 45
jacquesjoaquin,1,Katello::ActivationKey,name = jacques.joaquin@megacorp.com,"view_activation_keys",Mega Corporation,
46 46
janayjohnson,1,Katello::ActivationKey,name = janay.johnson@megacorp.com,"view_activation_keys",Mega Corporation,
47 47
jeffersonjock,1,Katello::ActivationKey,name = jefferson.jock@megacorp.com,"view_activation_keys",Mega Corporation,
48
jeneejahns,1,Katello::ActivationKey,,"view_activation_keys,create_activation_keys,update_activation_keys,destroy_activation_keys",Mega Corporation,
48
jeneejahns,1,Katello::ActivationKey,,"view_activation_keys,create_activation_keys,edit_activation_keys,destroy_activation_keys",Mega Corporation,
49 49
jeremyjong,1,Katello::ActivationKey,name = jeremy.jong@megacorp.com,"view_activation_keys",Mega Corporation,
50 50
judithjoachim,1,Katello::ActivationKey,name = judith.joachim@megacorp.com,"view_activation_keys",Mega Corporation,
51 51
juliojerabek,1,Katello::ActivationKey,name = julio.jerabek@megacorp.com,"view_activation_keys",Mega Corporation,
......
117 117
winifredwessels,1,Katello::ActivationKey,name = winifred.wessels@megacorp.com,"view_activation_keys",Mega Corporation,
118 118
yunyarberry,1,Katello::ActivationKey,name = yun.yarberry@megacorp.com,"view_activation_keys",Mega Corporation,
119 119
zelmazemke,1,Katello::ActivationKey,name = zelma.zemke@megacorp.com,"view_activation_keys",Mega Corporation,
120
Mega Corporation Admin,1,Katello::ActivationKey,"","view_activation_keys,create_activation_keys,update_activation_keys,destroy_activation_keys",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
120
Mega Corporation Admin,1,Katello::ActivationKey,"","view_activation_keys,create_activation_keys,edit_activation_keys,destroy_activation_keys",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
121 121
Mega Corporation Admin,1,Architecture,"","view_architectures,create_architectures,edit_architectures,destroy_architectures",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
122 122
Mega Corporation Admin,1,Audit,"",view_audit_logs,Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
123 123
Mega Corporation Admin,1,Bookmark,"","view_bookmarks,create_bookmarks,edit_bookmarks,destroy_bookmarks",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
......
125 125
Mega Corporation Admin,1,ComputeProfile,"","view_compute_profiles,create_compute_profiles,edit_compute_profiles,destroy_compute_profiles",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
126 126
Mega Corporation Admin,1,ComputeResource,"","console_compute_resources_vms,power_compute_resources_vms,destroy_compute_resources_vms,edit_compute_resources_vms,create_compute_resources_vms,view_compute_resources_vms,destroy_compute_resources,edit_compute_resources,create_compute_resources,view_compute_resources",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
127 127
Mega Corporation Admin,1,Katello::System,"","view_content_hosts,create_content_hosts,edit_content_hosts,destroy_content_hosts",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
128
Mega Corporation Admin,1,Katello::ContentView,"","view_content_views,create_content_views,update_content_views,destroy_content_views,publish_content_views",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
128
Mega Corporation Admin,1,Katello::ContentView,"","view_content_views,create_content_views,edit_content_views,destroy_content_views,publish_content_views",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
129 129
Mega Corporation Admin,1,Domain,"","view_domains,create_domains,edit_domains,destroy_domains",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
130 130
Mega Corporation Admin,1,Environment,"","view_environments,create_environments,edit_environments,destroy_environments,import_environments",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
131 131
Mega Corporation Admin,1,FactValue,"","view_facts,upload_facts",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
132 132
Mega Corporation Admin,1,Filter,"","view_filters,create_filters,edit_filters,destroy_filters",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
133
Mega Corporation Admin,1,Katello::GpgKey,"","view_gpg_keys,create_gpg_keys,update_gpg_keys,destroy_gpg_keys",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
133
Mega Corporation Admin,1,Katello::GpgKey,"","view_gpg_keys,create_gpg_keys,edit_gpg_keys,destroy_gpg_keys",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
134 134
Mega Corporation Admin,1,Hostgroup,"","view_hostgroups,create_hostgroups,edit_hostgroups,destroy_hostgroups",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
135 135
Mega Corporation Admin,1,HostClass,"",edit_classes,Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
136 136
Mega Corporation Admin,1,Host,"","puppetrun_hosts,ipmi_boot,console_hosts,power_hosts,build_hosts,destroy_hosts,edit_hosts,create_hosts,view_hosts",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
137 137
Mega Corporation Admin,1,Image,"","view_images,create_images,edit_images,destroy_images",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
138 138
Mega Corporation Admin,1,Location,"","view_locations,create_locations,edit_locations,destroy_locations,assign_locations",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
139
Mega Corporation Admin,1,Katello::KTEnvironment,"","view_lifecycle_environments,create_lifecycle_environments,update_lifecycle_environments,destroy_lifecycle_environments",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
139
Mega Corporation Admin,1,Katello::KTEnvironment,"","view_lifecycle_environments,create_lifecycle_environments,edit_lifecycle_environments,destroy_lifecycle_environments",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
140 140
Mega Corporation Admin,1,LookupKey,"","view_external_variables,create_external_variables,edit_external_variables,destroy_external_variables",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
141 141
Mega Corporation Admin,1,Medium,"","view_media,create_media,edit_media,destroy_media",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
142 142
Mega Corporation Admin,1,Model,"","view_models,create_models,edit_models,destroy_models",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
......
144 144
Mega Corporation Admin,1,Organization,"","delete_manifest,import_manifest,unattach_subscriptions,attach_subscriptions,view_subscriptions,assign_organizations,edit_organizations,view_organizations",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
145 145
Mega Corporation Admin,1,Parameter,"","create_params,edit_params,destroy_params",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
146 146
Mega Corporation Admin,1,Ptable,"","view_ptables,create_ptables,edit_ptables,destroy_ptables",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
147
Mega Corporation Admin,1,Katello::Product,"","view_products,create_products,update_products,destroy_products,sync_products",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
147
Mega Corporation Admin,1,Katello::Product,"","view_products,create_products,edit_products,destroy_products,sync_products",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
148 148
Mega Corporation Admin,1,ConfigTemplate,"","view_templates,create_templates,edit_templates,destroy_templates,deploy_templates",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
149 149
Mega Corporation Admin,1,Puppetclass,"","view_puppetclasses,create_puppetclasses,edit_puppetclasses,destroy_puppetclasses,import_puppetclasses",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
150 150
Mega Corporation Admin,1,Realm,"","view_realms,create_realms,edit_realms,destroy_realms",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
......
152 152
Mega Corporation Admin,1,Role,"","view_roles,create_roles,edit_roles,destroy_roles",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
153 153
Mega Corporation Admin,1,SmartProxy,"","destroy_smart_proxies_puppetca,edit_smart_proxies_puppetca,view_smart_proxies_puppetca,destroy_smart_proxies_autosign,create_smart_proxies_autosign,view_smart_proxies_autosign,destroy_smart_proxies,edit_smart_proxies,create_smart_proxies,view_smart_proxies",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
154 154
Mega Corporation Admin,1,Subnet,"","view_subnets,create_subnets,edit_subnets,destroy_subnets,import_subnets",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
155
Mega Corporation Admin,1,Katello::SyncPlan,"","view_sync_plans,create_sync_plans,update_sync_plans,destroy_sync_plans",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
156
Mega Corporation Admin,1,Trend,"","view_trends,create_trends,edit_trends,destroy_trends,update_trends",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
155
Mega Corporation Admin,1,Katello::SyncPlan,"","view_sync_plans,create_sync_plans,edit_sync_plans,destroy_sync_plans",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
156
Mega Corporation Admin,1,Trend,"","view_trends,create_trends,edit_trends,destroy_trends,edit_trends",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
157 157
Mega Corporation Admin,1,User,"","view_users,create_users,edit_users,destroy_users",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
158 158
Mega Corporation Admin,1,Usergroup,"","view_usergroups,create_usergroups,edit_usergroups,destroy_usergroups",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
159 159
Mega Corporation Admin,1,,"","view_tasks,view_statistics,view_plugins,view_discovered_hosts,provision_discovered_hosts,edit_discovered_hosts,destroy_discovered_hosts,access_settings,access_dashboard",Mega Corporation,"Asia Pacific,Asia Pacific (Singapore) Region,Asia Pacific (Sydney) Region,Asia Pacific (Tokyo) Region,Default,EU (Ireland) Region,South America (Sao Paulo) Region,US East (Northern Virginia) Region,US West (Northern California) Region,US West (Oregon) Region"
test/data/subscriptions.csv
1 1
Name,Count,Organization,Manifest File
2
MegaCorp,1,megacorp,~/Downloads/megacorp.zip
2
MegaCorp,1,Mega Corporation,~/Downloads/megacorp.zip

Also available in: Unified diff