Skip to content

Commit 2c69a47

Browse files
committed
Add http_proxy to the SmartProxy entity
1 parent 62bee40 commit 2c69a47

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
@@ -7950,9 +7950,10 @@ class SmartProxy(
79507950
def __init__(self, server_config=None, **kwargs):
79517951
self._fields = {
79527952
'download_policy': entity_fields.StringField(
7953-
choices=('background', 'immediate', 'on_demand'),
7953+
choices=('on_demand', 'immediate', 'inherit', 'streamed'),
79547954
default='on_demand',
79557955
),
7956+
'http_proxy': entity_fields.OneToOneField(HTTPProxy),
79567957
'name': entity_fields.StringField(
79577958
required=True, str_type='alpha', length=(6, 12), unique=True
79587959
),
@@ -8038,6 +8039,7 @@ def read(self, entity=None, attrs=None, ignore=None, params=None):
80388039
if ignore is None:
80398040
ignore = set()
80408041
ignore.add('download_policy')
8042+
ignore.add('http_proxy')
80418043
return super().read(entity, attrs, ignore, params)
80428044

80438045
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)