Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ironic-tempest-plugin
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
OpenStack
tempest
ironic-tempest-plugin
Commits
c942d60b
Commit
c942d60b
authored
9 months ago
by
Zuul
Committed by
Gerrit Code Review
9 months ago
Browse files
Options
Downloads
Plain Diff
Merge "Unprovision iso ramdisk boot from test"
parents
505fa79f
80c6b514
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
ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py
+24
-17
24 additions, 17 deletions
...est_plugin/tests/scenario/baremetal_standalone_manager.py
with
24 additions
and
17 deletions
ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py
+
24
−
17
View file @
c942d60b
...
...
@@ -192,7 +192,12 @@ class BaremetalStandaloneManager(bm.BaremetalScenarioTest,
"""
vifs
=
cls
.
get_node_vifs
(
node_id
)
for
vif
in
vifs
:
cls
.
baremetal_client
.
vif_detach
(
node_id
,
vif
)
try
:
cls
.
baremetal_client
.
vif_detach
(
node_id
,
vif
)
except
lib_exc
.
BadRequest
:
# When the vif was already removed, such as the
# node was already unprovisioned.
pass
if
force_delete
:
try
:
cls
.
ports_client
.
delete_port
(
vif
)
...
...
@@ -877,8 +882,7 @@ class BaremetalStandaloneScenarioTest(BaremetalStandaloneManager):
self
.
assertTrue
(
self
.
ping_ip_address
(
self
.
node_ip
,
should_succeed
=
True
))
@classmethod
def
boot_node_ramdisk
(
cls
,
ramdisk_ref
,
iso
=
False
):
def
boot_node_ramdisk
(
self
,
ramdisk_ref
,
iso
=
False
):
"""
Boot ironic using a ramdisk node.
The following actions are executed:
...
...
@@ -894,11 +898,11 @@ class BaremetalStandaloneScenarioTest(BaremetalStandaloneManager):
us actually an ISO image.
"""
if
ramdisk_ref
is
None
:
ramdisk_ref
=
cls
.
image_ref
ramdisk_ref
=
self
.
image_ref
network
,
subnet
,
router
=
cls
.
create_networks
()
n_port
=
cls
.
create_neutron_port
(
network_id
=
network
[
'
id
'
])
cls
.
vif_attach
(
node_id
=
cls
.
node
[
'
uuid
'
],
vif_id
=
n_port
[
'
id
'
])
network
,
subnet
,
router
=
self
.
create_networks
()
n_port
=
self
.
create_neutron_port
(
network_id
=
network
[
'
id
'
])
self
.
vif_attach
(
node_id
=
self
.
node
[
'
uuid
'
],
vif_id
=
n_port
[
'
id
'
])
if
iso
:
patch_path
=
'
/instance_info/boot_iso
'
else
:
...
...
@@ -909,22 +913,25 @@ class BaremetalStandaloneScenarioTest(BaremetalStandaloneManager):
patch
=
[{
'
path
'
:
patch_path
,
'
op
'
:
'
add
'
,
'
value
'
:
ramdisk_ref
}]
cls
.
update_node
(
cls
.
node
[
'
uuid
'
],
patch
=
patch
)
cls
.
set_node_provision_state
(
cls
.
node
[
'
uuid
'
],
'
active
'
)
self
.
update_node
(
self
.
node
[
'
uuid
'
],
patch
=
patch
)
self
.
set_node_provision_state
(
self
.
node
[
'
uuid
'
],
'
active
'
)
self
.
addCleanup
(
self
.
set_node_provision_state
,
self
.
node
[
'
uuid
'
],
'
deleted
'
)
if
CONF
.
validation
.
connect_method
==
'
floating
'
:
cls
.
node_ip
=
cls
.
add_floatingip_to_node
(
cls
.
node
[
'
uuid
'
])
self
.
node_ip
=
self
.
add_floatingip_to_node
(
self
.
node
[
'
uuid
'
])
elif
CONF
.
validation
.
connect_method
==
'
fixed
'
:
cls
.
node_ip
=
cls
.
get_server_ip
(
cls
.
node
[
'
uuid
'
])
self
.
node_ip
=
self
.
get_server_ip
(
self
.
node
[
'
uuid
'
])
else
:
m
=
(
'
Configuration option
"
[validation]/connect_method
"
'
'
must be set.
'
)
raise
lib_exc
.
InvalidConfiguration
(
m
)
cls
.
wait_power_state
(
cls
.
node
[
'
uuid
'
],
bm
.
BaremetalPowerStates
.
POWER_ON
)
cls
.
wait_provisioning_state
(
cls
.
node
[
'
uuid
'
],
bm
.
BaremetalProvisionStates
.
ACTIVE
,
timeout
=
CONF
.
baremetal
.
active_timeout
,
interval
=
30
)
self
.
wait_power_state
(
self
.
node
[
'
uuid
'
],
bm
.
BaremetalPowerStates
.
POWER_ON
)
self
.
wait_provisioning_state
(
self
.
node
[
'
uuid
'
],
bm
.
BaremetalProvisionStates
.
ACTIVE
,
timeout
=
CONF
.
baremetal
.
active_timeout
,
interval
=
30
)
def
boot_and_verify_ramdisk_node
(
self
,
ramdisk_ref
=
None
,
iso
=
False
,
should_succeed
=
True
):
...
...
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