Merge "Consider the VPNService resource complete if its Neutron object is in PENDING_CREATE"

This commit is contained in:
Zuul 2025-04-03 10:56:14 +00:00 committed by Gerrit Code Review
commit bc8d2adaf4
3 changed files with 15 additions and 4 deletions

View File

@ -197,9 +197,15 @@ class VPNService(neutron.NeutronResource):
def check_create_complete(self, data):
attributes = self._show_resource()
status = attributes['status']
if status == 'PENDING_CREATE':
return False
elif status == 'ACTIVE':
# The Neutron VPN service doesn't hit the ACTIVE status until
# it has a matching site-to-site connection. However, it is
# required that the VPNService resource be in CREATE_COMPLETE,
# in order for the IPsecSiteConnection resource to progress to
# CREATE_IN_PROGRESS. The only way to resolve this catch-22 is
# to already consider the VPNService resource complete, even
# when its underlying Neutron VPN service object is still in
# PENDING_CREATE.
if status in ['PENDING_CREATE', 'ACTIVE']:
return True
elif status == 'ERROR':
raise exception.ResourceInError(

View File

@ -187,7 +187,6 @@ class VPNServiceTest(common.HeatTestCase):
rsrc = self.create_vpnservice()
self.mockclient.show_vpnservice.side_effect = [
{'vpnservice': {'status': 'PENDING_CREATE'}},
{'vpnservice': {'status': 'ERROR'}},
]

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Enable the creation of an ``OS::Neutron::VPNService`` resource,
and an ``OS::Neutron::IPsecSiteConnection`` resource that depends
on it, within the same stack.