Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LimaGroup
Lima-Launcher
Commits
339d401d
Commit
339d401d
authored
Jan 27, 2022
by
Alejandro Homs Puron
Browse files
[LIMA_LAUNCHER] Support tango_lima applications
parent
437b20a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/lima_launcher
View file @
339d401d
...
...
@@ -148,6 +148,23 @@ def get_tango_json_config(server, instance):
return
config_str
def
launch_lima_tango
(
config
,
args
):
tango_config
=
config
.
get
(
'lima_tango'
,
{})
instance
=
tango_config
.
get
(
'instance'
,
''
)
if
not
instance
:
raise
ValueError
(
'Missing lima_tango instance definition'
)
tango_debug_level
=
config
.
get
(
'tango_debug_level'
,
None
)
environ_config
=
config
.
get
(
'environment'
,
{})
with
Environment
(
environ_config
,
args
=
args
)
as
env
:
cmd
=
[
'LimaCCDs'
,
instance
]
if
tango_debug_level
is
not
None
:
cmd
.
append
(
f
'-v
{
tango_debug_level
}
'
)
ret
=
env
.
run_system_cmd
(
*
cmd
)
exit
(
ret
.
returncode
)
def
lima2_get_executables
(
tango_config
,
args
):
plugin
=
tango_config
.
get
(
'plugin'
,
''
)
if
not
plugin
:
...
...
@@ -244,15 +261,18 @@ def main():
parser
.
print_help
()
exit
(
1
)
config
=
json
.
loads
(
json_config
)
if
args
.
verbose
:
print
(
'JSON config:'
)
print
(
json_config
)
config
=
json
.
loads
(
json_config
)
os
.
environ
[
'LIMA_LAUNCHER_PID'
]
=
str
(
os
.
getpid
())
app
=
config
.
get
(
'application'
,
''
)
if
app
==
'lima2_tango'
:
if
app
==
'lima_tango'
:
launch_lima_tango
(
config
,
args
)
elif
app
==
'lima2_tango'
:
launch_lima2_tango
(
config
,
args
)
else
:
raise
ValueError
(
'Only lima2_tango application supported'
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment