Add metadata access rule for the VMs in StatelessNetworkSecGroupTest test
Initially the SG with the metadata rule was replaced with the SG
with SSH rule for the active VMs. But sometimes the VMs is active
but is not booted itself and still needs access to metadata service.
Related-prod: PRODX-48621
Change-Id: I946f462a1744edca8d8cf264e3e51ff6aef7839b
diff --git a/neutron_tempest_plugin/scenario/test_security_groups.py b/neutron_tempest_plugin/scenario/test_security_groups.py
index 2980e43..3742ed1 100644
--- a/neutron_tempest_plugin/scenario/test_security_groups.py
+++ b/neutron_tempest_plugin/scenario/test_security_groups.py
@@ -494,6 +494,9 @@
# configure sec groups to support SSH connectivity
self.create_loginable_secgroup_rule(
secgroup_id=secgroups[-1]['id'])
+ # add the initial metadata access rule if VMs are not booted yet
+ self.create_ingress_metadata_secgroup_rule(
+ secgroup_id=secgroups[-1]['id'])
# Configure security groups, first two servers as remotes
for i, server in enumerate(servers):