diff options
Diffstat (limited to 'cloudinit/sources/DataSourceEc2.py')
-rw-r--r-- | cloudinit/sources/DataSourceEc2.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cloudinit/sources/DataSourceEc2.py b/cloudinit/sources/DataSourceEc2.py index 7e845571..c7ad6d54 100644 --- a/cloudinit/sources/DataSourceEc2.py +++ b/cloudinit/sources/DataSourceEc2.py @@ -77,6 +77,12 @@ class DataSourceEc2(sources.DataSource): self.metadata_address) return False + @property + def launch_index(self): + if not self.metadata: + return None + return self.metadata.get('ami-launch-index') + def get_instance_id(self): return self.metadata['instance-id'] |