Skip to content

Commit 6bb9e3a

Browse files
Add http_proxy to the SmartProxy entity (#1314) (#1315)
(cherry picked from commit b31009f) Co-authored-by: Vladimir Sedmik <46570670+vsedmik@users.noreply.github.com>
1 parent 9ff9434 commit 6bb9e3a

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

nailgun/entities.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7889,9 +7889,10 @@ class SmartProxy(
78897889
def __init__(self, server_config=None, **kwargs):
78907890
self._fields = {
78917891
'download_policy': entity_fields.StringField(
7892-
choices=('background', 'immediate', 'on_demand'),
7892+
choices=('on_demand', 'immediate', 'inherit', 'streamed'),
78937893
default='on_demand',
78947894
),
7895+
'http_proxy': entity_fields.OneToOneField(HTTPProxy),
78957896
'name': entity_fields.StringField(
78967897
required=True, str_type='alpha', length=(6, 12), unique=True
78977898
),
@@ -7977,6 +7978,7 @@ def read(self, entity=None, attrs=None, ignore=None, params=None):
79777978
if ignore is None:
79787979
ignore = set()
79797980
ignore.add('download_policy')
7981+
ignore.add('http_proxy')
79807982
return super().read(entity, attrs, ignore, params)
79817983

79827984
def update(self, fields=None):

tests/test_entities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,7 @@ def test_ignore_arg_v1(self):
12881288
(entities.AzureRMComputeResource, {'secret_key'}),
12891289
(entities.Errata, {'content_view_version', 'environment', 'repository'}),
12901290
(entities.OVirtComputeResource, {'password'}),
1291-
(entities.SmartProxy, {'download_policy'}),
1291+
(entities.SmartProxy, {'download_policy', 'http_proxy'}),
12921292
(entities.SmartClassParameters, {'hidden_value'}),
12931293
(
12941294
entities.Subnet,

0 commit comments

Comments
 (0)