Revision b705c7a6 lib/utils.py

b/lib/utils.py
1461 1461
      L{constants.ETC_HOSTS}
1462 1462

  
1463 1463
  """
1464
  hi = netutils.HostInfo(name=hostname)
1465
  SetEtcHostsEntry(constants.ETC_HOSTS, hi.ip, hi.name, [hi.ShortName()])
1464
  SetEtcHostsEntry(constants.ETC_HOSTS, netutils.Hostname.GetIP(hostname),
1465
                   hostname, [hostname.split(".")[0]])
1466 1466

  
1467 1467

  
1468 1468
def RemoveEtcHostsEntry(file_name, hostname):
......
1518 1518
      L{constants.ETC_HOSTS}
1519 1519

  
1520 1520
  """
1521
  hi = netutils.HostInfo(name=hostname)
1522
  RemoveEtcHostsEntry(constants.ETC_HOSTS, hi.name)
1523
  RemoveEtcHostsEntry(constants.ETC_HOSTS, hi.ShortName())
1521
  RemoveEtcHostsEntry(constants.ETC_HOSTS, hostname)
1522
  RemoveEtcHostsEntry(constants.ETC_HOSTS, hostname.split(".")[0])
1524 1523

  
1525 1524

  
1526 1525
def TimestampForFilename():

Also available in: Unified diff