diff options
author | Scott Moser <smoser@ubuntu.com> | 2016-03-21 22:22:53 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2016-03-21 22:22:53 -0400 |
commit | 8968f570787c0889f2c8b363e208e018903b63fa (patch) | |
tree | 0008ea8f19816c882f52dee82079776317982210 /cloudinit/sources/DataSourceConfigDrive.py | |
parent | 0964b42e5117cce640a8ba9102a76fa54a698898 (diff) | |
download | vyos-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.py | 4 |
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): |