관리-도구
편집 파일: nic.cpython-39.opt-1.pyc
a '�Dg� � @ sT d dl mZ d dlmZmZmZ G dd� de�ZG dd� de�ZG dd� de�Zd S ) � )� BootProtoEnum)�NicBase�StaticIpv4Base�StaticIpv6Basec @ s� e Zd ZdZdd� Zdd� Zdd� Zedd � �Zed d� �Z edd � �Z edd� �Zedd� �Zedd� �Z edd� �Zedd� �ZdS )�Niczd Holds the information about each NIC specified in the customization specification file c C s || _ || _d S �N)�_name�_configFile)�self�nameZ configFile� r �L/usr/lib/python3.9/site-packages/cloudinit/sources/helpers/vmware/imc/nic.py�__init__ s zNic.__init__c C s | j �| jd | d �S )N�|)r �getr )r Zwhatr r r �_get s zNic._getc C s | j �| j| �S r )r Zget_count_with_prefixr )r �prefixr r r �_get_count_with_prefix s zNic._get_count_with_prefixc C s | j S r )r �r r r r r s zNic.namec C s | � d��� S )NZMACADDR�r �lowerr r r r �mac$ s zNic.macc C s. | � d�}|r&|�� }|dkp$|dkS dS d S )NZPRIMARY�yes�trueFr �r �valuer r r �primary( s zNic.primaryc C s. | � d�}|r&|�� }|dkp$|dkS dS d S )NZONBOOTr r Fr r r r r �onboot1 s z Nic.onbootc C s | � d�}|r|�� S dS d S )NZ BOOTPROTO� r r r r r � bootProto: s z Nic.bootProtoc C s | � d�}|r|�� S dS d S )NZ IPv4_MODEr r r r r r � ipv4_modeB s z Nic.ipv4_modec C s | j tjkrt| �gS dS dS )z� Checks the BOOTPROTO property and returns StaticIPv4Addr configuration object if STATIC configuration is set. N)r r ZSTATIC�StaticIpv4Addrr r r r � staticIpv4J s zNic.staticIpv4c C s>