Sha256: d57f6eb8bd9f636d51d37e00ccc7e433a9955f23ce45fd1497c2f4bc62f95ece

Contents?: true

Size: 716 Bytes

Versions: 9

Compression:

Stored size: 716 Bytes

Contents

module Rivet
  class Client
    def initialize
    end

    def run(options)
      AwsUtils.set_aws_credentials(options[:profile])
      Rivet::Log.level(options[:log_level])
      Rivet::Utils.ensure_minimum_setup

      group_def = Rivet::Utils.get_definition(options[:group])

      Rivet::Utils.die "The #{options[:group]} definition doesn't exist" unless group_def

      Rivet::Log.info("Checking #{options[:group]} autoscaling definition")
      autoscale_def = Rivet::Autoscale.new(options[:group],group_def)
      autoscale_def.show_differences

      if options[:sync]
        autoscale_def.sync
      else
        Rivet::Log.info("use the -s [--sync] flag to sync changes")
      end

    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rivet-1.0.8 lib/rivet/client.rb
rivet-1.0.7 lib/rivet/client.rb
rivet-1.0.6 lib/rivet/client.rb
rivet-1.0.5 lib/rivet/client.rb
rivet-1.0.4 lib/rivet/client.rb
rivet-1.0.3 lib/rivet/client.rb
rivet-1.0.2 lib/rivet/client.rb
rivet-1.0.1 lib/rivet/client.rb
rivet-1.0.0 lib/rivet/client.rb