Sha256: 854fb4b68b93bf2334b73937dbf91e995d8d7afb45987270dd791419f4876287

Contents?: true

Size: 502 Bytes

Versions: 4

Compression:

Stored size: 502 Bytes

Contents

module VagrantPlugins
  module Rackspace
    module Action
      class ListFlavors
        def initialize(app, env)
          @app = app
        end

        def call(env)
          compute_service = env[:rackspace_compute]
          env[:ui].info ('%-36s %s' % ['Flavor ID', 'Flavor Name'])
          compute_service.flavors.sort_by(&:id).each do |flavor|
            env[:ui].info ('%-36s %s' % [flavor.id, flavor.name])
          end
          @app.call(env)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vagrant-rackspace-0.1.10 lib/vagrant-rackspace/action/list_flavors.rb
vagrant-rackspace-0.1.9 lib/vagrant-rackspace/action/list_flavors.rb
vagrant-rackspace-0.1.8 lib/vagrant-rackspace/action/list_flavors.rb
vagrant-rackspace-0.1.7 lib/vagrant-rackspace/action/list_flavors.rb