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

Interface abbreviation for TwoGigabitEthernet #221

Closed
michaelklose opened this issue Feb 27, 2023 · 2 comments · Fixed by #223
Closed

Interface abbreviation for TwoGigabitEthernet #221

michaelklose opened this issue Feb 27, 2023 · 2 comments · Fixed by #223
Labels
status: accepted This issue has been accepted by the maintainers team for implementation

Comments

@michaelklose
Copy link
Contributor

michaelklose commented Feb 27, 2023

Environment

  • Python version: 3.9.7
  • netutils version: 1.4.1

Expected Behavior

Abbreviation for TwoGigabitEthernet should be Tw e.g. Tw1/0/1

See Example output of a Cisco C9300-48UXM running 17.6.4

switch#show int status
Port         Name               Status       Vlan       Duplex  Speed Type
Tw1/0/1      test               notconnect   1          auto   auto 100/1000/2.5GBaseTX

Observed Behavior

Currently the abbreviation is Two

Steps to Reproduce

>>> from netutils.interface import abbreviated_interface_name
>>> abbreviated_interface_name("TwoGigabitEthernet1/0/1")
'Two1/0/1'
>>>
@michaelklose
Copy link
Contributor Author

If issue is accepted you can assign it to me and I will open a PR.

@itdependsnetworks
Copy link
Contributor

Please do : )

@itdependsnetworks itdependsnetworks added the status: accepted This issue has been accepted by the maintainers team for implementation label Feb 27, 2023
michaelklose added a commit to michaelklose/netutils that referenced this issue Feb 27, 2023
@qduk qduk closed this as completed in #223 Mar 17, 2023
qduk pushed a commit that referenced this issue Mar 17, 2023
* Interface abbreviation for TwoGigabitEthernet
Fixes #221

* Added tests for TwoGigabitEthernet

* Fixed linting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepted This issue has been accepted by the maintainers team for implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants