Closed rmhasan closed 7 years ago
Looks like I might need to modify some of the tests. I'll take a look at the errors brought up in the travis cl build.
As asked in issue #251, Lets say you have the three following networks for a site.
10.2.1.0/24
10.2.1.0/25
10.2.1.192/27
And you want to execute the command nsot networks list -s 2 -c 10.1.2.0/24 next_network -p 26 -n 3
would you want 10.2.1.128/26
to be listed. It is the parent of 10.2.1.192/27
.
Hi @jathanism and @nickpegg I finished all my work on this pull request. I added three tests to test_networks.py
in the model_tests
sub directory. If you want me to do any more tests please let me know. Can someone please review this pull request.
rebased for v1.1 release
@rmhasan Thank you. We will take a look at this soon, I promise. I appreciate your contribution!
Hi @jathanism I made some changes so that strict allocation is optional and a pull request in pynsot to pass a -s/--strict-allocation
flag to the next_network
and next_address
actions. The PR can be found at dropbox/pynsot#128 .
@rmhasan Cool! Thanks! One other thing I noticed. Can you please update your pull request base to dropbox:develop
? I'm really trying to get a look at this today if at all possible.
Hi @jathanism , I made the changes you and @nickpegg suggested. And I changed the base of the PR to dropbox:develop
for both this PR and the PR I created in pynsot, dropbox/pynsot#128.
The latest commits look good to me. @rmhasan thanks for this contribution!
@jathanism: if it looks good to you, let's ship this thing!
Hi @jathanism and @nickpegg, there are security vulnerabilities with django-smart-selects versions 1.2.8 and below. I opened PR #263. I modified the requirements.txt file in this branch to use
django-smart-selects==1.2.9
as well.
Fix for #251. This PR, adds a simple implementation of the
get_next_network
method, which also performs strict allocation. I added 3 test cases to thetest_networks.py
script inmodel_tests
folder. I had to modify a couple tests because their expected results were based on loose allocation. I changed the results to those expected for strict allocation. Please refer to commit rmhasan@714f63ec0dbb8017156eb0cacda16efff8a9feab.