-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
validate: add the validation of Resources.devices #374
Conversation
Signed-off-by: zhouhao <[email protected]>
Signed-off-by: zhouhao <[email protected]>
resources.devices.access? r.Resources.Devices[index].Access)) |
I'd rather handle this sort of value validation by using the spec's
JSON Schema (see the in-flight #197).
|
LGTM |
@liangchenye @mrunalp PTAL |
On Fri, May 05, 2017 at 02:51:31AM -0700, Ma Shimiao wrote:
It's hard to exactly check composition of r, w, m in JSON schema as
I tried in runtime-spec/#690 and has been rejected.
opencontainers/runtime-spec#690 was a stronger check than what we're
checking here (since as of f6e16e8 this allows more than three
characters). That PR wasn't closed because of a JSON Schema
limitation, it was closed because the spec doesn't like carrying
kernel limits (even though these particular limits are still listed in
the spec [1]). But I don't think “included in the spec but not in the
JSON Schema” is a particularly consistent position, so I'd rather
revisit the JSON Schema approach to this or drop the valid-value
listing from the spec Markdown. Either way, I don't think we need a
Go check for these values in runtime-tools.
[1]: https://github.com/opencontainers/runtime-spec/blame/v1.0.0-rc5/config-linux.md#L223
|
ping @liangchenye @mrunalp |
@liangchenye @mrunalp PTAL |
We can drop this kind of validation when the JSON schema validation is adopted in runtime-tools. @q384566678 @Mashimiao will you try to integrate that? |
1 similar comment
@liangchenye I will try to do this. |
According to the following spec:
devices.type
devices.access
Signed-off-by: zhouhao [email protected]