Class: OpenStack::Nova::Compute::BaseDetail

Inherits:
Base show all
Defined in:
lib/open_stack/nova/compute/base_detail.rb

Overview

:nodoc:

Direct Known Subclasses

Flavor, Image, Server

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

site, site=

Methods inherited from Common

custom_method_collection_url, element_path

Methods inherited from Base

headers

Methods inherited from ActiveResource::Base

#load

Class Method Details

.collection_path(prefix_options = {}, query_options = nil) ⇒ Object

Overrides ActiveResource::Base::collection_path to add /details to resource path for servers and to remove .<extension>



26
27
28
29
30
31
# File 'lib/open_stack/nova/compute/base_detail.rb', line 26

def self.collection_path(prefix_options = {}, query_options = nil)
  check_prefix_options(prefix_options)

  prefix_options, query_options = split_options(prefix_options) if query_options.nil?
  "#{prefix(prefix_options)}#{collection_name}/detail#{query_string(query_options)}"
end

.collection_path_create(prefix_options = {}, query_options = nil) ⇒ Object



33
34
35
36
37
38
# File 'lib/open_stack/nova/compute/base_detail.rb', line 33

def self.collection_path_create(prefix_options = {}, query_options = nil)
  check_prefix_options(prefix_options)

  prefix_options, query_options = split_options(prefix_options) if query_options.nil?
  "#{prefix(prefix_options)}#{collection_name}#{query_string(query_options)}"
end

Instance Method Details

#collection_path_create(options = nil) ⇒ Object



40
41
42
# File 'lib/open_stack/nova/compute/base_detail.rb', line 40

def collection_path_create(options = nil)
  self.class.collection_path_create(options || prefix_options)
end