yast/yast-network — pull request #128 by jreidinger (2013-11-12 16:22:38+00:00)
Title: propose new object API for devices

Hi,
I propose new API for network for purpose of new installer and as I hope good enough to replace in future old API, which is really unintuitive.

example usage as I see it for NI simple task ( for each device try to set up DHCP, start it and if it not work, then stop it and remove DHCP config )

```ruby
def enable_dhcp_devices(device_name)
device = Network::Device.new(device_name)
device.configuration = Network::Configuration::DHCP.new
device.start
if device.global_address?
return
else
device.stop
device.configuration = Network::Configuration::None.new
device.save
end
end
```

in future we can improve when there is use case for it (I have in mind modules to extend configuration for specific devices with proper object hierarchy or Factory pattern for device, so it can be much easier cached).

@mchf @mvidner opinions?