U Ec_&@s,ddlmZmZmZmZGdddeZdS))NamespacedClient query_params _make_path SKIP_IN_PATHc@seZdZedddddZeddddZeddd dd d Zedd d d dZeddd!ddZedd dd"ddZ eddd#ddZ eddd$ddZ edd d%ddZ edd d&ddZ dS)'SnapshotClientZmaster_timeoutZwait_for_completionNcCs<||fD]}|tkrtdq|jjdtd|||||dS)a Creates a snapshot in a repository. ``_ :arg repository: A repository name :arg snapshot: A snapshot name :arg body: The snapshot definition :arg master_timeout: Explicit operation timeout for connection to master node :arg wait_for_completion: Should this request wait until the operation has completed before returning +Empty value passed for a required argument.PUT _snapshotparamsheadersbodyr ValueError transportperform_requestrself repositorysnapshotr r r paramrD/tmp/pip-target-m1bursmm/lib/python/elasticsearch/client/snapshot.pycreates   zSnapshotClient.createcCs:||fD]}|tkrtdq|jjdtd||||dS)a: Deletes a snapshot. ``_ :arg repository: A repository name :arg snapshot: A snapshot name :arg master_timeout: Explicit operation timeout for connection to master node rDELETEr r r rrrrr r rrrrdelete0s   zSnapshotClient.deleteZignore_unavailableverbosecCs:||fD]}|tkrtdq|jjdtd||||dS)a Returns information about a snapshot. ``_ :arg repository: A repository name :arg snapshot: A comma-separated list of snapshot names :arg ignore_unavailable: Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown :arg master_timeout: Explicit operation timeout for connection to master node :arg verbose: Whether to show verbose snapshot info or only show the basic info found in the repository index blob rGETr rrrrrrgetFs   zSnapshotClient.gettimeoutcCs*|tkrtd|jjdtd|||dS)a Deletes a repository. ``_ :arg repository: Name of the snapshot repository to unregister. Wildcard (`*`) patterns are supported. :arg master_timeout: Explicit operation timeout for connection to master node :arg timeout: Explicit operation timeout 8Empty value passed for a required argument 'repository'.rr rrrrr r rrrdelete_repositoryas z SnapshotClient.delete_repositorylocalcCs|jjdtd|||dS)a Returns information about a repository. ``_ :arg repository: A comma-separated list of repository names :arg local: Return local information, do not retrieve the state from master node (default: false) :arg master_timeout: Explicit operation timeout for connection to master node rr rrrrr#rrrget_repositoryws zSnapshotClient.get_repositoryverifycCs:||fD]}|tkrtdq|jjdtd||||dS)a Creates a repository. ``_ :arg repository: A repository name :arg body: The repository definition :arg master_timeout: Explicit operation timeout for connection to master node :arg timeout: Explicit operation timeout :arg verify: Whether to verify the repository after creation rrr r r)rrr r r rrrrcreate_repositorys  z SnapshotClient.create_repositorycCs>||fD]}|tkrtdq|jjdtd||d|||dS)a Restores a snapshot. ``_ :arg repository: A repository name :arg snapshot: A snapshot name :arg body: Details of what to restore :arg master_timeout: Explicit operation timeout for connection to master node :arg wait_for_completion: Should this request wait until the operation has completed before returning rPOSTr Z_restorer rrrrrrestores   zSnapshotClient.restorecCs|jjdtd||d||dS)a Returns information about the status of a snapshot. ``_ :arg repository: A repository name :arg snapshot: A comma-separated list of snapshot names :arg ignore_unavailable: Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown :arg master_timeout: Explicit operation timeout for connection to master node rr Z_statusrr&)rrrr r rrrstatuss  zSnapshotClient.statuscCs,|tkrtd|jjdtd|d||dS)aG Verifies a repository. ``_ :arg repository: A repository name :arg master_timeout: Explicit operation timeout for connection to master node :arg timeout: Explicit operation timeout r"r*r Z_verifyrrr#rrrverify_repositorys  z SnapshotClient.verify_repositorycCs,|tkrtd|jjdtd|d||dS)a] Removes stale data from repository. ``_ :arg repository: A repository name :arg master_timeout: Explicit operation timeout for connection to master node :arg timeout: Explicit operation timeout r"r*r _cleanuprrr#rrrcleanup_repositorys  z!SnapshotClient.cleanup_repository)NNN)NN)NN)NN)NNN)NN)NNN)NNNN)NN)NN)__name__ __module__ __qualname__rrrr r$r'r)r+r,r-r/rrrrrs(           rN)utilsrrrrrrrrrs