class Fog::Rackspace::Orchestration::Mock
Public Class Methods
new(options)
click to toggle source
# File lib/fog/rackspace/orchestration.rb, line 92 def initialize(options) @rackspace_api_key = options[:rackspace_api_key] end
Public Instance Methods
get_stack_template(stack)
click to toggle source
# File lib/fog/rackspace/requests/orchestration/get_stack_template.rb, line 15 def get_stack_template(stack) end
list_resource_types()
click to toggle source
# File lib/fog/rackspace/requests/orchestration/list_resource_types.rb, line 15 def list_resource_types resources = self.data[:resource_types].values response(:body => { 'resource_types' => resources }) end
list_resources(stack)
click to toggle source
# File lib/fog/rackspace/requests/orchestration/list_resources.rb, line 12 def list_resources(stack) resources = self.data[:resources].values response(:body => { 'resources' => resources }) end
list_stack_data()
click to toggle source
# File lib/fog/rackspace/requests/orchestration/list_stack_data.rb, line 15 def list_stack_data stacks = self.data[:stacks].values response(:body => { 'stacks' => stacks }) end
list_stack_events()
click to toggle source
# File lib/fog/rackspace/requests/orchestration/list_resource_events.rb, line 12 def list_stack_events events = self.data[:events].values response(:body => { 'events' => events }) end
request(params)
click to toggle source
# File lib/fog/rackspace/orchestration.rb, line 96 def request(params) Fog::Mock.not_implemented end
response(params={})
click to toggle source
# File lib/fog/rackspace/orchestration.rb, line 100 def response(params={}) body = params[:body] || {} status = params[:status] || 200 headers = params[:headers] || {} response = Excon::Response.new(:body => body, :headers => headers, :status => status) if params.key?(:expects) && ![*params[:expects]].include?(response.status) raise(Excon::Errors.status_error(params, response)) else response end end
show_event_details(stack, event)
click to toggle source
# File lib/fog/rackspace/requests/orchestration/show_event_details.rb, line 15 def show_event_details(stack, event) events = self.data[:events].values response(:body => { 'events' => events }) end
show_resource_data(stack_name, stack_id, resource_name)
click to toggle source
# File lib/fog/rackspace/requests/orchestration/show_resource_data.rb, line 15 def show_resource_data(stack_name, stack_id, resource_name) resources = self.data[:resources].values response(:body => { 'resources' => resources }) end
show_resource_metadata(stack, resource_name)
click to toggle source
# File lib/fog/rackspace/requests/orchestration/show_resource_metadata.rb, line 15 def show_resource_metadata(stack, resource_name) resources = self.data[:resources].values response(:body => { 'resources' => resources }) end
show_resource_template(name)
click to toggle source
# File lib/fog/rackspace/requests/orchestration/show_resource_template.rb, line 15 def show_resource_template(name) end
show_stack_details(name, id)
click to toggle source
# File lib/fog/rackspace/requests/orchestration/show_stack_details.rb, line 15 def show_stack_details(name, id) stack = self.data[:stack].values response(:body => { 'stack' => stack }) end