Class: RightScaleCLI::Networks
- Inherits:
-
Thor
- Object
- Thor
- RightScaleCLI::Networks
- Defined in:
- lib/rightscale_cli/network/networks.rb
Overview
Represents Network Manager Networks
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ Networks
constructor
A new instance of Networks.
- #list ⇒ Object
Constructor Details
#initialize(*args) ⇒ Networks
Returns a new instance of Networks.
26 27 28 29 30 |
# File 'lib/rightscale_cli/network/networks.rb', line 26 def initialize(*args) super @client = RightScaleCLI::Client.new() @logger = RightScaleCLI::Logger.new end |
Class Method Details
.banner(task, _namespace = true, subcommand = false) ⇒ Object
57 58 59 |
# File 'lib/rightscale_cli/network/networks.rb', line 57 def self.(task, _namespace = true, subcommand = false) "#{basename} #{task.formatted_usage(self, true, subcommand)}" end |
Instance Method Details
#list ⇒ Object
46 47 48 49 50 51 52 53 54 55 |
# File 'lib/rightscale_cli/network/networks.rb', line 46 def list filter = [] @logger.debug "filter: #{filter}" if [:debug] networks = [] @client.client.networks.index(filter: filter).each do |network| networks.push(network) end @client.render(networks, 'networks') end |