Skip to content

Commit 6cd9ddb

Browse files
Merge pull request #1032 from jiridanek/jd_podman_info_schema
NO-JIRA: fix(pydantic_schemas): new podman version changed output of `podman info`
2 parents 54e28ab + 3c3e788 commit 6cd9ddb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/containers/pydantic_schemas/podman_info.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ class ContainerStore(BaseModel):
129129
stopped: int
130130

131131

132+
class GraphOptions(BaseModel, extra="allow"):
133+
overlay_additional_image_stores: list[str] | None = Field(None, alias="overlay.additionalImageStores")
134+
overlay_imagestore: str | None = Field(None, alias="overlay.imagestore")
135+
overlay_mountopt: str | None = Field(None, alias="overlay.mountopt")
136+
137+
132138
class GraphStatus(BaseModel):
133139
backing_filesystem: str = Field(..., alias="Backing Filesystem")
134140
native_overlay_diff: str = Field(..., alias="Native Overlay Diff")
@@ -146,7 +152,7 @@ class Store(BaseModel):
146152
configFile: str
147153
containerStore: ContainerStore
148154
graphDriverName: str
149-
graphOptions: dict[str, str]
155+
graphOptions: GraphOptions
150156
graphRoot: str
151157
graphRootAllocated: int
152158
graphRootUsed: int
@@ -284,6 +290,7 @@ def test_podman_info():
284290
"containerStore": {"number": 0, "paused": 0, "running": 0, "stopped": 0},
285291
"graphDriverName": "overlay",
286292
"graphOptions": {
293+
"overlay.additionalImageStores": ["/usr/lib/containers/storage"],
287294
"overlay.imagestore": "/usr/lib/containers/storage",
288295
"overlay.mountopt": "nodev,metacopy=on",
289296
},

0 commit comments

Comments
 (0)