Fix the cloud-config keys that are processed by cloudbase-init

Some of the keys of the currently supported cloud-config plugins are not
the same as the ones used by cloud-init. This patch adds the correct keys
for the cloud-config plugins.

Change-Id: I901acb330f934b6144ff69f4f65d6053dfb8fe1b
This commit is contained in:
Paula Madalina Crismaru 2017-06-30 14:24:29 +03:00
parent 68a9ae57d4
commit f92371bfdd
3 changed files with 11 additions and 3 deletions

View File

@ -22,8 +22,12 @@ PLUGINS = {
'cloudconfigplugins.write_files.WriteFilesPlugin',
'set_timezone': 'cloudbaseinit.plugins.common.userdataplugins.'
'cloudconfigplugins.set_timezone.SetTimezonePlugin',
'timezone': 'cloudbaseinit.plugins.common.userdataplugins.'
'cloudconfigplugins.set_timezone.SetTimezonePlugin',
'set_hostname': 'cloudbaseinit.plugins.common.userdataplugins.'
'cloudconfigplugins.set_hostname.SetHostnamePlugin',
'hostname': 'cloudbaseinit.plugins.common.userdataplugins.'
'cloudconfigplugins.set_hostname.SetHostnamePlugin',
}

View File

@ -27,7 +27,11 @@ LOG = oslo_logging.getLogger(__name__)
class SetHostnamePlugin(base.BaseCloudConfigPlugin):
"""Change the hostname for the underlying platform.
If the timezone is changed a restart will be required.
If the hostname is changed a restart will be required.
To change the hostname to 'myhostname', use this syntax:
hostname: myhostname
"""

View File

@ -31,9 +31,9 @@ class SetTimezonePlugin(base.BaseCloudConfigPlugin):
https://technet.microsoft.com/en-us/library/cc749073%28v=ws.10%29.aspx).
For instance, to change the timezone to 'America/Montevideo', use
this syntax::
this syntax:
set_timezone: America/Montevideo
timezone: America/Montevideo
"""