Closed archu-s closed 8 years ago
For IPV4/IPv6 existing other tool UIs are putting the required details only to ifcfg file. Even i feel going forward we have to achieve this in near future.
1)Select manual mode and put the required details. Apply. 2)This will get reflected in ifcfg file. 3)Now change to dhcp and apply. 4)The manual mode details will be removed from the ifcfg file. We can maintain the same behaviour and hence a new issue is opened up https://github.com/kimchi-project/ginger/issues/141
1)Select manual mode and put the required details. DONT Apply. 2)Now change to dhcp . 3)When you change from dhcp to manual, still the details edited in step 1 should be available. This has to be handle in UI cache.
In current code, to maintain consistency, i will not get the details of manual mode,if automatic mode is selected in case of ipv6.
Let me know if this is fine.
curl GET result for cfginterface is as below: { "IPV4_INFO":{ "PEERROUTES":"\"yes\"", "IPV4INIT":"yes", "DEFROUTE":"\"yes\"", "PEERDNS":"\"yes\"", "IPV4_FAILURE_FATAL":"\"no\"", "BOOTPROTO":"dhcp", "DNSAddresses":[ "9.9.9.9" ], "ROUTES":[ { "METRIC":"9.9.9.9", "NETMASK":"9.9.9.9", "GATEWAY":"9.9.9.9", "ADDRESS":"9.9.9.9" } ] }, "BASIC_INFO":{ "UUID":"\"7241d3b4-2b15-49a8-994e-b788062a9b02\"", "MTU":"1500", "HWADDR":"08:00:27:65:33:7F", "DEVICE":"enp0s3d", "TYPE":"Ethernet", "ONBOOT":"yes", "NAME":"enp0s3d" }, "IPV6_INFO":{ "IPV6_DEFAULTGW":"fe80::ff:fe23:9f4d", "IPV6INIT":"yes", "IPV6_PEERDNS":"\"yes\"", "IPV6Addresses":[ { "PREFIX":"fe80::ff:fe23:9f4d", "IPADDR":"fe80::ff:fe23:9f4d" } ], "IPV6_DEFROUTE":"\"yes\"", "ROUTES":[ { "METRIC":"fe80::ff:fe23:9f4d", "NETMASK":"fe80::ff:fe23:9f4d", "GATEWAY":"fe80::ff:fe23:9f4d", "ADDRESS":"fe80::ff:fe23:9f4d" } ], "IPV6_AUTOCONF":"yes", "IPV6_FAILURE_FATAL":"\"no\"", "DHCPV6C":"yes", "IPV6_PEERROUTES":"\"yes\"" } }
The result above does not have IPv4 address, but the ifcfg file has it as given below:
TYPE=Ethernet BOOTPROTO=dhcp DEFROUTE="yes" IPV4_FAILURE_FATAL="no" IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE="yes" IPV6_FAILURE_FATAL="no" NAME=enp0s3d UUID="7241d3b4-2b15-49a8-994e-b788062a9b02" HWADDR=08:00:27:65:33:7F PEERDNS="yes" PEERROUTES="yes" IPV6_PEERDNS="yes" IPV6_PEERROUTES="yes" DEVICE=enp0s3d ONBOOT=yes MTU=1500 IPADDR=9.9.9.9 GATEWAY=9.9.9.9 PREFIX=24 IPADDR1=10.10.10.17 PREFIX1=24 GATEWAY1=10.10.10.10 PREFIX2=24 IPADDR2=10.10.10.12 GATEWAY2=10.10.10.10 PREFIX3=24 IPADDR3=10.10.10.18 GATEWAY3=10.10.10.10 DNS=9.9.9.9 DHCPV6C=yes IPV6ADDR=fe80::ff:fe23:9f4d/fe80::ff:fe23:9f4d DNS1=9.9.9.9 DNS2=10.10.10.10 IPV6_DEFAULTGW=fe80::ff:fe23:9f4d