The dhcp is setting with True by default and progress always
jump into the first if check.
So the no-dhcp option always ignored there.
Check the no-dhcp option first and then the dhcp option value
to avoid this.
Change-Id: Ide640e2cab3936d419ca62105304ff5d4a8a2074
Closes-Bug: #1602588