Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions lib/Net/DRI/DRD/NGTLD.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ xn--3ds443g xn--fiq228c5hs xn--nyqy26a xn--rhqv96g xn--vuq861b

=head3 TLDs

audio blackfriday christmas click country diet flowers game gift guitars help hiphop hiv hosting juegos link lol mom photo pics property sexy tattoo trust
audio blackfriday christmas click country diet flowers game gift guitars help hiv hosting juegos link lol mom photo pics property sexy tattoo trust

Contended TLD's not included

Expand Down Expand Up @@ -1098,8 +1098,8 @@ L<Net::DRI::Protocol::EPP::Extensions::VeriSign::Sync> http://www.verisign.com/e

return {
bep_type => 2, # shared registry
tlds => ['audio','blackfriday','christmas','click','country','diet','flowers','game','gift','guitars','help','hiphop','hiv','home','hosting','juegos','link','lol','mom','photo','pics','property','sexy','tattoo','trust'],
transport_protocol_default => ['Net::DRI::Transport::Socket',{},'Net::DRI::Protocol::EPP::Extensions::UniRegistry',{'brown_fee_version' => '0.7'}],
tlds => ['audio','blackfriday','christmas','click','country','diet','flowers','game','gift','guitars','help','hiv','home','hosting','juegos','link','lol','mom','photo','pics','property','sexy','tattoo','trust'],
transport_protocol_default => ['Net::DRI::Transport::Socket',{},'Net::DRI::Protocol::EPP::Extensions::UniRegistry',{'brown_fee_version' => '0.7', 'default_product'=>'UNIREG'}],
factories => [ {'object'=>'contact','factory' => sub { return Net::DRI::Data::Contact::UniRegistry->new(@_); } } ],
requires => [ 'Net::DRI::Data::Contact::UniRegistry'],
whois_server => 'whois.uniregistry.net',
Expand All @@ -1109,7 +1109,7 @@ L<Net::DRI::Protocol::EPP::Extensions::VeriSign::Sync> http://www.verisign.com/e

=head3 TLDs

creditunion love
creditunion hiphop love

UNR no longer own any TLDs so from now on they plan to use a distinct server for some TLDs: .coop (epp.registry.coop:700), .love (epp.registry.love:700)

Expand All @@ -1131,10 +1131,9 @@ UNR no longer own any TLDs so from now on they plan to use a distinct server for

return {
bep_type => 1, # dedicated (Since UNR no longer own any TLDs from now on and for some TLDs: "... most of our TLDs will be operated separately by their respective registry operators")
tlds => ['creditunion','love'],
tlds => ['creditunion','hiphop','love'],
transport_protocol_default => ['Net::DRI::Transport::Socket',{},'Net::DRI::Protocol::EPP::Extensions::UniRegistry',{'brown_fee_version' => '0.7'}],
factories => [ {'object'=>'contact','factory' => sub { return Net::DRI::Data::Contact::UniRegistry->new(@_); } } ],
requires => [ 'Net::DRI::Data::Contact::UniRegistry'],
whois_server => (defined $tld && $tld =~ m/\w+/ ? 'whois.nic.' . $tld : undef),
} if $bep eq 'unireg_nonshared';

Expand Down
11 changes: 1 addition & 10 deletions lib/Net/DRI/DRD/UniRegistry/NonShared.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ use strict;
use warnings;

use base qw/Net::DRI::DRD::UniRegistry::UniRegistry/;
use Net::DRI::Data::Contact::UniRegistry;

use DateTime::Duration;

=pod
Expand Down Expand Up @@ -97,7 +95,7 @@ sub new
sub periods { return map { DateTime::Duration->new(years => $_) } (1..10); }
sub name { return 'UniRegistry::NonShared'; }

sub tlds { return ('creditunion', 'love'); }
sub tlds { return ('creditunion', 'hiphop', 'love'); }
sub object_types { return ('domain','contact','ns'); }
sub profile_types { return qw/epp/; }

Expand All @@ -109,12 +107,5 @@ sub transport_protocol_default
return;
}

sub set_factories
{
my ($self,$po)=@_;
$po->factories('contact',sub { return Net::DRI::Data::Contact::UniRegistry->new(@_); });
return;
}

####################################################################################################
1;
4 changes: 2 additions & 2 deletions lib/Net/DRI/DRD/UniRegistry/UniRegistry.pm
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ sub new
sub periods { return map { DateTime::Duration->new(years => $_) } (1..10); }
sub name { return 'UniRegistry::UniRegistry'; }

sub tlds { return ('audio', 'blackfriday', 'christmas', 'click', 'country', 'diet', 'flowers', 'game', 'gift', 'guitars', 'help', 'hiphop', 'hiv', 'hosting', 'juegos', 'link', 'lol', 'mom', 'photo', 'pics', 'property', 'sexy', 'tattoo', 'trust'); }
sub tlds { return ('audio', 'blackfriday', 'christmas', 'click', 'country', 'diet', 'flowers', 'game', 'gift', 'guitars', 'help', 'hiv', 'hosting', 'juegos', 'link', 'lol', 'mom', 'photo', 'pics', 'property', 'sexy', 'tattoo', 'trust'); }
sub object_types { return ('domain','contact','ns'); }
sub profile_types { return qw/epp/; }

sub transport_protocol_default
{
my ($self,$type)=@_;

return ('Net::DRI::Transport::Socket',{},'Net::DRI::Protocol::EPP::Extensions::UniRegistry',{ 'brown_fee_version' => '0.7' }) if $type eq 'epp';
return ('Net::DRI::Transport::Socket',{},'Net::DRI::Protocol::EPP::Extensions::UniRegistry',{ 'brown_fee_version' => '0.7', 'default_product'=>'UNIREG' }) if $type eq 'epp';
return;
}

Expand Down
5 changes: 4 additions & 1 deletion lib/Net/DRI/Protocol/EPP/Extensions/UniRegistry.pm
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ sub core_modules
return @c;
}

## tucows purchased uniregistry and now they're in the process of moving from shared epp server => one server perl tld (they don't use Centric, Market and Sync extensions, only UNIREG AND ICM products)
## icm profile use 2x extra extensions - afilias association and ipr - related with migration from Afilias to Uniregistry::ICM platform
## TODO: we should review and clean all this mess. Example, Extensions::DM => Extensions::TUCOWS or something similar (NonShared would be part of that, we could even rename NonShared=>TUCOWS as well)
sub default_extensions
{
my ($self,$rp)=@_;
my @c=qw/GracePeriod SecDNS IDN LaunchPhase UniRegistry::Centric UniRegistry::RegistryMessage UniRegistry::Market VeriSign::Sync CentralNic::Fee/;
my @c=qw/GracePeriod SecDNS IDN LaunchPhase UniRegistry::RegistryMessage CentralNic::Fee/;
push @c,qw/UniRegistry::Centric UniRegistry::Market VeriSign::Sync/ if exists $rp->{default_product} && defined $rp->{default_product} && $rp->{default_product} =~ m/^(ICM|UNIREG)$/;
push @c,qw/Afilias::Association Afilias::IPR/ if exists $rp->{default_product} && defined $rp->{default_product} && $rp->{default_product} eq 'ICM';

return @c;
Expand Down
61 changes: 60 additions & 1 deletion t/Net/DRI/Protocol/EPP/Extensions/UniRegistry.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use Net::DRI::Data::Raw;
use DateTime;
use DateTime::Duration;

use Test::More tests => 60;
use Test::More tests => 75;
use Test::Exception;
eval { no warnings; require Test::LongString; Test::LongString->import(max => 100); $Test::LongString::Context=50; };
if ( $@ ) { no strict 'refs'; *{'main::is_string'}=\&main::is; }
Expand Down Expand Up @@ -109,6 +109,65 @@ is($dri->get_info('exist','domain','example22.love'),0,'domain_check .love multi
is($dri->get_info('exist','domain','examexample2.love'),1,'domain_check .love multi get_info(exist) 2/2');
is($dri->get_info('exist_reason','domain','examexample2.love'),'In use','domain_check .love multi get_info(exist_reason)');

$R2=$E1.'<response>'.r().'<resData><domain:chkData xmlns:domain="urn:ietf:params:xml:ns:domain-1.0" xsi:schemaLocation="urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd"><domain:cd><domain:name avail="1">example22.hiphop</domain:name></domain:cd><domain:cd><domain:name avail="0">examexample2.hiphop</domain:name><domain:reason>In use</domain:reason></domain:cd></domain:chkData></resData>'.$TRID.'</response>'.$E2;
$rc=$dri->domain_check('example22.hiphop','examexample2.hiphop');
is($R1,$E1.'<command><check><domain:check xmlns:domain="urn:ietf:params:xml:ns:domain-1.0" xsi:schemaLocation="urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd"><domain:name>example22.hiphop</domain:name><domain:name>examexample2.hiphop</domain:name></domain:check></check><clTRID>ABC-12345</clTRID></command>'.$E2,'domain_check .hiphop multi build');
is($rc->is_success(),1,'domain_check .hiphop multi is_success');
is($dri->get_info('exist','domain','example22.hiphop'),0,'domain_check .hiphop multi get_info(exist) 1/2');
is($dri->get_info('exist','domain','examexample2.hiphop'),1,'domain_check .hiphop multi get_info(exist) 2/2');
is($dri->get_info('exist_reason','domain','examexample2.hiphop'),'In use','domain_check .hiphop multi get_info(exist_reason)');

$R2=$E1.'<greeting>
<svID>hiphop EPP Server</svID>
<svDate>2022-04-26T14:55:00.310Z</svDate>
<svcMenu>
<version>1.0</version>
<lang>en</lang>
<lang>es</lang>
<lang>fr</lang>
<objURI>urn:ietf:params:xml:ns:domain-1.0</objURI>
<objURI>urn:ietf:params:xml:ns:host-1.0</objURI>
<objURI>urn:ietf:params:xml:ns:contact-1.0</objURI>
<objURI>http://ns.uniregistry.net/eps-1.0</objURI>
<svcExtension>
<extURI>urn:ietf:params:xml:ns:secDNS-1.1</extURI>
<extURI>urn:ietf:params:xml:ns:rgp-1.0</extURI>
<extURI>urn:ietf:params:xml:ns:idn-1.0</extURI>
<extURI>urn:ietf:params:xml:ns:launch-1.0</extURI>
<extURI>urn:ietf:params:xml:ns:fee-0.7</extURI>
</svcExtension>
</svcMenu>
<dcp>
<access>
<all/>
</access>
<statement>
<purpose>
<admin/>
<prov/>
</purpose>
<recipient>
<ours/>
<public/>
</recipient>
<retention>
<stated/>
</retention>
</statement>
</dcp>
</greeting>'.$E2;
$rc=$dri->process('session','noop',[]);
is($R1,$E1.'<hello/>'.$E2,'session noop build (hello command)');
is($rc->is_success(),1,'session noop is_success');
is($rc->get_data('session','server','server_id'),'hiphop EPP Server','session noop get_data(session,server,server_id)');
is($rc->get_data('session','server','date'),'2022-04-26T14:55:00','session noop get_data(session,server,date)');
is_deeply($rc->get_data('session','server','version'),['1.0'],'session noop get_data(session,server,version)');
is_deeply($rc->get_data('session','server','lang'),['en','es','fr'],'session noop get_data(session,server,lang)');
is_deeply($rc->get_data('session','server','objects'),['urn:ietf:params:xml:ns:domain-1.0','urn:ietf:params:xml:ns:host-1.0','urn:ietf:params:xml:ns:contact-1.0','http://ns.uniregistry.net/eps-1.0'],'session noop get_data(session,server,objects)');
is_deeply($rc->get_data('session','server','extensions_announced'),['urn:ietf:params:xml:ns:secDNS-1.1','urn:ietf:params:xml:ns:rgp-1.0','urn:ietf:params:xml:ns:idn-1.0','urn:ietf:params:xml:ns:launch-1.0','urn:ietf:params:xml:ns:fee-0.7'],'session noop get_data(session,server,extensions_announced)');
is_deeply($rc->get_data('session','server','extensions_selected'),['urn:ietf:params:xml:ns:secDNS-1.1','urn:ietf:params:xml:ns:rgp-1.0','urn:ietf:params:xml:ns:idn-1.0','urn:ietf:params:xml:ns:launch-1.0','urn:ietf:params:xml:ns:fee-0.7'],'session noop get_data(session,server,extensions_selected)');
is($rc->get_data('session','server','dcp_string'),'<access><all/></access><statement><purpose><admin/><prov/></purpose><recipient><ours/><public/></recipient><retention><stated/></retention></statement>','session noop get_data(session,server,dcp_string)');



#####################
Expand Down