Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(442)

Issue 750313003: ONC: Add IPConfigType. (Closed)

Created:
6 years ago by pneubeck (no reviews)
Modified:
5 years, 11 months ago
Reviewers:
stevenjb
CC:
chromium-reviews, stevenjb+watch_chromium.org, oshima+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@ipconfig_object
Project:
chromium
Visibility:
Public.

Description

ONC: Add IPConfigType. BUG=

Patch Set 1 : #

Total comments: 4

Patch Set 2 : Fixed default value documentation. #

Total comments: 4

Patch Set 3 : Change clearing of StaticIPConfig. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+106 lines, -6 lines) Patch
M chromeos/network/onc/onc_normalizer.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M chromeos/network/onc/onc_normalizer_unittest.cc View 1 chunk +19 lines, -2 lines 0 comments Download
M chromeos/network/onc/onc_signature.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chromeos/network/onc/onc_translator_onc_to_shill.cc View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
M chromeos/network/onc/onc_validator.cc View 2 chunks +11 lines, -0 lines 0 comments Download
M chromeos/test/data/network/augmented_merge.json View 1 chunk +6 lines, -1 line 0 comments Download
M chromeos/test/data/network/device_policy.onc View 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/test/data/network/managed_toplevel1.onc View 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/test/data/network/settings_with_normalization.json View 1 chunk +20 lines, -0 lines 0 comments Download
M chromeos/test/data/network/toplevel_wifi_open.onc View 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/test/data/network/user.onc View 1 chunk +1 line, -0 lines 0 comments Download
M components/onc/docs/onc_spec.html View 1 2 chunks +20 lines, -2 lines 0 comments Download
M components/onc/onc_constants.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M components/onc/onc_constants.cc View 1 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (3 generated)
pneubeck (no reviews)
@Steven, this is how I imagined to distinguish Automatic and Static IPConfig. Does this look ...
6 years ago (2014-11-29 12:36:59 UTC) #3
stevenjb
LGTM This looks fine, and I very much appreciate you doing the legwork (I never ...
6 years ago (2014-12-01 18:29:45 UTC) #5
stevenjb
https://codereview.chromium.org/750313003/diff/40001/components/onc/docs/onc_spec.html File components/onc/docs/onc_spec.html (right): https://codereview.chromium.org/750313003/diff/40001/components/onc/docs/onc_spec.html#newcode259 components/onc/docs/onc_spec.html:259: <span class="value">DHCP</span>) Actually, e.g., ethernet.onc contains a StaticIPConfig entry, ...
6 years ago (2014-12-04 00:14:30 UTC) #6
pneubeck (no reviews)
https://codereview.chromium.org/750313003/diff/40001/components/onc/docs/onc_spec.html File components/onc/docs/onc_spec.html (right): https://codereview.chromium.org/750313003/diff/40001/components/onc/docs/onc_spec.html#newcode259 components/onc/docs/onc_spec.html:259: <span class="value">DHCP</span>) On 2014/12/04 00:14:30, stevenjb wrote: > Actually, ...
6 years ago (2014-12-04 12:17:42 UTC) #7
stevenjb
On Thu, Dec 4, 2014 at 4:17 AM, <pneubeck@chromium.org> wrote: > > ... > > ...
6 years ago (2014-12-04 18:23:28 UTC) #8
pneubeck (no reviews)
https://codereview.chromium.org/750313003/diff/60001/chromeos/network/onc/onc_normalizer.cc File chromeos/network/onc/onc_normalizer.cc (right): https://codereview.chromium.org/750313003/diff/60001/chromeos/network/onc/onc_normalizer.cc#newcode184 chromeos/network/onc/onc_normalizer.cc:184: ::onc::network_config::kStaticIPConfig, this line should remove a 'irrelevant' StaticIPConfig in ...
6 years ago (2014-12-04 18:47:04 UTC) #9
pneubeck (no reviews)
On 2014/12/04 18:23:28, stevenjb wrote: > On Thu, Dec 4, 2014 at 4:17 AM, <mailto:pneubeck@chromium.org> ...
6 years ago (2014-12-04 18:52:29 UTC) #10
stevenjb
https://codereview.chromium.org/750313003/diff/60001/chromeos/network/onc/onc_normalizer.cc File chromeos/network/onc/onc_normalizer.cc (right): https://codereview.chromium.org/750313003/diff/60001/chromeos/network/onc/onc_normalizer.cc#newcode184 chromeos/network/onc/onc_normalizer.cc:184: ::onc::network_config::kStaticIPConfig, On 2014/12/04 18:47:04, pneubeck wrote: > this line ...
6 years ago (2014-12-04 18:54:44 UTC) #11
pneubeck (no reviews)
On 2014/12/04 18:54:44, stevenjb wrote: > https://codereview.chromium.org/750313003/diff/60001/chromeos/network/onc/onc_normalizer.cc > File chromeos/network/onc/onc_normalizer.cc (right): > > https://codereview.chromium.org/750313003/diff/60001/chromeos/network/onc/onc_normalizer.cc#newcode184 > ...
6 years ago (2014-12-04 18:59:52 UTC) #12
stevenjb
I see. That's a bit confusing. So, with this change, existing configurations (which I believe ...
6 years ago (2014-12-04 19:28:01 UTC) #13
chromium-reviews
On Thu, Dec 4, 2014 at 8:28 PM, Steven Bennetts <stevenjb@chromium.org> wrote: > I see. ...
6 years ago (2014-12-04 19:32:33 UTC) #14
stevenjb
Note: I think this CL will need to be rebased. This won't be completely correct ...
6 years ago (2014-12-05 00:37:08 UTC) #15
stevenjb
https://codereview.chromium.org/750313003/diff/60001/chromeos/network/onc/onc_normalizer.cc File chromeos/network/onc/onc_normalizer.cc (right): https://codereview.chromium.org/750313003/diff/60001/chromeos/network/onc/onc_normalizer.cc#newcode184 chromeos/network/onc/onc_normalizer.cc:184: ::onc::network_config::kStaticIPConfig, On 2014/12/04 18:54:44, stevenjb wrote: > On 2014/12/04 ...
6 years ago (2014-12-05 01:11:47 UTC) #16
pneubeck (no reviews)
On 2014/12/05 01:11:47, stevenjb wrote: > https://codereview.chromium.org/750313003/diff/60001/chromeos/network/onc/onc_normalizer.cc > File chromeos/network/onc/onc_normalizer.cc (right): > > https://codereview.chromium.org/750313003/diff/60001/chromeos/network/onc/onc_normalizer.cc#newcode184 > ...
6 years ago (2014-12-05 10:25:01 UTC) #17
stevenjb
6 years ago (2014-12-05 18:23:59 UTC) #18
Yeah, this is all giving me a headache. I've flip flopped a couple of times
now in my thinking. Now I'm thinking that, since we are now setting
StaticIPConfig as an object in Shill, maybe we don't actually need
IPConfigType, i.e:

To specify both static IP address and name servers:
StaticIPConfig = { IPAddress = "foo", NameServers = "bar" }

To specify a static IP address with automatic name servers:
StaticIPConfig = { IPAddress = "foo" }

To specify specific name servers with automatic IP address:
StaticIPConfig = { NameServers = "bar" }

To specify automatic IP Address and name servers:
StaticIPConfig = {}

To specify neither, i.e. leave the settings unchanged, do not provide
StaticIPConfig.

We would not support changing just IP address config or just name server
config; to set one both must be specified.

WDYT?

(It may just make sense to discuss this in person when you are here. I'll
set up a time and start an agenda).


On Fri, Dec 5, 2014 at 2:25 AM, <pneubeck@chromium.org> wrote:

> On 2014/12/05 01:11:47, stevenjb wrote:
>
> https://codereview.chromium.org/750313003/diff/60001/
> chromeos/network/onc/onc_normalizer.cc
>
>> File chromeos/network/onc/onc_normalizer.cc (right):
>>
>
>
> https://codereview.chromium.org/750313003/diff/60001/
> chromeos/network/onc/onc_normalizer.cc#newcode184
>
>> chromeos/network/onc/onc_normalizer.cc:184:
>> ::onc::network_config::kStaticIPConfig,
>> On 2014/12/04 18:54:44, stevenjb wrote:
>> > On 2014/12/04 18:47:04, pneubeck wrote:
>> > > this line should remove a 'irrelevant' StaticIPConfig in every flow
>> that
>> goes
>> > > through MNCH before we sent a configuration to Shill.
>> >
>> > Then I'm confused why the translation of ethernet.onc doesn't fail
>> since it
>> > doesn't specify IPConfigType?
>> >
>>
>
>  I just realized that this is potentially confusing if a configuration only
>> specifies specific NameServers, e.g.:
>>
>
>  StaticIPConfig: {
>>    NameServers = [ "8.8.4.4" ]
>> }
>>
>
>  In this case, IPConfigType will need to be 'Static', even though the
>> IPAddress
>> is not set (which will cause Shill to use DHCP for the IP address). This
>> seems
>> OK, and works fine for the Settings code, but we might want to make that
>> clear
>> in the spec.
>>
>
> Yes, I realized that during the discussion in your CL as well.
> Shall we change IPConfigType to IPAddressType + NameserverType ?
>
> https://codereview.chromium.org/750313003/
>

To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698