Sha256: 2a985b9c135234d284e225ae399ba71976c5622ff39ae281cb3252d492d1de93

Contents?: true

Size: 603 Bytes

Versions: 8

Compression:

Stored size: 603 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
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
knife-joyent-0.4.0 lib/chef/knife/joyent_network_list.rb
knife-joyent-0.3.6 lib/chef/knife/joyent_network_list.rb
knife-joyent-0.3.5 lib/chef/knife/joyent_network_list.rb
knife-joyent-0.3.4 lib/chef/knife/joyent_network_list.rb
knife-joyent-0.3.3 lib/chef/knife/joyent_network_list.rb
knife-joyent-0.3.2 lib/chef/knife/joyent_network_list.rb
knife-joyent-0.3.1 lib/chef/knife/joyent_network_list.rb
knife-joyent-0.3.0 lib/chef/knife/joyent_network_list.rb