Sha256: d445511ca87e00e6ae1187bb4bef5d0808e2552196bfebc68abd37ad3d9b40f3
Contents?: true
Size: 883 Bytes
Versions: 43
Compression:
Stored size: 883 Bytes
Contents
module Brightbox command [:groups] do |cmd| cmd.desc I18n.t("groups.update.desc") cmd.arg_name "grp-id" cmd.command [:update] do |c| c.desc I18n.t("options.name.desc") c.flag [:n, :name] c.desc I18n.t("options.description.desc") c.flag [:d, :description] c.action do |global_options, options, args| grp_id = args.shift raise "You must specify the server group to update as the first argument" unless grp_id =~ /^grp-/ params = NilableHash.new if options[:n] params[:name] = options[:n] end if options[:d] params[:description] = options[:d] end params.nilify_blanks sg = ServerGroup.find grp_id info "Updating server group #{sg}" sg = sg.update(params) render_table([sg], global_options) end end end end
Version data entries
43 entries across 43 versions & 1 rubygems