| Server IP : 162.19.112.25 / Your IP : 216.73.216.88 Web Server : LiteSpeed System : Linux qamar.tasjeel.ae 5.14.0-611.55.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 15:19:29 EDT 2026 x86_64 User : archiart ( 1428) PHP Version : 8.2.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3.9/site-packages/cloudinit/sources/helpers/vmware/imc/__pycache__/ |
Upload File : |
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>