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 }, http_proxy_uri: 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 }, http_proxy_uri: nil) ⇒ Client
Returns a new instance of Client.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# 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 }, http_proxy_uri: nil ) initialize_client(uri, path, version, ssl_options: , auth_options: , socket_options: , http_proxy_uri: http_proxy_uri) end |
Instance Method Details
#all_entities ⇒ Object
52 53 54 |
# File 'lib/openshift_client.rb', line 52 def all_entities retrieve_all_entities(ENTITY_TYPES) end |