summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceConfigDrive.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-03-21 22:22:53 -0400
committerScott Moser <smoser@ubuntu.com>2016-03-21 22:22:53 -0400
commit8968f570787c0889f2c8b363e208e018903b63fa (patch)
tree0008ea8f19816c882f52dee82079776317982210 /cloudinit/sources/DataSourceConfigDrive.py
parent0964b42e5117cce640a8ba9102a76fa54a698898 (diff)
downloadvyos-cloud-init-8968f570787c0889f2c8b363e208e018903b63fa.tar.gz
vyos-cloud-init-8968f570787c0889f2c8b363e208e018903b63fa.zip
add check_instance_id to ConfigDrive
Diffstat (limited to 'cloudinit/sources/DataSourceConfigDrive.py')
-rw-r--r--cloudinit/sources/DataSourceConfigDrive.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/sources/DataSourceConfigDrive.py b/cloudinit/sources/DataSourceConfigDrive.py
index e3916208..6fc9e05b 100644
--- a/cloudinit/sources/DataSourceConfigDrive.py
+++ b/cloudinit/sources/DataSourceConfigDrive.py
@@ -146,6 +146,10 @@ class DataSourceConfigDrive(openstack.SourceMixin, sources.DataSource):
return True
+ def check_instance_id(self):
+ # quickly (local check only) if self.instance_id is still valid
+ return sources.instance_id_matches_system_uuid(self.get_instance_id())
+
class DataSourceConfigDriveNet(DataSourceConfigDrive):
def __init__(self, sys_cfg, distro, paths):