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

Add boolean field for content_default_http_proxy in HTTProxy entity #1254

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions nailgun/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -5534,6 +5534,7 @@ def __init__(self, server_config=None, **kwargs):
'organization': entity_fields.OneToManyField(Organization),
'location': entity_fields.OneToManyField(Location),
'cacert': entity_fields.StringField(),
'content_default_http_proxy': entity_fields.BooleanField(),
}
self._meta = {'api_path': 'api/v2/http_proxies'}
super().__init__(server_config=server_config, **kwargs)
Expand All @@ -5556,12 +5557,17 @@ def read(self, entity=None, attrs=None, ignore=None, params=None):
For more information, see `Bugzilla #1779642
<https://bugzilla.redhat.com/show_bug.cgi?id=1779642>`_.
"""
if attrs is None:
attrs = self.read_json()
if ignore is None:
ignore = set()
ignore.add('password')
ignore.add('organization')
ignore.add('location')
ignore.add('cacert')
# Workaround for SAT-30769
if 'content_default_http_proxy' not in attrs:
ignore.add('content_default_http_proxy')
Gauravtalreja1 marked this conversation as resolved.
Show resolved Hide resolved
return super().read(entity, attrs, ignore, params)


Expand Down