Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kolla Ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Very Demiurge Very Mindful
Kolla Ansible
Commits
ef9a20c1
Commit
ef9a20c1
authored
2 years ago
by
Zuul
Committed by
Gerrit Code Review
2 years ago
Browse files
Options
Downloads
Plain Diff
Merge "[CI] Test image from instance"
parents
bede6857
1a468997
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test-core-openstack.sh
+25
-0
25 additions, 0 deletions
tests/test-core-openstack.sh
with
25 additions
and
0 deletions
tests/test-core-openstack.sh
+
25
−
0
View file @
ef9a20c1
...
@@ -77,6 +77,26 @@ function create_an_image_from_volume {
...
@@ -77,6 +77,26 @@ function create_an_image_from_volume {
done
done
}
}
function
create_an_image_from_instance
{
local
image_name
=
$1
local
instance_name
=
$2
local
attempt
openstack server image create
$instance_name
--name
$image_name
attempt
=
1
while
[[
$(
openstack image show
$image_name
-f
value
-c
status
)
!=
"active"
]]
;
do
echo
"Image
$image_name
not active yet"
attempt
=
$((
attempt+1
))
if
[[
$attempt
-eq
11
]]
;
then
echo
"Image
$image_name
failed to become active"
openstack image show
$image_name
return
1
fi
sleep
30
done
}
function
attach_and_detach_a_volume
{
function
attach_and_detach_a_volume
{
local
volume_name
=
$1
local
volume_name
=
$1
local
instance_name
=
$2
local
instance_name
=
$2
...
@@ -259,6 +279,11 @@ function test_instance_boot {
...
@@ -259,6 +279,11 @@ function test_instance_boot {
echo
"SUCCESS: Glance image from Cinder volume and back to volume"
echo
"SUCCESS: Glance image from Cinder volume and back to volume"
fi
fi
echo
"TESTING: Instance image upload"
create_an_image_from_instance image_from_instance kolla_boot_test
openstack image delete image_from_instance
echo
"SUCCESS: Instance image upload"
echo
"TESTING: Floating ip allocation"
echo
"TESTING: Floating ip allocation"
fip_addr
=
$(
create_fip
)
fip_addr
=
$(
create_fip
)
attach_fip kolla_boot_test
${
fip_addr
}
attach_fip kolla_boot_test
${
fip_addr
}
...
...
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