3 \�me � @ s: d dl Z d dlmZmZ d dlmZ G dd� dej�ZdS )� N)�PREFERRED_NTP_CLIENTS�debian)�Snapc s6 e Zd Z� fdd�Zd� fdd� Zedd� �Z� ZS ) �Distroc sd t � j|||� ddd�| _| jd tjd�| jd tjdd�d�| _t| j�| _| j j | j� d S ) Nz+/etc/network/interfaces.d/50-cloud-init.cfgz/etc/netplan/50-cloud-init.yaml)�eni�netplanr )Zeni_pathZ eni_headerr T)Znetplan_pathZnetplan_headerZpostcmds)�super�__init__Znetwork_conf_fnr ZNETWORK_FILE_HEADERZrenderer_configsr Z_runner�snapZpackage_managers�append)�self�nameZcfg�paths)� __class__� �/usr/lib/python3.6/ubuntu.pyr s zDistro.__init__Nc s t � j|||� | jj� d S )N)r �package_commandr Zupgrade_packages)r Zcommand�argsZpkgs)r r r r ( s zDistro.package_commandc C s | j stjt�| _ | j S )z5The preferred ntp client is dependent on the version.)Z_preferred_ntp_clients�copy�deepcopyr )r r r r �preferred_ntp_clients, s zDistro.preferred_ntp_clients)NN)�__name__� __module__�__qualname__r r �propertyr � __classcell__r r )r r r s r )r Zcloudinit.distrosr r Z)cloudinit.distros.package_management.snapr r r r r r �<module> s