Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/pyeapi/api/__pycache__/acl.cpython-39.pyc
Ðазад
a b�hs+ � @ s� d Z ddlZddlZddlmZ ddlmZ eddg�Zdd� Z d d � Z G dd� de�ZG d d� de�ZG dd� de�Z ee d�Zdd� ZdS )a1 Module for working with EOS access control list resources This module provides an implementation for configuring and managing access access control lists on Arista EOS nodes. Access control lists can be specified as either 'standard' or 'extended' ACLs. This module provides the following class implementations: * Acls -- The top-level class used to manage both standard and extended access control lists in EOS * StandardAcls -- Class that manages the set of standard ACLs * ExtendedAcls -- Class that manages the set of extended ACLs � N)�EntityCollection)� ProxyCall�standard�extendedc C s | pd} t �| ��� S )z�Converts a subnet mask from dotted decimal to bit length Args: mask (str): The dotted decimal subnet mask to convert Returns: str: The subnet mask as a valid prefix length z255.255.255.255)�netaddrZ IPAddressZnetmask_bits)�mask� r �~/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/pyeapi/api/acl.py�mask_to_prefixlen7 s r c C s | pd} d| }t t�|�j�S )z�Converts a prefix length to a dotted decimal subnet mask Args: prefixlen (str): The prefix length value to convert Returns: str: The subt mask as a dotted decimal string Z32z 0.0.0.0/%s)�strr Z IPNetwork�netmask)� prefixlen�addrr r r �prefixlen_to_maskD s r c sV e Zd Z� fdd�Zdd� Zdd� Zdd� Zd d � Zdd� Zd d� Z ddd�Z � ZS )�Aclsc s* t t| �j|g|�R i |�� t� | _d S �N)�superr �__init__�dict� _instances)�self�node�args�kwargs�� __class__r r r T s z Acls.__init__c C s | � |�| S r )�get_instance�r �namer r r �getX s zAcls.getc C sb t �dt j�}i i d�}|�| j�D ]8\}}| �|�}|rP|dkrP||d |<