ovirt_network: correct when not specified external_provider (#66859)
This commit is contained in:
parent
d385a648c4
commit
b74ca2fe4f
1 changed files with 3 additions and 2 deletions
|
@ -171,8 +171,9 @@ from ansible.module_utils.ovirt import (
|
|||
|
||||
class NetworksModule(BaseModule):
|
||||
def build_entity(self):
|
||||
ons_service = self._connection.system_service().openstack_network_providers_service()
|
||||
on_service = ons_service.provider_service(get_id_by_name(ons_service, self.param('external_provider')))
|
||||
if self.param('external_provider'):
|
||||
ons_service = self._connection.system_service().openstack_network_providers_service()
|
||||
on_service = ons_service.provider_service(get_id_by_name(ons_service, self.param('external_provider')))
|
||||
return otypes.Network(
|
||||
name=self._module.params['name'],
|
||||
comment=self._module.params['comment'],
|
||||
|
|
Loading…
Reference in a new issue