Sha256: e57a2b64792980cd27f758f0d304989e8f7be6b883d903e9e5785c84bc1857fc

Contents?: true

Size: 644 Bytes

Versions: 9

Compression:

Stored size: 644 Bytes

Contents

module Brightbox
  desc 'Show Firewall Rule'
  arg_name 'firewall-rule-id'
  command [:show] do |c|
    c.action do |global_options, options, args|
      raise "You must specify server groups to show" if args.empty?

      policies = FirewallRule.find_or_call(args) do |id|
        raise "Couldn't find Firewall Rule #{id}"
      end

      display_options = { :fields => [
          :id, :protocol,:source, :sport, :destination, :dport, :icmp_type, :firewall_policy, :description
        ],
        :vertical => true
      }
      table_opts = global_options.update(display_options)
      render_table(policies, table_opts)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
brightbox-cli-0.18.1 lib/brightbox-cli/commands/firewall-rules-show.rb
brightbox-cli-0.18.0 lib/brightbox-cli/commands/firewall-rules-show.rb
brightbox-cli-0.17.5 lib/brightbox-cli/commands/firewall-rules-show.rb
brightbox-cli-0.17.4 lib/brightbox-cli/commands/firewall-rules-show.rb
brightbox-cli-0.17.3 lib/brightbox-cli/commands/firewall-rules-show.rb
brightbox-cli-0.17.2 lib/brightbox-cli/commands/firewall-rules-show.rb
brightbox-cli-0.17.1 lib/brightbox-cli/commands/firewall-rules-show.rb
brightbox-cli-0.17.0 lib/brightbox-cli/commands/firewall-rules-show.rb
brightbox-cli-0.16.0 lib/brightbox-cli/commands/firewall-rules-show.rb