Class: Knifecosmic::CosmicRouterList
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- Knifecosmic::CosmicRouterList
- Includes:
- Chef::Knife::KnifecosmicBaseList
- Defined in:
- lib/chef/knife/cosmic_router_list.rb
Instance Method Summary collapse
Methods included from Chef::Knife::KnifecosmicBaseList
included, #list_object, #list_object_fields, #output_format
Instance Method Details
#run ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/chef/knife/cosmic_router_list.rb', line 42 def run columns = [ 'Name :name', 'Account :account', 'Domain :domain', 'State :state', 'Address :publicip' ] params = { 'command' => "listRouters" } params['filter'] = locate_config_value(:filter) if locate_config_value(:filter) params['listall'] = locate_config_value(:listall) if locate_config_value(:listall) params['keyword'] = locate_config_value(:keyword) if locate_config_value(:keyword) params['name'] = locate_config_value(:name) if locate_config_value(:name) result = connection.list_object(params, "router") list_object(columns, result) end |