Revision a5ce2ea2

b/lib/server/confd.py
49 49
from ganeti import errors
50 50
from ganeti import daemon
51 51
from ganeti import netutils
52
from ganeti import pathutils
52 53

  
53 54

  
54 55
class ConfdAsyncUDPServer(daemon.AsyncUDPSocket):
......
114 115
    self.last_notification = 0
115 116

  
116 117
    # Asyncronous inotify handler for config changes
117
    cfg_file = constants.CLUSTER_CONF_FILE
118
    cfg_file = pathutils.CLUSTER_CONF_FILE
118 119
    self.wm = pyinotify.WatchManager()
119 120
    self.inotify_handler = asyncnotifier.SingleFileEventHandler(self.wm,
120 121
                                                                self.OnInotify,
......
249 250

  
250 251
  # TODO: collapse HMAC daemons handling in daemons GenericMain, when we'll
251 252
  # have more than one.
252
  if not os.path.isfile(constants.CONFD_HMAC_KEY):
253
    print >> sys.stderr, "Need HMAC key %s to run" % constants.CONFD_HMAC_KEY
253
  if not os.path.isfile(pathutils.CONFD_HMAC_KEY):
254
    print >> sys.stderr, "Need HMAC key %s to run" % pathutils.CONFD_HMAC_KEY
254 255
    sys.exit(constants.EXIT_FAILURE)
255 256

  
256 257
  # TODO: once we have a cluster param specifying the address family
b/lib/server/masterd.py
58 58
from ganeti import objects
59 59
from ganeti import query
60 60
from ganeti import runtime
61
from ganeti import pathutils
61 62

  
62 63

  
63 64
CLIENT_REQUEST_WORKERS = 16
......
527 528

  
528 529
  """
529 530
  if until is None:
530
    utils.RemoveFile(constants.WATCHER_PAUSEFILE)
531
    utils.RemoveFile(pathutils.WATCHER_PAUSEFILE)
531 532
  else:
532
    utils.WriteFile(constants.WATCHER_PAUSEFILE,
533
    utils.WriteFile(pathutils.WATCHER_PAUSEFILE,
533 534
                    data="%d\n" % (until, ))
534 535

  
535 536
  return until
......
689 690
  """
690 691
  # This is safe to do as the pid file guarantees against
691 692
  # concurrent execution.
692
  utils.RemoveFile(constants.MASTER_SOCKET)
693
  utils.RemoveFile(pathutils.MASTER_SOCKET)
693 694

  
694 695
  mainloop = daemon.Mainloop()
695
  master = MasterServer(constants.MASTER_SOCKET, options.uid, options.gid)
696
  master = MasterServer(pathutils.MASTER_SOCKET, options.uid, options.gid)
696 697
  return (mainloop, master)
697 698

  
698 699

  
......
712 713
    finally:
713 714
      rpc.Shutdown()
714 715
  finally:
715
    utils.RemoveFile(constants.MASTER_SOCKET)
716
    utils.RemoveFile(pathutils.MASTER_SOCKET)
716 717

  
717 718
  logging.info("Clean master daemon shutdown")
718 719

  
b/lib/server/noded.py
48 48
from ganeti import storage
49 49
from ganeti import serializer
50 50
from ganeti import netutils
51
from ganeti import pathutils
51 52

  
52 53
import ganeti.http.server # pylint: disable=W0611
53 54

  
......
447 448

  
448 449
    Note that as opposed to export_info, which may query data about an
449 450
    export in any path, this only queries the standard Ganeti path
450
    (constants.EXPORT_DIR).
451
    (pathutils.EXPORT_DIR).
451 452

  
452 453
    """
453 454
    return backend.ListExports()
......
1090 1091
                    default=True, action="store_false")
1091 1092

  
1092 1093
  daemon.GenericMain(constants.NODED, parser, CheckNoded, PrepNoded, ExecNoded,
1093
                     default_ssl_cert=constants.NODED_CERT_FILE,
1094
                     default_ssl_key=constants.NODED_CERT_FILE,
1094
                     default_ssl_cert=pathutils.NODED_CERT_FILE,
1095
                     default_ssl_key=pathutils.NODED_CERT_FILE,
1095 1096
                     console_logging=True)
b/lib/server/rapi.py
47 47
from ganeti import serializer
48 48
from ganeti import compat
49 49
from ganeti import utils
50
from ganeti import pathutils
50 51
from ganeti.rapi import connector
51 52

  
52 53
import ganeti.http.auth   # pylint: disable=W0611
......
325 326
  handler = RemoteApiHandler(users.Get)
326 327

  
327 328
  # Setup file watcher (it'll be driven by asyncore)
328
  SetupFileWatcher(constants.RAPI_USERS_FILE,
329
                   compat.partial(users.Load, constants.RAPI_USERS_FILE))
329
  SetupFileWatcher(pathutils.RAPI_USERS_FILE,
330
                   compat.partial(users.Load, pathutils.RAPI_USERS_FILE))
330 331

  
331
  users.Load(constants.RAPI_USERS_FILE)
332
  users.Load(pathutils.RAPI_USERS_FILE)
332 333

  
333 334
  server = \
334 335
    http.server.HttpServer(mainloop, options.bind_address, options.port,
......
360 361
                                 constants.RELEASE_VERSION)
361 362

  
362 363
  daemon.GenericMain(constants.RAPI, parser, CheckRapi, PrepRapi, ExecRapi,
363
                     default_ssl_cert=constants.RAPI_CERT_FILE,
364
                     default_ssl_key=constants.RAPI_CERT_FILE)
364
                     default_ssl_cert=pathutils.RAPI_CERT_FILE,
365
                     default_ssl_key=pathutils.RAPI_CERT_FILE)

Also available in: Unified diff