config-vm: Recycle the 'process' schema #1
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is my requested update to opencontainers#949.
We already have two ways to specify a process to launch (for the container process and for hooks). This commit recycles the container process schema for launcing the hypervisor. I've dropped the terminal configuration because callers are unlikely to need control over their hypervisor's standard streams, but otherwise this is the same structure.
The JSON Schema cheats a bit by not forbidding the terminal properties. We could address that if we really wanted to (JSON Schema makes it hard to extend a previously-defined object), but I'm leaving it to downstream tools in this commit.
I've split this PR into two commits. The first implements my preferred reference-style approach. The second implements @crosbymichaels' preferred copy/paste approach. The copy/paste approach allows you to extend one schema without (accidentally?) extending the other (the terminal properties are an example of this). I think the overlap is much greater than the differences, so I'd rather use the first commit's “is is the same, except for …” approach. But as far as configurations are concerned, the two approaches are identical, so I don't really care.
I've left the JSON Schema change off the copy/paste commit for now, I'll go back through and adjust that once we have a maintainer confirming the copy/paste approach.