Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snf-ganeti
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
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
itminedu
snf-ganeti
Commits
19205c39
Commit
19205c39
authored
16 years ago
by
Michael Hanselmann
Browse files
Options
Downloads
Patches
Plain Diff
ganeti-noded: Migrate to new HTTP server
Reviewed-by: amishchenko
parent
02cab3e7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
daemons/ganeti-noded
+6
-4
6 additions, 4 deletions
daemons/ganeti-noded
with
6 additions
and
4 deletions
daemons/ganeti-noded
+
6
−
4
View file @
19205c39
...
...
@@ -43,6 +43,8 @@ from ganeti import daemon
from
ganeti
import
http
from
ganeti
import
utils
import
ganeti.http.server
queue_lock
=
None
...
...
@@ -65,21 +67,21 @@ def _RequireJobQueueLock(fn):
return
wrapper
class
NodeHttpServer
(
http
.
HttpServer
):
class
NodeHttpServer
(
http
.
server
.
HttpServer
):
"""
The server implementation.
This class holds all methods exposed over the RPC interface.
"""
def
__init__
(
self
,
*
args
,
**
kwargs
):
http
.
HttpServer
.
__init__
(
self
,
*
args
,
**
kwargs
)
http
.
server
.
HttpServer
.
__init__
(
self
,
*
args
,
**
kwargs
)
self
.
noded_pid
=
os
.
getpid
()
def
HandleRequest
(
self
,
req
):
"""
Handle a request.
"""
if
req
.
request_method
.
upper
()
!=
"
PUT
"
:
if
req
.
request_method
.
upper
()
!=
http
.
HTTP_
PUT
:
raise
http
.
HttpBadRequest
()
path
=
req
.
request_path
...
...
@@ -92,7 +94,7 @@ class NodeHttpServer(http.HttpServer):
try
:
try
:
return
method
(
req
.
request_
post_data
)
return
method
(
req
.
request_
body
)
except
:
logging
.
exception
(
"
Error in RPC call
"
)
raise
...
...
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