Skip to content

Conversation

@liangchenye
Copy link
Member

  1. Add 'omitempty' to 'Device'.
  2. remove the 'seccomp' and 'device' from the example since they are not necessary
  3. change the device type description c to "c" since it became a string.

Signed-off-by: liangchenye [email protected]

@mrunalp
Copy link
Contributor

mrunalp commented Mar 10, 2016

LGTM

// If resources are specified, the cgroups at CgroupsPath will be updated based on resources.
CgroupsPath *string `json:"cgroupsPath,omitempty"`
// Namespaces contains the namespaces that are created and/or joined by the container
Namespaces []Namespace `json:"namespaces"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't namespaces optional as well?

@crosbymichael
Copy link
Member

Why do we have to remove fields from the EXAMPLES? They are examples, if you don't have fields in examples where are people going to learn about them?

@wking
Copy link
Contributor

wking commented Mar 10, 2016

On Thu, Mar 10, 2016 at 10:25:56AM -0800, Michael Crosby wrote:

Why do we have to remove fields from the EXAMPLES? They are
examples, if you don't have fields in examples where are people
going to learn about them?

I think we should either remove optional fields or fill them in with
meaningful values 1. Discovery should be through the parent field's
documentation [2,3].

@liangchenye
Copy link
Member Author

Same with Wking, I think we can just keep the meaningful value.

* **`type`** *(string, required)* - type of device: "c", "b", "u" or "p".
More info in [mknod(1)][mknod.1].
* **`path`** *(string, required)* - full path to device inside container.
* **`major, minor`** *(int64, required unless **`type`** is `p`)* - [major, minor numbers][devices] for the device.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to change p here and below in Device whitelist section as well. Anyway I don't see this necessary, because I don't think there is inkling for a specific type with backticks since it's just consistent usage for markdown. See discussion in #323 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Thu, Mar 10, 2016 at 06:36:58PM -0800, Qiang Huang wrote:

@@ -99,7 +99,7 @@ The runtime may supply them however it likes (with [mknod][mknod.2], by bind mou

The following parameters can be specified:

-* type (string, required) - type of device: c, b, u or p.
+* type (string, required) - type of device: "c", "b", "u" or "p".
More info in [mknod(1)][mknod.1].

  • path (string, required) - full path to device inside container.
  • major, minor (int64, required unless *type** is p)* - [major, minor numbers][devices] for the device.

You might want to change p here and below in Device whitelist
section as well. Anyway I don't see this necessary, because I don't
think there is inkling for a specific type with backticks since it's
just consistent usage for markdown. See discussion in
#323 (comment)

I think the style we choose is less important thant that we pick
something and document it in 1 for consistency. Having to think
about this whenever someone inserts a string literal in new docs is
wasted time ;).

@liangchenye
Copy link
Member Author

@hqhq yes, remove the unnecessary change.
@vishh new update also adds omitempty to 'namespace'

@vbatts
Copy link
Member

vbatts commented Mar 16, 2016

LGTM

and while this removes the empty values, i'll fix via #344

vbatts added a commit that referenced this pull request Mar 16, 2016
@vbatts vbatts merged commit 4d4a079 into opencontainers:master Mar 16, 2016
wking added a commit to wking/opencontainer-runtime-spec that referenced this pull request Aug 3, 2016
To match the omitempty which the Go property has had since 28cc423
(add omitempty to 'Device' and 'Namespace', 2016-03-10, opencontainers#340).

Signed-off-by: W. Trevor King <[email protected]>
wking added a commit to wking/opencontainer-runtime-spec that referenced this pull request Aug 3, 2016
To match the omitempty which the Go property has had since 28cc423
(add omitempty to 'Device' and 'Namespace', 2016-03-10, opencontainers#340).

Signed-off-by: W. Trevor King <[email protected]>
Mashimiao pushed a commit to Mashimiao/specs that referenced this pull request Aug 19, 2016
To match the omitempty which the Go property has had since 28cc423
(add omitempty to 'Device' and 'Namespace', 2016-03-10, opencontainers#340).

Signed-off-by: W. Trevor King <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants