Srikanth Vavilapalli | 1725e49 | 2014-12-01 17:50:52 -0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2013 Big Switch Networks, Inc. |
| 3 | # |
| 4 | # Licensed under the Eclipse Public License, Version 1.0 (the |
| 5 | # "License"); you may not use this file except in compliance with the |
| 6 | # License. You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.eclipse.org/legal/epl-v10.html |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| 13 | # implied. See the License for the specific language governing |
| 14 | # permissions and limitations under the License. |
| 15 | # |
| 16 | |
| 17 | # |
| 18 | # (c) in 2012 by Big Switch Networks |
| 19 | # All rights reserved |
| 20 | # |
| 21 | |
| 22 | # |
| 23 | # show tech-support |
| 24 | # |
| 25 | ## Command table for show tech-support command |
| 26 | tech_support_commands = [ |
| 27 | ['cli', 'show version', None], |
| 28 | ['cli', 'show controller-node localhost summary', None], |
| 29 | ['cli', 'show clock', None], |
| 30 | ['cli', 'show config', None], |
| 31 | ['cli', 'show config-file', None], |
| 32 | ['cli', 'show controller-node', None], |
| 33 | ['cli', 'show controller-node all interfaces', None], |
| 34 | ['cli', 'show controller-node localhost stats', None], |
| 35 | ['cli', 'show running-config', None], |
| 36 | ['cli', 'show switch', None], |
| 37 | ['cli', 'show switch-cluster', None], |
| 38 | ['cli', 'show link', None], |
| 39 | ['cli', 'show tunnel all', None], |
| 40 | ['cli', 'show host', None], |
| 41 | ['cli', 'show host all attachment-point', None], |
| 42 | ['cli', 'show host all ip-address', None], |
| 43 | # ['cli', 'show flow-cache', None], |
| 44 | ['cli', 'show flow-entry', None], |
| 45 | ['cli', 'show network-service', None], |
| 46 | ['cli', 'show event-history topology-cluster', None], |
| 47 | ['cli', 'show event-history topology-link', None], |
| 48 | ['cli', 'show event-history topology-switch', None], |
| 49 | ['cli', 'show logging all', None], |
| 50 | # ['cli', 'show system internal performance-data'], wasn't working |
| 51 | ['cli', 'history 100', None], |
| 52 | ['shell', 'uptime', None], |
| 53 | ['shell', 'ps -elf', None], |
| 54 | ['shell', 'pstree', None], |
| 55 | ['shell', 'cat /proc/meminfo', None], |
| 56 | ['shell', 'df -m', None], |
| 57 | ['shell', 'top -n 1 -b', None], |
| 58 | ['shell', 'dmesg', None], |
| 59 | ] |
| 60 | |
| 61 | #------------------------------------------- |
| 62 | # add_to_show_tech_support |
| 63 | #------------------------------------------- |
| 64 | def add_to_show_tech_support(shell, cmd, feature=None): |
| 65 | tech_support_commands.append([shell, cmd, feature]) |
| 66 | |
| 67 | def print_show_tech(): |
| 68 | for entry in tech_support_commands: |
| 69 | print "Shell %s"%entry[0] + ",Cmd %s"%entry[1] + ",Feature %s"%entry[2] |
| 70 | |
| 71 | def get_show_tech_cmd_table(): |
| 72 | return tech_support_commands |