Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Klaus Wölfel
slapos.toolbox
Commits
5ec0a5a1
Commit
5ec0a5a1
authored
Jan 05, 2015
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webrunner: add getConnectionParameter API.
parent
0e4413c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
slapos/runner/views.py
slapos/runner/views.py
+10
-0
No files found.
slapos/runner/views.py
View file @
5ec0a5a1
...
...
@@ -14,6 +14,7 @@ import urllib
from
flask
import
(
Flask
,
request
,
redirect
,
url_for
,
render_template
,
g
,
flash
,
jsonify
,
session
,
abort
,
send_file
)
import
slapos
from
slapos.runner.utils
import
(
checkSoftwareFolder
,
configNewSR
,
createNewUser
,
getBuildAndRunParams
,
getProfilePath
,
getSlapgridResult
,
...
...
@@ -171,6 +172,15 @@ def inspectInstance():
slap_status
=
getSlapStatus
(
app
.
config
),
partition_amount
=
app
.
config
[
'partition_amount'
])
def
getConnectionParameter
(
partition_reference
):
"""
Return connection parameters of a partition.
"""
slap
=
slapos
.
slap
.
slap
()
slap
.
initializeConnection
(
app
.
config
[
'master_url'
])
partition
=
slap
.
registerComputerPartition
(
app
.
config
[
'computer_id'
],
partition_reference
)
return
jsonify
(
partition
.
getConnectionParameterDict
())
app
.
add_url_rule
(
"/getConnectionParameter/<partition_reference>"
,
'getConnectionParameter'
,
getConnectionParameter
,
methods
=
[
'GET'
])
#Reload instance process ans returns new value to ajax
def
supervisordStatus
():
...
...
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