From 8c47aba9559d149f4223b44ac53811777e497ff6 Mon Sep 17 00:00:00 2001 From: wvandeun Date: Mon, 7 Oct 2024 23:34:13 +0200 Subject: [PATCH 1/4] bump infrahub-sdk to v0.14.0 --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index de27f56..2973bab 100644 --- a/poetry.lock +++ b/poetry.lock @@ -200,13 +200,13 @@ testing = ["flake8 (<5)", "flufl.flake8", "importlib-resources (>=1.3)", "packag [[package]] name = "infrahub-sdk" -version = "0.13.0" +version = "0.14.0" description = "Python Client to interact with Infrahub" optional = false python-versions = "<4.0,>=3.9" files = [ - {file = "infrahub_sdk-0.13.0-py3-none-any.whl", hash = "sha256:c974462d207c47477cf47876a8d6b47b3b939a6e29b88510cffda8b66f7d7bbf"}, - {file = "infrahub_sdk-0.13.0.tar.gz", hash = "sha256:5be70ca95ee63bd7db4c2fc120e9e5129e9eb2c7f37690be7f0170c488d113b2"}, + {file = "infrahub_sdk-0.14.0-py3-none-any.whl", hash = "sha256:f414ca90b11f465605723b54fd36ada6ca15e1fd9b81889272f127c82d4ec81e"}, + {file = "infrahub_sdk-0.14.0.tar.gz", hash = "sha256:0ac1c415724caaa70077a3ed5563d0d9b1ff1b6649f1a09d7f6b9b21d461f531"}, ] [package.dependencies] From 7f0a3cd82a689693ed1406ee5347f370cb4f6b89 Mon Sep 17 00:00:00 2001 From: wvandeun Date: Mon, 7 Oct 2024 23:56:52 +0200 Subject: [PATCH 2/4] remove usage of deprecate init method on InfrahubClient(Sync) --- nornir_infrahub/plugins/inventory/infrahub.py | 2 +- tests/unit/conftest.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nornir_infrahub/plugins/inventory/infrahub.py b/nornir_infrahub/plugins/inventory/infrahub.py index 451de54..53a1e57 100644 --- a/nornir_infrahub/plugins/inventory/infrahub.py +++ b/nornir_infrahub/plugins/inventory/infrahub.py @@ -155,7 +155,7 @@ def __init__( # noqa: PLR0913 self.defaults_file = Path(defaults_file).expanduser() self.group_file = Path(group_file).expanduser() - self.client = InfrahubClientSync.init(config=Config(api_token=token), address=self.address) + self.client = InfrahubClientSync(config=Config(api_token=token), address=self.address) schema_mappings = schema_mappings or [] self.schema_mappings = [SchemaMappingNode(**mapping) for mapping in schema_mappings] diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index 0fe2ea3..81e554f 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -9,12 +9,12 @@ @pytest.fixture async def client() -> InfrahubClient: - return await InfrahubClient.init(address="http://mock") + return InfrahubClient(address="http://mock") @pytest.fixture async def client_sync() -> InfrahubClientSync: - return (InfrahubClientSync.init(address="http://mock"),) + return (InfrahubClientSync(address="http://mock"),) @pytest.fixture From e92a7a48b4ddda4e22312ed4c19ed5b91aa9dfa7 Mon Sep 17 00:00:00 2001 From: wvandeun Date: Tue, 8 Oct 2024 00:09:13 +0200 Subject: [PATCH 3/4] set infrahub-sdk minimum version to v0.14.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fdc9a8b..cbb84b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ packages = [{ include = "nornir_infrahub" }] [tool.poetry.dependencies] python = "^3.9, <3.13" -infrahub-sdk = { version = "^0,>=0.9.1", extras = ["tests"] } +infrahub-sdk = { version = "^0,>=0.14.0", extras = ["tests"] } ruamel-yaml = "^0.18.5" nornir = "^3.4.1" nornir-utils = "^0.2.0" From 33ee4d7d8e418b149e95e1bfa98a4b93484a536c Mon Sep 17 00:00:00 2001 From: wvandeun Date: Tue, 8 Oct 2024 00:09:34 +0200 Subject: [PATCH 4/4] bump version to v0.4.0 --- poetry.lock | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/poetry.lock b/poetry.lock index 2973bab..f5e1d78 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1231,4 +1231,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = "^3.9, <3.13" -content-hash = "d43d47d0dd7612f9b014e7f71f28ffb57f985aca128e9299607247ba3834655e" +content-hash = "5e6bd02b86107e084ce7a8108341196b1488cea2c574f1d454d62be45c8aca2b" diff --git a/pyproject.toml b/pyproject.toml index cbb84b9..f0427d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "nornir-infrahub" -version = "0.3.2" +version = "0.4.0" description = "Nornir plugin for Infrahub" authors = ["OpsMill "] readme = "README.md"