Sha256: d49bce07acc5e6c7f57d4f2b8c66245c1efdff977daf1a4b6a04d2c5f79d0584
Contents?: true
Size: 741 Bytes
Versions: 4
Compression:
Stored size: 741 Bytes
Contents
module Brightbox command [:"firewall-rules"] do |cmd| cmd.desc "Destroy Firewall Rule" cmd.arg_name "[firewall-rule-id...]" cmd.command [:destroy] do |c| c.action do |global_options, options, args| raise "You must specify firewall-rule-id to destroy" if args.empty? firewall_rules = FirewallRule.find_or_call(args) do |id| raise "Couldn't find Firewall Rule #{id}" end firewall_rules.each do |firewall_rule| info "Destroying firewall rule #{firewall_rule}" begin firewall_rule.destroy rescue Brightbox::Api::Conflict => e error "Could not destroy #{firewall_rule}" end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems