Class: ConohaApi::Client
- Inherits:
-
Object
- Object
- ConohaApi::Client
- Includes:
- Authentication, Compute, Identity, Configurable, Connection
- Defined in:
- lib/conoha_api/client.rb,
lib/conoha_api/client/compute.rb,
lib/conoha_api/client/identity.rb
Defined Under Namespace
Constant Summary
Constants included from Identity
Constants included from Compute
Instance Attribute Summary
Attributes included from Authentication
Attributes included from Configurable
#api_endpoint, #connection_options, #login, #middleware, #password, #proxy, #raise_error, #tenant_id
Attributes included from Connection
Instance Method Summary collapse
- #credential ⇒ Object
- #endpoints ⇒ Object
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
Methods included from Identity
Methods included from Compute
#add_keypair, #add_server, #change_console_keymap, #change_network_adapter, #change_strage_controller, #change_video_device, #confirm_resize, #create_image, #delete_keypair, #delete_server, #flavor, #flavors, #flavors_detail, #force_stop_server, #get_web_console, #image, #images, #images_detail, #keypair, #keypairs, #mount_iso_image, #reboot_server, #rebuild_server, #resize, #revert_resize, #server, #servers, #servers_detail, #start_server, #stop_server, #unmount_iso_image, #vnc
Methods included from Authentication
#ready_for_authentication?, #token_expired?, #token_expires
Methods included from Configurable
Methods included from Connection
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
21 22 23 24 25 26 |
# File 'lib/conoha_api/client.rb', line 21 def initialize( = {}) Configurable.keys.each do |key| instance_variable_set(:"@#{key}", [key] || ConohaApi.instance_variable_get(:"@#{key}")) end credential end |
Instance Method Details
#credential ⇒ Object
32 33 34 35 |
# File 'lib/conoha_api/client.rb', line 32 def credential @credential = nil if token_expired? @credential ||= auth end |
#endpoints ⇒ Object
28 29 30 |
# File 'lib/conoha_api/client.rb', line 28 def endpoints @@endpoints end |