Class: OpenshiftClient::Client
- Inherits:
-
Object
- Object
- OpenshiftClient::Client
- Includes:
- Kubeclient::ClientMixin
- 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 Method Summary collapse
- #all_entities ⇒ Object
-
#initialize(uri, version = 'v1', path = '/oapi', ssl_options: { client_cert: nil, client_key: nil, ca_file: nil, verify_ssl: OpenSSL::SSL::VERIFY_PEER }, auth_options: { username: nil, password: nil, bearer_token: nil, bearer_token_file: nil }) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(uri, version = 'v1', path = '/oapi', ssl_options: { client_cert: nil, client_key: nil, ca_file: nil, verify_ssl: OpenSSL::SSL::VERIFY_PEER }, auth_options: { username: nil, password: nil, bearer_token: nil, bearer_token_file: nil }) ⇒ Client
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/openshift_client.rb', line 25 def initialize(uri, version = 'v1', path = '/oapi', ssl_options: { client_cert: nil, client_key: nil, ca_file: nil, verify_ssl: OpenSSL::SSL::VERIFY_PEER }, auth_options: { username: nil, password: nil, bearer_token: nil, bearer_token_file: nil } ) initialize_client(uri, path, version, ssl_options: , auth_options: ) end |
Instance Method Details
#all_entities ⇒ Object
44 45 46 |
# File 'lib/openshift_client.rb', line 44 def all_entities retrieve_all_entities(ENTITY_TYPES) end |