From 3f953199a01bf8fa99dc740737209f9d755d6502 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Tue, 18 Jan 2011 21:25:49 +0000 Subject: 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. --- cloudinit/DataSourceEc2.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/cloudinit/DataSourceEc2.py b/cloudinit/DataSourceEc2.py index 7a6c9dc9..84826276 100644 --- a/cloudinit/DataSourceEc2.py +++ b/cloudinit/DataSourceEc2.py @@ -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: -- cgit v1.2.3