Sha256: 8f75d35bb1c05eda0b1fe547636ec5cd180ff578d4fa7046a538f287e39d40c0

Contents?: true

Size: 514 Bytes

Versions: 10

Compression:

Stored size: 514 Bytes

Contents

module Brightbox
  desc 'Create a server group'
  command [:create] do |c|
    c.desc "Name of Server Group"
    c.flag [:n, :name]

    c.desc "Server group description"
    c.flag [:d, :description]

    c.action do |global_options, options, args|
      params = {}

      params[:name] = options[:n] if options[:n]
      params[:description] = options[:d] if options[:d]

      info "Creating a new server group"
      sg = ServerGroup.create(params)
      render_table([sg], global_options)
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
brightbox-cli-0.18.1 lib/brightbox-cli/commands/groups-create.rb
brightbox-cli-0.18.0 lib/brightbox-cli/commands/groups-create.rb
brightbox-cli-0.17.5 lib/brightbox-cli/commands/groups-create.rb
brightbox-cli-0.17.4 lib/brightbox-cli/commands/groups-create.rb
brightbox-cli-0.17.3 lib/brightbox-cli/commands/groups-create.rb
brightbox-cli-0.17.2 lib/brightbox-cli/commands/groups-create.rb
brightbox-cli-0.17.1 lib/brightbox-cli/commands/groups-create.rb
brightbox-cli-0.17.0 lib/brightbox-cli/commands/groups-create.rb
brightbox-cli-0.16.0 lib/brightbox-cli/commands/groups-create.rb
brightbox-cli-0.15.0 lib/brightbox-cli/commands/groups-create.rb