Revision ee045466 lib/utils/nodesetup.py

b/lib/utils/nodesetup.py
24 24

  
25 25
from cStringIO import StringIO
26 26

  
27
from ganeti import constants
27
from ganeti import pathutils
28 28

  
29 29
from ganeti.utils import algo
30 30
from ganeti.utils import io
......
71 71

  
72 72
  @type hostname: str
73 73
  @param hostname: a hostname that will be resolved and added to
74
      L{constants.ETC_HOSTS}
74
      L{pathutils.ETC_HOSTS}
75 75
  @type ip: str
76 76
  @param ip: The ip address of the host
77 77

  
78 78
  """
79
  SetEtcHostsEntry(constants.ETC_HOSTS, ip, hostname, [hostname.split(".")[0]])
79
  SetEtcHostsEntry(pathutils.ETC_HOSTS, ip, hostname, [hostname.split(".")[0]])
80 80

  
81 81

  
82 82
def RemoveEtcHostsEntry(file_name, hostname):
......
115 115
  @type hostname: str
116 116
  @param hostname: hostname that will be resolved and its
117 117
      full and shot name will be removed from
118
      L{constants.ETC_HOSTS}
118
      L{pathutils.ETC_HOSTS}
119 119

  
120 120
  """
121
  RemoveEtcHostsEntry(constants.ETC_HOSTS, hostname)
122
  RemoveEtcHostsEntry(constants.ETC_HOSTS, hostname.split(".")[0])
121
  RemoveEtcHostsEntry(pathutils.ETC_HOSTS, hostname)
122
  RemoveEtcHostsEntry(pathutils.ETC_HOSTS, hostname.split(".")[0])

Also available in: Unified diff