Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ciena SAOS templates (naming fix) #665

Merged
merged 26 commits into from
Apr 28, 2020

Conversation

georgesnow
Copy link
Contributor

@georgesnow georgesnow commented Apr 24, 2020

ISSUE TYPE
COMPONENT

ciena_saos (old was ciena_6x)

SUMMARY

this adds new templates for Ciena SAOS. I have tested all of these against Ciena devices using Nornir/Netmiko and they all work. I opened as draft pull request until the tests issue is resolved, but all the templates are working didn't want someone else duplicate the effort.

However, I tried updating to the correct naming convention in the tests. This has produced few errors that need to be resolve. If you have ideas please let me know

Output:


======================================= FAILURES =======================================
_________________________________ test_index_ordering __________________________________

    def test_index_ordering():

        os_choices = [
            "a10",
            "alcatel_aos",
            "alcatel_sros",
            "arista_eos",
            "aruba_os",
            "avaya_ers",
            "avaya_vsp",
            "brocade_fastiron",
            "brocade_netiron",
            "brocade_nos",
            "brocade_vdx",
            "brocade_vyos",
            "checkpoint_gaia",
            "ciena_saos",
            "cisco_asa",
            "cisco_ios",
            "cisco_nxos",
            "cisco_s300",
            "cisco_wlc",
            "cisco_xe",
            "cisco_xr",
            "dell_force10",
            "enterasys",
            "extreme",
            "f5_ltm",
            "fortinet_fortios",
            "hp_comware",
            "hp_procurve",
            "huawei_vrp",
            "juniper",
            "juniper_junos",
            "juniper_screenos",
            "linux",
            "ovs_linux",
            "paloalto_panos",
            "quanta_mesh",
            "ruckus_fastiron",
            "ubiquiti_edgeswitch",
            "vmware_nsxv",
            "vyatta_vyos",
            "vyos",
            "watchguard_firebox",
        ]

        prior_os = ""
        prior_len = 0
        prior_cmd = ""
        used_os = []

        index = load_index_data()
        for row in index:
            template = row[0].strip()
            os = "_".join(template.split("_")[:2])
            cmd = "_".join(template.split("_")[2:])
            cmd_len = len(cmd)
            check_val, check_msg = check_order(
                os, prior_os, cmd_len, prior_len, os_choices, used_os, cmd, prior_cmd
            )
            if not check_val:
                # assertFalse(check_val, msg=check_msg)
                print("Error on line: {0}".format(row))
                print("Error Message: {0}".format(check_msg))
>           assert check_val
E           assert False

tests/test_index_order.py:127: AssertionError
--------------------------------- Captured stdout call ---------------------------------
Error on line: ['ciena_saos_software_show.textfsm', ' .*', ' ciena_saos', ' so[[ftware]] sh[[ow]]']
Error Message: Current Command len '21' larger then previous '17', for command 'software_show.textfsm'

Copy link
Contributor

@jmcgill298 jmcgill298 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update Tox to allow for various python versions

tox.ini Outdated Show resolved Hide resolved
@georgesnow
Copy link
Contributor Author

one issue is I didn't realize I need the yml file to account for all returned records. I will have to fix that next week.

@FragmentedPacket FragmentedPacket added the changes_requested Waiting on user to address feedback label Apr 27, 2020
@georgesnow georgesnow marked this pull request as ready for review April 28, 2020 15:10
@jmcgill298 jmcgill298 merged commit 3a554d6 into networktocode:master Apr 28, 2020
@georgesnow georgesnow deleted the ciena_saos branch April 29, 2020 14:16
thomasblass pushed a commit to thomasblass/ntc-templates that referenced this pull request Oct 25, 2020
Changed Ciena platform name

Created templates for:
  * chassis show temperature
  * port show
  * rstp show
  * vlan show
jvanderaa pushed a commit that referenced this pull request Nov 10, 2021
Changed Ciena platform name

Created templates for:
  * chassis show temperature
  * port show
  * rstp show
  * vlan show
guillaume-mbali pushed a commit to unyc-io/ntc-templates that referenced this pull request Apr 12, 2023
Changed Ciena platform name

Created templates for:
  * chassis show temperature
  * port show
  * rstp show
  * vlan show
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes_requested Waiting on user to address feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ciena naming doesn’t conform to Netmiko
3 participants