Add traffic_ops_ort.pl suuport for processing ##OVERRIDE## lines from…#3140
Add traffic_ops_ort.pl suuport for processing ##OVERRIDE## lines from…#3140elsloo merged 1 commit intoapache:masterfrom
Conversation
|
Can one of the admins verify this patch? |
ocket8888
left a comment
There was a problem hiding this comment.
Other than the one little thing this looks good to me.
traffic_ops/bin/traffic_ops_ort.pl
Outdated
There was a problem hiding this comment.
First let me say I'm a huge fan of turning space-based indentation into tab-based indentation. Just be careful that when you're doing that you aren't turning alignment into indentation. This should be indented one level with a tab character then aligned using spaces so that it displays consistently regardless of where your editor places its tabstops.
5e5126b to
a2f5fa4
Compare
6c41fbb to
a29277c
Compare
ocket8888
left a comment
There was a problem hiding this comment.
In addition to my comments, I'd also suggest that ##OVERRIDE## always be wrapped double-backticks as it is literal text to be inserted in a configuration file.
For full documentation guidelines, refer to the documentation.
There was a problem hiding this comment.
Please wrap console commands in double backticks like e.g.
(same as ``hostname -s``)There was a problem hiding this comment.
references to LSB commands (and/or those found on default installs of our only supported operating system - CentOS 7) should use the manpage role, e.g.
(same as :manpage:`hostname(1)`)There was a problem hiding this comment.
Syntax here is invalid; maintain the table structure by beginning/ending the frame with a pipe (|) as well as using it to delimit columns.
There was a problem hiding this comment.
Also, please use "Delivery Service" rather than "deliveryservice".
There was a problem hiding this comment.
traffic_ops_ort.pl is a file, use the file role. Also acceptable is the program role. I also wouldn't request changes if it was simply wrapped in double-backticks, but file or program are better.
Example:
:file:`traffic_ops/bin/traffic_ops_ort.pl` or
:program:`traffic_ops_ort` (note no ``.pl``)There was a problem hiding this comment.
Not only do you not need to do this, but it actually doesn't do anything. The index for the page can be generated simply by looking at the headings; no explicit index entries are necessary except to have the (sub)section title display differently in the sidebar than on the page (which you should NOT do)
There was a problem hiding this comment.
'ATS' is an abbreviation; if it's expanded previously in the section this could be left alone, but it isn't. The preferred way is to decorate it with the abbr role, but it would also be acceptable to place the expansion followed by the abbreviation in parenthesis.
Example:
:abbr:`ATS (Apache Traffic Server)` is the preferred abbreviation method
(especially since this isn't the abbreviation's first appearance in the section) but
"Apache Traffic Server (ATS)" could also be used.I'd also argue that this is more of a warning than a note, but that's really up to your preference.
There was a problem hiding this comment.
don't use the double-colon. It'll try to highlight it using the default 'domain' of the page - which is 'Python' by default in Sphinx, but some pages set it to 'javascript' explicitly - this is neither. Instead, either wrap the text in double-backticks or use the code-block directive (with maybe the text syntax).
Example:
``this is preformatted text``
.. code-block:: text
:caption: Example
This is also preformatted, but is link-able and has a title/caption.
If your text doesn't need to be linkable and/or shouldn't have a title/caption, then likely
you don't need ``code-block`` and just want to use double-backticks.There was a problem hiding this comment.
once more, no double colon
There was a problem hiding this comment.
Just a suggestion, this could link to an email thread/GitHub Issue/Pull Request. Or any combination thereof.
fe6c454 to
4f652fa
Compare
There was a problem hiding this comment.
The rest of the file (and the documentation) uses tabs for indentation. This table should too.
There was a problem hiding this comment.
This table is malformed. You need to make sure your pipes align with the rest of the table.
There was a problem hiding this comment.
This is wrong, nevermind. I was looking at old changes :P
There was a problem hiding this comment.
These captions should be unique, and once again please use tabs not spaces.
… anymap remap_text
4f652fa to
e3e4f9e
Compare
fix to require space after ##OVERRIDE## keyword
What does this PR do?
Fixes #(issue_number)
Which TC components are affected by this PR?
What is the best way to verify this PR?
Select any existing base DS. Create ANY_MAP delivery service to override.
Create raw remap text with something like:
Short example:
##OVERRIDE## map http://from.foo http://to.bar
Make sure both the base DS and ANY_MAP are assigned to a server. run ORT in report mode to check that the ##OVERRIDE## rule is uncommented and that the base DS rule is commented out via ##OVERRIDDEN##.
Select to queue that particular server. Inspect the generated remap.config for the above conditions.
Select to queue again. Ensure that remap.config is not tagged as changed to avoid unnecessary config reloads.
Check all that apply