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 ClusterRoleBinding Build BuildConfig Image ImageStream).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 }, socket_options: { socket_class: nil, ssl_socket_class: 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 }, socket_options: { socket_class: nil, ssl_socket_class: nil }) ⇒ Client
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/openshift_client.rb', line 26 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 }, socket_options: { socket_class: nil, ssl_socket_class: nil } ) initialize_client(uri, path, version, ssl_options: , auth_options: , socket_options: ) end |
Instance Method Details
#all_entities ⇒ Object
50 51 52 |
# File 'lib/openshift_client.rb', line 50 def all_entities retrieve_all_entities(ENTITY_TYPES) end |