Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kayobe
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
Kayobe
Commits
c726492e
Commit
c726492e
authored
7 months ago
by
Zuul
Committed by
Gerrit Code Review
7 months ago
Browse files
Options
Downloads
Plain Diff
Merge "Stop replacing dashes with underscores for Kolla interfaces"
parents
d27ae6c3
f2b042dc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
kayobe/plugins/action/kolla_ansible_host_vars.py
+0
-4
0 additions, 4 deletions
kayobe/plugins/action/kolla_ansible_host_vars.py
kayobe/tests/unit/plugins/action/test_kolla_ansible_host_vars.py
+0
-20
0 additions, 20 deletions
...tests/unit/plugins/action/test_kolla_ansible_host_vars.py
with
0 additions
and
24 deletions
kayobe/plugins/action/kolla_ansible_host_vars.py
+
0
−
4
View file @
c726492e
...
...
@@ -95,10 +95,6 @@ class ActionModule(ActionBase):
# Get the network interface for this network.
iface
=
(
"
{{
'
%s
'
| net_interface }}
"
%
net_name
)
iface
=
self
.
_templar
.
template
(
iface
)
if
iface
:
# Ansible fact names replace dashes with underscores.
# FIXME(mgoddard): Is this still required?
iface
=
iface
.
replace
(
'
-
'
,
'
_
'
)
if
required
and
not
iface
:
msg
=
(
"
Required network
'
%s
'
(%s) does not have an interface
"
"
configured for this host
"
%
(
net_name
,
description
))
...
...
This diff is collapsed.
Click to expand it.
kayobe/tests/unit/plugins/action/test_kolla_ansible_host_vars.py
+
0
−
20
View file @
c726492e
...
...
@@ -136,26 +136,6 @@ class TestCase(unittest.TestCase):
}
self
.
assertEqual
(
expected
,
result
)
def
test__run_one_with_dashes
(
self
):
variables
=
copy
.
deepcopy
(
self
.
variables
)
variables
[
"
foo_interface
"
]
=
"
eth-0
"
module
=
self
.
_create_module
(
variables
)
interfaces
=
[{
"
var_name
"
:
"
kolla_foo_interface
"
,
"
network
"
:
"
foo
"
,
"
description
"
:
"
Foo network
"
,
"
required
"
:
False
,
}]
result
=
module
.
_run
(
interfaces
,
[])
expected
=
{
"
changed
"
:
False
,
"
ansible_facts
"
:
{
"
kolla_foo_interface
"
:
"
eth_0
"
,
},
"
_ansible_facts_cacheable
"
:
False
,
}
self
.
assertEqual
(
expected
,
result
)
def
test__run_interface_not_mapped
(
self
):
module
=
self
.
_create_module
()
interfaces
=
[{
...
...
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