MT#10715 Remove exrescent debug and code

Change-Id: Ife5b5dd797b032717d104f68ff376560cc91dedf
changes/84/784/1
Irina Peshinskaya 11 years ago
parent ce29d22a53
commit 861f00019e

@ -32,13 +32,13 @@ sub _dispatch{
$c->log->debug( "action=$action;" );
if($redirect_processor->can($action)){
$ret = $redirect_processor->$action();
$c->log->debug( "ret=$ret;" );
}else{
if( ('register' eq $action) && $params->{mac_old} && ( $params->{mac_old} ne $params->{mac} ) ){
$redirect_processor->redirect_server_call('unregister');
}
$ret = $redirect_processor->redirect_server_call($action);
}
$c->log->debug( "ret=$ret;" );
}
return $ret;
}
@ -68,14 +68,12 @@ sub get_devmod_params{
redirect_params => $sync_params,
credentials => $vcredentials,
};
$c->log->debug(Dumper($sync_params));
return $params;
}
sub get_redirect_processor{
my ($params) = @_;
my $c = $params->{c};
my $bootstrap_method = $params->{bootstrap_method};
$c->log->debug( "bootstrap_method AAAAAAAAA =$bootstrap_method;" );
my $redirect_processor;
if('redirect_panasonic' eq $bootstrap_method){
$redirect_processor = NGCP::Panel::Utils::DeviceBootstrap::Panasonic->new( params => $params );
@ -86,7 +84,6 @@ sub get_redirect_processor{
}elsif('http' eq $bootstrap_method){
#$ret = panasonic_bootstrap_register($params);
}
$c->log->debug( "redirect_processor=$redirect_processor;" );
return $redirect_processor;
}

@ -5,21 +5,6 @@ use Moose;
use Data::Dumper;
extends 'NGCP::Panel::Utils::DeviceBootstrap::VendorRPC';
has 'rpc_server_params' => (
is => 'rw',
isa => 'HashRef',
accessor => '_rpc_server_params',
);
has 'register_content' => (
is => 'rw',
isa => 'Str',
accessor => '_register_content',
);
has 'unregister_content' => (
is => 'rw',
isa => 'Str',
accessor => '_unregister_content',
);
sub rpc_server_params{
my $self = shift;
my $cfg = {

@ -8,21 +8,6 @@ use Moose;
extends 'NGCP::Panel::Utils::DeviceBootstrap::VendorRPC';
has 'rpc_server_params' => (
is => 'rw',
isa => 'HashRef',
accessor => '_rpc_server_params',
);
has 'register_content' => (
is => 'rw',
isa => 'Str',
accessor => '_register_content',
);
has 'unregister_content' => (
is => 'rw',
isa => 'Str',
accessor => '_unregister_content',
);
has 'register_subscriber_content' => (
is => 'rw',
isa => 'Str',

@ -20,13 +20,23 @@ has 'content_params' => (
has 'rpc_server_params' => (
is => 'rw',
isa => 'HashRef',
accessor => '_rpc_server_params',
);
has 'register_content' => (
is => 'rw',
isa => 'Str',
accessor => '_register_content',
);
has 'unregister_content' => (
is => 'rw',
isa => 'Str',
accessor => '_unregister_content',
);
sub redirect_server_call{
my ($self, $action) = @_;
my $c = $self->params->{c};
$self->init_content_params();
$c->log->debug(Dumper ($self->content_params));
my($content,$response_value,$ret);
my $method = $action.'_content';
if($self->can($method)){
@ -36,7 +46,6 @@ sub redirect_server_call{
}
if($content){
$response_value = $self->rpc_https_call($content);
$c->log->debug(Dumper $response_value);
$ret = $self->extract_response_description($response_value);
}
return $ret;
@ -46,8 +55,8 @@ sub rpc_https_call{
my($self, $content, $cfg) = @_;
$cfg //= $self->rpc_server_params;
my $c = $self->params->{c};
$c->log->debug( "host=$cfg->{host}; port=$cfg->{port}; path=$cfg->{path}; content=$content;" );
$c->log->debug( Dumper($cfg->{headers}) );
$c->log->debug( "rpc_https_call: host=$cfg->{host}; port=$cfg->{port}; path=$cfg->{path}; content=$content;" );
#$c->log->debug( Dumper($cfg->{headers}) );
my( $page, $response_code, %reply_headers ) = https_post({
'host' => $cfg->{host},
'port' => $cfg->{port},
@ -106,7 +115,6 @@ sub get_basic_authorization{
my($self) = @_;
my $authorization = encode_base64(join(':',@{$self->params->{credentials}}{qw/user password/}));
$authorization =~s/[ \s]//gis;
#$authorization .= '=';
return { 'Authorization' => 'Basic '.$authorization };
}
sub get_bootstrap_uri{

@ -5,21 +5,6 @@ use Moose;
use Digest::MD5 qw/md5_hex/;
extends 'NGCP::Panel::Utils::DeviceBootstrap::VendorRPC';
has 'rpc_server_params' => (
is => 'rw',
isa => 'HashRef',
accessor => '_rpc_server_params',
);
has 'register_content' => (
is => 'rw',
isa => 'Str',
accessor => '_register_content',
);
has 'unregister_content' => (
is => 'rw',
isa => 'Str',
accessor => '_unregister_content',
);
has 'register_model_content' => (
is => 'rw',
isa => 'Str',

@ -25,21 +25,14 @@ function vendor2bootstrapMethod(vendorField){
}
if(vendorField && vendorField.value){//onchange and on load after error
var bootstrapMethod='';
switch(vendorField.value.toLowerCase()){
var vendor = vendorField.value.toLowerCase();
switch(vendor){
case "cisco":
bootstrapMethod = 'http';
break;
;
case "panasonic":
bootstrapMethod = 'redirect_panasonic';
break;
;
case "yealink":
bootstrapMethod = 'redirect_yealink';
break;
;
case "polycom":
bootstrapMethod = 'redirect_polycom';
default:
bootstrapMethod = 'redirect_'+vendor;
break;
;
}

Loading…
Cancel
Save