Jacob Erlbeck | ae15a2c | 2013-08-06 14:29:14 +0200 | [diff] [blame] | 1 | Going to test vty_cmd_string_from_valstr() |
Jacob Erlbeck | cd195fa | 2013-08-06 14:29:15 +0200 | [diff] [blame] | 2 | Tested with %s-strings, resulting cmd = '[prefix%s%s%s%s%s][foo%s%s%s%s%s][sep%s%s%s%s%s][bar%s%s%s%s%s][end%s%s%s%s%s]' |
Jacob Erlbeck | 0c987bd | 2013-09-06 16:52:00 +0200 | [diff] [blame] | 3 | Going to test VTY node tree structure |
| 4 | Going to execute 'enable' |
| 5 | Returned: 0, Current node: 3 '%s# ' |
| 6 | Going to execute 'configure terminal' |
| 7 | Returned: 0, Current node: 4 '%s(config)# ' |
| 8 | Going to execute 'exit' |
| 9 | Returned: 0, Current node: 3 '%s# ' |
| 10 | Going to execute 'configure terminal' |
| 11 | Returned: 0, Current node: 4 '%s(config)# ' |
| 12 | Going to execute 'end' |
| 13 | Returned: 0, Current node: 3 '%s# ' |
| 14 | Going to execute 'configure terminal' |
| 15 | Returned: 0, Current node: 4 '%s(config)# ' |
| 16 | Going to execute 'log stderr' |
| 17 | Returned: 0, Current node: 7 '%s(config-log)# ' |
| 18 | Going to execute 'exit' |
| 19 | Returned: 0, Current node: 4 '%s(config)# ' |
| 20 | Going to execute 'log stderr' |
| 21 | Returned: 0, Current node: 7 '%s(config-log)# ' |
| 22 | Going to execute 'end' |
| 23 | Returned: 0, Current node: 3 '%s# ' |
| 24 | Going to execute 'configure terminal' |
| 25 | Returned: 0, Current node: 4 '%s(config)# ' |
| 26 | Going to execute 'line vty' |
Jacob Erlbeck | adc900e | 2015-10-20 19:05:52 +0200 | [diff] [blame] | 27 | Returned: 0, Current node: 9 '%s(config-line)# ' |
Jacob Erlbeck | 0c987bd | 2013-09-06 16:52:00 +0200 | [diff] [blame] | 28 | Going to execute 'exit' |
| 29 | Returned: 0, Current node: 4 '%s(config)# ' |
| 30 | Going to execute 'line vty' |
Jacob Erlbeck | adc900e | 2015-10-20 19:05:52 +0200 | [diff] [blame] | 31 | Returned: 0, Current node: 9 '%s(config-line)# ' |
Jacob Erlbeck | 0c987bd | 2013-09-06 16:52:00 +0200 | [diff] [blame] | 32 | Going to execute 'end' |
| 33 | Returned: 0, Current node: 3 '%s# ' |
| 34 | Going to execute 'configure terminal' |
| 35 | Returned: 0, Current node: 4 '%s(config)# ' |
| 36 | Going to execute 'log stderr' |
| 37 | Returned: 0, Current node: 7 '%s(config-log)# ' |
| 38 | Going to execute 'line vty' |
Jacob Erlbeck | adc900e | 2015-10-20 19:05:52 +0200 | [diff] [blame] | 39 | Returned: 0, Current node: 9 '%s(config-line)# ' |
Jacob Erlbeck | 0c987bd | 2013-09-06 16:52:00 +0200 | [diff] [blame] | 40 | Going to execute 'log stderr' |
| 41 | Returned: 0, Current node: 7 '%s(config-log)# ' |
| 42 | Going to execute 'end' |
| 43 | Returned: 0, Current node: 3 '%s# ' |
| 44 | Going to execute 'exit' |
| 45 | Returned: 0, Current node: 3 '%s# ' |
Jacob Erlbeck | be37fb7 | 2015-11-03 15:21:34 +0100 | [diff] [blame] | 46 | Going to test VTY configuration of the stats subsystem |
| 47 | Going to execute 'enable' |
| 48 | Returned: 0, Current node: 3 '%s# ' |
| 49 | Going to execute 'configure terminal' |
| 50 | Returned: 0, Current node: 4 '%s(config)# ' |
| 51 | Going to execute 'stats reporter foobar' |
| 52 | Returned: 2, Current node: 4 '%s(config)# ' |
| 53 | Going to execute 'stats interval 42' |
| 54 | Returned: 0, Current node: 4 '%s(config)# ' |
| 55 | Going to execute 'stats reporter log' |
| 56 | Returned: 0, Current node: 8 '%s(config-stats)# ' |
| 57 | Going to execute 'prefix myprefix' |
| 58 | Returned: 0, Current node: 8 '%s(config-stats)# ' |
| 59 | Going to execute 'no prefix' |
| 60 | Returned: 0, Current node: 8 '%s(config-stats)# ' |
| 61 | Going to execute 'level peer' |
| 62 | Returned: 0, Current node: 8 '%s(config-stats)# ' |
| 63 | Going to execute 'level subscriber' |
| 64 | Returned: 0, Current node: 8 '%s(config-stats)# ' |
| 65 | Going to execute 'level global' |
| 66 | Returned: 0, Current node: 8 '%s(config-stats)# ' |
| 67 | Going to execute 'level foobar' |
| 68 | Returned: 2, Current node: 8 '%s(config-stats)# ' |
| 69 | Going to execute 'enable' |
| 70 | Returned: 0, Current node: 8 '%s(config-stats)# ' |
| 71 | Going to execute 'disable' |
| 72 | Returned: 0, Current node: 8 '%s(config-stats)# ' |
| 73 | Going to execute 'exit' |
| 74 | Returned: 0, Current node: 4 '%s(config)# ' |
| 75 | Going to execute 'stats reporter statsd' |
| 76 | Returned: 0, Current node: 8 '%s(config-stats)# ' |
| 77 | Going to execute 'prefix myprefix' |
| 78 | Returned: 0, Current node: 8 '%s(config-stats)# ' |
| 79 | Going to execute 'no prefix' |
| 80 | Returned: 0, Current node: 8 '%s(config-stats)# ' |
| 81 | Going to execute 'level peer' |
| 82 | Returned: 0, Current node: 8 '%s(config-stats)# ' |
| 83 | Going to execute 'level subscriber' |
| 84 | Returned: 0, Current node: 8 '%s(config-stats)# ' |
| 85 | Going to execute 'level global' |
| 86 | Returned: 0, Current node: 8 '%s(config-stats)# ' |
| 87 | Going to execute 'level foobar' |
| 88 | Returned: 2, Current node: 8 '%s(config-stats)# ' |
| 89 | Going to execute 'remote-ip 127.0.0.99' |
| 90 | Returned: 0, Current node: 8 '%s(config-stats)# ' |
| 91 | Going to execute 'remote-ip 678.0.0.99' |
| 92 | Returned: 1, Current node: 8 '%s(config-stats)# ' |
| 93 | Going to execute 'remote-port 12321' |
| 94 | Returned: 0, Current node: 8 '%s(config-stats)# ' |
| 95 | Going to execute 'local-ip 127.0.0.98' |
| 96 | Returned: 0, Current node: 8 '%s(config-stats)# ' |
| 97 | Going to execute 'no local-ip' |
| 98 | Returned: 0, Current node: 8 '%s(config-stats)# ' |
| 99 | Going to execute 'mtu 987' |
| 100 | Returned: 0, Current node: 8 '%s(config-stats)# ' |
| 101 | Going to execute 'no mtu' |
| 102 | Returned: 0, Current node: 8 '%s(config-stats)# ' |
| 103 | Going to execute 'enable' |
| 104 | Returned: 0, Current node: 8 '%s(config-stats)# ' |
| 105 | Going to execute 'disable' |
| 106 | Returned: 0, Current node: 8 '%s(config-stats)# ' |
| 107 | Going to execute 'exit' |
| 108 | Returned: 0, Current node: 4 '%s(config)# ' |
| 109 | Going to execute 'no stats reporter log' |
| 110 | Returned: 0, Current node: 4 '%s(config)# ' |
| 111 | Going to execute 'no stats reporter statsd' |
| 112 | Returned: 0, Current node: 4 '%s(config)# ' |
Jacob Erlbeck | ae15a2c | 2013-08-06 14:29:14 +0200 | [diff] [blame] | 113 | All tests passed |