MT#16985 Rename CentralDB to RoDB

Change-Id: I3e4fcf39dc2323213e3f3a69c3bac375421f6bd4
changes/19/3819/2
Andreas Granig 10 years ago committed by Victor Seva
parent 18973d763c
commit f9ce228e76

@ -160,7 +160,7 @@ sub POST :Allow {
my ($self, $c) = @_;
my $guard = $c->model('DB')->txn_scope_guard;
my $cguard = $c->model('CentralDB')->txn_scope_guard;
my $cguard = $c->model('RoDB')->txn_scope_guard;
{
my $resource = $self->get_valid_post_data(
c => $c,
@ -175,7 +175,7 @@ sub POST :Allow {
form => $form,
);
my $num_rs = $c->model('CentralDB')->resultset('voip_numbers')->search(
my $num_rs = $c->model('RoDB')->resultset('voip_numbers')->search(
\[ 'concat(cc,ac,sn) = ?', [ {} => $resource->{number} ]]
);
unless($num_rs->first) {

@ -87,7 +87,7 @@ sub OPTIONS :Allow {
sub PATCH :Allow {
my ($self, $c, $id) = @_;
my $cguard = $c->model('CentralDB')->txn_scope_guard;
my $cguard = $c->model('RoDB')->txn_scope_guard;
my $guard = $c->model('DB')->txn_scope_guard;
{
my $preference = $self->require_preference($c);
@ -152,7 +152,7 @@ sub PATCH :Allow {
sub PUT :Allow {
my ($self, $c, $id) = @_;
my $cguard = $c->model('CentralDB')->txn_scope_guard;
my $cguard = $c->model('RoDB')->txn_scope_guard;
my $guard = $c->model('DB')->txn_scope_guard;
{
my $preference = $self->require_preference($c);

@ -1,4 +1,4 @@
package NGCP::Panel::Model::CentralDB;
package NGCP::Panel::Model::RoDB;
use strict;
use File::ShareDir 'dist_file';

@ -1,7 +1,7 @@
package NGCP::Panel::Model::CentralDB::Base;
package NGCP::Panel::Model::RoDB::Base;
#use base 'Catalyst::Model::Adaptor';
use base 'Catalyst::Model';
use NGCP::Panel::Model::CentralDB;
use NGCP::Panel::Model::RoDB;
use Moose;
@ -69,6 +69,6 @@ __PACKAGE__->config(
has 'schema' => (
is => 'rw',
isa => 'NGCP::Panel::Model::CentralDB',
isa => 'NGCP::Panel::Model::RoDB',
);
1;

@ -153,7 +153,7 @@ sub update_item {
sub subres_from_number {
my ($self, $c, $number) = @_;
my $num_rs = $c->model('CentralDB')->resultset('voip_numbers')->search(
my $num_rs = $c->model('RoDB')->resultset('voip_numbers')->search(
\[ 'concat(cc,ac,sn) = ?', [ {} => $number ]]
);
unless($num_rs->first) {

@ -18,6 +18,9 @@ log4perl.appender.Default.layout.ConversionPattern=%d{ISO8601} [%p] [%F +%L] %m{
<Model::DB>
schema_class NGCP::Schema
</Model::DB>
<Model::RoDB>
schema_class NGCP::RoSchema
</Model::DB>
<contact>
email postmaster@domain.invalid

Loading…
Cancel
Save