Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
104
Merge Requests
104
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
b4faf71d
Commit
b4faf71d
authored
Nov 28, 2024
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simpleran/instance-ors: cleanup amarisoft section
parent
40e80171
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
software/simpleran/buildout.hash.cfg
software/simpleran/buildout.hash.cfg
+2
-2
software/simpleran/instance-ors.cfg
software/simpleran/instance-ors.cfg
+5
-5
software/simpleran/instance.cfg
software/simpleran/instance.cfg
+3
-3
No files found.
software/simpleran/buildout.hash.cfg
View file @
b4faf71d
...
@@ -16,11 +16,11 @@
...
@@ -16,11 +16,11 @@
[template]
[template]
filename = instance.cfg
filename = instance.cfg
md5sum =
aa7feb77723afc25bb9403179d6a3f0f
md5sum =
fc545fa11ca2da5cff420c72e72ae8e9
[template-ors]
[template-ors]
filename = instance-ors.cfg
filename = instance-ors.cfg
md5sum =
1bcf1d10fdcc7f77172b93bf2c50241f
md5sum =
307e38207945a9adcfea0263cba9d3a6
[slaplte.jinja2]
[slaplte.jinja2]
_update_hash_filename_ = slaplte.jinja2
_update_hash_filename_ = slaplte.jinja2
...
...
software/simpleran/instance-ors.cfg
View file @
b4faf71d
...
@@ -167,14 +167,14 @@ init =
...
@@ -167,14 +167,14 @@ init =
}
}
def get_sdr_info(cmd):
def get_sdr_info(cmd):
if options['configuration'].get('testing', False):
if options['configuration'].get('testing', False):
return {'t': 'TDD', 'b': 'B39', 'v': '4.2', 's': 'B53'}[cmd]
.encode()
return {'t': 'TDD', 'b': 'B39', 'v': '4.2', 's': 'B53'}[cmd]
return subprocess.check_output(
return subprocess.check_output(
["sudo", "-n", options['sdr-dir'] + "/get-sdr-info", "-" + cmd]
["sudo", "-n", options['sdr-dir'] + "/get-sdr-info", "-" + cmd]
)
)
.decode()
version = get_sdr_info('v')
.decode()
version = get_sdr_info('v')
options['version'] = float(version) if version != 'UNKNOWN' else 0
options['version'] = float(version) if version != 'UNKNOWN' else 0
options['band'] = get_sdr_info('b')
.decode()
options['band'] = get_sdr_info('b')
options['tdd'] = get_sdr_info('t')
.decode()
options['tdd'] = get_sdr_info('t')
options['one-watt'] = bool(options['version'] >= 4)
options['one-watt'] = bool(options['version'] >= 4)
options['ors-version'] = "{} {} {}".format(
options['ors-version'] = "{} {} {}".format(
options['tdd'],
options['tdd'],
...
...
software/simpleran/instance.cfg
View file @
b4faf71d
...
@@ -82,9 +82,9 @@ init =
...
@@ -82,9 +82,9 @@ init =
[sdr]
[sdr]
recipe = slapos.recipe.build
recipe = slapos.recipe.build
dir = /opt/sdr
init =
init =
pass
# Set SDR directory
options['dir'] = options['configuration'].get('sdr_dir', '/opt/sdr')
[amarisoft]
[amarisoft]
recipe = slapos.recipe.build
recipe = slapos.recipe.build
...
@@ -104,7 +104,7 @@ init =
...
@@ -104,7 +104,7 @@ init =
else:
else:
options['version'] = options['fixed_version']
options['version'] = options['fixed_version']
# Set Binaries and license directories
# Set Binaries and license directories
binary_dir = options['dir'] + "/v" + options['version']
.
binary_dir = options['dir'] + "/v" + options['version']
options['license_dir'] = options['dir'] + '/.amarisoft'
options['license_dir'] = options['dir'] + '/.amarisoft'
options['sdr_dir'] = options['binary_dir'] + '/trx_sdr'
options['sdr_dir'] = options['binary_dir'] + '/trx_sdr'
options['enb_dir'] = options['binary_dir'] + '/enb'
options['enb_dir'] = options['binary_dir'] + '/enb'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment