Sha256: b2b3288fbcbfaab5e771a7aa64ad4f5ff9db42821a81b1590ddbf75d7696e149

Contents?: true

Size: 561 Bytes

Versions: 10

Compression:

Stored size: 561 Bytes

Contents

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

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

      table_opts = global_options.update(:vertical => true,
                                  :fields => [:id, :server_group, :default,:name, :description])

      render_table(policies, table_opts)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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