-
Notifications
You must be signed in to change notification settings - Fork 83
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
Add cacert to .fields in HttpProxy #923
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #923 +/- ##
=======================================
Coverage 91.83% 91.83%
=======================================
Files 6 6
Lines 3000 3001 +1
=======================================
+ Hits 2755 2756 +1
Misses 245 245
☔ View full report in Codecov by Sentry. |
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.
IMHO you also need to add the field into the ignore list, as this field is not returned back on GET request and thus should be ignored when missing in the response:
[root@satellite ~]# curl -sku admin:changeme -H "Content-type: application/json" -X GET https://$(hostname)/api/http_proxies/1 | json_reformat
{
"id": 1,
"name": "AwesomeProxy",
"url": "http://my.awesome.proxy.com:3128",
"username": null,
"locations": [
{
"id": 2,
"name": "Default Location",
"title": "Default Location"
}
],
"organizations": [ ]
}
just few lines lower:
if ignore is None:
ignore = set()
ignore.add('cacert')
ignore.add('password')
...
Yeah I think @damoore044 was about to try curl to see what is returned from the GET. For reference David, nailgun entities are designed to look for any of the attributes defined in Here's the code that implements the logic I just explained: https://github.com/SatelliteQE/nailgun/blob/master/nailgun/entity_mixins.py#L777 All you need to do is add |
Very nice explanation @Griffin-Sullivan !! @damoore044 Please do it before we merge ! |
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.
ACK pending @vsedmik comment for ignoring the field in read.
Thanks @Griffin-Sullivan for the helpful explanation, just addressed those |
* Add cacert to .fields in HttpProxy * ignore cacert in http-proxy.read() (cherry picked from commit 9d5b535)
* Add cacert to .fields in HttpProxy * ignore cacert in http-proxy.read() (cherry picked from commit 9d5b535)
Description of changes
Add cacert to .fields in http_proxy, which is the path within the host to the cacert for the proxy.
Supports robottelo PR# 11454