
    1                     j    S r SSKJr  SSKJr  SSKJr  SSKrSSKJr   " S S\R                  5      r	g)	z:Wrapper around Snapshot to provide file-order determinism.    )absolute_import)division)unicode_literalsN)storage_utilc                       \ rS rSrSrS rSrg)DeterministicSnapshot   z8DeterministicSnapshot is a thin wrapper around Snapshot.c                 H    [        U R                  R                  5       S S9$ )a  Gets the values of `self.files` in a deterministic order.

Internally, `self.files` is a dictionary. Prior to Python 3.6, dictionaries
were ordered nondeterministically, but our tests require determinism. As
such, we have to convert the underlying dictionary to a list and sort that
list. The specific order itself (e.g. alphabetical vs. reverse-alphabetical)
doesn't matter.

Returns:
  A list of files in a deterministic order.
c                 j    [         R                  R                  U R                  U R                  5      $ )N)ospathjoinroot)ms    Flib/googlecloudsdk/command_lib/infra_manager/deterministic_snapshot.py<lambda>6DeterministicSnapshot.GetSortedFiles.<locals>.<lambda>+   s    277<<+G    )key)sortedfilesvalues)selfs    r   GetSortedFiles$DeterministicSnapshot.GetSortedFiles   s$     

!G r    N)__name__
__module____qualname____firstlineno____doc__r   __static_attributes__r   r   r   r   r      s
    @r   r   )
r!   
__future__r   r   r   r   googlecloudsdk.api_lib.storager   Snapshotr   r   r   r   <module>r&      s,     A &  ' 	 7L11 r   