Sha256: 7ed627970e333534043fc7b3f56ebe08806792decaed4a2c0b697b6337fc88d9
Contents?: true
Size: 778 Bytes
Versions: 14
Compression:
Stored size: 778 Bytes
Contents
module Brightbox command [:"firewall-policies"] do |cmd| cmd.desc I18n.t("firewall.policies.destroy.desc") cmd.arg_name "[firewall-policy-id...]" cmd.command [:destroy] do |c| c.action do |_global_options, _options, args| raise "You must specify firewall-policy-id to destroy" if args.empty? firewall_policies = FirewallPolicy.find_or_call(args) do |id| raise "Couldn't find Firewall Policy #{id}" end firewall_policies.each do |firewall_policy| info "Destroying firewall policy #{firewall_policy}" begin firewall_policy.destroy rescue Brightbox::Api::Conflict error "Could not destroy #{firewall_policy}" end end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems