<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic RE: Is there a way to omit all the unused config from a 'show conf' in ExtremeSwitching (EXOS/Switch Engine)</title>
    <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/is-there-a-way-to-omit-all-the-unused-config-from-a-show-conf/m-p/18118#M707</link>
    <description>Yes.</description>
    <pubDate>Thu, 03 Sep 2015 23:03:00 GMT</pubDate>
    <dc:creator>Bruce_Garlock</dc:creator>
    <dc:date>2015-09-03T23:03:00Z</dc:date>
    <item>
      <title>Is there a way to omit all the unused config from a 'show conf'</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/is-there-a-way-to-omit-all-the-unused-config-from-a-show-conf/m-p/18116#M705</link>
      <description>Coming from a mostly Procurve background, the one thing we are finding more difficult is the CLI output from EXOS.  Is there any way to omit the features we aren't using, so there are not show many pages of output when doing a 'show conf' ?&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Sep 2015 23:00:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/is-there-a-way-to-omit-all-the-unused-config-from-a-show-conf/m-p/18116#M705</guid>
      <dc:creator>Bruce_Garlock</dc:creator>
      <dc:date>2015-09-03T23:00:00Z</dc:date>
    </item>
    <item>
      <title>RE: Is there a way to omit all the unused config from a 'show conf'</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/is-there-a-way-to-omit-all-the-unused-config-from-a-show-conf/m-p/18117#M706</link>
      <description>Are you referring to the modules that may come up empty?</description>
      <pubDate>Thu, 03 Sep 2015 23:02:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/is-there-a-way-to-omit-all-the-unused-config-from-a-show-conf/m-p/18117#M706</guid>
      <dc:creator>Patrick_Voss</dc:creator>
      <dc:date>2015-09-03T23:02:00Z</dc:date>
    </item>
    <item>
      <title>RE: Is there a way to omit all the unused config from a 'show conf'</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/is-there-a-way-to-omit-all-the-unused-config-from-a-show-conf/m-p/18118#M707</link>
      <description>Yes.</description>
      <pubDate>Thu, 03 Sep 2015 23:03:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/is-there-a-way-to-omit-all-the-unused-config-from-a-show-conf/m-p/18118#M707</guid>
      <dc:creator>Bruce_Garlock</dc:creator>
      <dc:date>2015-09-03T23:03:00Z</dc:date>
    </item>
    <item>
      <title>RE: Is there a way to omit all the unused config from a 'show conf'</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/is-there-a-way-to-omit-all-the-unused-config-from-a-show-conf/m-p/18119#M708</link>
      <description>Unfortunately you can't omit unused modules. If you are looking for specific configuration you can either specify the module you would like to look at after "show configuration" or you can use the "| i" filter. For example, "show config | i vlan". This will display any lines in the output that have that specific string in it.</description>
      <pubDate>Thu, 03 Sep 2015 23:07:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/is-there-a-way-to-omit-all-the-unused-config-from-a-show-conf/m-p/18119#M708</guid>
      <dc:creator>Patrick_Voss</dc:creator>
      <dc:date>2015-09-03T23:07:00Z</dc:date>
    </item>
    <item>
      <title>RE: Is there a way to omit all the unused config from a 'show conf'</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/is-there-a-way-to-omit-all-the-unused-config-from-a-show-conf/m-p/18120#M709</link>
      <description>As a workaround you can use the command below to remove any line with a # in it:&lt;BR /&gt;
&lt;BR /&gt;
show config | e "#"&lt;BR /&gt;
&lt;BR /&gt;
This should minimize the amount of output you receive.</description>
      <pubDate>Thu, 03 Sep 2015 23:14:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/is-there-a-way-to-omit-all-the-unused-config-from-a-show-conf/m-p/18120#M709</guid>
      <dc:creator>Patrick_Voss</dc:creator>
      <dc:date>2015-09-03T23:14:00Z</dc:date>
    </item>
    <item>
      <title>RE: Is there a way to omit all the unused config from a 'show conf'</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/is-there-a-way-to-omit-all-the-unused-config-from-a-show-conf/m-p/18121#M710</link>
      <description>That's very helpful - thanks!  I live in BASH all day, so anytime I can pipe, I'm happy &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Sep 2015 23:15:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/is-there-a-way-to-omit-all-the-unused-config-from-a-show-conf/m-p/18121#M710</guid>
      <dc:creator>Bruce_Garlock</dc:creator>
      <dc:date>2015-09-03T23:15:00Z</dc:date>
    </item>
    <item>
      <title>RE: Is there a way to omit all the unused config from a 'show conf'</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/is-there-a-way-to-omit-all-the-unused-config-from-a-show-conf/m-p/18122#M711</link>
      <description>Hi Bruce,&lt;BR /&gt;
EXOS 15.7+ natively supports Python Scripting, if you're into that.  It wouldn't be very difficult to write up a script that excludes modules that don't give output - we may already have one written that I can share.  It might also be a good addition to EXOS' native CLI, but that won't happen overnight &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Sep 2015 23:33:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/is-there-a-way-to-omit-all-the-unused-config-from-a-show-conf/m-p/18122#M711</guid>
      <dc:creator>Drew_C</dc:creator>
      <dc:date>2015-09-03T23:33:00Z</dc:date>
    </item>
    <item>
      <title>RE: Is there a way to omit all the unused config from a 'show conf'</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/is-there-a-way-to-omit-all-the-unused-config-from-a-show-conf/m-p/18123#M712</link>
      <description>Bruce, here's a Python script (for EXOS 15.7+)  that will do exactly what you're looking for.  It was adapted from another script.  It's possible that there's a better way, but this works!&lt;BR /&gt;
You can copy it to your switch as a .py file with TFTP, or just paste the script in through &lt;DIV class="threadCode"&gt;&lt;B&gt;code:&lt;/B&gt;&lt;PRE spellcheck="false"&gt;vi&lt;/PRE&gt;&lt;/DIV&gt; on the CLI.&lt;BR /&gt;
class Clean_Config(object):&lt;BR /&gt;
    def process_config(self):&lt;BR /&gt;
        self.cfg_modules = []&lt;BR /&gt;
        print "\nProcessing Configuration...\n\n"&lt;BR /&gt;
        config = exsh.clicmd('show config', capture=True)&lt;BR /&gt;
        config = config.splitlines(True)&lt;BR /&gt;
        print "\n-&amp;gt;show configuration\n"&lt;BR /&gt;
        moduleName = ''&lt;BR /&gt;
        moduleStr = ''&lt;BR /&gt;
        configExist = False&lt;BR /&gt;
        for line in config:&lt;BR /&gt;
            if '#' not in line and line != '\n':&lt;BR /&gt;
                moduleStr += line&lt;BR /&gt;
                configExist = True&lt;BR /&gt;
            elif configExist is True and '#' in line:&lt;BR /&gt;
                self.cfg_modules.append(moduleName)&lt;BR /&gt;
                moduleStr = line&lt;BR /&gt;
                moduleName = ''&lt;BR /&gt;
                configExist = False&lt;BR /&gt;
            elif '#' in line:&lt;BR /&gt;
                moduleStr += line&lt;BR /&gt;
                configExist = False&lt;BR /&gt;
                if '# Module ' in line:&lt;BR /&gt;
                    moduleName = line.replace('# Module ','')&lt;BR /&gt;
                    moduleName = moduleName.replace(' configuration.\n','')&lt;BR /&gt;
                    moduleName = moduleName.lower()&lt;BR /&gt;
            elif configExist is True and line == '\n':&lt;BR /&gt;
                moduleStr += line&lt;BR /&gt;
            else:&lt;BR /&gt;
                moduleStr = ''&lt;BR /&gt;
&lt;BR /&gt;
def main():&lt;BR /&gt;
    cfg = Clean_Config()&lt;BR /&gt;
    cfg.process_config()&lt;BR /&gt;
    for module in cfg.cfg_modules:&lt;BR /&gt;
        cmd = 'show config %s' % module&lt;BR /&gt;
        print exsh.clicmd(cmd, capture=True)&lt;BR /&gt;
&lt;BR /&gt;
main()&lt;BR /&gt;
&lt;BR /&gt;
And here's how it looks when executed:&lt;BR /&gt;
X460_TestSwitch.12 # run script clean_config.py&lt;BR /&gt;
Processing Configuration...&lt;BR /&gt;
-&amp;gt;show configuration&lt;BR /&gt;
&lt;BR /&gt;
#&lt;BR /&gt;
# Module devmgr configuration.&lt;BR /&gt;
#&lt;BR /&gt;
configure snmp sysName "X460_TestSwitch"&lt;BR /&gt;
configure snmp sysContact "support@extremenetworks.com, +1 888 257 3000"&lt;BR /&gt;
configure sys-recovery-level switch reset&lt;BR /&gt;
&lt;BR /&gt;
#&lt;BR /&gt;
# Module vlan configuration.&lt;BR /&gt;
#&lt;BR /&gt;
configure vlan default delete ports all&lt;BR /&gt;
configure vr VR-Default delete ports 1-34&lt;BR /&gt;
configure vr VR-Default add ports 1-34&lt;BR /&gt;
configure vlan default delete ports 1-34&lt;BR /&gt;
create vlan "lp"&lt;BR /&gt;
configure vlan lp tag 1001&lt;BR /&gt;
enable loopback-mode vlan lp&lt;BR /&gt;
create vlan "v1"&lt;BR /&gt;
configure vlan v1 tag 10&lt;BR /&gt;
create vlan "v3"&lt;BR /&gt;
configure vlan v3 tag 30&lt;BR /&gt;
create vlan "x460g2"&lt;BR /&gt;
configure vlan x460g2 tag 1500&lt;BR /&gt;
configure vlan v1 add ports 3 tagged  &lt;BR /&gt;
configure vlan v3 add ports 2 tagged  &lt;BR /&gt;
configure vlan x460g2 add ports 4 tagged  &lt;BR /&gt;
configure vlan v1 ipaddress 10.0.0.1 255.255.255.0&lt;BR /&gt;
enable ipforwarding vlan v1&lt;BR /&gt;
configure vlan lp ipaddress 192.168.1.1 255.255.255.0&lt;BR /&gt;
enable ipforwarding vlan lp&lt;BR /&gt;
configure vlan v3 ipaddress 30.0.0.2 255.255.255.0&lt;BR /&gt;
enable ipforwarding vlan v3&lt;BR /&gt;
configure vlan x460g2 ipaddress 172.16.11.1 255.255.255.0&lt;BR /&gt;
enable ipforwarding vlan x460g2&lt;BR /&gt;
&lt;BR /&gt;
#&lt;BR /&gt;
# Module netTools configuration.&lt;BR /&gt;
#&lt;BR /&gt;
configure dns-client add name-server 10.1.1.1 vr VR-Default&lt;BR /&gt;
configure dns-client add name-server 10.1.1.2 vr VR-Default&lt;BR /&gt;
configure dns-client add domain-suffix extremenetworks.com&lt;BR /&gt;
enable dhcp vlan Mgmt&lt;BR /&gt;
&lt;BR /&gt;
#&lt;BR /&gt;
# Module ospf configuration.&lt;BR /&gt;
#&lt;BR /&gt;
configure ospf routerid 192.168.1.1&lt;BR /&gt;
enable ospf&lt;BR /&gt;
create ospf area 0.0.0.2&lt;BR /&gt;
configure ospf add vlan lp area 0.0.0.0&lt;BR /&gt;
configure ospf add vlan v1 area 0.0.0.2 link-type point-to-point&lt;BR /&gt;
configure ospf add vlan v3 area 0.0.0.2 link-type point-to-point&lt;BR /&gt;
configure ospf add vlan x460g2 area 0.0.0.2 link-type point-to-point&lt;BR /&gt;
&lt;BR /&gt;
#&lt;BR /&gt;
# Module thttpd configuration.&lt;BR /&gt;
#&lt;BR /&gt;
configure ssl certificate hash-algorithm sha512&lt;BR /&gt;
Let me know what you think!&lt;BR /&gt;
&lt;BR /&gt;
-Drew</description>
      <pubDate>Fri, 04 Sep 2015 02:27:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/is-there-a-way-to-omit-all-the-unused-config-from-a-show-conf/m-p/18123#M712</guid>
      <dc:creator>Drew_C</dc:creator>
      <dc:date>2015-09-04T02:27:00Z</dc:date>
    </item>
    <item>
      <title>RE: Is there a way to omit all the unused config from a 'show conf'</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/is-there-a-way-to-omit-all-the-unused-config-from-a-show-conf/m-p/18124#M713</link>
      <description>This is even better, Drew - thank you!  Another reason why I tell everyone that 'vi' is better than emacs! I had no idea I could use Python.  I'm still a newbie to Extreme, and this is a very nice selling point.  Thanks again.</description>
      <pubDate>Fri, 04 Sep 2015 02:42:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/is-there-a-way-to-omit-all-the-unused-config-from-a-show-conf/m-p/18124#M713</guid>
      <dc:creator>Bruce_Garlock</dc:creator>
      <dc:date>2015-09-04T02:42:00Z</dc:date>
    </item>
    <item>
      <title>RE: Is there a way to omit all the unused config from a 'show conf'</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/is-there-a-way-to-omit-all-the-unused-config-from-a-show-conf/m-p/18125#M714</link>
      <description>You're welcome!&lt;BR /&gt;
If you want to explore the capabilities of Python in EXOS, there's a lot of good information in the &lt;A href="https://community.extremenetworks.com/extreme/categories/extreme_scripting" target="_blank" rel="nofollow noreferrer noopener"&gt;"Scripting" category here on The Hub&lt;/A&gt;.&lt;BR /&gt;
If you want more, you can check out the &lt;A href="http://www.extremenetworks.com/wp-content/uploads/2015/02/Python_Getting_Started_Guide.pdf" target="_blank" rel="nofollow noreferrer noopener"&gt;Python Scripting Guide&lt;/A&gt; and documentation on &lt;A href="http://documentation.extremenetworks.com/python/" target="_blank" rel="nofollow noreferrer noopener"&gt;The EXOS Python API&lt;/A&gt;, which you may find helpful.&lt;BR /&gt;
&lt;BR /&gt;
Since you're new to Extreme - you'll likely want to see what you can find in our KB, &lt;A href="https://gtacknowledge.extremenetworks.com/" target="_blank" rel="nofollow noreferrer noopener"&gt;GTAC Knowledge&lt;/A&gt;.  New articles are loaded there every day.&lt;BR /&gt;
&lt;BR /&gt;
Come back and see us... we're a helpful bunch of Extremists!</description>
      <pubDate>Fri, 04 Sep 2015 02:42:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/is-there-a-way-to-omit-all-the-unused-config-from-a-show-conf/m-p/18125#M714</guid>
      <dc:creator>Drew_C</dc:creator>
      <dc:date>2015-09-04T02:42:00Z</dc:date>
    </item>
  </channel>
</rss>

