Sha256: be58f7698cd5698ec870c54f1415a8fd6ac799a17f23fcb720a6c93749ec1d59

Contents?: true

Size: 767 Bytes

Versions: 14

Compression:

Stored size: 767 Bytes

Contents

module Brightbox
  command [:cloudips] do |cmd|
    cmd.desc I18n.t("cloudips.show.desc")
    cmd.arg_name "cloudip-id..."
    cmd.command [:show] do |c|
      c.action do |global_options, _options, args|
        if args.empty?
          raise "You must specify the cloud ips you want to show"
        end

        ips = CloudIP.find_or_call(args) do |id|
          warn "Couldn't find Cloud IP #{id}"
        end

        fields = %i[
          id
          name
          status
          public_ipv4
          public_ipv6
          fqdn
          reverse_dns
          destination
          interface_id
          port_translators
        ]

        render_table(ips.compact, global_options.merge(:vertical => true, :fields => fields))
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
brightbox-cli-4.8.0 lib/brightbox-cli/commands/cloudips/show.rb
brightbox-cli-4.7.0 lib/brightbox-cli/commands/cloudips/show.rb
brightbox-cli-4.6.0 lib/brightbox-cli/commands/cloudips/show.rb
brightbox-cli-4.5.0 lib/brightbox-cli/commands/cloudips/show.rb
brightbox-cli-4.5.0.rc1 lib/brightbox-cli/commands/cloudips/show.rb
brightbox-cli-4.4.0 lib/brightbox-cli/commands/cloudips/show.rb
brightbox-cli-4.3.2 lib/brightbox-cli/commands/cloudips/show.rb
brightbox-cli-4.3.1 lib/brightbox-cli/commands/cloudips/show.rb
brightbox-cli-4.3.0 lib/brightbox-cli/commands/cloudips/show.rb
brightbox-cli-4.2.1 lib/brightbox-cli/commands/cloudips/show.rb
brightbox-cli-4.2.0 lib/brightbox-cli/commands/cloudips/show.rb
brightbox-cli-4.1.0 lib/brightbox-cli/commands/cloudips/show.rb
brightbox-cli-4.0.0 lib/brightbox-cli/commands/cloudips/show.rb
brightbox-cli-4.0.0.rc2 lib/brightbox-cli/commands/cloudips/show.rb