Class: Octo::Helpers::KongBridge

Inherits:
Object
  • Object
show all
Extended by:
KongHelper
Defined in:
lib/octocore/helpers/kong_helper.rb

Overview

This class acts as the bridge between Octo and Kong

Class Method Summary collapse

Methods included from KongHelper

add_ratelimiting_plugin, apislist, consumerlist, create_keyauth, delete_api, delete_consumer, kong_url, process_kong_request

Class Method Details

.delete_allObject

Method to delete all consumers and apis



139
140
141
142
143
144
145
146
147
148
149
150
151
152
# File 'lib/octocore/helpers/kong_helper.rb', line 139

def delete_all
  unless apislist.nil?
    apislist.each do |api|
      delete_api(api['name'])
    end
  end

  unless consumerlist.nil?
    consumerlist.each do |consumer|
      delete_consumer(consumer['username'])
    end
  end

end