Network provider modeling

Radek Novacek rnovacek at redhat.com
Wed Apr 10 11:11:35 UTC 2013


On Wed 10 of Apr 2013 12:39:43 Jan Safranek wrote:
> On 04/09/2013 04:02 PM, Radek Novacek wrote:
>> <snip>
> 
> I have no strong opinion, just if we continue with 2) or 3), I would
> suggest to follow storage model of working with various setting.
> 
> Currently the networking provider has method CreateOrModifySetting,
> which is the only way to create or modify a LMI_*Setting for networking.
> 
> In storage, I usually have method CreateSetting(), which creates default
> LMI_*Setting instance and the application then changes it using
> ModifyInstance (and DeleteInstance) intrinsic methods.
> 
> If we diverge from the standard, we should IMHO use one way how Setting
> classes work.
>
> Jan

I could split the the creation of setting to the two parts - creation an empty 
setting and then modifying it, but the CreateSetting method would need 
additional arguments to set following:
 * ProtocolIFType -- do we want to create Setting IPv4, IPv6 or both
 * What type of setting should be created (which subclass of
   IPAssignmentSettingData should be created -
   ExtendedStaticIPAssignmentSettingData or DHCPSettingData)
 * IPNetworkConnection - port to which should be the Setting associated
 * Type - are we creating setting for bridge or bond or normal one?

Some of these options can't be easily set up later, because it affects which 
classes will be created, others would require additional action (like creating 
association to IPNetworkConnection by hand).


Can you see any way how to do solve this in some nice way? Or are there some 
classes in storage that solve something like that?

Radek Novacek



More information about the openlmi-devel mailing list