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
Minor fix getting description of Ports #1543
Conversation
Codecov Report
@@ Coverage Diff @@
## trunk #1543 +/- ##
==========================================
- Coverage 84.77% 83.07% -1.70%
==========================================
Files 388 394 +6
Lines 81521 84738 +3217
Branches 8243 9002 +759
==========================================
+ Hits 69111 70399 +1288
- Misses 9422 11274 +1852
- Partials 2988 3065 +77
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, feel free to merge such small fixes at your own convenience.
@@ -2874,7 +2874,7 @@ def _to_port(self, element): | |||
allowed_address_pairs=element['allowed_address_pairs'], | |||
binding_vnic_type=element['binding:vnic_type'], | |||
device_id=element['device_id'], | |||
description=element['description'], | |||
description=element.get('description', None), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you get a chance it would also be good to add a test case for it + changelog entry.
Minor fix getting description of Ports
Description
In some cases the port may not have the "description" field, and the "_to_port" function fails.
Status
Checklist (tick everything that applies)