Package ganeti :: Package server :: Module rapi
[hide private]
[frames] | no frames]

Module rapi

source code

Ganeti Remote API master script.

Classes [hide private]
  RemoteApiRequestContext
Data structure for Remote API requests.
  JsonErrorRequestExecutor
Custom Request Executor class that formats HTTP errors in JSON.
  RemoteApiHttpServer
REST Request Handler Class.
  FileEventHandler
Functions [hide private]
 
SetupFileWatcher(filename, cb)
Configures an inotify watcher for a file.
source code
 
CheckRapi(options, args)
Initial checks whether to run or exit with a failure.
source code
 
PrepRapi(options, _)
Prep remote API function, executed with the PID file held.
source code
 
ExecRapi(options, args, prep_data)
Main remote API function, executed with the PID file held.
source code
 
Main()
Main function.
source code

Imports: logging, optparse, sys, os, errno, pyinotify, asyncnotifier, constants, http, daemon, ssconf, luxi, serializer, compat, utils, connector, ganeti


Function Details [hide private]

SetupFileWatcher(filename, cb)

source code 

Configures an inotify watcher for a file.

Parameters:
  • filename (string) - File to watch
  • cb (callable) - Function called on file change