-
Notifications
You must be signed in to change notification settings - Fork 36
Conversation
Codecov Report
@@ Coverage Diff @@
## master #95 +/- ##
==========================================
+ Coverage 66.77% 66.97% +0.19%
==========================================
Files 6 8 +2
Lines 1496 1511 +15
==========================================
+ Hits 999 1012 +13
- Misses 497 499 +2
Continue to review full report at Codecov.
|
ospd/error.py
Outdated
client """ | ||
|
||
def __init__(self, message, command='osp', status=400): | ||
super(OSPDError, self).__init__() |
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.
With python 3 you can just use
super(OSPDError, self).__init__() | |
super().__init__() |
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.
Looks very useful! Just update the docstrings to our common format.
ospd/xml.py
Outdated
def simple_response_str(command, status, status_text, content=""): | ||
""" Creates an OSP response XML string. | ||
|
||
@param: OSP Command to respond to. |
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.
Could you use the same docstring annotations as before?
Arguments:
name (type): ....
Move OSPDError class from ospd.ospd to its own module. Move simple_response_str() and get_result_xml() from ospd.ospd to its own module. This allows to import the modules from other files, avoiding an import loop. Update tests accordingly.
Improve docstrings too.
Create module ospd.error and ospd.xml
Move OSPDError class from ospd.ospd to its own module.
Move simple_response_str() and get_result_xml() from ospd.ospd to its own module.
This allows to import the modules from other files, avoiding an import loop.
Update tests accordingly.
Improve the way in which the filter for vts is applied.
Add error handling to the filter passed to get_vts.