module Sfn::MonkeyPatch::Stack::Google::PretendStack
Helper module to allow nested stack behavior to function as expected internally within sfn
Public Instance Methods
events()
click to toggle source
Sub-stacks never provide events
# File lib/sfn/monkey_patch/stack/google.rb, line 36 def events collection = Miasma::Models::Orchestration::Stack::Events.new(self) collection.define_singleton_method(:perform_population) { [] } collection end
perform_template_load()
click to toggle source
disable template load
# File lib/sfn/monkey_patch/stack/google.rb, line 19 def perform_template_load Smash.new end
reload()
click to toggle source
disable reload
# File lib/sfn/monkey_patch/stack/google.rb, line 14 def reload self end
resources()
click to toggle source
only show resources associated to this stack
# File lib/sfn/monkey_patch/stack/google.rb, line 24 def resources collection = Miasma::Models::Orchestration::Stack::Resources.new(self) collection.define_singleton_method(:perform_population) do valid = stack.sparkleish_template.fetch(:resources, {}).keys stack.custom[:resources].find_all { |r| valid.include?(r[:name]) }.map do |attrs| Miasma::Models::Orchestration::Stack::Resource.new(stack, attrs).valid_state end end collection end