
    >Tf/                     f    d dl mZ d dlmZmZ d dlmZ  G d d ej        e                    ZdS )    )Manager)HostInet)RestrictedQuerySetc                        e Zd Z fdZ xZS )IPAddressManagerc                     t                                                                          t          t	          d                              S )a  
        By default, PostgreSQL will order INETs with shorter (larger) prefix lengths ahead of those with longer
        (smaller) masks. This makes no sense when ordering IPs, which should be ordered solely by family and host
        address. We can use HOST() to extract just the host portion of the address (ignoring its mask), but we must
        then re-cast this value to INET() so that records will be ordered properly. We are essentially re-casting each
        IP address as a /32 or /128.
        address)superget_querysetorder_byr   r   )self	__class__s    2/var/www/html/netbox-4.1.3/netbox/ipam/managers.pyr   zIPAddressManager.get_queryset	   s7     ww##%%..tDOO/D/DEEE    )__name__
__module____qualname__r   __classcell__)r   s   @r   r   r      sA        F F F F F F F F Fr   r   N)	django.db.modelsr   ipam.lookupsr   r   utilities.querysetsr   from_querysetr    r   r   <module>r      s    $ $ $ $ $ $ # # # # # # # # 2 2 2 2 2 2
F 
F 
F 
F 
F,w,-?@@ 
F 
F 
F 
F 
Fr   