[Oscar-devel] got lost in mksimachine code
by Olivier LAHAYE
 |
REPLY TO AUTHOR
|
 |
|
|
 |
REPLY TO GROUP
|
 |
|
Hi,
I'm trying to make mksimachine work (delete and update functions), but I got lost into its code.
Here is an attached patch (that resumes my attempts). This patch is certainly wrong, but the
comment I've added should help a lot in understanding the problem.
So far, I've understood that functions working with Nics are sometimes expecting a hash representing the database table Nics and sometimes they are expecting a SIS::Adapter object which is really different. (netmask and client fields that table Nics lacks while it misses id, node_id or network_id).
This BUG is typically visible in OSCAR::Network::set_network_adapter line 72
expected input: array of SIS::Adapter() objects
got input from SIS::NewDB::set_adapter : Hash representing the nic (from DB)
BUG: unexpected data type received.
This code looks like being in between a major rewrite, and thus at this point I'm unable to determine which data model should be kept (SIS:Adapter or hash from db).
In other words, should OSCAR::NewDB::list_adapters be rewritten to use SIS:Adapter objects, or should OSCAR::NewDB::set_adapter be rewritten to use a simple hash representing the Nics database table?
Although, another thing that seems strange is that updating a client triggers the update nic, but the function used for that purpose seems to handle associations between nics and clients and not Nics database fields updates.
So using simple words: HELP I can't go further, my perl knowledge and oscar knowledge have been overflowed ;-)
Regards,
Olivier.
--
Olivier LAHAYE
CEA Saclay
DRT-LIST-DETECS-SSTM
Bookmark with:
Delicious
Digg
reddit
Facebook
StumbleUpon
Related Messages
opensubscriber is not affiliated with the authors of this message nor responsible for its content.
|