relax connect_info for passed-through DBI attributes

agranig/2.004-ramoptimized
Lars Dieckow 12 years ago
parent 8f5278dc9b
commit a667bdefa5

@ -20,8 +20,7 @@ class_has('config', is => 'rw', isa => 'NGCP::Schema::Config', lazy => 1, defaul
});
method connection {
my %connect_info = %{ $self->config->as_hash->{accountingdb} };
$self->SUPER::connection(@connect_info{qw(dsn username password)});
$self->SUPER::connection($self->config->as_hash->{accountingdb});
}
__PACKAGE__->meta->make_immutable(inline_constructor => 0);

@ -27,8 +27,7 @@ has('provisioning', is => 'rw', isa => 'NGCP::Schema::provisioning', lazy => 1,
});
method connection {
my %connect_info = %{ $self->config->as_hash->{billingdb} };
$self->SUPER::connection(@connect_info{qw(dsn username password)});
$self->SUPER::connection($self->config->as_hash->{billingdb});
}
method get_domain($reseller_id, $domain) {

@ -20,8 +20,7 @@ class_has('config', is => 'rw', isa => 'NGCP::Schema::Config', lazy => 1, defaul
});
method connection {
my %connect_info = %{ $self->config->as_hash->{carrierdb} };
$self->SUPER::connection(@connect_info{qw(dsn username password)});
$self->SUPER::connection($self->config->as_hash->{carrierdb});
}
__PACKAGE__->meta->make_immutable(inline_constructor => 0);

@ -20,8 +20,7 @@ class_has('config', is => 'rw', isa => 'NGCP::Schema::Config', lazy => 1, defaul
});
method connection {
my %connect_info = %{ $self->config->as_hash->{kamailiodb} };
$self->SUPER::connection(@connect_info{qw(dsn username password)});
$self->SUPER::connection($self->config->as_hash->{kamailiodb});
}
__PACKAGE__->meta->make_immutable(inline_constructor => 0);

@ -20,8 +20,7 @@ class_has('config', is => 'rw', isa => 'NGCP::Schema::Config', lazy => 1, defaul
});
method connection {
my %connect_info = %{ $self->config->as_hash->{ngcpdb} };
$self->SUPER::connection(@connect_info{qw(dsn username password)});
$self->SUPER::connection($self->config->as_hash->{ngcpdb});
}
__PACKAGE__->meta->make_immutable(inline_constructor => 0);

@ -23,8 +23,7 @@ class_has('config', is => 'rw', isa => 'NGCP::Schema::Config', lazy => 1, defaul
has('validator', is => 'rw', isa => 'NGCP::Schema', lazy => 1, default => sub { return NGCP::Schema->new; });
method connection {
my %connect_info = %{ $self->config->as_hash->{provisioningdb} };
$self->SUPER::connection(@connect_info{qw(dsn username password)});
$self->SUPER::connection($self->config->as_hash->{provisioningdb});
}
method _get_domain_id($domain) {

@ -20,8 +20,7 @@ class_has('config', is => 'rw', isa => 'NGCP::Schema::Config', lazy => 1, defaul
});
method connection {
my %connect_info = %{ $self->config->as_hash->{sipstatsdb} };
$self->SUPER::connection(@connect_info{qw(dsn username password)});
$self->SUPER::connection($self->config->as_hash->{sipstatsdb});
}
__PACKAGE__->meta->make_immutable(inline_constructor => 0);

Loading…
Cancel
Save