3 \Όmeγ@s.Gdd„dƒZGdd„dƒZGdd„dƒZdS)c@sleZdZdZedd„ƒZedd„ƒZedd„ƒZedd „ƒZed d „ƒZ ed d „ƒZ edd„ƒZ dd„Z dS)ΪNicBasez{ Define what are expected of each nic. The following properties should be provided in an implementation class. cCs tdƒ‚dS)zb Retrieves the mac address of the nic @return (str) : the MACADDR setting ZMACADDRN)ΪNotImplementedError)Ϊself©rϊ/usr/lib/python3.6/nic_base.pyΪmacsz NicBase.maccCs tdƒ‚dS)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 ZPRIMARYN)r)rrrrΪprimarys zNicBase.primarycCs tdƒ‚dS)zu Retrieves whether the nic should be up at the boot time @return (bool) : the ONBOOT setting ZONBOOTN)r)rrrrΪonboot"szNicBase.onbootcCs tdƒ‚dS)z… Retrieves the boot protocol of the nic @return (str): the BOOTPROTO setting, valid values: dhcp and static. Z BOOTPROTON)r)rrrrΪ bootProto*szNicBase.bootProtocCs tdƒ‚dS)z‘ Retrieves the IPv4_MODE @return (str): the IPv4_MODE setting, valid values: backwards_compatible, static, dhcp, disabled, as_is Z IPv4_MODEN)r)rrrrΪ ipv4_mode2szNicBase.ipv4_modecCs tdƒ‚dS)zƒ Retrieves the static IPv4 configuration of the nic @return (StaticIpv4Base list): the static ipv4 setting z Static IPv4N)r)rrrrΪ staticIpv4;szNicBase.staticIpv4cCs tdƒ‚dS)z| Retrieves the IPv6 configuration of the nic @return (StaticIpv6Base list): the static ipv6 setting z Static Ipv6N)r)rrrrΪ staticIpv6CszNicBase.staticIpv6cCs tdƒ‚dS)z– Validate the object For example, the staticIpv4 property is required and should not be empty when ipv4Mode is STATIC zCheck constraints on propertiesN)r)rrrrΪvalidateKszNicBase.validateN) Ϊ__name__Ϊ __module__Ϊ __qualname__Ϊ__doc__Ϊpropertyrrrr r r r r rrrrr s     rc@s4eZdZdZedd„ƒZedd„ƒZedd„ƒZdS) ΪStaticIpv4Basez‡ Define what are expected of a static IPv4 setting The following properties should be provided in an implementation class. cCs tdƒ‚dS)zV Retrieves the Ipv4 address @return (str): the IPADDR setting z Ipv4 AddressN)r)rrrrΪipZszStaticIpv4Base.ipcCs tdƒ‚dS)z_ Retrieves the Ipv4 NETMASK setting @return (str): the NETMASK setting z Ipv4 NETMASKN)r)rrrrΪnetmaskbszStaticIpv4Base.netmaskcCs tdƒ‚dS)zl Retrieves the gateways on this Ipv4 subnet @return (str list): the GATEWAY setting z Ipv4 GATEWAYN)r)rrrrΪgatewaysjszStaticIpv4Base.gatewaysN)rrrrrrrrrrrrrTs  rc@s4eZdZdZedd„ƒZedd„ƒZedd„ƒZdS) ΪStaticIpv6Basez‚Define what are expected of a static IPv6 setting The following properties should be provided in an implementation class. cCs tdƒ‚dS)zX Retrieves the Ipv6 address @return (str): the IPv6ADDR setting z Ipv6 AddressN)r)rrrrrxszStaticIpv6Base.ipcCs tdƒ‚dS)zc Retrieves the Ipv6 NETMASK setting @return (str): the IPv6NETMASK setting z Ipv6 NETMASKN)r)rrrrr€szStaticIpv6Base.netmaskcCs tdƒ‚dS)zc Retrieves the Ipv6 GATEWAY setting @return (str): the IPv6GATEWAY setting z Ipv6 GATEWAYN)r)rrrrΪgatewayˆszStaticIpv6Base.gatewayN)rrrrrrrrrrrrrss  rN)rrrrrrrΪ sK