Class: OpenshiftClient::Client
- Inherits:
-
Kubeclient::Common::Client
- Object
- Kubeclient::Common::Client
- OpenshiftClient::Client
- 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
-
#api_endpoint ⇒ Object
readonly
Returns the value of attribute api_endpoint.
Instance Method Summary collapse
- #all_entities ⇒ Object
-
#initialize(uri, version = 'v1', path = 'oapi') ⇒ Client
constructor
A new instance of Client.
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 = {} end |
Instance Attribute Details
#api_endpoint ⇒ Object (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_entities ⇒ Object
30 31 32 |
# File 'lib/openshift_client.rb', line 30 def all_entities retrieve_all_entities(ENTITY_TYPES) end |