| Server IP : 159.223.102.202 / Your IP : 216.73.216.195 Web Server : nginx/1.26.0 System : Linux Gen1-cloudpanel2ubuntu2404-1vcpu-1gb-nyc1-01 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 User : albasshbotta ( 1021) PHP Version : 8.2.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/netplan/__pycache__/ |
Upload File : |
�
*C�eJ �
�� � d dl mZ d dlZd dlZd dlmZmZmZ ddlm Z ddl
mZmZ ddl
mZ ddlmZ dd lmZ dd
lmZmZmZmZmZmZmZ dee ded
efd�Zdee deeef defd�Zeeeeeeeeeeeeeg
Zy)� )�StringION)�Union�List�IO� )�lib)�
NetDefinition�NetDefinitionIterator)�Parser)�State)�_checked_lib_call)�NetplanException�NetplanBackendException�NetplanEmitterException�NetplanFileException�NetplanFormatException�NetplanParserException�NetplanValidationException�prefix�
input_file�output_filec � � t |t � rqt j d�� }|j � }t j
||j
d� � t j |dt j � n|j � }t |t � rt j d�� }n|j � }t t j dj | � j
d� ||� t |t � rt j |� t |t � r�t j |dt j � }t j |dt j � t j ||� }|j |j# d� � t j |� y y )N�netplan_temp_input_file)�name�utf-8r �netplan_temp_output_file� )�
isinstancer �os�memfd_create�getvalue�write�encode�lseek�SEEK_SET�filenor
r �netplan_util_dump_yaml_subtree�join�close�SEEK_CUR�read�decode)r r r �input_fd�data� output_fd�sizes �2/usr/lib/python3/dist-packages/netplan/__init__.py�_dump_yaml_subtreer2 s6 � ��*�h�'��?�?�(A�B���"�"�$��
����4�;�;�w�/�0�
����1�b�k�k�*��$�$�&���+�x�(��O�O�)C�D� ��&�&�(� ��c�8�8�$�)�)�F�:K�:R�:R�SZ�:[�]e�gp�q��*�h�'�
������+�x�(��x�x� �1�b�k�k�2��
����A�r�{�{�+��w�w�y�$�'�����$�+�+�g�.�/�
����� )� �patch_object_path�
patch_payload�patch_outputc � � t |t � rt j |� }t t
j dj | � j d� |j d� |j � � y )Nr r )
r �dict�json�dumpsr
r �netplan_util_create_yaml_patchr( r# r&