Skip to content

Commit

Permalink
Merge pull request vmware#452 from Priyanka-Middha/BugFixes
Browse files Browse the repository at this point in the history
Made IP Protocol field as non mandate in deploy OVF Module
  • Loading branch information
budipi authored Jan 4, 2023
2 parents 9245e16 + 848b6bc commit c221b18
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions plugins/modules/nsxt_deploy_ova.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def main():
vcenter_passwd=dict(required=True, type='str', no_log=True),
extra_para=dict(type='str'),
role=dict(required=True, type='str'),
ip_protocol=dict(required=True, type='str')
ip_protocol=dict(required=False, type='str')
),
supports_check_mode=True,
required_together=[['gateway6_0', 'ip_address6_0', 'netmask6_0'], ['portgroup_ext', 'portgroup_transport']]
Expand All @@ -303,10 +303,12 @@ def main():
ovf_base_options = ['--acceptAllEulas', '--skipManifestCheck', '--X:injectOvfEnv', '--powerOn', '--noSSLVerify',
'--allowExtraConfig', '--diskMode={}'.format(module.params['disk_mode']),
'--datastore={}'.format(module.params['datastore']),
'--name={}'.format(module.params['vmname']),
'--ipProtocol={}'.format(module.params['ip_protocol'])
'--name={}'.format(module.params['vmname'])
]

if module.params['ip_protocol']:
ovf_base_options.extend(['--ipProtocol={}'.format(module.params['ip_protocol'])])

if module.params['portgroup_ext']:
ovf_base_options.extend(['--net:Network 0={}'.format(module.params['portgroup']),
'--net:Network 1={}'.format(module.params['portgroup_ext']),
Expand Down

0 comments on commit c221b18

Please sign in to comment.