Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mutalyzer
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirrors
mutalyzer
Commits
d4f7f5cb
Commit
d4f7f5cb
authored
10 years ago
by
Vermaat
Browse files
Options
Downloads
Patches
Plain Diff
Option to have debug webservers listen on custom hostname
parent
670ec1a2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
mutalyzer/entrypoints/service_json.py
+10
-6
10 additions, 6 deletions
mutalyzer/entrypoints/service_json.py
mutalyzer/entrypoints/service_soap.py
+11
-7
11 additions, 7 deletions
mutalyzer/entrypoints/service_soap.py
mutalyzer/entrypoints/website.py
+9
-5
9 additions, 5 deletions
mutalyzer/entrypoints/website.py
with
30 additions
and
18 deletions
mutalyzer/entrypoints/service_json.py
+
10
−
6
View file @
d4f7f5cb
...
...
@@ -42,12 +42,12 @@ if settings.REVERSE_PROXIED:
application
=
_ReverseProxied
(
application
)
def
debugserver
(
port
):
def
debugserver
(
host
,
port
):
"""
Run the webservice with the Python built-in HTTP server.
"""
sys
.
stderr
.
write
(
'
Listening on http://
localhost
:%d/
\n
'
%
port
)
make_server
(
'
local
host
'
,
port
,
application
).
serve_forever
()
sys
.
stderr
.
write
(
'
Listening on http://
%s
:%d/
\n
'
%
(
host
,
port
)
)
make_server
(
host
,
port
,
application
).
serve_forever
()
def
main
():
...
...
@@ -57,11 +57,15 @@ def main():
parser
=
argparse
.
ArgumentParser
(
description
=
'
Mutalyzer HTTP/RPC+JSON webservice.
'
)
parser
.
add_argument
(
'
-p
'
,
'
--port
'
,
metavar
=
'
NUMBER
'
,
dest
=
'
port
'
,
type
=
int
,
default
=
8082
,
help
=
'
port to run the webservice on (default: 8082)
'
)
'
-H
'
,
'
--host
'
,
metavar
=
'
HOSTNAME
'
,
dest
=
'
host
'
,
default
=
'
127.0.0.1
'
,
help
=
'
hostname to listen on (default: 127.0.0.1; specify 0.0.0.0 to
'
'
listen on all hostnames)
'
)
parser
.
add_argument
(
'
-p
'
,
'
--port
'
,
metavar
=
'
PORT
'
,
dest
=
'
port
'
,
type
=
int
,
default
=
8082
,
help
=
'
port to listen on (default: 8082)
'
)
args
=
parser
.
parse_args
()
debugserver
(
args
.
port
)
debugserver
(
args
.
host
,
args
.
port
)
if
__name__
==
'
__main__
'
:
...
...
This diff is collapsed.
Click to expand it.
mutalyzer/entrypoints/service_soap.py
+
11
−
7
View file @
d4f7f5cb
...
...
@@ -42,13 +42,13 @@ if settings.REVERSE_PROXIED:
application
=
_ReverseProxied
(
application
)
def
debugserver
(
port
):
def
debugserver
(
host
,
port
):
"""
Run the webservice with the Python built-in HTTP server.
"""
sys
.
stderr
.
write
(
'
Listening on http://
localhost
:%d/
\n
'
%
port
)
sys
.
stderr
.
write
(
'
WDSL file is at http://
localhost
:%d/?wsdl
\n
'
%
port
)
make_server
(
'
local
host
'
,
port
,
application
).
serve_forever
()
sys
.
stderr
.
write
(
'
Listening on http://
%s
:%d/
\n
'
%
(
host
,
port
)
)
sys
.
stderr
.
write
(
'
WDSL file is at http://
%s
:%d/?wsdl
\n
'
%
(
host
,
port
)
)
make_server
(
host
,
port
,
application
).
serve_forever
()
def
main
():
...
...
@@ -58,11 +58,15 @@ def main():
parser
=
argparse
.
ArgumentParser
(
description
=
'
Mutalyzer SOAP webservice.
'
)
parser
.
add_argument
(
'
-p
'
,
'
--port
'
,
metavar
=
'
NUMBER
'
,
dest
=
'
port
'
,
type
=
int
,
default
=
8081
,
help
=
'
port to run the webservice on (default: 8081)
'
)
'
-H
'
,
'
--host
'
,
metavar
=
'
HOSTNAME
'
,
dest
=
'
host
'
,
default
=
'
127.0.0.1
'
,
help
=
'
hostname to listen on (default: 127.0.0.1; specify 0.0.0.0 to
'
'
listen on all hostnames)
'
)
parser
.
add_argument
(
'
-p
'
,
'
--port
'
,
metavar
=
'
PORT
'
,
dest
=
'
port
'
,
type
=
int
,
default
=
8081
,
help
=
'
port to listen on (default: 8081)
'
)
args
=
parser
.
parse_args
()
debugserver
(
args
.
port
)
debugserver
(
args
.
host
,
args
.
port
)
if
__name__
==
'
__main__
'
:
...
...
This diff is collapsed.
Click to expand it.
mutalyzer/entrypoints/website.py
+
9
−
5
View file @
d4f7f5cb
...
...
@@ -52,11 +52,11 @@ if settings.REVERSE_PROXIED:
application
.
wsgi_app
=
_ReverseProxied
(
application
.
wsgi_app
)
def
debugserver
(
port
):
def
debugserver
(
host
,
port
):
"""
Run the website with the Python built-in HTTP server.
"""
application
.
run
(
port
=
port
,
debug
=
True
,
use_reloader
=
False
)
application
.
run
(
host
=
host
,
port
=
port
,
debug
=
True
,
use_reloader
=
False
)
def
main
():
...
...
@@ -66,11 +66,15 @@ def main():
parser
=
argparse
.
ArgumentParser
(
description
=
'
Mutalyzer website.
'
)
parser
.
add_argument
(
'
-p
'
,
'
--port
'
,
metavar
=
'
NUMBER
'
,
dest
=
'
port
'
,
type
=
int
,
default
=
8089
,
help
=
'
port to run the website on (default: 8080)
'
)
'
-H
'
,
'
--host
'
,
metavar
=
'
HOSTNAME
'
,
dest
=
'
host
'
,
default
=
'
127.0.0.1
'
,
help
=
'
hostname to listen on (default: 127.0.0.1; specify 0.0.0.0 to
'
'
listen on all hostnames)
'
)
parser
.
add_argument
(
'
-p
'
,
'
--port
'
,
metavar
=
'
PORT
'
,
dest
=
'
port
'
,
type
=
int
,
default
=
8089
,
help
=
'
port to listen on (default: 8080)
'
)
args
=
parser
.
parse_args
()
debugserver
(
args
.
port
)
debugserver
(
args
.
host
,
args
.
port
)
if
__name__
==
'
__main__
'
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment