[freeside] Problem with BEGIN statement in fs-setup

ivan ivan at 420.am
Fri Oct 26 02:28:25 PDT 2001


On Fri, Oct 26, 2001 at 01:38:03AM -0700, Louis Erickson wrote:
> On Thu, 25 Oct 2001, ivan wrote:
> 
> > On Thu, Oct 25, 2001 at 12:31:53AM -0700, Louis Erickson wrote:
> > >
> > > DBD is DBD::InterBase version 1.24.
> > > Yes, I realize I'm asking for a world of hurt by using a strange
> > > database, but that's something I think I can cope with, and I like
> > > InterBase.  I don't think it's causing the problem, either.
> >
> > You'll probably need to add support for InterBase to DBIx::DBSchema
> > <http://www.420.am/dbix-dbschema/>.  I don't know how well the default
> > support will cope with InterBase.  Driver writer's guide is at
> > <http://www.420.am/dbix-dbschema/DBIx/DBSchema/DBD.html>.
> 
> Thank you for the pointer.  The package seems to be very well done, and a
> good and laudable idea.  Unfourtenately, I couldn't figure out a clean way
> to get the information needed from InterBase that I felt worth the effort.
> You'd have to write an XSUB and link with the InterBase library, and I
> punted on it and used mySQL.  (Dynamic SQL from Interbase has no "SHOW
> TABLE" command.  You could run isql, and parse the output, or link to the
> C libraries.

For what it's worth, Postgres's `psql' tool had an `-e' option to `Show
all queries that are sent to the backend' which when used with the table
query commands, showed me the underlying SQL commands needed to get table
meta-information from Postgres.  Don't know if isql uses standard SQL or
if the necessary glue is in DBD::Interbase.

>  Both are possible.  I decided neither was worth the effort.)

You might be able to get away with DBIx::DBSchema's default database
support for a basic install, but the `dbdef-create' utility, used on
upgrades, definately wouldn't work. 

Or if this isn't the sort of hacking you're interested in doing right now,
you could always use Postgres... :)

> I have a couple of questions about operation, though.
> 
> As I understand it, you create SERVICES which describe the details of what
> is available to customers.  You then create PACKAGES which contain one or
> more services.  You sell packages to people.  So far, so good.
> 
> I'm trying to go through the list of things I offer, and translate them in
> to items which freeside can manage.  I'm not certain how to describe some
> of them.
> 
> When you define a service, there are four tables, svc_acct, svc_domain,
> svc_acct_sm, and svc_www... these seem to be the sorts of services which
> you can make available.  That's accounts, hosted domains, something about
> email for hosted domains, and something about web pages.
> 
> I'm not certain I understand what the four types are for and how they are
> best used.  Is there some documentation I am missing, or could you shed
> some light on what the four different types are for?

Your outline above is accurate.

svc_acct is for accounts: mailboxes, shell accounts, RADIUS accounts,
anything with a username.

svc_acct_sm is for virtual domain mail aliasing.  In 1.4, it's been
depreciated and replaced with a more flexible system thanks to Jeff
Finucane.

svc_domain is for domains.

svc_www is domain web hosting, so far.  It's not as complete as the other
available tables.

Updates to the documentation included on the service administration page
are welcome.

> Is there a way to add one-off items to an account?

The UI isn't ideal, but you can order any existing package and the choose
the "customize pricing" link for that package.

>  I want to be able to
> charge users for extra disc space, if they run over their quota, on a
> month-by-month basis, and in blocks of disc.

Billing on metered services is a bit klunky with 1.3.1.  I did a few
installations with the 1.3 codebase that did metered billing, but they
were pretty hacky.  I think Jason Spence also deployed 1.3ish with some
funky billing expressions.

I suggest working with a 1.4.0 snapshot if you want to automate this;
things are cleaner and there's a better UI for selecting "price plans"

> And, can I add or remove items from external programs?

Yes, see htdocs/docs/export.html and htdocs/docs/config.html

>  I just noticed the Perl API, which may
> have the information I need for that.
> 
> My list of states for new customers dosen't have California in it.
> Where'd it go?  =)

Dunno how you could have done that.  Maybe you clicked on "expand state"
under tax rates and didn't enter any counties.  Maybe you're looking for
California instead of `CA' (don't pick Canada).

> I've noticed the web pages don't always refersh; they must not have
> no-cache in the header.  I expect everybody's mentioned that, though.
> 
> I'm quite impressed with the package, by the way.  It's quite capable,
> looks as if it can be expanded to control many interesting devices and
> services, and distributed to multiple machines.

Thanks for the kind words!  Might want to check out the current 1.4.0
snapshot or CVS if you want to expand on the code at all; there's been a
lot of changes since 1.3.1.

-- 
_ivan



More information about the freeside-users mailing list