Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GÉANT Service Orchestrator
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
GÉANT Orchestration and Automation Team
GAP
GÉANT Service Orchestrator
Commits
63f6f34f
Commit
63f6f34f
authored
1 year ago
by
Jorge Sasiain
Browse files
Options
Downloads
Patches
Plain Diff
NAT-152: fix ipv6 allocation by host ip address
parent
378c07f2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!27
Merge develop into NAT-185
,
!15
Nat 185
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gso/services/_ipam.py
+1
-1
1 addition, 1 deletion
gso/services/_ipam.py
gso/services/ipam.py
+24
-16
24 additions, 16 deletions
gso/services/ipam.py
with
25 additions
and
17 deletions
gso/services/_ipam.py
+
1
−
1
View file @
63f6f34f
...
...
@@ -480,7 +480,7 @@ def allocate_service_host(hostname=None,
assert
any
(
ipv6_addr
in
oss_ipv6_container
for
oss_ipv6_container
in
oss_ipv6_containers
)
else
:
assert
any
(
ipv
4
_addr
in
oss_ipv6_network
assert
any
(
ipv
6
_addr
in
oss_ipv6_network
for
oss_ipv6_network
in
oss_ipv6_networks
)
host
=
_allocate_host
(
...
...
This diff is collapsed.
Click to expand it.
gso/services/ipam.py
+
24
−
16
View file @
63f6f34f
...
...
@@ -70,40 +70,48 @@ if __name__ == '__main__':
hostname_A
=
'
hA
'
hostname_B
=
'
hB
'
# h1 LO (loopback)
# hA LO (loopback)
# loA_v4_host_address = ipaddress.ip_address('10.255.255.0')
# loA_v6_host_address = ipaddress.ip_address('dead:beef::0')
# loA_host_addresses = HostAddresses(v4=loA_v4_host_address,
# v6=loA_v6_host_address)
# new_service_host(hostname=hostname_A+"_LO",
# host_addresses=loA_host_addresses,
# cname_aliases=["alias1.hA", "alias2.hA"],
# service_type='LO')
new_service_host
(
hostname
=
hostname_A
+
"
_LO
"
,
cname_aliases
=
[
"
alias1.hA
"
,
"
alias2.hA
"
],
service_type
=
'
LO
'
)
# h
2
LO (loopback)
# h
B
LO (loopback)
new_service_host
(
hostname
=
hostname_B
+
"
_LO
"
,
cname_aliases
=
[
"
alias1.hB
"
],
service_type
=
'
LO
'
)
# h
1
-h
2
TRUNK
trunk
12
_network_extattrs
=
{
# h
A
-h
B
TRUNK
trunk
AB
_network_extattrs
=
{
"
vrf_name
"
:
{
"
value
"
:
"
dummy_vrf
"
},
}
trunk
12
_host_extattrs
=
{
trunk
AB
_host_extattrs
=
{
"
Site
"
:
{
"
value
"
:
"
dummy_site
"
},
}
trunk
12
_service_networks
=
new_service_networks
(
trunk
AB
_service_networks
=
new_service_networks
(
service_type
=
'
TRUNK
'
,
extattrs
=
trunk
12
_network_extattrs
,
comment
=
"
Network for h
1
-h
2
TRUNK
"
extattrs
=
trunk
AB
_network_extattrs
,
comment
=
"
Network for h
A
-h
B
TRUNK
"
)
trunk
12
_v4_host_address
=
trunk
12
_service_networks
.
v4
.
network_address
trunk
12
_v6_host_address
=
trunk
12
_service_networks
.
v6
.
network_address
trunk
12
_host_addresses
=
HostAddresses
(
v4
=
trunk
12
_v4_host_address
,
v6
=
trunk
12
_v6_host_address
)
trunk
AB
_v4_host_address
=
trunk
AB
_service_networks
.
v4
.
network_address
trunk
AB
_v6_host_address
=
trunk
AB
_service_networks
.
v6
.
network_address
trunk
AB
_host_addresses
=
HostAddresses
(
v4
=
trunk
AB
_v4_host_address
,
v6
=
trunk
AB
_v6_host_address
)
new_service_host
(
hostname
=
hostname_A
+
"
_TRUNK
"
,
service_type
=
'
TRUNK
'
,
host_addresses
=
trunk
12
_host_addresses
,
extattrs
=
trunk
12
_host_extattrs
)
host_addresses
=
trunk
AB
_host_addresses
,
extattrs
=
trunk
AB
_host_extattrs
)
new_service_host
(
hostname
=
hostname_B
+
"
_TRUNK
"
,
service_type
=
'
TRUNK
'
,
service_networks
=
trunk
12
_service_networks
,
extattrs
=
trunk
12
_host_extattrs
)
service_networks
=
trunk
AB
_service_networks
,
extattrs
=
trunk
AB
_host_extattrs
)
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