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.2.12 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.11 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.10 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.9 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.8 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.7 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.6 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.5 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.4 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.3 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.2 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.1 example/stacks/tasks/lookup_vpc_task.rb
convection-2.2.0 example/stacks/tasks/lookup_vpc_task.rb
convection-2.1.2 example/stacks/tasks/lookup_vpc_task.rb
convection-2.1.1 example/stacks/tasks/lookup_vpc_task.rb
convection-2.1.0 example/stacks/tasks/lookup_vpc_task.rb
convection-2.0.0 example/stacks/tasks/lookup_vpc_task.rb
convection-1.1.7 example/stacks/tasks/lookup_vpc_task.rb
convection-1.1.5 example/stacks/tasks/lookup_vpc_task.rb
convection-1.1.4 example/stacks/tasks/lookup_vpc_task.rb