Sha256: cae8c2eeda884750d0f2e27b7259159182e1fa203c974e68846a26b7d1be3b3f

Contents?: true

Size: 622 Bytes

Versions: 67

Compression:

Stored size: 622 Bytes

Contents

# tasks/lookup_vpc_task.rb
module Tasks
  class LookupVpcTask
    # REQUIRED: Convection expects tasks to respond to #call.
    def call(stack)
      @vpc_id = stack.get('vpc', 'id')
      @result = vpc_found?
    end

    # REQUIRED: Convection expects tasks to respond to #success?.
    def success?
      @result
    end

    # OPTIONAL: Convection emits the task as `task.to_s` in certain log messages.
    def to_s
      return 'VPC lookup' unless @vpc_id

      "VPC lookup of #{@vpc_id.inspect}"
    end

    private

    def vpc_found?
      true # XXX: This could be a call to the aws-sdk APIs.
    end
  end
end

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
convection-2.3.1 example/stacks/tasks/lookup_vpc_task.rb
convection-2.3.0 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.29 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.28.pre.beta.2 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.28.pre.beta.1 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.27 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.26 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.25 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.24 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.23 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.22 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.21 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.20 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.19 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.18 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.17 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.16 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.15 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.14 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.13 example/stacks/tasks/lookup_vpc_task.rb