def generate_local_policy(reporter)
      action = Action::GenerateLocalPolicy.new(cookbook: temp_cookbook)
      action.run do |event, data|
        case event
        when :generating
          reporter.update(TS.generate_local_policy.generating)
        when :exporting
          reporter.update(TS.generate_local_policy.exporting)
        when :success
          reporter.success(TS.generate_local_policy.success)
        else
          handle_message(event, data, reporter)
        end
      end
      action.archive_file_location
    end
def generate_local_policy(reporter)
      action = Action::GenerateLocalPolicy.new(cookbook: temp_cookbook)
      action.run do |event, data|
        case event
        when :generating
          reporter.update(TS.generate_local_policy.generating)
        when :exporting
          reporter.update(TS.generate_local_policy.exporting)
        when :success
          reporter.success(TS.generate_local_policy.success)
        else
          handle_message(event, data, reporter)
        end
      end
      action.archive_file_location
    end
def generate_local_policy ( reporter ) action = Action :: GenerateLocalPolicy . new ( cookbook : temp_cookbook ) action . run do | event , data | case event when :generating reporter . update ( TS . generate_local_policy . generating ) when :exporting reporter . update ( TS . generate_local_policy . exporting ) when :success reporter . success ( TS . generate_local_policy . success ) else handle_message ( event , data , reporter ) end end action . archive_file_location end
Runs the GenerateLocalPolicy action and renders UI updates
 as the action reports back
Runs the GenerateLocalPolicy action and renders UI updates as the action reports back