Class: Fog::Linode::Compute::Mock
- Inherits:
-
Object
- Object
- Fog::Linode::Compute::Mock
- Defined in:
- lib/fog/compute/linode.rb,
lib/fog/compute/requests/linode/linode_list.rb,
lib/fog/compute/requests/linode/avail_kernels.rb,
lib/fog/compute/requests/linode/linode_create.rb,
lib/fog/compute/requests/linode/linode_delete.rb,
lib/fog/compute/requests/linode/linode_reboot.rb,
lib/fog/compute/requests/linode/avail_datacenters.rb,
lib/fog/compute/requests/linode/avail_linodeplans.rb,
lib/fog/compute/requests/linode/avail_stackscripts.rb,
lib/fog/compute/requests/linode/avail_distributions.rb
Overview
request :linode_resize request :linode_shutdown request :linode_update
Class Method Summary collapse
Instance Method Summary collapse
- #avail_datacenters ⇒ Object
- #avail_distributions(options = {}) ⇒ Object
- #avail_kernels(options = {}) ⇒ Object
- #avail_linodeplans(linodeplan_id = nil) ⇒ Object
- #avail_stackscripts(options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ Mock
constructor
A new instance of Mock.
- #linode_create(datacenter_id, payment_term, plan_id) ⇒ Object
- #linode_delete(linode_id, options = {}) ⇒ Object
- #linode_list(options = {}) ⇒ Object
- #linode_reboot(linode_id, options = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Mock
Returns a new instance of Mock.
40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/fog/compute/linode.rb', line 40 def initialize(={}) unless .delete(:provider) location = caller.first warning = "[yellow][WARN] Fog::Linode::Compute.new is deprecated, use Fog::Compute.new(:provider => 'Linode') instead[/]" warning << " [light_black](" << location << ")[/] " Formatador.display_line(warning) end @linode_api_key = [:linode_api_key] @data = self.class.data[@linode_api_key] end |
Class Method Details
.data ⇒ Object
28 29 30 31 32 |
# File 'lib/fog/compute/linode.rb', line 28 def self.data @data ||= Hash.new do |hash, key| hash[key] = {} end end |
.reset_data(keys = data.keys) ⇒ Object
34 35 36 37 38 |
# File 'lib/fog/compute/linode.rb', line 34 def self.reset_data(keys=data.keys) for key in [*keys] data.delete(key) end end |
Instance Method Details
#avail_datacenters ⇒ Object
24 25 26 |
# File 'lib/fog/compute/requests/linode/avail_datacenters.rb', line 24 def avail_datacenters Fog::Mock.not_implemented end |
#avail_distributions(options = {}) ⇒ Object
31 32 33 |
# File 'lib/fog/compute/requests/linode/avail_distributions.rb', line 31 def avail_distributions(={}) Fog::Mock.not_implemented end |
#avail_kernels(options = {}) ⇒ Object
29 30 31 |
# File 'lib/fog/compute/requests/linode/avail_kernels.rb', line 29 def avail_kernels(={}) Fog::Mock.not_implemented end |
#avail_linodeplans(linodeplan_id = nil) ⇒ Object
28 29 30 |
# File 'lib/fog/compute/requests/linode/avail_linodeplans.rb', line 28 def avail_linodeplans(linodeplan_id = nil) Fog::Mock.not_implemented end |
#avail_stackscripts(options = {}) ⇒ Object
30 31 32 |
# File 'lib/fog/compute/requests/linode/avail_stackscripts.rb', line 30 def avail_stackscripts(={}) Fog::Mock.not_implemented end |
#linode_create(datacenter_id, payment_term, plan_id) ⇒ Object
34 35 36 |
# File 'lib/fog/compute/requests/linode/linode_create.rb', line 34 def linode_create(datacenter_id, payment_term, plan_id) Fog::Mock.not_implemented end |
#linode_delete(linode_id, options = {}) ⇒ Object
29 30 31 |
# File 'lib/fog/compute/requests/linode/linode_delete.rb', line 29 def linode_delete(linode_id, ={}) Fog::Mock.not_implemented end |
#linode_list(options = {}) ⇒ Object
31 32 33 |
# File 'lib/fog/compute/requests/linode/linode_list.rb', line 31 def linode_list(={}) Fog::Mock.not_implemented end |
#linode_reboot(linode_id, options = {}) ⇒ Object
29 30 31 |
# File 'lib/fog/compute/requests/linode/linode_reboot.rb', line 29 def linode_reboot(linode_id, ={}) Fog::Mock.not_implemented end |