Class: Misty::Openstack::Nova::V2_1

Inherits:
Object
  • Object
show all
Includes:
ClientPack, Microversion, Misty::Openstack::NovaV2_1
Defined in:
lib/misty/openstack/nova/v2_1.rb

Constant Summary

Constants included from Microversion

Microversion::VERSION_STATES

Constants included from Client

Client::INTERFACES

Instance Attribute Summary

Attributes included from Client

#headers, #microversion

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Microversion

#initialize, #version_get, #versions

Methods included from HTTP::Direct

#base_set, #delete, #get, #post, #put

Methods included from HTTP::Request

#decode?, #http, #http_copy, #http_delete, #http_get, #http_head, #http_options, #http_patch, #http_post, #http_put, #http_to_s

Methods included from HTTP::MethodBuilder

#method_missing

Methods included from HTTP::NetHTTP

http_request

Methods included from Client

#initialize, #prefix_path_to_ignore, #requests

Methods included from Misty::Openstack::NovaV2_1

#api, #tag

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Misty::HTTP::MethodBuilder

Class Method Details

.list_all_major_versionsObject

TODO: Verify Overrides API because the definitions don’t specify prefix



15
16
17
# File 'lib/misty/openstack/nova/v2_1.rb', line 15

def self.list_all_major_versions
  http_get('/', headers)
end

.show_details_of_specific_api_version(version) ⇒ Object



19
20
21
# File 'lib/misty/openstack/nova/v2_1.rb', line 19

def self.show_details_of_specific_api_version(version)
  http_get("/#{version}", headers)
end

Instance Method Details

#microversion_headerObject



27
28
29
30
31
32
33
# File 'lib/misty/openstack/nova/v2_1.rb', line 27

def microversion_header
  # Versions 2.27+ use default OpenStack-API-Version
  header = super
  # For prior vesions then remove once depcrecated
  header.merge!('X-Openstack-Nova-API-Version' => "#{@version}",)
  header
end

#service_namesObject



23
24
25
# File 'lib/misty/openstack/nova/v2_1.rb', line 23

def service_names
    %w{compute}
end