class OpenShift::Runtime::Frontend::Http::Plugins::PluginBaseClass

Constants

SERVER_CONNECT_ADDR
SERVER_HTTPS_PORT
SERVER_HTTP_PORT

Attributes

container_name[R]
container_uuid[R]
fqdn[R]
namespace[R]

Public Class Methods

inherited(subclass) click to toggle source
# File lib/openshift-origin-node/model/frontend/http/plugins/frontend_http_base.rb, line 96
def self.inherited(subclass)
  ::OpenShift::Runtime::Frontend::Http::Plugins::add_plugin(subclass)
end
new(container_uuid, fqdn, container_name, namespace) click to toggle source
# File lib/openshift-origin-node/model/frontend/http/plugins/frontend_http_base.rb, line 75
def initialize(container_uuid, fqdn, container_name, namespace)
  @container_uuid = container_uuid
  @fqdn = fqdn
  @container_name = container_name
  @namespace = namespace
end

Public Instance Methods

unprivileged_unidle() click to toggle source
# File lib/openshift-origin-node/model/frontend/http/plugins/frontend_http_base.rb, line 82
def unprivileged_unidle
  begin
    http = Net::HTTP.new(SERVER_CONNECT_ADDR, SERVER_HTTP_PORT)
    http.open_timeout = 5
    http.read_timeout = 60
    http.use_ssl = false
    http.start do |client|
      resp = client.request_head('/', { 'Host' => @fqdn })
      resp.code
    end
  rescue
  end
end