Changeset 374 for trunk


Ignore:
Timestamp:
Jan 4, 2018, 1:44:38 PM (6 years ago)
Author:
g7moreau
Message:
  • Add switch description list when export switch db
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/klask

    r372 r374  
    30593059   my $switch_connection = YAML::Syck::LoadFile("$KLASK_SW_FILE");
    30603060
     3061   {
     3062      my %db_switch_global = %{$switch_connection->{'switch_db'}};
     3063      my $arrow            = '0--------->>>>';
     3064
     3065      my $tb_desc = Text::Table->new(
     3066         {align => 'left',   align_title => 'left',   title => 'Switch'},
     3067         {align => 'center', align_title => 'center', title => 'Is'},
     3068         {align => 'left',   align_title => 'left',   title => 'Description'},
     3069         {align => 'left',   align_title => 'left',   title => 'Model'},
     3070         {align => 'left',   align_title => 'left',   title => 'Revision'},
     3071         );
     3072
     3073      for my $sw (values %db_switch_global) {
     3074         $tb_desc->add($sw->{'hostname'}, $arrow, $sw->{'description'}, $sw->{'model'}, $sw->{'revision'});
     3075         }
     3076
     3077      print $tb_desc->title();
     3078      print $tb_desc->rule('-');
     3079      print $tb_desc->body();
     3080      $tb_desc->clear;
     3081      }
     3082
    30613083   my %db_switch_output_port       = %{$switch_connection->{'output_port'}};
    30623084   my %db_switch_parent            = %{$switch_connection->{'parent'}};
Note: See TracChangeset for help on using the changeset viewer.