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

Also available in: Unified diff