Create networks only when network service is enabled
Currently tempestconf calls create_tempest_networks method without checking neutron service is available or not which leads to 'NoneType' object has no attribute 'create_tempest_networks'. Making it conditional fixes the issue where we explicitly disables the neutron service. create_tempest_networks also contains the logic for creating nova network and earlier it was called only when has_neutron is false. nova network support is deprecated long time ago and this change already pushes network creation part to conditional then it will be never called. Change-Id: I10f282e2a813060419e213dd25641078774a852d Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
This commit is contained in:
@@ -544,10 +544,13 @@ def config_tempest(**kwargs):
|
|||||||
False))
|
False))
|
||||||
image.create_tempest_images(conf)
|
image.create_tempest_images(conf)
|
||||||
|
|
||||||
|
# FIXME(chkumar246): Remove dead code of nova_network
|
||||||
|
# as it is deprecated long time ago.
|
||||||
has_neutron = services.is_service(**{"type": "network"})
|
has_neutron = services.is_service(**{"type": "network"})
|
||||||
network = services.get_service("network")
|
if has_neutron:
|
||||||
network.create_tempest_networks(has_neutron, conf,
|
network = services.get_service("network")
|
||||||
kwargs.get('network_id'))
|
network.create_tempest_networks(has_neutron, conf,
|
||||||
|
kwargs.get('network_id'))
|
||||||
|
|
||||||
services.post_configuration()
|
services.post_configuration()
|
||||||
services.set_supported_api_versions()
|
services.set_supported_api_versions()
|
||||||
|
|||||||
Reference in New Issue
Block a user