Class: Octo::Helpers::KongBridge

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

Overview

This class acts as the bridge between Octo and Kong

Constant Summary

Constants included from KongHelper

Octo::Helpers::KongHelper::KONG_URL

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



147
148
149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/octocore-cassandra/helpers/kong_helper.rb', line 147

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