podman-py icon indicating copy to clipboard operation
podman-py copied to clipboard

RFE: Provide a way to verify create container kwargs

Open ogajduse opened this issue 1 year ago • 1 comments

docker-py provides two constants RUN_CREATE_KWARGS and RUN_HOST_CONFIG_KWARGS that a consumer might use to validate kwargs they are passing to the CreateMixin.create method.

https://github.com/docker/docker-py/blob/a3652028b1ead708bd9191efb286f909ba6c2a49/docker/models/containers.py#L1122-L1134

I would like podman-py to provide either similar kinds of constants like docker-py does or provide a public method that could be used to validate the kwargs.

Currently, we have the following workaround implemented: https://github.com/SatelliteQE/broker/blob/eab6d4596d1b729bf86cc2dcd1bcae87e08a576a/broker/binds/containers.py#L150-L165

ogajduse avatar Jul 10 '24 17:07 ogajduse

In our DockerBind class, the implementation of the same method is using the constants that are mentioned in the issue description.

https://github.com/SatelliteQE/broker/blob/eab6d4596d1b729bf86cc2dcd1bcae87e08a576a/broker/binds/containers.py#L181-L184

ogajduse avatar Jul 10 '24 17:07 ogajduse