Project

General

Profile

Revision 4b5a5328

Added by Thomas McKay about 6 years ago

refs #14615 - properly map host id

View differences:

lib/hammer_cli_import/base.rb
451 451
              'comment' => entity_hash[:description]
452 452
            }
453 453
          }
454
          @api.resource(:hosts).call(:update, params)
454
          entity = @api.resource(:hosts).call(:update, params)
455 455
          unless entity_hash[:host_collection_ids].empty?
456 456
            @api.resource(:host_collections).call(:add_hosts, {
457 457
                'id' => entity_hash[:host_collection_ids][0],
lib/hammer_cli_import/contenthost.rb
92 92
        # store processed system profiles to a set according to the organization
93 93
        @map << {
94 94
          :org_id => data['organization_id'].to_i,
95
          :host_id => data['server_id'].to_i,
96
          :uuid => c_host['uuid']}
95
          :system_id => data['server_id'].to_i,
96
          :host_id => c_host['id'],
97
          :uuid => c_host['subscription_facet_attributes']['uuid']
98
        }
97 99
        # associate virtual guests in post_import to make sure, all the guests
98 100
        # are already imported (and known to sat6)
99 101
        @vguests[data['server_id'].to_i] = split_multival(data['virtual_guest']) if data['virtual_host'] == data['server_id']

Also available in: Unified diff