Sha256: 32eab48d58a77f7bb9b1ffbe893f98c6faa4d0e429adfad2655a6feedac25bc9

Contents?: true

Size: 645 Bytes

Versions: 11

Compression:

Stored size: 645 Bytes

Contents

require 'chef/knife/joyent_base'

class Chef
  class Knife
    class JoyentNetworkList < Knife
      include Knife::JoyentBase

      banner "knife joyent network list"

      def run
        networks = [
          ui.color('ID', :bold),
          ui.color('Name', :bold),
          ui.color(''),
        ]

        self.connection.networks.each do |network|
          networks << network.id
          networks << network.name
          networks << (network.public ? 'public' : 'private')
        end

        puts ui.list(networks, :uneven_columns_across, 3)
        exit 0
      rescue => e
        output_error(e)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
knife-joyent-0.4.14 lib/chef/knife/joyent_network_list.rb
knife-joyent-0.4.12 lib/chef/knife/joyent_network_list.rb
knife-joyent-0.4.11 lib/chef/knife/joyent_network_list.rb
knife-joyent-0.4.10 lib/chef/knife/joyent_network_list.rb
knife-joyent-0.4.9 lib/chef/knife/joyent_network_list.rb
knife-joyent-0.4.8 lib/chef/knife/joyent_network_list.rb
knife-joyent-0.4.5 lib/chef/knife/joyent_network_list.rb
knife-joyent-0.4.4 lib/chef/knife/joyent_network_list.rb
knife-joyent-0.4.3 lib/chef/knife/joyent_network_list.rb
knife-joyent-0.4.2 lib/chef/knife/joyent_network_list.rb
knife-joyent-0.4.1 lib/chef/knife/joyent_network_list.rb