Class: Fog::Terremark::Vcloud::Mock

Inherits:
Object
  • Object
show all
Includes:
Shared::Mock, Shared::Parser
Defined in:
lib/rackspace-fog/terremark/vcloud.rb

Instance Method Summary collapse

Methods included from Shared::Parser

#parse

Methods included from Shared::Mock

#addresses, error_headers, #get_network, #get_organization, #get_organizations, #get_public_ips, #get_vdc, headers, mock_data, #networks, #servers, status, #tasks, unathorized_status, #vdcs

Methods included from Shared::Common

#default_organization_id

Constructor Details

#initialize(option = {}) ⇒ Mock

Returns a new instance of Mock.



103
104
105
106
107
108
109
110
# File 'lib/rackspace-fog/terremark/vcloud.rb', line 103

def initialize(option = {})
  super
  @base_url = Fog::Terremark::Vcloud::Defaults::SCHEME + "://" +
              Fog::Terremark::Vcloud::Defaults::HOST +
              Fog::Terremark::Vcloud::Defaults::PATH

  @terremark_username = options[:terremark_vcloud_username]
end

Instance Method Details

#dataObject



112
113
114
# File 'lib/rackspace-fog/terremark/vcloud.rb', line 112

def data
  self.class.data[@terremark_username]
end

#reset_dataObject



116
117
118
# File 'lib/rackspace-fog/terremark/vcloud.rb', line 116

def reset_data
  self.class.data.delete(@terremark_username)
end