Skip to content

Commit

Permalink
Fixed vLan transform in network
Browse files Browse the repository at this point in the history
  • Loading branch information
nitish-ks committed Dec 4, 2024
1 parent 33d9143 commit cc2325a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/modules/nios_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,10 @@ def vlans(module):
if 'parent' in vlan_filtered:
obj_vlanview = wapi.get_object('vlanview', {'name': vlan_filtered['parent']})
obj_vlanrange = wapi.get_object('vlanrange', {'name': vlan_filtered['parent']})
if obj_vlanview and not obj_vlanrange:
vlan_filtered['parent'] = obj_vlanview[0]['_ref']
elif not obj_vlanview and obj_vlanrange:
if obj_vlanrange:
vlan_filtered['parent'] = obj_vlanrange[0]['_ref']
elif obj_vlanview:
vlan_filtered['parent'] = obj_vlanview[0]['_ref']
else:
module.fail_json(msg='VLAN View/Range \'%s\' cannot be found.' % vlan_filtered['parent'])

Expand Down

0 comments on commit cc2325a

Please sign in to comment.