Klaus Kaempf wrote / napísal(a):
* Michal Zugec <mzugec@suse.cz> [Aug 13. 2009 16:07]:
[shortened to focus on relevant parts]
Basic Config ------------
* /network/devices/ (RO)
Devices and interfaces are the same for now. How would I be able to distinguish them ?
Device is physical hardware. It can exists without configuration. Interface is software representation of physical device or virtual device. Virtual devices are software-created. Without configuration, they disappears after "rcnetwork restart"
Ok, understood. But it doesn't answer my question. Let me restate it: If interfaces and devices all show up below /network/devices/, how do I know which is which ? I'd rather not have to retrieve every instance and check a property.
Hm, you don't need to know that. Let's say there are only network interfaces. Two types of interfaces : based on physical devices and virtual ones. Main difference between them is that first one you can "just see", second one you need to create (or configure them). Reason why Martin mentioned that is that for first one RO is enough, but for virtual devices you need RW access to create them.
* /network/configs/ (RO)
Configs are separated from devices
Can you document the purpose of configs in more detail ? It's configuration of Layer3 of the ISO/OSI model. Devices defines Layer2 of the ISO/OSI model.
Ah, ok.
[...]
But a config can get another attribute, "device" that makes it the default config for a device, and it works like our ifcfg (where "device" is in the filename)
Don't over-engineer it ! Nothing in the feature request asks for the separation of device and its config.
For the future, this can be usefull. For wireless devices you can switch between several APs just by associate different configurations to one device.
No question about the usefulness. Just focus on the simple parts (one config per interface) now and extend later.
Hm, but here's conflict of requirements. As I understand from Jiri, we should define rest-api not only for this simple purpose but also for future. We need to discuss this ...
[...]
Hmm, I'd assume /network/resolver to represent /etc/resolv.conf, right ? However, /etc/resolv.conf is autogenerated, so /network/resolver should be 'RO'.
/etc/resolv.conf doesn't record anything about how it was generated, i.e. via dhcp or manual setup. Thus 'use-dhcp' is a (RW) config property, not a resolver property.
No, it represents /etc/sysconfig/network/config.NETCONFIG_DNS_STATIC_SEARCHLIST
Ok, understood. Then please name it accordingly, 'resolver' is confusing.
CIM property is CIM_DNSGeneralSettingData.DNSSuffixesToAppend, so DNSGeneralSettingData/DNSSuffixesToAppend ? I will write this in the next mail.
bridge ------ ifcfg-br0 STARTMODE='auto' BOOTPROTO='dhcp' BRIDGE='yes' BRIDGE_PORTS='eth0 eth1' BRIDGE_PORTPRIORITIES='50 20'
* /network/devices/1 interface=br0 bridge='yes' bridge_ports='eth0 eth1' bridge_portpriorities='50 20'
Hehe, here the object oriented model of CIM shows its value. A physical and a virtual network device should be based on a common parent class. Thus documenting the properties of the virtual device should only show the subclass ('VirtualDevice'). But in this case, there's nothing in common ...
Startmode ? bootproto ? Some property for 'virtual' device ?
No! This properties are for Layer3 - not /devices/ but /configs/
One question remains: Is all this covered by the current YaST 'yapi' ? No, there's no network-yapi yet
So how are you going to implement the network rest-service then ?
For first iteration we can use CLI backend and then write yapi
Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
-- Best Regards, Michal Zugec Software developer --------------------------------------------------------------------- SuSE CR, s.r.o. e-mail: mzugec@suse.cz Lihovarska 1060/12 tel: +420 284 028 960 190 00 Praha 9 fax: +420 296 542 374 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org