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-1.1.3 example/stacks/tasks/lookup_vpc_task.rb
convection-1.1.2 example/stacks/tasks/lookup_vpc_task.rb
convection-1.1.1 example/stacks/tasks/lookup_vpc_task.rb
convection-1.1.0 example/stacks/tasks/lookup_vpc_task.rb
convection-1.0.7 example/stacks/tasks/lookup_vpc_task.rb
convection-1.0.6 example/stacks/tasks/lookup_vpc_task.rb
convection-1.0.5 example/stacks/tasks/lookup_vpc_task.rb
convection-1.0.4 example/stacks/tasks/lookup_vpc_task.rb
convection-1.0.3 example/stacks/tasks/lookup_vpc_task.rb
convection-1.0.2 example/stacks/tasks/lookup_vpc_task.rb
convection-1.0.1 example/stacks/tasks/lookup_vpc_task.rb
convection-1.0.0.pre.beta.10 example/stacks/tasks/lookup_vpc_task.rb
convection-1.0.0.pre.beta.9 example/stacks/tasks/lookup_vpc_task.rb
convection-1.0.0.pre.beta.8 example/stacks/tasks/lookup_vpc_task.rb
convection-1.0.0.pre.beta.7 example/stacks/tasks/lookup_vpc_task.rb
convection-1.0.0.pre.beta.6 example/stacks/tasks/lookup_vpc_task.rb
convection-1.0.0.pre.beta.4 example/stacks/tasks/lookup_vpc_task.rb
convection-1.0.0.pre.beta.1 example/stacks/tasks/lookup_vpc_task.rb
convection-0.4.3 example/stacks/tasks/lookup_vpc_task.rb
convection-0.4.2 example/stacks/tasks/lookup_vpc_task.rb