1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323
|
.. _other_modules:
Other Modules
#############
``curator.cli``
===============
.. py:module:: curator.cli
.. autofunction:: process_action
.. autofunction:: ilm_action_skip
.. autofunction:: exception_handler
.. autofunction:: run
.. py:function:: cli(ctx, config, hosts, cloud_id, id, api_key, username, password, bearer_auth, opaque_id, request_timeout, http_compress, verify_certs, ca_certs, client_cert, client_key, ssl_assert_hostname, ssl_assert_fingerprint, ssl_version, master_only, skip_version_test, dry_run, loglevel, logfile, logformat, action_file)
This is the :py:class:`click.Command` that initiates everything and connects the command-line to
the rest of Curator.
:param ctx: The Click Context
:param config: Path to configuration file.
:param hosts: Elasticsearch URL to connect to
:param cloud_id: Shorthand to connect to Elastic Cloud instance
:param id: API Key "id" value
:param api_key: API Key "api_key" value
:param username: Username used to create "basic_auth" tuple
:param password: Password used to create "basic_auth" tuple
:param bearer_auth: Bearer Auth Token
:param opaque_id: Opaque ID string
:param request_timeout: Request timeout in seconds
:param http_compress: Enable HTTP compression
:param verify_certs: Verify SSL/TLS certificate(s)
:param ca_certs: Path to CA certificate file or directory
:param client_cert: Path to client certificate file
:param client_key: Path to client certificate key
:param ssl_assert_hostname: Hostname or IP address to verify on the node's certificate.
:param ssl_assert_fingerprint: SHA-256 fingerprint of the node's certificate. If this value is
given then root-of-trust verification isn't done and only the node's certificate
fingerprint is verified.
:param ssl_version: Minimum acceptable TLS/SSL version
:param master_only: Only run if the single host provided is the elected master
:param skip_version_test: Do not check the host version
:param dry_run: Do not perform any changes.
:param loglevel: Log level
:param logfile: Path to log file
:param logformat: Log output format
:param action_file: Path to action file
:type ctx: :py:class:`~.click.Context`
:type config: str
:type hosts: list
:type cloud_id: str
:type id: str
:type api_key: str
:type username: str
:type password: str
:type bearer_auth: str
:type opaque_id: str
:type request_timeout: int
:type http_compress: bool
:type verify_certs: bool
:type ca_certs: str
:type client_cert: str
:type client_key: str
:type ssl_assert_hostname: str
:type ssl_assert_fingerprint: str
:type ssl_version: str
:type master_only: bool
:type skip_version_test: bool
:type dry_run: bool
:type loglevel: str
:type logfile: str
:type logformat: str
:type action_file: str
``curator.repomgrcli``
======================
.. py:module:: curator.repomgrcli
.. autofunction:: delete_callback
.. autofunction:: show_repos
.. autofunction:: get_client
.. autofunction:: create_repo
.. py:function:: azure(ctx, name, client, container, base_path, chunk_size, compress, max_restore_rate, max_snapshot_rate, readonly, location_mode, verify)
:param ctx: The Click Context
:param name: The repository name
:param client: The named client (Azure)
:param container: Container name. You must create the Azure container before creating the
repository.
:param base_path: Specifies the path within container to repository data. Defaults to empty
(root directory).
:param chunk_size: Chunk size, e.g. ``1g``, ``10m``, ``5k``. Default is unbounded.
:param compress: Enable/Disable metadata compression.
:param max_restore_rate: Throttles per node restore rate (per second). Default is ``20mb``.
:param max_snapshot_rate: Throttles per node restore rate (per second). Default is ``20mb``.
:param readonly: Make repsitory read-only.
:param location_mode: Either ``primary_only`` or ``secondary_only``. Note that if you set it to
``secondary_only``, it will force ``readonly`` to ``True``.
:param verify: Verify repository after creation.
:type ctx: :py:class:`~.click.Context`
:type name: str
:type client: str
:type container: str
:type base_path: str
:type chunk_size: str
:type compress: bool
:type max_restore_rate: str
:type max_snapshot_rate: str
:type readonly: bool
:type location_mode: str
:type verify: bool
.. py:function:: gcs(ctx, name, bucket, client, base_path, chunk_size, compress, max_restore_rate, max_snapshot_rate, readonly, verify)
:param ctx: The Click Context
:param name: The repository name
:param client: The name of the client to use to connect to Google Cloud Storage.
:param bucket: The name of the bucket to be used for snapshots.
:param base_path: Specifies the path within bucket to repository data. Defaults to the root of
the bucket.
:param chunk_size: Chunk size, e.g. ``1g``, ``10m``, ``5k``. Default is unbounded.
:param compress: Enable/Disable metadata compression.
:param max_restore_rate: Throttles per node restore rate (per second). Default is ``20mb``.
:param max_snapshot_rate: Throttles per node restore rate (per second). Default is ``20mb``.
:param readonly: Make repsitory read-only.
:param verify: Verify repository after creation.
:type ctx: :py:class:`~.click.Context`
:type name: str
:type client: str
:type bucket: str
:type base_path: str
:type chunk_size: str
:type compress: bool
:type max_restore_rate: str
:type max_snapshot_rate: str
:type readonly: bool
:type verify: bool
.. py:function:: s3(ctx, name, bucket, client, base_path, chunk_size, compress, max_restore_rate, max_snapshot_rate, readonly, server_side_encryption, buffer_size, canned_acl, storage_class, verify)
:param ctx: The Click Context
:param name: The repository name
:param bucket: The bucket name must adhere to Amazon's S3 bucket naming rules.
:param client: The name of the S3 client to use to connect to S3.
:param base_path: Specifies the path to the repository data within its bucket. Defaults to an
empty string, meaning that the repository is at the root of the bucket. The value of this
setting should not start or end with a /.
:param chunk_size: Chunk size, e.g. ``1g``, ``10m``, ``5k``. Default is unbounded.
:param compress: Enable/Disable metadata compression.
:param max_restore_rate: Throttles per node restore rate (per second). Default is ``20mb``.
:param max_snapshot_rate: Throttles per node restore rate (per second). Default is ``20mb``.
:param readonly: Make repsitory read-only.
:param server_side_encryption: If set, files are encrypted on server side using AES256 algorithm.
:param buffer_size: Minimum threshold below which the chunk is uploaded using a single request.
Must be between 5mb and 5gb.
:param canned_acl: When the S3 repository creates buckets and objects, it adds the canned ACL
into the buckets and objects.
:param storage_class: Sets the S3 storage class for objects stored in the snapshot repository.
:param verify: Verify repository after creation.
:type ctx: :py:class:`~.click.Context`
:type name: str
:type bucket: str
:type client: str
:type base_path: str
:type chunk_size: str
:type compress: bool
:type max_restore_rate: str
:type max_snapshot_rate: str
:type readonly: bool
:type server_side_encryption: bool
:type buffer_size: str
:type canned_acl: str
:type storage_class: str
:type verify: bool
.. py:function:: fs(ctx, name, location, compress, chunk_size, max_snapshots, max_restore_rate, max_snapshot_rate, readonly, verify)
:param ctx: The Click Context
:param name: The repository name
:param location: Shared file-system location. Must match remote path, & be accessible to all
master & data nodes
:param compress: Enable/Disable metadata compression.
:param chunk_size: Chunk size, e.g. ``1g``, ``10m``, ``5k``. Default is unbounded.
:param max_snapshots: Maximum number of snapshots the repository can contain. Defaults to
``Integer.MAX_VALUE``, which is 2147483647.
:param max_restore_rate: Throttles per node restore rate (per second). Default is ``20mb``.
:param max_snapshot_rate: Throttles per node restore rate (per second). Default is ``20mb``.
:param readonly: Make repsitory read-only.
:param verify: Verify repository after creation.
:type ctx: :py:class:`~.click.Context`
:type name: str
:type location: str
:type compress: bool
:type chunk_size: str
:type max_snapshots: int
:type max_restore_rate: str
:type max_snapshot_rate: str
:type readonly: bool
:type verify: bool
.. py:function:: url(ctx, name, chunk_size, http_max_retries, http_socket_timeout, compress, max_snapshots, max_restore_rate, shared_filesystem_url, verify)
:param ctx: The Click Context
:param name: The repository name
:param chunk_size: Chunk size, e.g. ``1g``, ``10m``, ``5k``. Default is unbounded.
:param http_max_retries: Maximum number of retries for http and https
:param http_socket_timeout: Maximum wait time for data transfers over a connection.
:param compress: Enable/Disable metadata compression.
:param max_snapshots: Maximum number of snapshots the repository can contain. Defaults to
``Integer.MAX_VALUE``, which is 2147483647.
:param max_restore_rate: Throttles per node restore rate (per second). Default is ``20mb``.
:param shared_filesystem_url: URL location of the root of the shared filesystem repository.
:param verify: Verify repository after creation.
:type ctx: :py:class:`~.click.Context`
:type name: str
:type chunk_size: str
:type http_max_retries: int
:type http_socket_timeout: int
:type compress: bool
:type max_snapshots: int
:type max_restore_rate: str
:type shared_filesystem_url: str
:type verify: bool
.. py:function:: source(ctx, name, delegate_type, location, compress, chunk_size, max_snapshots, max_restore_rate, max_snapshot_rate, readonly, verify)
:param ctx: The Click Context
:param name: The repository name
:param delegate_type: Delegated repository type.
:param location: Shared file-system location. Must match remote path, & be accessible to all
master & data nodes
:param compress: Enable/Disable metadata compression.
:param chunk_size: Chunk size, e.g. ``1g``, ``10m``, ``5k``. Default is unbounded.
:param max_snapshots: Maximum number of snapshots the repository can contain. Defaults to
``Integer.MAX_VALUE``, which is 2147483647.
:param max_restore_rate: Throttles per node restore rate (per second). Default is ``20mb``.
:param max_snapshot_rate: Throttles per node restore rate (per second). Default is ``20mb``.
:param readonly: Make repsitory read-only.
:param verify: Verify repository after creation.
:type ctx: :py:class:`~.click.Context`
:type name: str
:type delegate_type: str
:type location: str
:type compress: bool
:type chunk_size: str
:type max_snapshots: int
:type max_restore_rate: str
:type max_snapshot_rate: str
:type readonly: bool
:type verify: bool
.. py:function:: repo_mgr_cli(ctx, config, hosts, cloud_id, id, api_key, username, password, bearer_auth, opaque_id, request_timeout, http_compress, verify_certs, ca_certs, client_cert, client_key, ssl_assert_hostname, ssl_assert_fingerprint, ssl_version, master_only, skip_version_test, dry_run, loglevel, logfile, logformat)
:param ctx: The Click Context
:param config: Path to configuration file.
:param hosts: Elasticsearch URL to connect to
:param cloud_id: Shorthand to connect to Elastic Cloud instance
:param id: API Key "id" value
:param api_key: API Key "api_key" value
:param username: Username used to create "basic_auth" tuple
:param password: Password used to create "basic_auth" tuple
:param bearer_auth: Bearer Auth Token
:param opaque_id: Opaque ID string
:param request_timeout: Request timeout in seconds
:param http_compress: Enable HTTP compression
:param verify_certs: Verify SSL/TLS certificate(s)
:param ca_certs: Path to CA certificate file or directory
:param client_cert: Path to client certificate file
:param client_key: Path to client certificate key
:param ssl_assert_hostname: Hostname or IP address to verify on the node's certificate.
:param ssl_assert_fingerprint: SHA-256 fingerprint of the node's certificate. If this value is
given then root-of-trust verification isn't done and only the node's certificate
fingerprint is verified.
:param ssl_version: Minimum acceptable TLS/SSL version
:param master_only: Only run if the single host provided is the elected master
:param skip_version_test: Do not check the host version
:param dry_run: Do not perform any changes. NON-FUNCTIONAL PLACEHOLDER! DO NOT USE!
:param loglevel: Log level
:param logfile: Path to log file
:param logformat: Log output format
:type ctx: :py:class:`~.click.Context`
:type config: str
:type hosts: list
:type cloud_id: str
:type id: str
:type api_key: str
:type username: str
:type password: str
:type bearer_auth: str
:type opaque_id: str
:type request_timeout: int
:type http_compress: bool
:type verify_certs: bool
:type ca_certs: str
:type client_cert: str
:type client_key: str
:type ssl_assert_hostname: str
:type ssl_assert_fingerprint: str
:type ssl_version: str
:type master_only: bool
:type skip_version_test: bool
:type dry_run: bool
:type loglevel: str
:type logfile: str
:type logformat: str
|