First implementation of MethodsV2#1050
Conversation
|
Maybe rename this PR to "First implementation of MethodsV2"? |
|
Implementation updated to follow latest changes in specification from zonemaster#1059. |
| for my $ns ( @{$ns_ref} ){ | ||
| if ( not $zone->name->is_in_bailiwick( $ns->name ) ){ | ||
| if ( $is_undelegated and Zonemaster::Engine::Recursor->get_fake_addresses( $zone->name->string, $ns->name->string ) ){ |
There was a problem hiding this comment.
The last line should be indented, shouldn't it?
| =item get_parent_ns_ips($zone) | ||
| External method. | ||
|
|
||
| =item _get_oob_ips($zone, $ns_names_ref) | ||
| Interal method. | ||
|
|
||
| =item _get_delegation($zone) | ||
| Internal method. | ||
|
|
||
| =item get_del_ns_names_and_ips($zone) | ||
| External method. | ||
|
|
||
| =item get_del_ns_names($zone) | ||
| External method. | ||
|
|
||
| =item get_del_ns_ips($zone) | ||
| External method. | ||
|
|
||
| =item get_zone_ns_names($zone) | ||
| External method. | ||
|
|
||
| =item _get_ib_addr_in_zone($zone) | ||
| Internal method. | ||
|
|
||
| =item get_zone_ns_names_and_ips($zone) | ||
| External method. | ||
|
|
||
| =item get_zone_ns_ips($zone) | ||
| External method. |
There was a problem hiding this comment.
Is the plan to provide more information here? It is good to at least see what each subroutine returns.
Have you considered putting the documentation for the subroutines just before each subroutine instead of at the end?
There was a problem hiding this comment.
Is the plan to provide more information here? It is good to at least see what each subroutine returns.
Yes, more documentation to come.
Have you considered putting the documentation for the subroutines just before each subroutine instead of at the end?
Sure, I will do that as well.
There was a problem hiding this comment.
I have just provided an update which adds documentation and put it next to each subroutine. See 9a248dc.
- Complete rewrite of Test Methods (Zonemaster::Engine::TestMethodsV2), based on specification from v2022.2. - Documentation
|
As discussed in team meeting, this implementation requires extensive testing, but that will be done in a future PR when the new methods will start to be used. Corrections in the implementation, if needed, will also be added then. For now, these new methods are not used anywhere and so can be merged as is. Follow-up issue for testing: #1222 |
Purpose
This PR proposes a first implementation of the new methods "MethodsV2" to be used by Test modules of Zonemaster::Engine.
Those methods are not yet used anywhere (i.e., by any Test Case). This is planned for 2023.2 (at the earliest).
Context
Fixes #571 , #891
Changes
lib/Zonemaster/Engine/TestMethodsV2.pmHow to test this PR
In any Test module (e.g, Basic) where the new methods are to be tested, import them using:
use Zonemaster::Engine::TestMethodsV2;As with the current Methods implementations, you can call each method using:
my @results = Zonemaster::Engine::TestMethodsV2->get_parent_ns_ips( $zone );