Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
g1-g2-ostack-cloud-migration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cloud
g1-g2-ostack-cloud-migration
Commits
2c03b899
Commit
2c03b899
authored
11 months ago
by
František Řezníček
Browse files
Options
Downloads
Patches
Plain Diff
feat: assert disabled projects to avoid nova API 401s as listed below:
parent
76bec846
No related branches found
No related tags found
Loading
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+4
-0
4 additions, 0 deletions
CHANGELOG.md
ci/project-migrator.py
+7
-5
7 additions, 5 deletions
ci/project-migrator.py
with
11 additions
and
5 deletions
CHANGELOG.md
+
4
−
0
View file @
2c03b899
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
ci/project-migrator.py
+
7
−
5
View file @
2c03b899
...
@@ -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.1
1
Destination OpenStack cloud project type is
{
destination_project_type
}
"
,
lib
.
log_or_assert
(
args
,
f
"
B.1
2
Destination OpenStack cloud project type is
{
destination_project_type
}
"
,
destination_project_type
)
destination_project_type
)
lib
.
log_or_assert
(
args
,
"
B.1
2
Source and destination project types match
"
,
lib
.
log_or_assert
(
args
,
"
B.1
3
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.1
3
Cloud group project migration is executed by authorized person (cloud/openstack team member).
"
,
"
B.1
4
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
())
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment