Changeset 283
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r282 r283 2731 2731 2732 2732 my $format = 'txt'; 2733 my $modulo = 0; 2733 2734 2734 2735 GetOptions( 2735 2736 'format|f=s' => \$format, 2737 'modulo|m=i' => \$modulo, 2736 2738 ); 2737 2739 … … 2743 2745 $format = 'txt' if not defined $possible_format{$format}; 2744 2746 2745 $possible_format{$format}->( @ARGV);2747 $possible_format{$format}->($modulo, @ARGV); 2746 2748 return; 2747 2749 } … … 2790 2792 #--------------------------------------------------------------- 2791 2793 sub cmd_exportsw_dot { 2794 my $modulo = shift; 2792 2795 2793 2796 my $switch_connection = YAML::Syck::LoadFile("$KLASK_SW_FILE"); … … 2873 2876 print "\"$sw:$port_connect\" -> \"$sw\" [len=2, style=bold, color=$color, arrowhead=normal, arrowtail=inv];\n"; 2874 2877 2875 $db_switch_line{$sw}++;2878 #$db_switch_line{$sw}++; 2876 2879 #if ($db_switch_line{$sw} % 9 == 0) { 2877 2880 # # Create invisible node … … 2919 2922 printf " \"%s:%s\" -> \"%s:%s\" [style=$style, color=$color];\n", $sw, $db_switch_output_port{$sw}, $sw_connect, $port_connect; 2920 2923 2921 if ($db_switch_line{$sw_connect} % 9 == 0) { 2924 next if $modulo == 0; # No shift (invisible nodes) in graph 2925 $db_switch_line{$sw_connect}++; 2926 if ($db_switch_line{$sw_connect} % $modulo == 0) { 2922 2927 # Create invisible node 2923 2928 $invisible_node++; -
trunk/push-web
r202 r283 45 45 46 46 47 $KLASK exportsw --format dot > ${TMP}/switch-map.txt47 $KLASK exportsw --format dot --modulo 9 > ${TMP}/switch-map.txt 48 48 49 49
Note: See TracChangeset
for help on using the changeset viewer.