Revision e91b297c lib/netutils.py
b/lib/netutils.py | ||
---|---|---|
38 | 38 |
from ganeti import constants |
39 | 39 |
from ganeti import errors |
40 | 40 |
from ganeti import utils |
41 |
from ganeti import vcluster |
|
41 | 42 |
|
42 | 43 |
# Structure definition for getsockopt(SOL_SOCKET, SO_PEERCRED, ...): |
43 | 44 |
# struct ucred { pid_t pid; uid_t uid; gid_t gid; }; |
... | ... | |
189 | 190 |
|
190 | 191 |
""" |
191 | 192 |
if hostname is None: |
192 |
return socket.getfqdn() |
|
193 |
virtfqdn = vcluster.GetVirtualHostname() |
|
194 |
if virtfqdn: |
|
195 |
return virtfqdn |
|
196 |
else: |
|
197 |
return socket.getfqdn() |
|
193 | 198 |
else: |
194 | 199 |
return socket.getfqdn(hostname) |
195 | 200 |
|
Also available in: Unified diff