remove 'get_locale' from DataSourceEc2.
Previously the 'get_locale()' method of DataSourceEc2 would select a default locale based on the availability zone that the instance was running on. I generally don't like that as a.) there are loads of other locales than en_US and en_GB (that were being used) b.) either one is almost certainly not really the users preferred locale. Just because I launch an instance in eu-west-1 doesn't mean I perfer en_GB.
This commit is contained in:
parent
cdfcc677b8
commit
a066a4dc0e
@ -32,12 +32,6 @@ class DataSourceEc2(DataSource.DataSource):
|
||||
api_ver = '2009-04-04'
|
||||
cachedir = cloudinit.cachedir + '/ec2'
|
||||
|
||||
location_locale_map = {
|
||||
'us' : 'en_US.UTF-8',
|
||||
'eu' : 'en_GB.UTF-8',
|
||||
'default' : 'en_US.UTF-8',
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
@ -71,13 +65,6 @@ class DataSourceEc2(DataSource.DataSource):
|
||||
def get_local_mirror(self):
|
||||
return(self.get_mirror_from_availability_zone())
|
||||
|
||||
def get_locale(self):
|
||||
az = self.metadata['placement']['availability-zone']
|
||||
if self.location_locale_map.has_key(az[0:2]):
|
||||
return(self.location_locale_map[az[0:2]])
|
||||
else:
|
||||
return(self.location_locale_map["default"])
|
||||
|
||||
def get_mirror_from_availability_zone(self, availability_zone = None):
|
||||
# availability is like 'us-west-1b' or 'eu-west-1a'
|
||||
if availability_zone == None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user