Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work with VNETs with multiple address spaces #5

Open
51lver opened this issue Apr 1, 2024 · 12 comments
Open

Work with VNETs with multiple address spaces #5

51lver opened this issue Apr 1, 2024 · 12 comments

Comments

@51lver
Copy link

51lver commented Apr 1, 2024

Hello guys,

First of all, thank you for this solution!
One thing to add - the current solution, I guess, doesn't work with VNET's containing a few address spaces.

Will be very nice to add it.

@gamullen
Copy link
Owner

gamullen commented Apr 1, 2024

Thanks. Are you able to make any code changes?

@51lver
Copy link
Author

51lver commented Apr 1, 2024

I have no experience with C# 🤷

@gamullen
Copy link
Owner

gamullen commented Apr 2, 2024

@51lver - I added the functionality to the code.

@51lver
Copy link
Author

51lver commented Apr 5, 2024

Update - resolved
Hello Gary! @gamullen
Sorry for long delay, I tried to deploy the function using the Azure function core tools...
Is there anything I'm doing wrong? I know it's not related to this specific GH issue
image

@gamullen
Copy link
Owner

gamullen commented Apr 5, 2024

@51lver Looks as though you figured it out?

@51lver
Copy link
Author

51lver commented Apr 5, 2024

yes

@51lver
Copy link
Author

51lver commented Apr 5, 2024

@gamullen OK i tested the function, it works. Thanks!
I tried to test if it works with multiple address spaces, but I'm still not sure...
So for example, if I have 2 spaces (/26 + /27) and /26 has only space for /28 subnet, and I'm looking for /27 cidr, will it be found in the /27 space?

@gamullen
Copy link
Owner

gamullen commented Apr 5, 2024

If you have an address space in your VNet that is 10.0.0.0/26, and you want to get a 28 subnet out of it, you'd pass in "&cidr=28&addressSpace=10.0.0.0/26"

@51lver
Copy link
Author

51lver commented Apr 5, 2024

So by default (without address space in the request) it won't use all the spaces for searching?

@gamullen
Copy link
Owner

gamullen commented Apr 5, 2024

No - the first space that is returned by the API is used if the subnet fits. If you want to target a specific address space specify it.

@51lver
Copy link
Author

51lver commented Apr 8, 2024

@gamullen If you don't mind I'll try to add the work with a few spaces as a default option.

@gamullen
Copy link
Owner

gamullen commented Apr 8, 2024

Not sure what you mean. The code should go through all address spaces until it finds a suitable subnet. I just don't control the order in which the address spaces are processed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants