|
Post by Caffrey on Jun 24, 2021 5:20:15 GMT
Hi, I have one doubt need clarification. Please help, thanks a lot. [Question] Can developer decide when to show or hide a supported property in response. For example, EthernetInterface has property "IPv6StaticAddresses". Do we need to show it when IPv6 mode is DHCP? If we need to show, is below a correct way? "IPv6StaticAddresses": [] or "IPv6StaticAddresses": [null] Also see a definition in SPEC. might be related to this question. Does this means all supported properties required to show in GET response? For some properties not support null type value, can we just hide it if not able to determine the value? Thanks, Caffrey
|
|
|
Post by mraineri on Jun 24, 2021 14:28:08 GMT
Yes, you should be showing "IPv6StaticAddresses" even if currently in DHCP mode. The other thing to consider here is some of the client workflows for configuring interfaces; it's more complicated than showing an empty array or null in the array, which is the reason we have two properties: IPv6StaticAddresses for showing the client configured static addresses, and IPv6Addresses for showing the active addresses on the interface.
Take the following type of steps some clients perform when setting up an interface for a static address when currently in DHCP mode. 1) Set static addresses for the interface. 2) Verify all addresses and other settings are set properly on the interface. 3) Disable DHCP on the interface.
Hiding or not showing the configured static addresses can cause confusion to the user. Also remember that null is useful in arrays that clients can configure; showing null conveys to the client there's an empty slot that is currently not populated, and they can use that as an indicator of where to insert their configuration.
|
|
|
Post by Caffrey on Jun 25, 2021 2:51:43 GMT
Got it, thank you so much
|
|
|
Post by AMI_Mani on Jun 25, 2021 18:00:03 GMT
Hi , Assume network cable is unplugged for one of ethernet interface and LinkStatus attribute is Nolink, in this case do we need to show all properties like IPv6StaticAddresses,IPv4StaticAddresses, DHCPv4, DHCPv6 as null and user can't patch to change value. Can we show some minimal attributes(eventhough patch supported for IPv6StaticAddresses,IPv4StaticAddresses, DHCPv4, DHCPv6 will not show in response) which can be useful for user instead of showing all support attributes with Null value
Thanks, Mani
|
|
|
Post by mraineri on Jun 28, 2021 13:35:12 GMT
Why would not having a link prevent a user from changing settings? If the cable is unplugged, I would expect aspects about the resource to still be configurable. I can certainly see cases where a user might be configuring the desired network settings prior to inserting the cable; they might want to keep the interface off the network until it's in a known state.
|
|
|
Post by AMI_Mani on Jul 1, 2021 19:09:30 GMT
Assume if LAN cable is plugged after some time, if we apply patched value in back ground and if it fails, how user will know this failure status. Assume if network is changed, if we try to apply old patch value, it may affect Service and it may go undesirable state. Based on Service implementation, can we discard of applying desired value at later time.
Thanks, Mani
|
|
|
Post by mraineri on Jul 1, 2021 19:47:28 GMT
There are separate properties to convey "active" and "desired static" addresses (IPv4Addresses vs IPv4StaticAddresses). If there was a problem applying the requested static address to be active, that can be observed in the IPv4Addresses array with messages that indicate that there was a problem applying an address.
|
|