Project

General

Profile

Revision 9e11b4c5

Added by Thomas McKay over 7 years ago

updated to work with foreman-csv plugin

fixed roles

updated comment

View differences:

lib/hammer_cli_csv/roles.rb
84 84
            @existing_roles[name] = role['id']
85 85
          else
86 86
            print "Updating role '#{name}'..." if option_verbose?
87
            @api.resource(:roles).call(:update, {
88
                'id' => @existing_roles[name]
89
            })
87
            # Nothing to update on the role object itself, just filters below
90 88
          end
91 89

  
92 90
          filter_id = foreman_filter(name, line[RESOURCE], search)
......
104 102
            print " updating filter #{line[RESOURCE]}..."
105 103
            @api.resource(:filters).call(:update, {
106 104
                'id' => filter_id,
107
                'search' => search,
108
                'unlimited' => search.nil? || search.empty?,
109
                'organization_ids' => organizations,
110
                'location_ids' => locations,
111
                'permission_ids' => permissions
105
                'filter' => {
106
                    'search' => search,
107
                    'unlimited' => search.nil? || search.empty?,
108
                    'organization_ids' => organizations,
109
                    'location_ids' => locations,
110
                    'permission_ids' => permissions
111
                }
112 112
            })
113 113
          end
114 114

  

Also available in: Unified diff