Project

General

Profile

Revision bf81b9cf

Added by Thomas McKay over 8 years ago

test-fixes - setup_test clean except for manifest upload repeat

View differences:

lib/hammer_cli_csv/base.rb
415 415
        return nil if options[:name].nil? || options[:name].empty?
416 416
        options[:id] = @environments[organization][options[:name]]
417 417
        if !options[:id]
418
          @api.resource(:environments).call(:index, {'organization_id' => katello_organization(:name => organization)})['results'].each do |environment|
418
          @api.resource(:lifecycle_environments).call(:index, {
419
                                                        'organization_id' => katello_organization(:name => organization),
420
                                                        'library' => true
421
                                                      })['results'].each do |environment|
419 422
            @environments[organization][environment['name']] = environment['id']
420 423
          end
421 424
          options[:id] = @environments[organization][options[:name]]
......
426 429
        return nil if options[:id].nil?
427 430
        options[:name] = @environments.key(options[:id])
428 431
        if !options[:name]
429
          environment = @api.resource(:environments).call(:show, {'id' => options[:id]})
432
          environment = @api.resource(:lifecycle_environments).call(:show, {'id' => options[:id]})
430 433
          raise "Lifecycle environment '#{options[:name]}' not found" if !environment || environment.empty?
431 434
          options[:name] = environment['name']
432 435
          @environments[options[:name]] = options[:id]
......
445 448
        return nil if options[:name].nil? || options[:name].empty?
446 449
        options[:id] = @contentviews[organization][options[:name]]
447 450
        if !options[:id]
448
          @api.resource(:contentviews).call(:index, {'organization_id' => katello_organization(:name => organization)})['results'].each do |contentview|
451
          @api.resource(:content_views).call(:index, {'organization_id' => katello_organization(:name => organization)})['results'].each do |contentview|
449 452
            @contentviews[organization][contentview['name']] = contentview['id']
450 453
          end
451 454
          options[:id] = @contentviews[organization][options[:name]]
......
456 459
        return nil if options[:id].nil?
457 460
        options[:name] = @contentviews.key(options[:id])
458 461
        if !options[:name]
459
          contentview = @api.resource(:contentviews).call(:show, {'id' => options[:id]})
462
          contentview = @api.resource(:content_views).call(:show, {'id' => options[:id]})
460 463
          raise "Puppet contentview '#{options[:name]}' not found" if !contentview || contentview.empty?
461 464
          options[:name] = contentview['name']
462 465
          @contentviews[options[:name]] = options[:id]
......
510 513
        return nil if options[:name].nil? || options[:name].empty?
511 514
        options[:id] = @systemgroups[organization][options[:name]]
512 515
        if !options[:id]
513
          @api.resource(:systemgroups).call(:index, {
516
          @api.resource(:system_groups).call(:index, {
514 517
                                     'organization_id' => katello_organization(:name => organization),
515 518
                                     'search' => "name:\"#{options[:name]}\""
516 519
                                   })['results'].each do |systemgroup|
......
524 527
        return nil if options[:id].nil?
525 528
        options[:name] = @systemgroups.key(options[:id])
526 529
        if !options[:name]
527
          systemgroup = @api.resource(:systemgroups).call(:show, {'id' => options[:id]})
530
          systemgroup = @api.resource(:system_groups).call(:show, {'id' => options[:id]})
528 531
          raise "System group '#{options[:name]}' not found" if !systemgroup || systemgroup.empty?
529 532
          options[:name] = systemgroup['name']
530 533
          @systemgroups[options[:name]] = options[:id]

Also available in: Unified diff