livepatch-charmers team mailing list archive
-
livepatch-charmers team
-
Mailing list archive
-
Message #00026
Re: [Merge] ~hloeung/canonical-livepatch-charm/+git/master:master into canonical-livepatch-charm:master
Diff comments:
> diff --git a/files/check_canonical-livepatch.py b/files/check_canonical-livepatch.py
> index 74c61e5..facc904 100644
> --- a/files/check_canonical-livepatch.py
> +++ b/files/check_canonical-livepatch.py
> @@ -3,9 +3,12 @@
> # Copyright (C) 2016 Canonical Ltd.
>
> import os
> +import sys
> import nagios_plugin
> from subprocess import check_output
>
> +supported_archs = ['x86_64']
This is declared three times. Can we pull the two module level globals from layer.yaml? Maybe not this one, since the nagios check will be copied elsewhere and likely can't access charms.reactive or layer.yaml.
> +
>
> ##############################################################################
>
> diff --git a/reactive/canonical_livepatch.py b/reactive/canonical_livepatch.py
> index c2fb420..2748de7 100644
> --- a/reactive/canonical_livepatch.py
> +++ b/reactive/canonical_livepatch.py
> @@ -4,11 +4,13 @@ from charmhelpers.core import hookenv
> from charmhelpers.contrib.charmsupport import nrpe
> from subprocess import check_call, check_output, CalledProcessError
> from time import sleep
> -from os import path
> +from os import path, uname
> from yaml import load, dump
> from platform import release
> from distutils.version import LooseVersion
>
> +supported_archs = ['x86_64']
This is defined in layer.yaml, so you can pull it from there rather than declare it in two locations.
> +
>
> def file_to_units(local_path, unit_path):
> """ copy a file from the charm onto our unit(s) """
--
https://code.launchpad.net/~hloeung/canonical-livepatch-charm/+git/master/+merge/326295
Your team Livepatch charm developers is requested to review the proposed merge of ~hloeung/canonical-livepatch-charm/+git/master:master into canonical-livepatch-charm:master.
References