Sha256: 595c1026bffd2acda4627216e942a11ca7257118c07d322c833366d2d82ee785

Contents?: true

Size: 587 Bytes

Versions: 4

Compression:

Stored size: 587 Bytes

Contents

module Brightbox
  command [:groups] do |cmd|

    cmd.desc "Create a server group"
    cmd.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
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
brightbox-cli-1.1.0 lib/brightbox-cli/commands/groups-create.rb
brightbox-cli-1.0.0 lib/brightbox-cli/commands/groups-create.rb
brightbox-cli-1.0.0.rc2 lib/brightbox-cli/commands/groups-create.rb
brightbox-cli-1.0.0.rc1 lib/brightbox-cli/commands/groups-create.rb