Skip to content
Snippets Groups Projects
Commit 2c03b899 authored by František Řezníček's avatar František Řezníček
Browse files

feat: assert disabled projects to avoid nova API 401s as listed below:

parent 76bec846
No related branches found
No related tags found
Loading
...@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [1.1.3] - 2024-05-31
### Fixed
- assert disabled projects
## [1.1.2] - 2024-05-30 ## [1.1.2] - 2024-05-30
### Fixed ### Fixed
- attach FIP to correct virtual NIC - attach FIP to correct virtual NIC
......
...@@ -54,20 +54,22 @@ def main(args): ...@@ -54,20 +54,22 @@ def main(args):
source_project = lib.get_ostack_project(source_migrator_conn, source_project_name) source_project = lib.get_ostack_project(source_migrator_conn, source_project_name)
lib.log_or_assert(args, f"B.01 Source OpenStack cloud project (name:{source_project_name}) exists", source_project) lib.log_or_assert(args, f"B.01 Source OpenStack cloud project (name:{source_project_name}) exists", source_project)
source_project_type = lib.get_ostack_project_type(source_migrator_conn, source_project) source_project_type = lib.get_ostack_project_type(source_migrator_conn, source_project)
lib.log_or_assert(args, f"B.02 Source OpenStack cloud project type is {source_project_type}", lib.log_or_assert(args, "B.02 Source OpenStack cloud project is enabled", source_project.is_enabled)
source_project_type) lib.log_or_assert(args, f"B.03 Source OpenStack cloud project type is {source_project_type}",
source_project_type)
destination_project = lib.get_ostack_project(destination_migrator_conn, destination_project_name) destination_project = lib.get_ostack_project(destination_migrator_conn, destination_project_name)
lib.log_or_assert(args, f"B.10 Destination OpenStack cloud project (name:{destination_project_name}) exists", destination_project) lib.log_or_assert(args, f"B.10 Destination OpenStack cloud project (name:{destination_project_name}) exists", destination_project)
lib.log_or_assert(args, "B.11 Destination OpenStack cloud project is enabled", destination_project.is_enabled)
destination_project_type = lib.get_ostack_project_type(destination_migrator_conn, destination_project) destination_project_type = lib.get_ostack_project_type(destination_migrator_conn, destination_project)
lib.log_or_assert(args, f"B.11 Destination OpenStack cloud project type is {destination_project_type}", lib.log_or_assert(args, f"B.12 Destination OpenStack cloud project type is {destination_project_type}",
destination_project_type) destination_project_type)
lib.log_or_assert(args, "B.12 Source and destination project types match", lib.log_or_assert(args, "B.13 Source and destination project types match",
source_project_type == destination_project_type) source_project_type == destination_project_type)
if destination_project_type == 'group' and lib.executed_in_ci(): if destination_project_type == 'group' and lib.executed_in_ci():
lib.log_or_assert(args, lib.log_or_assert(args,
"B.13 Cloud group project migration is executed by authorized person (cloud/openstack team member).", "B.14 Cloud group project migration is executed by authorized person (cloud/openstack team member).",
lib.executed_as_admin_user_in_ci()) lib.executed_as_admin_user_in_ci())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment