Skip to content

Commit b712a4a

Browse files
authored
feat(docker): Add driver schema (#340)
1 parent bc838d7 commit b712a4a

5 files changed

Lines changed: 631 additions & 5 deletions

File tree

src/molecule_plugins/docker/driver.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
# DEALINGS IN THE SOFTWARE.
2020
"""Docker Driver Module."""
2121

22+
from __future__ import annotations
23+
2224
import os
25+
from pathlib import Path
2326

2427
from molecule import logger
2528
from molecule.api import Driver
@@ -277,3 +280,10 @@ def required_collections(self) -> dict[str, str]:
277280
# https://galaxy.ansible.com/community/docker
278281
# keep in synch with src/molecule_plugins/containers/driver.py and requirements.yml
279282
return {"community.docker": "3.10.2", "ansible.posix": "1.4.0"}
283+
284+
def schema_file(self) -> str | None:
285+
"""Return the path to the driver's JSON schema file."""
286+
p = Path(self._path, "schema", "driver.json")
287+
if p.is_file():
288+
return str(p)
289+
return None

0 commit comments

Comments
 (0)