Make _get_server_port_id_and_ip4() non-private

_get_server_port_id_and_ip4() is made public by this commit as
the tempest.scenario.manager interface is meant to be
consumed by tempest plugins.

Implements: blueprint tempest-scenario-manager-stable
Signed-off by: Soniya Vyas<svyas@redhat.com>

Change-Id: I25bf66fff0892a87face97660127e92479ef8100
This commit is contained in:
Soniya Vyas
2021-02-23 15:58:53 +05:30
parent 85e618faf3
commit a446d703c8
2 changed files with 4 additions and 4 deletions

View File

@ -1164,7 +1164,7 @@ class NetworkScenarioTest(ScenarioTest):
return subnet
def _get_server_port_id_and_ip4(self, server, ip_addr=None, **kwargs):
def get_server_port_id_and_ip4(self, server, ip_addr=None, **kwargs):
if ip_addr and not kwargs.get('fixed_ips'):
kwargs['fixed_ips'] = 'ip_address=%s' % ip_addr
@ -1217,7 +1217,7 @@ class NetworkScenarioTest(ScenarioTest):
if not client:
client = self.floating_ips_client
if not port_id:
port_id, ip4 = self._get_server_port_id_and_ip4(server)
port_id, ip4 = self.get_server_port_id_and_ip4(server)
else:
ip4 = None
@ -1245,7 +1245,7 @@ class NetworkScenarioTest(ScenarioTest):
This wrapper utility attaches the floating_ip for
the respective port_id of server
"""
port_id, _ = self._get_server_port_id_and_ip4(server)
port_id, _ = self.get_server_port_id_and_ip4(server)
kwargs = dict(port_id=port_id)
floating_ip = self.floating_ips_client.update_floatingip(
floating_ip['id'], **kwargs)['floatingip']

View File

@ -223,7 +223,7 @@ class TestNetworkBasicOps(manager.NetworkScenarioTest):
floating_ip, server = self.floating_ip_tuple
# create a new server for the floating ip
server = self._create_server(self.network)
port_id, _ = self._get_server_port_id_and_ip4(server)
port_id, _ = self.get_server_port_id_and_ip4(server)
floating_ip = self.floating_ips_client.update_floatingip(
floating_ip['id'], port_id=port_id)['floatingip']
self.assertEqual(port_id, floating_ip['port_id'])