Project

General

Profile

Revision ee942928

Added by Thomas McKay about 9 years ago

akeys - activation keys and other stuff

View differences:

lib/hammer_cli_csv/system_groups.rb
48 48
      super(args)
49 49
      @organization_api = KatelloApi::Resources::Organization.new(@init_options)
50 50
      @systemgroup_api = KatelloApi::Resources::SystemGroup.new(@init_options)
51
      @permission_api = KatelloApi::Resources::Permission.new(@init_options)
52 51
    end
53 52

  
54 53
    def execute
......
82 81
    def create_systemgroups_from_csv(line)
83 82
      details = parse_systemgroup_csv(line)
84 83

  
85
      @existing[details[:org_label]] ||= {}
86
      @systemgroup_api.index({'organization_id' => details[:org_label]})[0].each do |systemgroup|
84
      if !@existing[details[:org_label]]
85
        @existing[details[:org_label]] = {}
86
        @systemgroup_api.index({'organization_id' => details[:org_label]})[0].each do |systemgroup|
87 87
          @existing[details[:org_label]][systemgroup['name']] = systemgroup['id']
88
        end
88 89
      end
89 90

  
90 91
      details[:count].times do |number|

Also available in: Unified diff