How to use _opensearch_url method in localstack

Best Python code snippet using localstack_python

versions.py

Source:versions.py Github

copy

Full Screen

...167def get_install_version(version: str) -> str:168 if version not in install_versions:169 raise ValueError(f"unknown version {version}")170 return install_versions[version]171def _opensearch_url(install_version: semver.VersionInfo) -> str:172 arch = "x64" if get_arch() == "amd64" else "arm64"173 version = str(install_version)174 return (175 f"https://artifacts.opensearch.org/releases/bundle/opensearch/"176 f"{version}/opensearch-{version}-linux-{arch}.tar.gz"177 )178def _es_url(install_version: semver.VersionInfo) -> str:179 arch = "x86_64" if get_arch() == "amd64" else "aarch64"180 version = str(install_version)181 repo = "https://artifacts.elastic.co/downloads/elasticsearch"182 if install_version.major <= 6:183 return f"{repo}/elasticsearch-{version}.tar.gz"184 return f"{repo}/elasticsearch-{version}-linux-{arch}.tar.gz"185def get_download_url(install_version: str, engine_type: EngineType) -> str:186 install_version = semver.VersionInfo.parse(install_version)187 if engine_type == EngineType.OpenSearch:188 return _opensearch_url(install_version)189 elif engine_type == EngineType.Elasticsearch:190 return _es_url(install_version)191def fetch_latest_versions() -> Dict[str, str]: # pragma: no cover192 """193 Fetches from the opensearch git repository tags the latest patch versions for a minor version and returns a194 dictionary where the key corresponds to the minor version, and the value to the patch version. Run this once in a195 while and update the ``install_versions`` constant in this file.196 Example::197 {198 '1.0': '1.0.0',199 '1.1': '1.1.0',200 '1.2': '1.2.2'201 }202 When updating the versions, make sure to not add versions which are currently not yet supported by AWS....

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run localstack automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful