Re: [virt-manager PATCH 1/1] osinfo: deal with rolling distros for EOL status

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/15/19 7:28 AM, Pino Toscano wrote:
> If a distribution has no EOL date set, always consider it supported if
> its release status is "rolling".
> 
> Signed-off-by: Pino Toscano <ptoscano@xxxxxxxxxx>
> ---
>  virtinst/osdict.py | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/virtinst/osdict.py b/virtinst/osdict.py
> index 72edc4a6..7e2ca197 100644
> --- a/virtinst/osdict.py
> +++ b/virtinst/osdict.py
> @@ -318,6 +318,13 @@ class _OsVariant(object):
>          if eol is not None:
>              return now > _glib_to_datetime(eol)
>  
> +        # TODO: use os.get_release_status() & osinfo.ReleaseStatus.ROLLING
> +        # when requiring libosinfo >= 1.4.0.
> +        release_status = self._os and self._os.get_param_value(libosinfo.OS_PROP_RELEASE_STATUS) or None
> +        # Rolling distributions are never EOL.
> +        if release_status and release_status == "rolling":
> +            return False
> +
>          # If no EOL is present, assume EOL if release was > 5 years ago
>          if rel is not None:
>              rel5 = _glib_to_datetime(rel) + datetime.timedelta(days=365 * 5)
> 

Tweaked the formatting a bit and pushed, thanks

- Cole

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux