Commit 6d4d70c8 authored by Joanne Hugé's avatar Joanne Hugé

ors-amarisoft: add back support for IPv4 AMF / MME addresses

parent 87bac5c0
Pipeline #22816 failed with stage
in 0 seconds
......@@ -16,31 +16,31 @@
[template]
filename = instance.cfg
md5sum = 06331958afaaeb200e4d7f48b417cde8
md5sum = fc7bccab64e6794b33766ca9925231c8
[template-lte-enb-epc]
_update_hash_filename_ = instance-enb-epc.jinja2.cfg
md5sum = 946c70155a691e508e934a7ef2e442ba
md5sum = b10c10a9408a934052fd0960f31a75fc
[template-lte-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = 2b0ba32fb176fead6fb32779fa4d88be
md5sum = b5a0f5e258fd91573425b00027ca11b4
[template-lte-gnb-epc]
_update_hash_filename_ = instance-gnb-epc.jinja2.cfg
md5sum = 4a258326fe571790e07a0e903d94fde0
md5sum = 5f86177e7ef18a6046826f96397ded1d
[template-lte-epc]
_update_hash_filename_ = instance-epc.jinja2.cfg
md5sum = 1039c60e2dcb8ef144a8c56e34acce9b
md5sum = 2cfe5679374559ab94478b987d646d83
[template-lte-gnb]
_update_hash_filename_ = instance-gnb.jinja2.cfg
md5sum = 7d25976008c3aa588527db2b461ad72c
md5sum = 771c6b550ea558c708f207c75ff00f49
[template-lte-mme]
_update_hash_filename_ = instance-mme.jinja2.cfg
md5sum = e95761b8670ec8b90694e119a818e684
md5sum = 2c2d2dc4fd6b7a9100642e34812a5140
[ue_db.jinja2.cfg]
filename = config/ue_db.jinja2.cfg
......@@ -48,7 +48,7 @@ md5sum = dcaac06553a3222b14c0013a13f4a149
[enb.jinja2.cfg]
filename = config/enb.jinja2.cfg
md5sum = 18a8f16240881dbb87ecb5183d9872e0
md5sum = cd93c9c7bff2bcdd1cc01ad1cdf0c88c
[sib23.asn]
filename = config/sib23.asn
......@@ -56,7 +56,7 @@ md5sum = b377dac7f1fcf94fb9ce9ebed617f36a
[gnb.jinja2.cfg]
filename = config/gnb.jinja2.cfg
md5sum = c0d3d042960f5704dd2e3fa7714a4a5f
md5sum = 91005da479a848798d128dbfd407d2c7
[ltelogs.jinja2.sh]
filename = ltelogs.jinja2.sh
......@@ -64,7 +64,7 @@ md5sum = 1ba2e065bdf14a6411e95e80db17dcfd
[mme.jinja2.cfg]
filename = config/mme.jinja2.cfg
md5sum = fc073eb6450da95955009a127a333396
md5sum = da10ef4c61532364c758c7845614c4d6
[ims.jinja2.cfg]
filename = config/ims.jinja2.cfg
......
......@@ -33,7 +33,11 @@
{% endif %}
],
{% if slapparameter_dict.get('mme_list', '') %}
gtp_addr: "{{ gtp_addr }}",
{% if slapparameter_dict.get('use_ipv4', False) %}
gtp_addr: "{{ gtp_addr_v4 }}",
{% else %}
gtp_addr: "{{ gtp_addr_v6 }}",
{% endif %}
{% else %}
gtp_addr: "127.0.1.1",
{% endif %}
......
......@@ -39,7 +39,11 @@
],
{% if slapparameter_dict.get('amf_list', '') %}
gtp_addr: "{{ gtp_addr }}",
{% if slapparameter_dict.get('use_ipv4', False) %}
gtp_addr: "{{ gtp_addr_v4 }}",
{% else %}
gtp_addr: "{{ gtp_addr_v6 }}",
{% endif %}
{% else %}
gtp_addr: "127.0.1.1",
{% endif %}
......
......@@ -3,7 +3,11 @@
log_filename: "{{ directory['log'] }}/mme.log",
{% if slapparameter_dict.get('external_enb_gnb', '') %}
gtp_addr: "{{ gtp_addr }}",
{% if slapparameter_dict.get('use_ipv4', False) %}
gtp_addr: "{{ gtp_addr_v4 }}",
{% else %}
gtp_addr: "{{ gtp_addr_v6 }}",
{% endif %}
{% else %}
gtp_addr: "127.0.1.100",
{% endif %}
......
......@@ -55,7 +55,7 @@ config-name = mme
config-{{ key }} = {{ dumps(value) }}
{% endfor -%}
config-slave-list = {{ dumps(slave_instance_list) }}
return = monitor-base-url epc-ip
return = monitor-base-url epc-ipv6
[lte-enb-request]
<= request-common-base
......@@ -74,4 +74,5 @@ lte-enb-request = ${lte-enb-request:connection-monitor-base-url}
[publish-connection-information]
recipe = slapos.cookbook:publish.serialised
<= monitor-publish
epc-ip = ${lte-mme-request:connection-epc-ip}
epc-ipv6 = ${lte-mme-request:connection-epc-ipv6}
epc-ipv4 = {{ epc_ipv4 }}
......@@ -95,6 +95,12 @@
},
"type": "object",
"default": {}
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
"description": "Set to true to use IPv4 for AMF / MME addresses",
"type": "boolean"
}
}
}
......@@ -105,7 +105,8 @@ context =
section directory directory
section slap_configuration slap-configuration
key slapparameter_dict slap-configuration:configuration
key gtp_addr slap-configuration:ipv6-random
key gtp_addr_v6 slap-configuration:ipv6-random
raw gtp_addr_v4 {{ epc_ipv4 }}
raw sib23 {{ sib23 }}
import netaddr netaddr
......
......@@ -14,6 +14,12 @@
"title": "External eNB / gNB",
"description": "Set to true if external eNB / gNB will need to connect to this core network.",
"type": "boolean"
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
"description": "Set to true to use IPv4 for AMF / MME addresses",
"type": "boolean"
}
}
}
......@@ -44,7 +44,7 @@ cert-file = {{ slap_connection['cert-file'] }}
sla-computer_guid = {{ slap_connection['computer-id'] }}
config-monitor-password = ${monitor-htpasswd:passwd}
return = monitor-base-url epc-ip
return = monitor-base-url epc-ipv6
[lte-mme-request]
<= request-common-base
......@@ -62,4 +62,5 @@ lte-mme-request = ${lte-mme-request:connection-monitor-base-url}
[publish-connection-information]
recipe = slapos.cookbook:publish.serialised
<= monitor-publish
epc-ip = ${lte-mme-request:connection-epc-ip}
epc-ipv6 = ${lte-mme-request:connection-epc-ipv6}
epc-ipv4 = {{ epc_ipv4 }}
......@@ -55,7 +55,7 @@ config-name = mme
config-{{ key }} = {{ dumps(value) }}
{% endfor -%}
config-slave-list = {{ dumps(slave_instance_list) }}
return = monitor-base-url epc-ip
return = monitor-base-url epc-ipv6
[lte-gnb-request]
<= request-common-base
......@@ -74,4 +74,5 @@ lte-gnb-request = ${lte-gnb-request:connection-monitor-base-url}
[publish-connection-information]
recipe = slapos.cookbook:publish.serialised
<= monitor-publish
epc-ip = ${lte-mme-request:connection-epc-ip}
epc-ipv6 = ${lte-mme-request:connection-epc-ipv6}
epc-ipv4 = {{ epc_ipv4 }}
......@@ -137,6 +137,12 @@
},
"type": "object",
"default": {}
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
"description": "Set to true to use IPv4 for AMF / MME addresses",
"type": "boolean"
}
}
}
......@@ -106,7 +106,8 @@ context =
section directory directory
section slap_configuration slap-configuration
key slapparameter_dict slap-configuration:configuration
key gtp_addr slap-configuration:ipv6-random
key gtp_addr_v6 slap-configuration:ipv6-random
raw gtp_addr_v4 {{ epc_ipv4 }}
import netaddr netaddr
[lte-gnb-config]
......
......@@ -119,7 +119,8 @@ context =
section directory directory
section slap_configuration slap-configuration
key slapparameter_dict slap-configuration:configuration
key gtp_addr slap-configuration:ipv6-random
key gtp_addr_v6 slap-configuration:ipv6-random
raw gtp_addr_v4 {{ epc_ipv4 }}
import netaddr netaddr
key ifup_empty lte-mme-ifup-empty:wrapper-path
......@@ -148,7 +149,8 @@ password = {{ slapparameter_dict['monitor-password'] | string }}
[publish-connection-information]
<= monitor-publish
recipe = slapos.cookbook:publish.serialised
epc-ip = ${slap-configuration:ipv6-random}
epc-ipv6 = ${slap-configuration:ipv6-random}
epc-ipv4 = {{ epc_ipv4 }}
# Add custom promise to check if /dev/sdr0 is busy
[tun-up-promise]
......
......@@ -93,6 +93,12 @@
},
"type": "object",
"default": {}
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
"description": "Set to true to use IPv4 for AMF / MME addresses",
"type": "boolean"
}
}
}
......@@ -81,6 +81,12 @@
},
"type": "object",
"default": {}
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
"description": "Set to true to use IPv4 for AMF / MME addresses",
"type": "boolean"
}
}
}
......@@ -135,6 +135,12 @@
},
"type": "object",
"default": {}
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
"description": "Set to true to use IPv4 for AMF / MME addresses",
"type": "boolean"
}
}
}
......@@ -123,6 +123,12 @@
},
"type": "object",
"default": {}
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
"description": "Set to true to use IPv4 for AMF / MME addresses",
"type": "boolean"
}
}
}
......@@ -93,6 +93,12 @@
},
"type": "object",
"default": {}
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
"description": "Set to true to use IPv4 for AMF / MME addresses",
"type": "boolean"
}
}
}
......@@ -81,6 +81,12 @@
},
"type": "object",
"default": {}
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
"description": "Set to true to use IPv4 for AMF / MME addresses",
"type": "boolean"
}
}
}
......@@ -135,6 +135,12 @@
},
"type": "object",
"default": {}
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
"description": "Set to true to use IPv4 for AMF / MME addresses",
"type": "boolean"
}
}
}
......@@ -123,6 +123,12 @@
},
"type": "object",
"default": {}
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
"description": "Set to true to use IPv4 for AMF / MME addresses",
"type": "boolean"
}
}
}
......@@ -93,6 +93,12 @@
},
"type": "object",
"default": {}
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
"description": "Set to true to use IPv4 for AMF / MME addresses",
"type": "boolean"
}
}
}
......@@ -81,6 +81,12 @@
},
"type": "object",
"default": {}
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
"description": "Set to true to use IPv4 for AMF / MME addresses",
"type": "boolean"
}
}
}
......@@ -135,6 +135,12 @@
},
"type": "object",
"default": {}
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
"description": "Set to true to use IPv4 for AMF / MME addresses",
"type": "boolean"
}
}
}
......@@ -123,6 +123,12 @@
},
"type": "object",
"default": {}
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
"description": "Set to true to use IPv4 for AMF / MME addresses",
"type": "boolean"
}
}
}
......@@ -93,6 +93,12 @@
},
"type": "object",
"default": {}
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
"description": "Set to true to use IPv4 for AMF / MME addresses",
"type": "boolean"
}
}
}
......@@ -81,6 +81,12 @@
},
"type": "object",
"default": {}
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
"description": "Set to true to use IPv4 for AMF / MME addresses",
"type": "boolean"
}
}
}
......@@ -135,6 +135,12 @@
},
"type": "object",
"default": {}
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
"description": "Set to true to use IPv4 for AMF / MME addresses",
"type": "boolean"
}
}
}
......@@ -123,6 +123,12 @@
},
"type": "object",
"default": {}
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
"description": "Set to true to use IPv4 for AMF / MME addresses",
"type": "boolean"
}
}
}
......@@ -25,6 +25,7 @@ context =
raw buildout_directory ${buildout:directory}
section slap_connection slap-connection
key slapparameter_dict slap-configuration:configuration
key epc_ipv4 ethernet-ip:ipv4
$${:extra-context}
[amarisoft]
......@@ -39,6 +40,19 @@ init =
options['mme'] = path + "/mme"
options['ims'] = path + "/ims"
[ethernet-ip]
recipe = slapos.recipe.build
init =
import netifaces
for i in netifaces.interfaces():
if not (i.startswith("slaptun") or i.startswith("re6stnet") or i == "lo"):
a = netifaces.ifaddresses(i)
if netifaces.AF_INET in a:
try:
options['ipv4'] = a[netifaces.AF_INET][0]['addr']
except:
options['ipv4'] = "0.0.0.0"
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
enb-epc = dynamic-template-lte-enb-epc:output
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment