Skip to content
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

Windows: Fix camelCase inconsistencies #859

Merged
merged 1 commit into from
May 31, 2017

Conversation

lowenna
Copy link
Contributor

@lowenna lowenna commented May 25, 2017

Signed-off-by: John Howard jhoward@microsoft.com

As per #828 (comment), fixes #857.

Addresses credentialSpec, utilityVMPath, and ignoreFlushesDuringBoot.

REMOVED ~~~I noticed there were discrepancies also, particularly in the SolarisAnet structure (camelCase and non-matching field names to json names), so I fixed these up at the same time.~~~

Copy link
Contributor

@wking wking left a comment

Choose a reason for hiding this comment

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

Ping @anuthan for feedback on the Solaris changes.

@@ -12,15 +12,15 @@ The SMF(Service Management Facility) FMRI which should go to "online" state befo
"milestone": "svc:/milestone/container:default"
```

## <a name="configSolarisLimitpriv" />limitpriv
## <a name="configSolarisLimitPriv" />limitpriv
Copy link
Contributor

Choose a reason for hiding this comment

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

If you're changing limitpriv to limitPriv below, I expect you want to change it in the header here as well. You've currently changed the anchor, but not the visible text.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ugh, sorry, I missed that one. Force update coming in a minute.

@@ -90,7 +90,7 @@ Mapped to `allowed-address` in the [zonecfg(1M)][zonecfg.1m_2] man page.
* **`configureAllowedAddress`** *(string, OPTIONAL)* If configureAllowedAddress is set to true, the addresses specified by allowedAddress are automatically configured on the interface each time the container starts.
When it is set to false, the allowedAddress will not be configured on container start.
Mapped to `configure-allowed-address` in the [zonecfg(1M)][zonecfg.1m_2] man page.
* **`defrouter`** *(string, OPTIONAL)* The value for the OPTIONAL default router.
* **`defaultRouter`** *(string, OPTIONAL)* The value for the OPTIONAL default router.
Copy link
Contributor

@wking wking May 25, 2017

Choose a reason for hiding this comment

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

It seems inconsistent to me to expand defdefault here but not expand PrivPrivilege. I personally prefer the unabbreviated names, but am not sure how the Solaris folks want to handle this. I'm fine with this expansion and/or the PrivPrivilege expansion happening in a follow-up PR if we want to isolate those changes from the camelCase changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The link in the solaris markdown was wrong, but I'm updating it to http://docs.oracle.com/cd/E19253-01/816-5168/priv-str-to-set-3c/index.html as that seems the correct link.

However, as from that link the documentation seems to use Priv, I'm leaving it as-is.

As for def or default, def seems a very unusual abbreviation. Using default is also consistent with defaultAction. There seems no point that I can see for abbreviating it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I take it back, simply on account of it being def in the Solaris documentation. Reverted that change.

Copy link
Contributor

Choose a reason for hiding this comment

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

I take it back, simply on account of it being def in the Solaris documentation.

“Expose the platform abbreviation” sounds like a sane way to frame the policy. But then perhaps we want “expose the platform casing” as well, in which case we'd want to leave this entry as defrouter and not touch it in this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

hey @wking and @jhowardmsft. i'll be taking over responsibility for the solaris components from @anuthan. i've reviewed our use of camel case and i don't actually want to make any changes to it. in most cases our property names mirror what's found in zonecfg ("defrouter" being an example), and camel case was only used for property names that had a hyphen in them. for example, the zonecfg "allowed-address" property is mapped to "allowedAddress". hopefully that sounds reasonable?

that said, some of our docs.oracle.com links are broken so i'll file and issue for that and get it fixed.

@@ -495,7 +495,7 @@ type WindowsNetwork struct {
// WindowsHyperV contains information for configuring a container to run with Hyper-V isolation.
type WindowsHyperV struct {
// UtilityVMPath is an optional path to the image used for the Utility VM.
UtilityVMPath string `json:"utilityvmpath,omitempty"`
UtilityVMPath string `json:"utilityVMPath,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

On the unabbreviation front, this could be utilityVirtualMachinePath. I don't see a way to draw a hard line for this, and it's orthogonal to camelCasing, but I thought I'd point out that defdefault style expansion is something of a slippery slope. My own fuzzy possition is that I like defdefault but am less enthusiastic about VMVirtualMachine. And while I think blkioThrottleWriteIOPSDevice is a bit hard to read, it may be a better choice than throttleWriteOperationsPerSecondPerDevice. But if anyone does see a way to draw a good line, it would be nice to document that line in style.md.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I agree it's a fine line, but IMO, I would say VM is a very common abbreviation for 'Virtual Machine' and think it's OK as is.

Copy link
Contributor

Choose a reason for hiding this comment

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

FYI, I no longer work on containers, I will find a point of contact from Solaris for you guys.
Sorry about this.

Copy link
Contributor

Choose a reason for hiding this comment

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

hey @wking and @jhowardmsft. i'll be taking over responsibility for the solaris containers work from @anuthan. i did an audit of our use of camel case and i'd prefer not to change it. in general we've tried to have our property names map to zonecfg.1m properties. "defrouter" being a good example. the places where we have used camel case is for zonecfg properties that have hyphens in them. so for example the zonecfg "allowed-address" property has been mapped to allowedAddress. hopefully this seems sensible to folks.

that said, john correctly noted that some of our doc links are broken so i filed issue #864 on that.

@lowenna lowenna force-pushed the camelCase branch 4 times, most recently from 7ca2e6c to 451856a Compare May 25, 2017 23:12
@lowenna
Copy link
Contributor Author

lowenna commented May 25, 2017

OK, I don't want to rathole for 1.0, when what I was originally intending fixing which was the camelCasing in Windows. Reverted all Solaris changes and that can be taken up separately if necessary.

@lowenna lowenna changed the title Fix camelCase and Solaris incosistencies WIndows: Fix camelCase inconsistencies May 25, 2017
@lowenna lowenna changed the title WIndows: Fix camelCase inconsistencies Windows: Fix camelCase inconsistencies May 25, 2017
@wking
Copy link
Contributor

wking commented May 25, 2017 via email

Signed-off-by: John Howard <jhoward@microsoft.com>
@lowenna
Copy link
Contributor Author

lowenna commented May 25, 2017

And 451856a looks like it covers all the camelCasing for
config-windows.md, although there are still references in the JSON
Schema that need updating.

Thanks. Those too are updated now at c6338b3

@TomSweeneyRedHat
Copy link

LGTM

@mrunalp
Copy link
Contributor

mrunalp commented May 31, 2017

LGTM

Approved with PullApprove

@vbatts
Copy link
Member

vbatts commented May 31, 2017

LGTM

Approved with PullApprove

@vbatts vbatts merged commit 09404ad into opencontainers:master May 31, 2017
@lowenna lowenna deleted the camelCase branch May 31, 2017 21:56
@vbatts vbatts mentioned this pull request Jul 5, 2017
wking added a commit to wking/opencontainer-runtime-spec that referenced this pull request Jul 10, 2017
Through f4d221c (Merge pull request opencontainers#880 from
dqminh/wking-linux-only-capabilities-again, 2017-07-05).  The rc6
release picked up an earlier version of these notes, and those entries
are mostly unchanged except for:

* The credentialSpec entry, which was opencontainers#814 for credentialspec and now
  also includes opencontainers#859 for credentialSpec.

* The root(.path) Hyper-V entry, which was opencontainers#820 for root.path and now
  also includes opencontainers#838 for root.  I also moved this into the "breaking
  changes" section, because rc5 Hyper-V configs required root to be
  set, and rc6 Hyper-V configs require it to not be set.  Although
  whether rc5 allowed Hyper-V configs at all is not clear to me.

* Fixed indenting for the typo-fixes entry, as well as a number of
  more recent typo-fix PRs.

Signed-off-by: W. Trevor King <wking@tremily.us>
wking added a commit to wking/opencontainer-runtime-spec that referenced this pull request Jul 11, 2017
Through f4d221c (Merge pull request opencontainers#880 from
dqminh/wking-linux-only-capabilities-again, 2017-07-05).  The rc6
release picked up an earlier version of these notes, and those entries
are mostly unchanged except for:

* The credentialSpec entry, which was opencontainers#814 for credentialspec and now
  also includes opencontainers#859 for credentialSpec.

* The root(.path) Hyper-V entry, which was opencontainers#820 for root.path and now
  also includes opencontainers#838 for root.  I also moved this into the "breaking
  changes" section, because rc5 Hyper-V configs required root to be
  set, and rc6 Hyper-V configs require it to not be set.  Although
  whether rc5 allowed Hyper-V configs at all is not clear to me.

* Fixed indenting for the typo-fixes entry, as well as a number of
  more recent typo-fix PRs.

Signed-off-by: W. Trevor King <wking@tremily.us>
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.

Camel casing needs fixing in config.go and matching schema
7 participants