remove dead code from DataSourceEc2
This commit is contained in:
parent
8586407d4d
commit
b55a63717f
@ -86,9 +86,6 @@ class DataSourceEc2(sources.DataSource):
|
|||||||
def get_instance_id(self):
|
def get_instance_id(self):
|
||||||
return self.metadata['instance-id']
|
return self.metadata['instance-id']
|
||||||
|
|
||||||
def get_availability_zone(self):
|
|
||||||
return self.metadata['placement']['availability-zone']
|
|
||||||
|
|
||||||
def _get_url_settings(self):
|
def _get_url_settings(self):
|
||||||
mcfg = self.ds_cfg
|
mcfg = self.ds_cfg
|
||||||
if not mcfg:
|
if not mcfg:
|
||||||
@ -198,19 +195,6 @@ class DataSourceEc2(sources.DataSource):
|
|||||||
return None
|
return None
|
||||||
return ofound
|
return ofound
|
||||||
|
|
||||||
def is_vpc(self):
|
|
||||||
# See: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/615545
|
|
||||||
# Detect that the machine was launched in a VPC.
|
|
||||||
# But I did notice that when in a VPC, meta-data
|
|
||||||
# does not have public-ipv4 and public-hostname
|
|
||||||
# listed as a possibility.
|
|
||||||
ph = "public-hostname"
|
|
||||||
p4 = "public-ipv4"
|
|
||||||
if ((ph not in self.metadata or self.metadata[ph] == "") and
|
|
||||||
(p4 not in self.metadata or self.metadata[p4] == "")):
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def availability_zone(self):
|
def availability_zone(self):
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user