I'm in a position where I need to mass-add large numbers of rules,
aliases, and shaper configs, but can't be bothered to sit down and
type them all in.  As such, I'm trying to write a generalized routine
for this that doesn't rely on specific config.xml nuances so it can be
efficiently re-used.  My first choice would be to program against a
DTD and just output the relevant config sectuions, but that doesn't
seem to be much of an option since (according to the devwiki docs I
read) you guys don't have one and aren't ready to move to one yet.
Failing that, I think I'm going to mechanize against the individual
forms themselves - build a pfSense-resident PHP page that will, when
pointed at a sibling page, perform a GET against it and distill the
HTML down to the core form, suitable for simple POST mechanization.
It would then accept a CSV or the like and loop POSTs against it until
complete.  The engineer sense in me cringes at this - I think it's an
abuse of the interface and language and has a multitude of things that
can go wrong (JS, for example), but I've got to get these in somehow
without paying an L1 drone $xx per hour to sit there and typo my way
to pain.

Anyone have any thoughts or better ideas?  Obviously, this is
something I'd like to turn back in to pfSense at large if there's any
interest.


RB

Reply via email to