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
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
Justin
slapos
Commits
2089a585
Commit
2089a585
authored
Jan 07, 2020
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kvm: display url-additional in connection parameters for resilient kvm
parent
66b53066
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
1 deletion
+42
-1
software/kvm/buildout.hash.cfg
software/kvm/buildout.hash.cfg
+1
-1
software/kvm/instance-kvm-resilient.cfg.jinja2
software/kvm/instance-kvm-resilient.cfg.jinja2
+7
-0
software/kvm/test/test.py
software/kvm/test/test.py
+34
-0
No files found.
software/kvm/buildout.hash.cfg
View file @
2089a585
...
...
@@ -27,7 +27,7 @@ md5sum = 2e743132ba4e001f784791311df9ba6a
[template-kvm-resilient]
filename = instance-kvm-resilient.cfg.jinja2
md5sum =
e50e45c3097ed5a7115817fbc967f173
md5sum =
7de5756f59ef7d823cd8ed33e6d15230
[template-kvm-import]
filename = instance-kvm-import.cfg.jinja2.in
...
...
software/kvm/instance-kvm-resilient.cfg.jinja2
View file @
2089a585
...
...
@@ -13,6 +13,7 @@
{% set monitor_dict = {'parameter': monitor_parameter, 'return': monitor_return} -%}
{% endif -%}
{% set monitor_interface_url = slapparameter_dict.pop('monitor-interface-url', 'https://monitor.app.officejs.com') -%}
{% set additional_frontend = (slapparameter_dict.get('frontend-additional-instance-guid', '').strip() != '') %}
[buildout]
eggs-directory = {{ eggs_directory }}
...
...
@@ -66,6 +67,9 @@ return =
url ssh-public-key resilient-ssh-url notification-id ip {{ monitor_return | join(' ') }}
# KVM related parameters
# XXX: return ALL parameters (like nat rules), through jinja
{% if additional_frontend %}
url-additional
{% endif %}
backend-url url ip
{{ ' ' }}ipv6-network-info
...
...
@@ -81,6 +85,9 @@ monitor-user = ${monitor-publish-parameters:monitor-user}
monitor-base-url = ${monitor-publish-parameters:monitor-base-url}
monitor-setup-url = {{ monitor_interface_url }}/#page=settings_configurator&url=${monitor-publish-parameters:monitor-url}&username=${monitor-publish-parameters:monitor-user}&password=${publish-early:monitor-password}
{% endif -%}
{% if additional_frontend %}
url-additional = ${request-kvm:connection-url-additional}
{% endif %}
[kvm-frontend-url-bin]
recipe = collective.recipe.template
...
...
software/kvm/test/test.py
View file @
2089a585
...
...
@@ -309,6 +309,40 @@ class TestInstanceResilient(InstanceTestCase):
'takeover-kvm-1-url'
,
'url'
]))
@
unittest
.
skipIf
(
not
sanityCheck
(),
'missing kvm_intel module'
)
class
TestAccessResilientAdditional
(
InstanceTestCase
):
__partition_reference__
=
'ara'
expected_partition_with_monitor_base_url_count
=
1
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
'kvm-resilient'
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'frontend-additional-instance-guid'
:
'SOMETHING'
}
def
test
(
self
):
connection_parameter_dict
=
self
.
computer_partition
\
.
getConnectionParameterDict
()
result
=
requests
.
get
(
connection_parameter_dict
[
'url'
],
verify
=
False
)
self
.
assertEqual
(
httplib
.
OK
,
result
.
status_code
)
self
.
assertIn
(
'<title>noVNC</title>'
,
result
.
text
)
result
=
requests
.
get
(
connection_parameter_dict
[
'url-additional'
],
verify
=
False
)
self
.
assertEqual
(
httplib
.
OK
,
result
.
status_code
)
self
.
assertIn
(
'<title>noVNC</title>'
,
result
.
text
)
class
TestInstanceNbdServer
(
InstanceTestCase
):
__partition_reference__
=
'ins'
instance_max_retry
=
5
...
...
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