summaryrefslogtreecommitdiffstats
path: root/nova/flags.py
diff options
context:
space:
mode:
Diffstat (limited to 'nova/flags.py')
-rw-r--r--nova/flags.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/nova/flags.py b/nova/flags.py
index 6fc3100f8..e385c114f 100644
--- a/nova/flags.py
+++ b/nova/flags.py
@@ -59,7 +59,14 @@ def DECLARE(name, module_string, flag_values=FLAGS):
def _get_my_ip():
- """Returns the actual ip of the local machine."""
+ """
+ Returns the actual ip of the local machine.
+
+ This code figures out what source address would be used if some traffic
+ were to be sent out to some well known address on the Internet. In this
+ case, a Google DNS server is used, but the specific address does not
+ matter much. No traffic is actually sent.
+ """
try:
csock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
csock.connect(('8.8.8.8', 80))