71
62
def get_local_mirror(self):
72
63
return(self.get_mirror_from_availability_zone())
81
65
def get_mirror_from_availability_zone(self, availability_zone = None):
82
66
# availability is like 'us-west-1b' or 'eu-west-1a'
83
67
if availability_zone == None:
84
68
availability_zone = self.get_availability_zone()
87
76
host="%s.ec2.archive.ubuntu.com" % availability_zone[:-1]
88
77
socket.getaddrinfo(host, None, 0, socket.SOCK_STREAM)
89
78
return 'http://%s/ubuntu/' % host
94
83
def wait_for_metadata_service(self, sleeps = 100):