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
Łukasz Nowak
slapos
Commits
1bd2e9d0
Commit
1bd2e9d0
authored
Jan 19, 2024
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XXX refix defaults
parent
63227759
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
11 deletions
+13
-11
software/rapid-cdn/buildout.hash.cfg
software/rapid-cdn/buildout.hash.cfg
+4
-4
software/rapid-cdn/instance-frontend.cfg.in
software/rapid-cdn/instance-frontend.cfg.in
+1
-1
software/rapid-cdn/instance-master.cfg.in
software/rapid-cdn/instance-master.cfg.in
+1
-1
software/rapid-cdn/instance.cfg.in
software/rapid-cdn/instance.cfg.in
+3
-2
software/rapid-cdn/software.py
software/rapid-cdn/software.py
+4
-3
No files found.
software/rapid-cdn/buildout.hash.cfg
View file @
1bd2e9d0
...
...
@@ -14,7 +14,7 @@
# not need these here).
[template]
filename = instance.cfg.in
md5sum =
31821067c5f1586863c8c64c2143a51c
md5sum =
173312288efa2070611a6ba50120c952
[profile-common]
filename = instance-common.cfg.in
...
...
@@ -22,11 +22,11 @@ md5sum = 5784bea3bd608913769ff9a8afcccb68
[profile-frontend]
filename = instance-frontend.cfg.in
md5sum =
a0b28604769b1fe3fd745ef9683984e7
md5sum =
628a3d2dfb493b9834a23b9c02304f8d
[profile-master]
filename = instance-master.cfg.in
md5sum =
c8103be1781b3289e52c863921e9436a
md5sum =
bddf84b27d403fb6d5c3a969e78c43cb
[profile-slave-list]
filename = instance-slave-list.cfg.in
...
...
@@ -98,7 +98,7 @@ md5sum = 04bc664aa0159acaafec49a6bc36e84b
[software-py]
filename = software.py
md5sum =
487233af12c5b41d636a44a21a9daa64
md5sum =
2fef3ad7fb2f367045e6977f422f3bb0
[profile-kedifa]
filename = instance-kedifa.cfg.in
...
...
software/rapid-cdn/instance-frontend.cfg.in
View file @
1bd2e9d0
{% import "caucase" as caucase with context %}
{%- set configuration = instance_parameter_dict['configuration'] %}
{%- do software_module.merge_d
ict
(configuration['user'], FRONTEND_USER_DEFAULTS) %}
{%- do software_module.merge_d
efaults
(configuration['user'], FRONTEND_USER_DEFAULTS) %}
{%- set HTTP3_PORT = configuration['user']['global']['expert']['advertised-http3-port'] %}
{%- set FRONTEND_HTTP3 = configuration['user']['global']['enable-http3'] %}
{%- if FRONTEND_HTTP3 %}
...
...
software/rapid-cdn/instance-master.cfg.in
View file @
1bd2e9d0
{%- import "caucase" as CAUCASE with context %}
{#- BEGIN: Definition of global variables of the profile #}
{%- set configuration = instance_parameter_dict['configuration'].copy() %}
{%- do software_module.merge_d
ict
(configuration, CLUSTER_DEFAULTS) %}
{%- do software_module.merge_d
efaults
(configuration, CLUSTER_DEFAULTS) %}
{%- set SLAVE_TRUE_VALUES = ['y', 'yes', '1', 'true'] -%}
{#- List of keys which shall pass buildout before sending in request to parse ${...:...} #}
{%- set NEED_BUILDOUT_PASS_REQUEST_KEY_LIST = [
...
...
software/rapid-cdn/instance.cfg.in
View file @
1bd2e9d0
...
...
@@ -68,8 +68,9 @@ init =
default_dict[property] = value_dict['default']
elif 'properties' in value_dict:
default_dict[property] = fetchLevel(value_dict)
#else: # XXX -- then merge_dict can't work nicely...
# default_dict[property] = None
else:
# None means no default
default_dict[property] = None
return default_dict
options['defaults'] = fetchLevel(input_json)
...
...
software/rapid-cdn/software.py
View file @
1bd2e9d0
...
...
@@ -124,12 +124,13 @@ def caucase_csr_sign_check():
print
(
'OK No CSR to sign on %s'
%
(
ca_url
,))
def
merge_d
ict
(
d
,
u
):
def
merge_d
efaults
(
d
,
u
):
# inspired https://stackoverflow.com/a/3233356
for
k
,
v
in
u
.
items
():
if
isinstance
(
v
,
collections
.
abc
.
Mapping
):
d
[
k
]
=
merge_d
ict
(
d
.
get
(
k
,
{}),
v
)
d
[
k
]
=
merge_d
efaults
(
d
.
get
(
k
,
{}),
v
)
else
:
if
k
not
in
d
:
# None means no default defined
if
k
not
in
d
and
v
is
not
None
:
d
[
k
]
=
v
return
d
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