Class: OpenshiftClient::Client

Inherits:
Kubeclient::Common::Client
  • Object
show all
Defined in:
lib/openshift_client.rb

Overview

Openshift Client

Constant Summary collapse

ENTITY_TYPES =

Dynamically creating classes definitions (class Project, class Pod, etc.), The classes are extending RecursiveOpenStruct. This cancels the need to define the classes manually on every new entity addition, and especially since currently the class body is empty

%w(Project Route).map do |et|
  [OpenshiftClient.const_set(et, Class.new(RecursiveOpenStruct)), et]
end

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri, version = 'v1', path = 'oapi') ⇒ Client



23
24
25
26
27
28
# File 'lib/openshift_client.rb', line 23

def initialize(uri, version = 'v1', path = 'oapi')
  handle_uri(uri, path)
  @api_version = version
  @headers = {}
  ssl_options
end

Instance Attribute Details

#api_endpointObject (readonly)

Returns the value of attribute api_endpoint.



12
13
14
# File 'lib/openshift_client.rb', line 12

def api_endpoint
  @api_endpoint
end

Instance Method Details

#all_entitiesObject



30
31
32
# File 'lib/openshift_client.rb', line 30

def all_entities
  retrieve_all_entities(ENTITY_TYPES)
end