diff options
author | David Kindred <david.kindred@pureport.com> | 2019-11-04 22:00:19 +0000 |
---|---|---|
committer | Server Team CI Bot <josh.powers+server-team-bot@canonical.com> | 2019-11-04 22:00:19 +0000 |
commit | 15fa154602f281c9239084d7d20a0999c6b09970 (patch) | |
tree | 0f61f69d98025361bffbd984d5aca0f65da83594 /cloudinit/sources/DataSourceConfigDrive.py | |
parent | e81389592a67bb54b889512928dcdf65f87ad436 (diff) | |
download | vyos-cloud-init-15fa154602f281c9239084d7d20a0999c6b09970.tar.gz vyos-cloud-init-15fa154602f281c9239084d7d20a0999c6b09970.zip |
configdrive: fix subplatform config-drive for /config-drive source
When ConfigDrive discovers the source path /config-drive, subplatform
is now reports 'config-drive'
LP: #1849731
Diffstat (limited to 'cloudinit/sources/DataSourceConfigDrive.py')
-rw-r--r-- | cloudinit/sources/DataSourceConfigDrive.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cloudinit/sources/DataSourceConfigDrive.py b/cloudinit/sources/DataSourceConfigDrive.py index c3627152..f77923c2 100644 --- a/cloudinit/sources/DataSourceConfigDrive.py +++ b/cloudinit/sources/DataSourceConfigDrive.py @@ -163,10 +163,10 @@ class DataSourceConfigDrive(openstack.SourceMixin, sources.DataSource): def _get_subplatform(self): """Return the subplatform metadata source details.""" - if self.seed_dir in self.source: - subplatform_type = 'seed-dir' - elif self.source.startswith('/dev'): + if self.source.startswith('/dev'): subplatform_type = 'config-disk' + else: + subplatform_type = 'seed-dir' return '%s (%s)' % (subplatform_type, self.source) |