
­­­­­­­­­­­­­­­­­­
<!DOCTYPE html>
<html>
3
\me                 @   s.   G d d dZ G dd dZG dd dZdS )c               @   sl   e Zd ZdZedd Zedd Zedd Zedd	 Zed
d Z	edd Z
edd Zdd ZdS )NicBasez{
    Define what are expected of each nic.
    The following properties should be provided in an implementation class.
    c             C   s   t ddS )zb
        Retrieves the mac address of the nic
        @return (str) : the MACADDR setting
        ZMACADDRN)NotImplementedError)self r   /usr/lib/python3.6/nic_base.pymac   s    zNicBase.macc             C   s   t ddS )a  
        Retrieves whether the nic is the primary nic
        Indicates whether NIC will be used to define the default gateway.
        If none of the NICs is configured to be primary, default gateway won't
        be set.
        @return (bool): the PRIMARY setting
        ZPRIMARYN)r   )r   r   r   r   primary   s    	zNicBase.primaryc             C   s   t ddS )zu
        Retrieves whether the nic should be up at the boot time
        @return (bool) : the ONBOOT setting
        ZONBOOTN)r   )r   r   r   r   onboot"   s    zNicBase.onbootc             C   s   t ddS )z
        Retrieves the boot protocol of the nic
        @return (str): the BOOTPROTO setting, valid values: dhcp and static.
        Z	BOOTPROTON)r   )r   r   r   r   	bootProto*   s    zNicBase.bootProtoc             C   s   t ddS )z
        Retrieves the IPv4_MODE
        @return (str): the IPv4_MODE setting, valid values:
        backwards_compatible, static, dhcp, disabled, as_is
        Z	IPv4_MODEN)r   )r   r   r   r   	ipv4_mode2   s    zNicBase.ipv4_modec             C   s   t ddS )z
        Retrieves the static IPv4 configuration of the nic
        @return (StaticIpv4Base list): the static ipv4 setting
        zStatic IPv4N)r   )r   r   r   r   
staticIpv4;   s    zNicBase.staticIpv4c             C   s   t ddS )z|
        Retrieves the IPv6 configuration of the nic
        @return (StaticIpv6Base list): the static ipv6 setting
        zStatic Ipv6N)r   )r   r   r   r   
staticIpv6C   s    zNicBase.staticIpv6c             C   s   t ddS )z
        Validate the object
        For example, the staticIpv4 property is required and should not be
        empty when ipv4Mode is STATIC
        zCheck constraints on propertiesN)r   )r   r   r   r   validateK   s    zNicBase.validateN)__name__
__module____qualname____doc__propertyr   r   r   r	   r
   r   r   r   r   r   r   r   r   	   s   	r   c               @   s4   e Zd ZdZedd Zedd Zedd ZdS )	StaticIpv4Basez
    Define what are expected of a static IPv4 setting
    The following properties should be provided in an implementation class.
    c             C   s   t ddS )zV
        Retrieves the Ipv4 address
        @return (str): the IPADDR setting
        zIpv4 AddressN)r   )r   r   r   r   ipZ   s    zStaticIpv4Base.ipc             C   s   t ddS )z_
        Retrieves the Ipv4 NETMASK setting
        @return (str): the NETMASK setting
        zIpv4 NETMASKN)r   )r   r   r   r   netmaskb   s    zStaticIpv4Base.netmaskc             C   s   t ddS )zl
        Retrieves the gateways on this Ipv4 subnet
        @return (str list): the GATEWAY setting
        zIpv4 GATEWAYN)r   )r   r   r   r   gatewaysj   s    zStaticIpv4Base.gatewaysN)r   r   r   r   r   r   r   r   r   r   r   r   r   T   s   r   c               @   s4   e Zd ZdZedd Zedd Zedd ZdS )	StaticIpv6BasezDefine what are expected of a static IPv6 setting
    The following properties should be provided in an implementation class.
    c             C   s   t ddS )zX
        Retrieves the Ipv6 address
        @return (str): the IPv6ADDR setting
        zIpv6 AddressN)r   )r   r   r   r   r   x   s    zStaticIpv6Base.ipc             C   s   t ddS )zc
        Retrieves the Ipv6 NETMASK setting
        @return (str): the IPv6NETMASK setting
        zIpv6 NETMASKN)r   )r   r   r   r   r      s    zStaticIpv6Base.netmaskc             C   s   t ddS )zc
        Retrieves the Ipv6 GATEWAY setting
        @return (str): the IPv6GATEWAY setting
        zIpv6 GATEWAYN)r   )r   r   r   r   gateway   s    zStaticIpv6Base.gatewayN)r   r   r   r   r   r   r   r   r   r   r   r   r   s   s   r   N)r   r   r   r   r   r   r   <module>	   s   K