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
Aurel
slapos
Commits
1c20d190
Commit
1c20d190
authored
Jan 08, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'frontend'
parents
c78e7c59
8c5318e5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
slapos/recipe/apache_frontend/__init__.py
slapos/recipe/apache_frontend/__init__.py
+9
-0
No files found.
slapos/recipe/apache_frontend/__init__.py
View file @
1c20d190
...
@@ -81,6 +81,9 @@ class Recipe(BaseSlapRecipe):
...
@@ -81,6 +81,9 @@ class Recipe(BaseSlapRecipe):
slave_instance_list
=
sorted
(
slave_instance_list
,
slave_instance_list
=
sorted
(
slave_instance_list
,
key
=
operator
.
itemgetter
(
'slave_reference'
))
key
=
operator
.
itemgetter
(
'slave_reference'
))
# dict of used domains, only used to track duplicates
domain_dict
=
{}
for
slave_instance
in
slave_instance_list
:
for
slave_instance
in
slave_instance_list
:
backend_url
=
slave_instance
.
get
(
"url"
,
None
)
backend_url
=
slave_instance
.
get
(
"url"
,
None
)
reference
=
slave_instance
.
get
(
"slave_reference"
)
reference
=
slave_instance
.
get
(
"slave_reference"
)
...
@@ -106,6 +109,12 @@ class Recipe(BaseSlapRecipe):
...
@@ -106,6 +109,12 @@ class Recipe(BaseSlapRecipe):
domain
=
"%s.%s"
%
(
reference
.
replace
(
"-"
,
""
).
lower
(),
domain
=
"%s.%s"
%
(
reference
.
replace
(
"-"
,
""
).
lower
(),
frontend_domain_name
)
frontend_domain_name
)
if
domain_dict
.
get
(
domain
):
# This domain already has been processed, skip this new one
continue
else
:
domain_dict
[
domain
]
=
True
# Define the URL where the instance will be available
# Define the URL where the instance will be available
# WARNING: we use default ports (443, 80) here.
# WARNING: we use default ports (443, 80) here.
slave_dict
[
reference
]
=
"%s%s/"
%
(
scheme
,
domain
)
slave_dict
[
reference
]
=
"%s%s/"
%
(
scheme
,
domain
)
...
...
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