| 1 | ## Domain Registry Interface, .BR Domain EPP extension commands | ||||||||||||||||||||||||||||||||||||||||||
| 2 | ## draft-neves-epp-brdomain-03.txt | ||||||||||||||||||||||||||||||||||||||||||
| 3 | ## | ||||||||||||||||||||||||||||||||||||||||||
| 4 | ## Copyright (c) 2008,2013,2016 Patrick Mevzek <netdri@dotandco.com>. All rights reserved. | ||||||||||||||||||||||||||||||||||||||||||
| 5 | ## | ||||||||||||||||||||||||||||||||||||||||||
| 6 | ## This file is part of Net::DRI | ||||||||||||||||||||||||||||||||||||||||||
| 7 | ## | ||||||||||||||||||||||||||||||||||||||||||
| 8 | ## Net::DRI is free software; you can redistribute it and/or modify | ||||||||||||||||||||||||||||||||||||||||||
| 9 | ## it under the terms of the GNU General Public License as published by | ||||||||||||||||||||||||||||||||||||||||||
| 10 | ## the Free Software Foundation; either version 2 of the License, or | ||||||||||||||||||||||||||||||||||||||||||
| 11 | ## (at your option) any later version. | ||||||||||||||||||||||||||||||||||||||||||
| 12 | ## | ||||||||||||||||||||||||||||||||||||||||||
| 13 | ## See the LICENSE file that comes with this distribution for more details. | ||||||||||||||||||||||||||||||||||||||||||
| 14 | #################################################################################################### | ||||||||||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||||||||||
| 16 | package Net::DRI::Protocol::EPP::Extensions::BR::Domain; | ||||||||||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||||||||||
| 18 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 19 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||||||||||||
| 21 | 1 | ▶ | use Net::DRI::Exception; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 22 | 1 | ▶ | use Net::DRI::Util; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||||
| 24 | =pod | ||||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||
| 26 | =head1 NAME | ||||||||||||||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||||||||||||||
| 28 | Net::DRI::Protocol::EPP::Extensions::BR::Domain - .BR EPP Domain extension commands for Net::DRI | ||||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||
| 30 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||||||
| 32 | Please see the README file for details. | ||||||||||||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||||||||||||
| 34 | =head1 SUPPORT | ||||||||||||||||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||||||||||||||||
| 36 | For now, support questions should be sent to: | ||||||||||||||||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||||||||||||||||
| 38 | E<lt>netdri@dotandco.comE<gt> | ||||||||||||||||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||||||||||||||||
| 40 | Please also see the SUPPORT file in the distribution. | ||||||||||||||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||||||||||||||
| 42 | =head1 SEE ALSO | ||||||||||||||||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||||||||||||||||
| 44 | E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt> | ||||||||||||||||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||||||||||||||||
| 46 | =head1 AUTHOR | ||||||||||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||||||||||
| 48 | Patrick Mevzek, E<lt>netdri@dotandco.comE<gt> | ||||||||||||||||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||||||||||||||||
| 50 | =head1 COPYRIGHT | ||||||||||||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||||||||||||
| 52 | Copyright (c) 2008,2013,2016 Patrick Mevzek <netdri@dotandco.com>. | ||||||||||||||||||||||||||||||||||||||||||
| 53 | All rights reserved. | ||||||||||||||||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||||||||||||||||
| 55 | This program is free software; you can redistribute it and/or modify | ||||||||||||||||||||||||||||||||||||||||||
| 56 | it under the terms of the GNU General Public License as published by | ||||||||||||||||||||||||||||||||||||||||||
| 57 | the Free Software Foundation; either version 2 of the License, or | ||||||||||||||||||||||||||||||||||||||||||
| 58 | (at your option) any later version. | ||||||||||||||||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||||||||||||||||
| 60 | See the LICENSE file that comes with this distribution for more details. | ||||||||||||||||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||||||||||||||||
| 62 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||||||||||||||||
| 64 | #################################################################################################### | ||||||||||||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||||||||||||
| 66 | sub register_commands | ||||||||||||||||||||||||||||||||||||||||||
| 67 | { | ||||||||||||||||||||||||||||||||||||||||||
| 68 | 0 | ▶ | my ($class,$version)=@_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
register_commands: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 69 | 0 | my %tmp=( | |||||||||||||||||||||||||||||||||||||||||
| 70 | check => [ \&check, \&check_parse ], | ||||||||||||||||||||||||||||||||||||||||||
| 71 | info => [ \&info, \&info_parse ], | ||||||||||||||||||||||||||||||||||||||||||
| 72 | create => [ \&create, \&create_parse ], | ||||||||||||||||||||||||||||||||||||||||||
| 73 | renew => [ undef, \&renew_parse ], | ||||||||||||||||||||||||||||||||||||||||||
| 74 | update => [ \&update, \&update_parse ], | ||||||||||||||||||||||||||||||||||||||||||
| 75 | review_complete => [ undef, \&pandata_parse ], ## needs to have same name for key as in Core/Domain to make sure this will be called after Core parsing ! | ||||||||||||||||||||||||||||||||||||||||||
| 76 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||||||||||||||||
| 78 | 0 | $tmp{check_multi}=$tmp{check}; | |||||||||||||||||||||||||||||||||||||||||
| 79 | 0 | return { 'domain' => \%tmp }; | |||||||||||||||||||||||||||||||||||||||||
| 80 | } | ||||||||||||||||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||||||||||||||||
| 82 | #################################################################################################### | ||||||||||||||||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||||||||||||||||
| 84 | sub check | ||||||||||||||||||||||||||||||||||||||||||
| 85 | { | ||||||||||||||||||||||||||||||||||||||||||
| 86 | 0 | ▶ | my ($epp,$domain,$rd)=@_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
check: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 87 | |||||||||||||||||||||||||||||||||||||||||||
| 88 | 0 | ▶ | return unless Net::DRI::Util::has_key($rd,'orgid'); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 89 | 0 | ▶ | Net::DRI::Exception::usererr_invalid_parameters('orgid must be an xml token string with 1 to 30 characters') unless Net::DRI::Util::xml_is_token($rd->{orgid},1,30); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||||||||||||||||
| 91 | 0 | my $mes=$epp->message(); | |||||||||||||||||||||||||||||||||||||||||
| 92 | 0 | my $eid=$mes->command_extension_register('brdomain','check'); | |||||||||||||||||||||||||||||||||||||||||
| 93 | 0 | my @n=('brdomain:organization',$rd->{orgid}); | |||||||||||||||||||||||||||||||||||||||||
| 94 | 0 | $mes->command_extension($eid,\@n); | |||||||||||||||||||||||||||||||||||||||||
| 95 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 96 | } | ||||||||||||||||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||||||||||||||||
| 98 | sub check_parse | ||||||||||||||||||||||||||||||||||||||||||
| 99 | { | ||||||||||||||||||||||||||||||||||||||||||
| 100 | 0 | ▶ | my ($po,$otype,$oaction,$oname,$rinfo)=@_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
check_parse: not called CC=13 SCAR=52.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 101 | 0 | my $mes=$po->message(); | |||||||||||||||||||||||||||||||||||||||||
| 102 | 0 | ▶ | return unless $mes->is_success(); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 103 | |||||||||||||||||||||||||||||||||||||||||||
| 104 | 0 | my $chkdata=$mes->get_extension('brdomain','chkData'); | |||||||||||||||||||||||||||||||||||||||||
| 105 | 0 | ▶ | return unless $chkdata; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||||||||||||||||||||
| 107 | 0 | foreach my $cd ($chkdata->getChildrenByTagNameNS($mes->ns('brdomain'),'cd')) | |||||||||||||||||||||||||||||||||||||||||
| 108 | { | ||||||||||||||||||||||||||||||||||||||||||
| 109 | 0 | my $hc=$cd->getAttribute('hasConcurrent'); | |||||||||||||||||||||||||||||||||||||||||
| 110 | 0 | my $irp=$cd->getAttribute('inReleaseProcess'); | |||||||||||||||||||||||||||||||||||||||||
| 111 | 0 | my $c=$cd->getFirstChild(); | |||||||||||||||||||||||||||||||||||||||||
| 112 | 0 | my $domain; | |||||||||||||||||||||||||||||||||||||||||
| 113 | my @tn; | ||||||||||||||||||||||||||||||||||||||||||
| 114 | 0 | ▶ | while($c) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 115 | { | ||||||||||||||||||||||||||||||||||||||||||
| 116 | 0 | ▶ | next unless ($c->nodeType() == 1); ## only for element nodes | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 117 | 0 | ▶ | my $n=$c->localname() || $c->nodeName(); | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$c->localname || $c->nodeName
MC/DC0%0/2
$c->localname || $c->nodeName
$c->localname
$c->nodeName
Truth table0%0/3
A || B
A= $c->localnameB= $c->nodeName
| |||||||||||||||||||||||||||||||||||||||||||
| 118 | 0 | ▶ | if ($n eq 'name') | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 4 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 119 | { | ||||||||||||||||||||||||||||||||||||||||||
| 120 | 0 | $domain=lc($c->getFirstChild()->getData()); | |||||||||||||||||||||||||||||||||||||||||
| 121 | 0 | ▶ | $rinfo->{domain}->{$domain}->{has_concurrent}=Net::DRI::Util::xml_parse_boolean($hc) if defined($hc); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 122 | 0 | ▶ | $rinfo->{domain}->{$domain}->{in_release_process}=Net::DRI::Util::xml_parse_boolean($irp) if defined($irp); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 123 | } elsif ($n eq 'equivalentName') | ||||||||||||||||||||||||||||||||||||||||||
| 124 | { | ||||||||||||||||||||||||||||||||||||||||||
| 125 | 0 | $rinfo->{domain}->{$domain}->{equivalent_name}=$c->getFirstChild()->getData(); | |||||||||||||||||||||||||||||||||||||||||
| 126 | } elsif ($n eq 'organization') | ||||||||||||||||||||||||||||||||||||||||||
| 127 | { | ||||||||||||||||||||||||||||||||||||||||||
| 128 | 0 | $rinfo->{domain}->{$domain}->{orgid}=$c->getFirstChild()->getData(); | |||||||||||||||||||||||||||||||||||||||||
| 129 | } elsif ($n eq 'ticketNumber') | ||||||||||||||||||||||||||||||||||||||||||
| 130 | { | ||||||||||||||||||||||||||||||||||||||||||
| 131 | 0 | push @tn,$c->getFirstChild()->getData(); | |||||||||||||||||||||||||||||||||||||||||
| 132 | } | ||||||||||||||||||||||||||||||||||||||||||
| 133 | 0 | } continue { $c=$c->getNextSibling(); } | |||||||||||||||||||||||||||||||||||||||||
| 134 | 0 | $rinfo->{domain}->{$domain}->{ticket}=\@tn; | |||||||||||||||||||||||||||||||||||||||||
| 135 | } | ||||||||||||||||||||||||||||||||||||||||||
| 136 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 137 | } | ||||||||||||||||||||||||||||||||||||||||||
| 138 | |||||||||||||||||||||||||||||||||||||||||||
| 139 | sub info | ||||||||||||||||||||||||||||||||||||||||||
| 140 | { | ||||||||||||||||||||||||||||||||||||||||||
| 141 | 0 | ▶ | my ($epp,$domain,$rd)=@_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
info: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 142 | |||||||||||||||||||||||||||||||||||||||||||
| 143 | 0 | ▶ | return unless Net::DRI::Util::has_key($rd,'ticket'); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 144 | 0 | ▶ | Net::DRI::Exception::usererr_invalid_parameters('ticket parameter must be an integer') unless Net::DRI::Util::isint($rd->{ticket}); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 145 | |||||||||||||||||||||||||||||||||||||||||||
| 146 | 0 | my $mes=$epp->message(); | |||||||||||||||||||||||||||||||||||||||||
| 147 | 0 | my $eid=$mes->command_extension_register('brdomain', 'info'); | |||||||||||||||||||||||||||||||||||||||||
| 148 | 0 | my @n=('brdomain:ticketNumber',$rd->{ticket}); | |||||||||||||||||||||||||||||||||||||||||
| 149 | 0 | $mes->command_extension($eid,\@n); | |||||||||||||||||||||||||||||||||||||||||
| 150 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 151 | } | ||||||||||||||||||||||||||||||||||||||||||
| 152 | |||||||||||||||||||||||||||||||||||||||||||
| 153 | sub info_parse | ||||||||||||||||||||||||||||||||||||||||||
| 154 | { | ||||||||||||||||||||||||||||||||||||||||||
| 155 | 0 | ▶ | my ($po,$otype,$oaction,$oname,$rinfo)=@_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
info_parse: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 156 | 0 | my $mes=$po->message(); | |||||||||||||||||||||||||||||||||||||||||
| 157 | 0 | ▶ | return unless $mes->is_success(); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 158 | |||||||||||||||||||||||||||||||||||||||||||
| 159 | 0 | my $infdata=$mes->get_extension('brdomain','infData'); | |||||||||||||||||||||||||||||||||||||||||
| 160 | 0 | ▶ | return unless $infdata; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 161 | 0 | parse_extra_data($po,$oname,$rinfo,$mes,$infdata); | |||||||||||||||||||||||||||||||||||||||||
| 162 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 163 | } | ||||||||||||||||||||||||||||||||||||||||||
| 164 | |||||||||||||||||||||||||||||||||||||||||||
| 165 | sub parse_extra_data | ||||||||||||||||||||||||||||||||||||||||||
| 166 | { | ||||||||||||||||||||||||||||||||||||||||||
| 167 | 0 | ▶ | my ($po,$oname,$rinfo,$mes,$c)=@_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
parse_extra_data: not called CC=19 SCAR=59.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 168 | 0 | my $ns=$mes->ns('brdomain'); | |||||||||||||||||||||||||||||||||||||||||
| 169 | 0 | $c=$c->getFirstChild(); | |||||||||||||||||||||||||||||||||||||||||
| 170 | 0 | my @tnc; | |||||||||||||||||||||||||||||||||||||||||
| 171 | 0 | ▶ | while($c) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 172 | { | ||||||||||||||||||||||||||||||||||||||||||
| 173 | 0 | ▶ | next unless ($c->nodeType() == 1); ## only for element nodes | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 174 | 0 | ▶ | my $n=$c->localname() || $c->nodeName(); | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$c->localname || $c->nodeName
MC/DC0%0/2
$c->localname || $c->nodeName
$c->localname
$c->nodeName
Truth table0%0/3
A || B
A= $c->localnameB= $c->nodeName
| |||||||||||||||||||||||||||||||||||||||||||
| 175 | 0 | ▶ | if ($n eq 'ticketNumber') | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 7 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 176 | { | ||||||||||||||||||||||||||||||||||||||||||
| 177 | 0 | $rinfo->{domain}->{$oname}->{ticket}=$c->getFirstChild()->getData(); | |||||||||||||||||||||||||||||||||||||||||
| 178 | } elsif ($n eq 'organization') | ||||||||||||||||||||||||||||||||||||||||||
| 179 | { | ||||||||||||||||||||||||||||||||||||||||||
| 180 | 0 | $rinfo->{domain}->{$oname}->{orgid}=$c->getFirstChild()->getData(); | |||||||||||||||||||||||||||||||||||||||||
| 181 | } elsif ($n eq 'releaseProcessFlags') | ||||||||||||||||||||||||||||||||||||||||||
| 182 | { | ||||||||||||||||||||||||||||||||||||||||||
| 183 | 0 | my %f; | |||||||||||||||||||||||||||||||||||||||||
| 184 | 0 | foreach my $f (1..3) | |||||||||||||||||||||||||||||||||||||||||
| 185 | { | ||||||||||||||||||||||||||||||||||||||||||
| 186 | 0 | ▶ | next unless $c->hasAttribute('flag'.$f); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 187 | 0 | $f{'flag'.$f}=Net::DRI::Util::xml_parse_boolean($c->getAttribute('flag'.$f)); | |||||||||||||||||||||||||||||||||||||||||
| 188 | } | ||||||||||||||||||||||||||||||||||||||||||
| 189 | 0 | $rinfo->{domain}->{$oname}->{release_process}=\%f; | |||||||||||||||||||||||||||||||||||||||||
| 190 | } elsif ($n eq 'pending') | ||||||||||||||||||||||||||||||||||||||||||
| 191 | { | ||||||||||||||||||||||||||||||||||||||||||
| 192 | 0 | my $cc=$c->getFirstChild(); | |||||||||||||||||||||||||||||||||||||||||
| 193 | 0 | my %p; | |||||||||||||||||||||||||||||||||||||||||
| 194 | 0 | my $pd=DateTime::Format::ISO8601->new(); | |||||||||||||||||||||||||||||||||||||||||
| 195 | 0 | ▶ | while($cc) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 196 | { | ||||||||||||||||||||||||||||||||||||||||||
| 197 | 0 | ▶ | next unless ($cc->nodeType() == 1); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 198 | 0 | ▶ | my $nn=$cc->localName() || $c->nodeName(); | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$cc->localName || $c->nodeName
MC/DC0%0/2
$cc->localName || $c->nodeName
$cc->localName
$c->nodeName
Truth table0%0/3
A || B
A= $cc->localNameB= $c->nodeName
| |||||||||||||||||||||||||||||||||||||||||||
| 199 | 0 | ▶ | if ($nn eq 'doc') | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 200 | { | ||||||||||||||||||||||||||||||||||||||||||
| 201 | 0 | my $d=$cc->getChildrenByTagNameNS($ns,'description')->shift(); | |||||||||||||||||||||||||||||||||||||||||
| 202 | 0 | push @{$p{doc}}, { status => $cc->getAttribute('status'), | |||||||||||||||||||||||||||||||||||||||||
| 203 | type => $cc->getChildrenByTagNameNS($ns,'docType')->shift()->getFirstChild()->getData(), | ||||||||||||||||||||||||||||||||||||||||||
| 204 | limit => $pd->parse_datetime($cc->getChildrenByTagNameNS($ns,'limit')->shift()->getFirstChild()->getData()), | ||||||||||||||||||||||||||||||||||||||||||
| 205 | description => $d->getFirstChild()->getData(), | ||||||||||||||||||||||||||||||||||||||||||
| 206 | lang => $d->getAttribute('lang'), | ||||||||||||||||||||||||||||||||||||||||||
| 207 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 208 | } elsif ($nn eq 'dns') | ||||||||||||||||||||||||||||||||||||||||||
| 209 | { | ||||||||||||||||||||||||||||||||||||||||||
| 210 | 0 | push @{$p{dns}},{ status => $cc->getAttribute('status'), | |||||||||||||||||||||||||||||||||||||||||
| 211 | hostname => $cc->getChildrenByTagNameNS($ns,'hostName')->shift()->getFirstChild()->getData(), | ||||||||||||||||||||||||||||||||||||||||||
| 212 | limit => $pd->parse_datetime($cc->getChildrenByTagNameNS($ns,'limit')->shift()->getFirstChild()->getData()), | ||||||||||||||||||||||||||||||||||||||||||
| 213 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 214 | } elsif ($nn eq 'releaseProc') | ||||||||||||||||||||||||||||||||||||||||||
| 215 | { | ||||||||||||||||||||||||||||||||||||||||||
| 216 | 0 | $p{release}={ status => $cc->getAttribute('status'), | |||||||||||||||||||||||||||||||||||||||||
| 217 | limit => $pd->parse_datetime($cc->getChildrenByTagNameNS($ns,'limit')->shift()->getFirstChild()->getData()), | ||||||||||||||||||||||||||||||||||||||||||
| 218 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 219 | } | ||||||||||||||||||||||||||||||||||||||||||
| 220 | 0 | } continue { $cc=$cc->getNextSibling(); } | |||||||||||||||||||||||||||||||||||||||||
| 221 | 0 | $rinfo->{domain}->{$oname}->{pending}=\%p; | |||||||||||||||||||||||||||||||||||||||||
| 222 | } elsif ($n eq 'ticketNumberConc') | ||||||||||||||||||||||||||||||||||||||||||
| 223 | { | ||||||||||||||||||||||||||||||||||||||||||
| 224 | 0 | push @tnc,$c->getFirstChild()->getData(); | |||||||||||||||||||||||||||||||||||||||||
| 225 | } elsif ($n eq 'publicationStatus') | ||||||||||||||||||||||||||||||||||||||||||
| 226 | { | ||||||||||||||||||||||||||||||||||||||||||
| 227 | 0 | $rinfo->{domain}->{$oname}->{publication}=parse_publication($ns,$c); | |||||||||||||||||||||||||||||||||||||||||
| 228 | } elsif ($n eq 'autoRenew') | ||||||||||||||||||||||||||||||||||||||||||
| 229 | { | ||||||||||||||||||||||||||||||||||||||||||
| 230 | 0 | $rinfo->{domain}->{$oname}->{auto_renew}=Net::DRI::Util::xml_parse_boolean($c->getAttribute('active')); | |||||||||||||||||||||||||||||||||||||||||
| 231 | } | ||||||||||||||||||||||||||||||||||||||||||
| 232 | 0 | } continue { $c=$c->getNextSibling(); } | |||||||||||||||||||||||||||||||||||||||||
| 233 | |||||||||||||||||||||||||||||||||||||||||||
| 234 | 0 | $rinfo->{domain}->{$oname}->{ticket_concurrent}=\@tnc; | |||||||||||||||||||||||||||||||||||||||||
| 235 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 236 | } | ||||||||||||||||||||||||||||||||||||||||||
| 237 | |||||||||||||||||||||||||||||||||||||||||||
| 238 | sub parse_publication | ||||||||||||||||||||||||||||||||||||||||||
| 239 | { | ||||||||||||||||||||||||||||||||||||||||||
| 240 | 0 | ▶ | my ($ns,$c)=@_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
parse_publication: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 241 | 0 | my %s; | |||||||||||||||||||||||||||||||||||||||||
| 242 | 0 | $s{flag}=$c->getAttribute('publicationFlag'); | |||||||||||||||||||||||||||||||||||||||||
| 243 | 0 | foreach my $r ($c->getChildrenByTagNameNS($ns,'onHoldReason')) | |||||||||||||||||||||||||||||||||||||||||
| 244 | { | ||||||||||||||||||||||||||||||||||||||||||
| 245 | 0 | push @{$s{onhold_reason}},$r->getFirstChild()->getData(); | |||||||||||||||||||||||||||||||||||||||||
| 246 | } | ||||||||||||||||||||||||||||||||||||||||||
| 247 | 0 | return \%s; | |||||||||||||||||||||||||||||||||||||||||
| 248 | } | ||||||||||||||||||||||||||||||||||||||||||
| 249 | |||||||||||||||||||||||||||||||||||||||||||
| 250 | sub build_release | ||||||||||||||||||||||||||||||||||||||||||
| 251 | { | ||||||||||||||||||||||||||||||||||||||||||
| 252 | 0 | ▶ | my $rh=shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
build_release: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 253 | 0 | ▶ | my %f=map { $_ => (defined($rh->{$_}) && $rh->{$_})? 1 : 0 } grep { exists($rh->{$_}) } qw/flag1 flag2 flag3/; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $rh->{$_} and $rh->{$_}
MC/DC0%0/2
defined $rh->{$_} and $rh->{$_}
defined $rh->{$_}
$rh->{$_}
Truth table0%0/3
A and B
A= defined $rh->{$_}B= $rh->{$_}
| |||||||||||||||||||||||||||||||||||||||||||
| 254 | 0 | ▶ | return keys(%f)? ['brdomain:releaseProcessFlags',\%f] : (); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 255 | } | ||||||||||||||||||||||||||||||||||||||||||
| 256 | |||||||||||||||||||||||||||||||||||||||||||
| 257 | sub create | ||||||||||||||||||||||||||||||||||||||||||
| 258 | { | ||||||||||||||||||||||||||||||||||||||||||
| 259 | 0 | ▶ | my ($epp,$domain,$rd)=@_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
create: not called CC=7 SCAR=40.3
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 260 | |||||||||||||||||||||||||||||||||||||||||||
| 261 | 0 | ▶ | Net::DRI::Exception::usererr_insufficient_parameters('orgid is mandatory for domain_create') unless Net::DRI::Util::has_key($rd,'orgid'); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 262 | 0 | ▶ | Net::DRI::Exception::usererr_invalid_parameters('orgid must be an xml token string with 1 to 30 characters') unless Net::DRI::Util::xml_is_token($rd->{orgid},1,30); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 263 | |||||||||||||||||||||||||||||||||||||||||||
| 264 | 0 | my @n=(['brdomain:organization',$rd->{orgid}]); | |||||||||||||||||||||||||||||||||||||||||
| 265 | 0 | ▶ | push @n,build_release($rd->{release}) if (Net::DRI::Util::has_key($rd,'release') && (ref($rd->{release}) eq 'HASH')); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
Net::DRI::Util::has_key($rd, "release") and ref $rd->{"release"} eq "HASH"
MC/DC0%0/2
Net::DRI::Util::has_key($rd, "release") and ref $rd->{"release"} eq "HASH"
Net::DRI::Util::has_key($rd, "release")
ref $rd->{"release"} eq "HASH"
Truth table0%0/3
A and B
A= Net::DRI::Util::has_key($rd, "release")B= ref $rd->{"release"} eq "HASH"
| |||||||||||||||||||||||||||||||||||||||||||
| 266 | 0 | ▶ | push @n,['brdomain:autoRenew',{active => $rd->{auto_renew}? 1 : 0 }] if (Net::DRI::Util::has_key($rd,'auto_renew')); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 267 | |||||||||||||||||||||||||||||||||||||||||||
| 268 | 0 | my $mes=$epp->message(); | |||||||||||||||||||||||||||||||||||||||||
| 269 | 0 | my $eid=$mes->command_extension_register('brdomain','create'); | |||||||||||||||||||||||||||||||||||||||||
| 270 | 0 | $mes->command_extension($eid,\@n); | |||||||||||||||||||||||||||||||||||||||||
| 271 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 272 | } | ||||||||||||||||||||||||||||||||||||||||||
| 273 | |||||||||||||||||||||||||||||||||||||||||||
| 274 | sub create_parse | ||||||||||||||||||||||||||||||||||||||||||
| 275 | { | ||||||||||||||||||||||||||||||||||||||||||
| 276 | 0 | ▶ | my ($po,$otype,$oaction,$oname,$rinfo)=@_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
create_parse: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 277 | 0 | my $mes=$po->message(); | |||||||||||||||||||||||||||||||||||||||||
| 278 | 0 | ▶ | return unless $mes->is_success(); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 279 | |||||||||||||||||||||||||||||||||||||||||||
| 280 | 0 | my $credata=$mes->get_extension('brdomain','creData'); | |||||||||||||||||||||||||||||||||||||||||
| 281 | 0 | ▶ | return unless $credata; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 282 | 0 | parse_extra_data($po,$oname,$rinfo,$mes,$credata); | |||||||||||||||||||||||||||||||||||||||||
| 283 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 284 | } | ||||||||||||||||||||||||||||||||||||||||||
| 285 | |||||||||||||||||||||||||||||||||||||||||||
| 286 | sub renew_parse | ||||||||||||||||||||||||||||||||||||||||||
| 287 | { | ||||||||||||||||||||||||||||||||||||||||||
| 288 | 0 | ▶ | my ($po,$otype,$oaction,$oname,$rinfo)=@_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
renew_parse: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 289 | 0 | my $mes=$po->message(); | |||||||||||||||||||||||||||||||||||||||||
| 290 | 0 | ▶ | return unless $mes->is_success(); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 291 | |||||||||||||||||||||||||||||||||||||||||||
| 292 | 0 | my $rendata=$mes->get_extension('brdomain','renData'); | |||||||||||||||||||||||||||||||||||||||||
| 293 | 0 | ▶ | return unless $rendata; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 294 | 0 | my $ns=$mes->ns('brdomain'); | |||||||||||||||||||||||||||||||||||||||||
| 295 | 0 | my $pub=$rendata->getChildrenByTagNameNS($ns,'publicationStatus'); | |||||||||||||||||||||||||||||||||||||||||
| 296 | 0 | ▶ | return unless $pub->size(); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 297 | |||||||||||||||||||||||||||||||||||||||||||
| 298 | 0 | $rinfo->{domain}->{$oname}->{publication}=parse_publication($ns,$pub->shift()); | |||||||||||||||||||||||||||||||||||||||||
| 299 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 300 | } | ||||||||||||||||||||||||||||||||||||||||||
| 301 | |||||||||||||||||||||||||||||||||||||||||||
| 302 | sub update | ||||||||||||||||||||||||||||||||||||||||||
| 303 | { | ||||||||||||||||||||||||||||||||||||||||||
| 304 | 0 | ▶ | my ($epp,$domain,$todo)=@_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
update: not called CC=12 SCAR=50.5
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 305 | |||||||||||||||||||||||||||||||||||||||||||
| 306 | 0 | my $ticket=$todo->set('ticket'); | |||||||||||||||||||||||||||||||||||||||||
| 307 | 0 | my $release=$todo->set('release'); | |||||||||||||||||||||||||||||||||||||||||
| 308 | 0 | my $autorenew=$todo->set('auto_renew'); | |||||||||||||||||||||||||||||||||||||||||
| 309 | |||||||||||||||||||||||||||||||||||||||||||
| 310 | 0 | ▶ | return unless (defined($ticket) || defined($release) || defined($autorenew)); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
defined $ticket or defined $release or defined $autorenew
defined $ticket or defined $release
MC/DC0%0/3
defined $ticket or defined $release or defined $autorenew
defined $ticket
defined $release
defined $autorenew
Truth table0%0/4
A or B or C
A= defined $ticketB= defined $releaseC= defined $autorenew
| |||||||||||||||||||||||||||||||||||||||||||
| 311 | |||||||||||||||||||||||||||||||||||||||||||
| 312 | 0 | my @n; | |||||||||||||||||||||||||||||||||||||||||
| 313 | 0 | ▶ | push @n,['brdomain:ticketNumber',$ticket] if (defined($ticket) && Net::DRI::Util::isint($ticket)); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $ticket and Net::DRI::Util::isint($ticket)
MC/DC0%0/2
defined $ticket and Net::DRI::Util::isint($ticket)
defined $ticket
Net::DRI::Util::isint($ticket)
Truth table0%0/3
A and B
A= defined $ticketB= Net::DRI::Util::isint($ticket)
| |||||||||||||||||||||||||||||||||||||||||||
| 314 | 0 | my @c; | |||||||||||||||||||||||||||||||||||||||||
| 315 | 0 | ▶ | push @c,build_release($release) if (defined($release) && (ref($release) eq 'HASH')); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $release and ref $release eq "HASH"
MC/DC0%0/2
defined $release and ref $release eq "HASH"
defined $release
ref $release eq "HASH"
Truth table0%0/3
A and B
A= defined $releaseB= ref $release eq "HASH"
| |||||||||||||||||||||||||||||||||||||||||||
| 316 | 0 | ▶ | push @c,['brdomain:autoRenew',{active => $autorenew? 1 : 0}] if defined($autorenew); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 317 | 0 | ▶ | push @n,['brdomain:chg',@c] if @c; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 318 | |||||||||||||||||||||||||||||||||||||||||||
| 319 | 0 | ▶ | return unless @n; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 320 | |||||||||||||||||||||||||||||||||||||||||||
| 321 | 0 | my $mes=$epp->message(); | |||||||||||||||||||||||||||||||||||||||||
| 322 | 0 | my $eid=$mes->command_extension_register('brdomain','update'); | |||||||||||||||||||||||||||||||||||||||||
| 323 | 0 | $mes->command_extension($eid,\@n); | |||||||||||||||||||||||||||||||||||||||||
| 324 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 325 | } | ||||||||||||||||||||||||||||||||||||||||||
| 326 | |||||||||||||||||||||||||||||||||||||||||||
| 327 | sub update_parse | ||||||||||||||||||||||||||||||||||||||||||
| 328 | { | ||||||||||||||||||||||||||||||||||||||||||
| 329 | 0 | ▶ | my ($po,$otype,$oaction,$oname,$rinfo)=@_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
update_parse: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 330 | 0 | my $mes=$po->message(); | |||||||||||||||||||||||||||||||||||||||||
| 331 | 0 | ▶ | return unless $mes->is_success(); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 332 | |||||||||||||||||||||||||||||||||||||||||||
| 333 | 0 | my $upddata=$mes->get_extension('brdomain','updData'); | |||||||||||||||||||||||||||||||||||||||||
| 334 | 0 | ▶ | return unless $upddata; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 335 | 0 | parse_extra_data($po,$oname,$rinfo,$mes,$upddata); | |||||||||||||||||||||||||||||||||||||||||
| 336 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 337 | } | ||||||||||||||||||||||||||||||||||||||||||
| 338 | |||||||||||||||||||||||||||||||||||||||||||
| 339 | sub pandata_parse | ||||||||||||||||||||||||||||||||||||||||||
| 340 | { | ||||||||||||||||||||||||||||||||||||||||||
| 341 | 0 | ▶ | my ($po,$otype,$oaction,$oname,$rinfo)=@_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
pandata_parse: not called CC=10 SCAR=47.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 342 | 0 | my $mes=$po->message(); | |||||||||||||||||||||||||||||||||||||||||
| 343 | 0 | ▶ | return unless $mes->is_success(); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 344 | |||||||||||||||||||||||||||||||||||||||||||
| 345 | 0 | my $pandata=$mes->get_extension('brdomain','panData'); | |||||||||||||||||||||||||||||||||||||||||
| 346 | 0 | ▶ | return unless $pandata; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 347 | |||||||||||||||||||||||||||||||||||||||||||
| 348 | 0 | my $c=$pandata->firstChild(); | |||||||||||||||||||||||||||||||||||||||||
| 349 | 0 | ▶ | while ($c) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 350 | { | ||||||||||||||||||||||||||||||||||||||||||
| 351 | 0 | ▶ | next unless ($c->nodeType() == 1); ## only for element nodes | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 352 | 0 | ▶ | my $n=$c->localname() || $c->nodeName(); | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$c->localname || $c->nodeName
MC/DC0%0/2
$c->localname || $c->nodeName
$c->localname
$c->nodeName
Truth table0%0/3
A || B
A= $c->localnameB= $c->nodeName
| |||||||||||||||||||||||||||||||||||||||||||
| 353 | 0 | ▶ | next unless $n; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 354 | 0 | ▶ | if ($n eq 'ticketNumber') | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 355 | { | ||||||||||||||||||||||||||||||||||||||||||
| 356 | 0 | $rinfo->{$otype}->{$oname}->{ticket}=$c->getFirstChild()->getData(); | |||||||||||||||||||||||||||||||||||||||||
| 357 | } elsif ($n eq 'reason') | ||||||||||||||||||||||||||||||||||||||||||
| 358 | { | ||||||||||||||||||||||||||||||||||||||||||
| 359 | 0 | $rinfo->{$otype}->{$oname}->{reason}=$c->getFirstChild()->getData(); | |||||||||||||||||||||||||||||||||||||||||
| 360 | 0 | ▶ | $rinfo->{$otype}->{$oname}->{reason_lang}=$c->getAttribute('lang') || 'en'; | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$c->getAttribute('lang') || 'en'
MC/DC0%0/1
$c->getAttribute('lang') || 'en'
$c->getAttribute('lang')
Truth table0%0/2
A
A= $c->getAttribute('lang')
| |||||||||||||||||||||||||||||||||||||||||||
| 361 | } | ||||||||||||||||||||||||||||||||||||||||||
| 362 | 0 | } continue { $c=$c->getNextSibling(); } | |||||||||||||||||||||||||||||||||||||||||
| 363 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 364 | } | ||||||||||||||||||||||||||||||||||||||||||
| 365 | |||||||||||||||||||||||||||||||||||||||||||
| 366 | #################################################################################################### | ||||||||||||||||||||||||||||||||||||||||||
| 367 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||