Set network state to implemented when no services (#6838)

Co-authored-by: Nicolas Vazquez <nicovazquez90@gmail.com>
Co-authored-by: Wei Zhou <weizhou@apache.org>
This commit is contained in:
dahn 2022-10-24 08:59:17 +02:00 committed by GitHub
parent c37709c44b
commit 13d22c2f54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -586,3 +586,14 @@ UPDATE cloud.configuration
SET description = "Use SSL method used to encrypt copy traffic between zones. Also ensures that the certificate assigned to the zone is used when
generating links for external access."
WHERE name = 'secstorage.encrypt.copy';
-- allow isolated networks without services to be used as is.
UPDATE `cloud`.`networks` ntwk
SET ntwk.state = 'Implemented'
WHERE ntwk.network_offering_id in
(SELECT id FROM `cloud`.`network_offerings` ntwkoff
WHERE (SELECT count(*) FROM `cloud`.`ntwk_offering_service_map` ntwksrvcmp WHERE ntwksrvcmp.network_offering_id = ntwkoff.id) = 0
AND ntwkoff.is_persistent = 1) AND
ntwk.state = 'Setup' AND
ntwk.removed is NULL AND
ntwk.guest_type = 'Isolated';