• Kirill Smelkov's avatar
    software/ors-amarisoft: Merge instance-ue-lte.jinja2.cfg +... · f877ed2c
    Kirill Smelkov authored
    software/ors-amarisoft: Merge instance-ue-lte.jinja2.cfg + instance-ue-nr.jinja2.cfg  -> into instance-ue.jinja2.cfg
    
    This is preparatory step for MultiRU and removes code duplication.
    
    Mostly straightforward, but there is one backward incompatible change: instead
    of ue_lte_config_link and ue_nr_config_link there is now only one
    ue_config_link parameter.
    
    We talked with Lu some time ago and my understanding is that UEsim is not widely
    used. This way I think it is better to clarify things instead of putting
    backward compatibility effort for nothing.
    
    /cc @lu.xu, @tomo, @xavier_thompson, @Daetalus
    /reviewed-by @jhuge
    /reviewed-on !1523
    
    --------
    
    Appendix. Diff between instance-ue-lte.jinja2.cfg and instance-ue-nr.jinja2.cfg before this patch
    
    ```
    $ git diff --no-index instance-ue-lte.jinja2.cfg instance-ue-nr.jinja2.cfg
    ```
    
    ```diff
    diff --git a/instance-ue-lte.jinja2.cfg b/instance-ue-nr.jinja2.cfg
    index 4d4a2e329..8fd238bfb 100644
    --- a/instance-ue-lte.jinja2.cfg
    +++ b/instance-ue-nr.jinja2.cfg
    @@ -1,7 +1,7 @@
     [buildout]
     parts =
       directory
    -  lte-ue-lte-config
    +  lte-ue-nr-config
       lte-ue-service
       check-sdr-busy.py
       monitor-base
    @@ -35,11 +35,11 @@ url = {{ slap_connection['server-url'] }}
     key = {{ slap_connection['key-file'] }}
     cert = {{ slap_connection['cert-file'] }}
    
    -configuration.default_lte_bandwidth = {{ default_lte_bandwidth }}
    +configuration.default_nr_bandwidth = {{ default_nr_bandwidth }}
     configuration.default_n_antenna_dl = {{ default_n_antenna_dl }}
     configuration.default_n_antenna_ul = {{ default_n_antenna_ul }}
    -configuration.default_lte_imsi = {{ default_lte_imsi }}
    -configuration.default_lte_k = {{default_lte_k}}
    +configuration.default_nr_imsi = {{ default_nr_imsi }}
    +configuration.default_nr_k = {{ default_nr_k }}
    
     [directory]
     recipe = slapos.cookbook:mkdirectory
    @@ -56,11 +56,11 @@ service = ${:etc}/service
     promise = ${:etc}/promise
     log = ${:var}/log
    
    -{% if slapparameter_dict.get("ue_lte_config_link", None) %}
    -[ue-lte-config-dl]
    +{% if slapparameter_dict.get("ue_nr_config_link", None) %}
    +[ue-nr-config-dl]
     recipe = slapos.recipe.build:download
    -url = {{ slapparameter_dict.get("ue_lte_config_link") }}
    -version = {{ slapparameter_dict.get("ue_lte_config_version") }}
    +url = {{ slapparameter_dict.get("ue_nr_config_link") }}
    +version = {{ slapparameter_dict.get("ue_nr_config_version") }}
     offline = false
     {% endif %}
    
    @@ -87,7 +87,7 @@ mode = 0775
     reserve-cpu = True
     pidfile = ${directory:run}/ue.pid
     hash-files =
    -  ${lte-ue-lte-config:output}
    +  ${lte-ue-nr-config:output}
       ${lte-ue-sh-wrapper:output}
     environment =
       LD_LIBRARY_PATH={{ openssl_location }}/lib
    @@ -101,18 +101,19 @@ context =
       section slap_configuration slap-configuration
       section pub_info publish-connection-information
       key slapparameter_dict slap-configuration:configuration
    -  json do_lte true
    -  json do_nr  false
    +  json do_lte false
    +  json do_nr  true
    
    -[lte-ue-lte-config]
    +[lte-ue-nr-config]
     <= config-base
    -{% if slapparameter_dict.get("ue_lte_config_link", None) %}
    -url = ${ue-lte-config-dl:target}
    +{% if slapparameter_dict.get("ue_nr_config_link", None) %}
    +url = ${ue-nr-config-dl:target}
     {% else %}
     url = {{ ue_template }}
     {% endif %}
     output = ${directory:etc}/ue.cfg
    
    +
     [publish-connection-information]
     <= monitor-publish
     recipe = slapos.cookbook:publish.serialised
    ```
    f877ed2c
software-base.cfg 4.54 KB