Merge "Add a repr method to fixture `Host`"

This commit is contained in:
Zuul authored and Gerrit Code Review committed 2024-12-02 20:33:19 +00:00
commit 1249afb2ae
1 file changed
+10
@@ -84,6 +84,9 @@ class EnvironmentDescription:
def tunneling_enabled(self):
return self.network_type in ('vxlan', 'gre')
def __str__(self):
return '{}'.format(vars(self))
class HostDescription:
"""A set of characteristics of an environment Host.
@@ -104,6 +107,9 @@ class HostDescription:
self.l3_agent_mode = l3_agent_mode
self.l3_agent_extensions = l3_agent_extensions
def __str__(self):
return '{}'.format(vars(self))
class Host(fixtures.Fixture):
"""The Host class models a physical host running agents, all reporting with
@@ -158,6 +164,10 @@ class Host(fixtures.Fixture):
self.dhcp_agent_cfg_fixture,
namespace=self.host_namespace))
def __repr__(self) -> str:
return 'Host description {}, environment description: {}'.format(
self.host_desc, self.env_desc)
def setup_host_with_ovs_agent(self):
agent_cfg_fixture = config.OVSConfigFixture(
self.env_desc, self.host_desc, self.neutron_config.temp_dir,