Skip to content

Commit

Permalink
Add network_type and remote_execution_proxy fields to Subnet (Sat…
Browse files Browse the repository at this point in the history
  • Loading branch information
abalakh authored and lpramuk committed Sep 26, 2023
1 parent b6a96c7 commit 96c21ff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions nailgun/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -5996,7 +5996,13 @@ def __init__(self, server_config=None, **kwargs):
default=u'DHCP',
),
'location': entity_fields.OneToManyField(Location),
'network_type': entity_fields.StringField(
choices=('IPv4', 'IPv6'),
default='IPv4',
),
'organization': entity_fields.OneToManyField(Organization),
'remote_execution_proxy':
entity_fields.OneToManyField(SmartProxy),
'subnet_parameters_attributes': entity_fields.ListField(),
'tftp': entity_fields.OneToOneField(SmartProxy),
})
Expand Down Expand Up @@ -6028,6 +6034,7 @@ def read(self, entity=None, attrs=None, ignore=None, params=None):
else:
ignore.add('subnet_parameters_attributes')
ignore.add('discovery')
ignore.add('remote_execution_proxy')
return super(Subnet, self).read(entity, attrs, ignore, params)

def update_payload(self, fields=None):
Expand Down
4 changes: 3 additions & 1 deletion tests/test_entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,9 @@ def test_ignore_arg_v1(self):
(entities.SmartClassParameters, {'hidden_value'}),
(entities.SmartVariable, {'hidden_value'}),
(entities.Subnet, {
'discovery', 'subnet_parameters_attributes'}),
'discovery',
'remote_execution_proxy',
'subnet_parameters_attributes'}),
(entities.Subscription, {'organization'}),
(entities.Repository, {'organization'}),
(entities.User, {'password'}),
Expand Down

0 comments on commit 96c21ff

Please sign in to comment.