# File lib/rudy/cli/networks.rb, line 14 def create_networks Rudy::Routines::Handlers::Group.create rescue nil networks end
# File lib/rudy/cli/networks.rb, line 19 def destroy_networks Rudy::Routines::Handlers::Group.destroy rescue nil end
# File lib/rudy/cli/networks.rb, line 28 def local_networks ea = Rudy::Utils::external_ip_address || '' ia = Rudy::Utils::internal_ip_address || '' if @global.quiet li ia unless @option.external && !@option.internal li ea unless @option.internal && !@option.external else li "%10s: %s" % ['Internal', ia] unless @option.external && !@option.internal li "%10s: %s" % ['External', ea] unless @option.internal && !@option.external end @global.quiet = true # don't print elapsed time end
# File lib/rudy/cli/networks.rb, line 42 def modify_group_valid? if @option.owner == 'self' raise "AWS_ACCOUNT_NUMBER not set" unless @@global.accountnum @option.owner = @@global.accountnum end if (@option.addresses || @option.ports) && (@option.group || @option.owner) raise Drydock::OptError.new('', @alias, "Cannot mix group and network authorization") end if @option.owner && !@option.group raise Drydock::OptError.new('', @alias, "Must provide -g with -o") end true end
# File lib/rudy/cli/networks.rb, line 7 def networks name = current_group_name Rudy::AWS::EC2::Groups.list(name).each do |group| li @@global.verbose > 0 ? group.inspect : group.dump(@@global.format) end end
# File lib/rudy/cli/networks.rb, line 59 def revoke_networks; modify_group(:revoke); end
Generated with the Darkfish Rdoc Generator 2.