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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
isaak yansane-sisk
slapos
Commits
3679ef5f
Commit
3679ef5f
authored
Apr 25, 2012
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support both IPv4 and IPv6 address.
parent
a67c393d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
slapos/recipe/generic_varnish/__init__.py
slapos/recipe/generic_varnish/__init__.py
+4
-5
No files found.
slapos/recipe/generic_varnish/__init__.py
View file @
3679ef5f
...
...
@@ -38,7 +38,7 @@ class Recipe(GenericSlapRecipe):
def
_install
(
self
):
ip
=
self
.
options
[
'ip'
]
backend_url
=
self
.
parameter_dict
[
'tidstorage-url'
]
backend_
ip
,
backend_port
=
self
.
_getBackendServer
(
backend_url
)
backend_
server
,
backend_port
=
self
.
_getBackendServer
(
backend_url
)
varnishd_manager_port
=
int
(
self
.
options
[
'manager-port'
])
varnishd_server_port
=
int
(
self
.
options
[
'server-port'
])
path_list
=
[]
...
...
@@ -53,9 +53,8 @@ class Recipe(GenericSlapRecipe):
varnish_data
=
self
.
options
[
'varnish-data'
],
shell_path
=
self
.
options
[
'shell-path'
],
vcl_file
=
self
.
options
[
'vcl-file'
],
backend_ip
=
backend_ip
,
backend_port
=
backend_port
,
backend_server
=
"[%s]"
%
backend_ip
,
backend_port
=
backend_port
,
backend_server
=
backend_server
,
)
path_list
.
append
(
self
.
createExecutable
(
self
.
options
[
'varnishd-wrapper'
],
...
...
@@ -70,7 +69,7 @@ class Recipe(GenericSlapRecipe):
return
path_list
def
_getBackendServer
(
self
,
url
):
r
=
re
.
compile
(
'
\
/
\
/
\
[(.*)
\
]
:(
\
d*)
'
)
r
=
re
.
compile
(
'
\
/
\
/
(
\
[.+
\
]|[
\
d.]+)
:(
\
d*)'
)
result
=
r
.
search
(
url
)
ip
=
result
.
groups
()[
0
]
port
=
result
.
groups
()[
1
]
...
...
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