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/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]

Also available in: Unified diff