Hi, > -----Original Message----- > From: wpkg-users-bounces at lists.wpkg.org [mailto:wpkg-users- > bounces at lists.wpkg.org] On Behalf Of Jindrich Vorlicek > Sent: 22 April 2009 23:35 > To: wpkg-users at lists.wpkg.org > Subject: [wpkg-users] More ways of defining hosts in hosts.xml - end > > I tested my patched wpkg.js on Windows XP Professional SP3 computers > joined to Windows Server 2003 domain. > I tested it a year and it works for me well. > > So try my patch and if you will think, that my changes are useful, > maybe could be used (or its parts) in next version of wpkg. > > If you want detailed description of all new functions, you can find it > at http://bugzilla.wpkg.org/show_bug.cgi?id=118 > (as decription off Patched wpkg.js v.1.1.0-M6) > ----------------------------------------------------------------------- > -- > wpkg-users mailing list archives >> > http://lists.wpkg.org/pipermail/wpkg-users/ > _______________________________________________ > wpkg-users mailing list > wpkg-users at lists.wpkg.org > http://lists.wpkg.org/mailman/listinfo/wpkg-users Brilliant! There's some incredibly useful stuff in there. I'd really like to see it become part of WPKG! It's making me think of a few alternative ways of implementing it though. I'm sorry I don't speak your native tongue so if any of this doesn't make sense let me know and I'll try and re-write it in babelfish friendly words. I've thrown in a few ideas myself but one of the arguments about adding extra facilities like this is that you always end up adding new XML elements or properties to handle. This makes it difficult for people to write a Web management system. That's something I feel would really get WPKG noticed. With your original code as an example and inspiration, I implemented my own "Group Membership" but I tried a different direction. I added it as another "test" as it went through the matching process. I based it one the principal that names are quite often unique so if a host id didn't match one test it was safe for it to be matched against another. Maybe it would be easy to think about it like this; <host id="<match criteria>[;<match criteria>...]" profile-id="abc"/> and then write a good parser that tries to match the host ID to each type of test step by step as WPKG already does. A machine name should be unique, a group name should be unique, IP addresses should be easy to identify and maybe it's easy to also identify an OU path? If you see what I mean... I really like the idea of using ";" so you can have multiple hosts getting a certain profile. It makes sense to handle "collections" of hosts. It really works well in my head. If you've followed this far then what I'm thinking about is; <host id="computer01"... <host id="computer01;computer02"... <host id="salesgroup"... <host id="computer01;salesgroup"... <host id="192.168.0.4;computer02;salesgoup"... <host id="192.168.0.1-100;computer02;salesgroup"... <host id="192.168.0.1-100;ou=sales dc=fabrikam dc=com;computer02;salesgroup"... <host id="192.168.0.*;computer*;sales*"... It all just boils down to some good code to "recognise" each match rather than add new elements and complications to the parsing. I think that that might be a really good and easy way of getting your add-ons easily put into WPKG. It just seems a lot neater and easy to understand. What do you think? Regards, Keith PS: If Rainer think this has merit you could easily apply it everywhere so it you don't need things like /applymultiple I was thinking that the following would be really cool; <host id="match1;match2;match3" profile="profile1;profile2"/> Not only would it give you what you need but it would also remove the awkward, <host id="computer01" profile-id="xyz"><profile id="abc"></host> I've always felt that WPKG needed to handle the profile property vs element issue. It really would make things simpler on the coding front. There's no reason why the matches couldn't also be regex expressions :-) PPS: Sorry I haven't added my commitment for a while. Work has been unusually difficult! PPPS: It also make another thought spring to mind. How about; <check "rule1 and (rule2 or rule3)"> Where rule1 etc are different checks... Now that would save all the awkward parsing of XML elements there as well. Hrmmm... WPKG 3.0 I think... lots to do before that idea... |