From 58dcbc066728f9325b40e45dbedd85389dea0278 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Wed, 11 Dec 2019 09:52:49 +0000 Subject: [PATCH] Add a default network when creating a server If a new server is created without defining a network, Nova will retrieve the available networks for the corresponding project. In case of having more than one network, Nova raises the exception "NetworkAmbiguous", informing that in case of multiple networks found, one must be selected in the call. This error has been detected in "ServersNegativeTestJSON" test cases. Change-Id: I71333a45982fc0b6b155d68e96640a9db3d41e4a Closes-Bug: #1844568 --- tempest/api/compute/servers/test_servers_negative.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tempest/api/compute/servers/test_servers_negative.py b/tempest/api/compute/servers/test_servers_negative.py index 6cabf658dc..1759d64ae1 100644 --- a/tempest/api/compute/servers/test_servers_negative.py +++ b/tempest/api/compute/servers/test_servers_negative.py @@ -46,6 +46,11 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest): # server_check_teardown should be called after super's tearDown. self.server_check_teardown() + @classmethod + def setup_credentials(cls): + cls.set_network_resources(network=True, subnet=True) + super(ServersNegativeTestJSON, cls).setup_credentials() + @classmethod def setup_clients(cls): super(ServersNegativeTestJSON, cls).setup_clients()