← Back to team overview

cloud-init-dev team mailing list archive

Re: [Merge] ~raharper/cloud-init:feature/update-ntp-spec into cloud-init:master

 


Diff comments:

> diff --git a/cloudinit/config/cc_ntp.py b/cloudinit/config/cc_ntp.py
> index cbd0237..a6f8a1d 100644
> --- a/cloudinit/config/cc_ntp.py
> +++ b/cloudinit/config/cc_ntp.py
> @@ -83,7 +183,75 @@ schema = {
>                          List of ntp servers. If both pools and servers are
>                           empty, 4 default pool servers will be provided with
>                           the format ``{0-3}.{distro}.pool.ntp.org``.""")
> -                }
> +                },
> +                'ntp_client': {
> +                    'type': 'string',
> +                    'default': 'auto',
> +                    'description': dedent("""\
> +                        Name of an NTP client to use to configure system NTP.
> +                        When unprovided or 'auto' the default client preferred

Same leading/trailing space comment below. tox -e doc shows you that any multi-line text block is being joined without a space between.

> +                        by the distribution will be used. The following
> +                        built-in client names can be used to override existing
> +                        configuration defaults: chrony, ntp, ntpdate,
> +                        systemd-timesyncd."""),
> +                },
> +                'enabled': {
> +                    'type': 'boolean',
> +                    'default': True,
> +                    'description': dedent("""\
> +                        Attempt to enable ntp clients if set to True.  If set
> +                        to False, ntp client will not be configured or

you either need a leading space on the 2nd and 3rd lines, or a trailing space on the 1st and 2nd lines of a text block, otherwise dedent is squashing them together.

> +                        installed"""),
> +                },
> +                'config': {
> +                    'description': dedent("""\
> +                        Configuration settings or overrides for the
> +                        ``ntp_client`` specified."""),
> +                    'type': ['object', 'null'],
> +                    'properties': {
> +                        'confpath': {
> +                            'type': 'string',
> +                            'description': dedent("""\
> +                                The path to where the ``ntp_client``
> +                                configuration is written."""),
> +                        },
> +                        'check_exe': {
> +                            'type': 'string',
> +                            'description': dedent("""\
> +                                The executable name for the ``ntp_client``.
> +                                For exampe, ntp service ``check_exec`` is
> +                                'ntpd' because it runs the ntpd binary."""),
> +                        },
> +                        'packages': {
> +                            'type': 'array',
> +                            'items': {
> +                                'type': 'string',
> +                            },
> +                            'uniqueItems': True,
> +                            'description': dedent("""\
> +                                List of packages needed to be installed for the
> +                                selected ``ntp_client``."""),
> +                        },
> +                        'service_name': {
> +                            'type': 'string',
> +                            'description': dedent("""\
> +                                The systemd or sysvinit service name used to
> +                                start and stop the ``ntp_client`` service."""),
> +                        },
> +                        'template': {
> +                            'type': 'string',
> +                            'description': dedent("""\
> +                                Inline template allowing users to define their
> +                                own ``ntp_client`` configuration template.
> +                                The value should start with '## template:jinja'
> +                                to enable use of cloud-init templating support.
> +                                """),
> +                        },
> +                    },
> +                    'required': [],
> +                    'minProperties': 1,  # If we have config, define something
> +                    'additionalProperties': False
> +                },
>              },
>              'required': [],
>              'additionalProperties': False


-- 
https://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/339438
Your team cloud-init commiters is requested to review the proposed merge of ~raharper/cloud-init:feature/update-ntp-spec into cloud-init:master.


References