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/poetry.lock b/poetry.lock index de27f56..f5e1d78 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] @@ -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 fdc9a8b..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" @@ -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" 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