-
Notifications
You must be signed in to change notification settings - Fork 10
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
Issue with creating subnet folder when multiple folders have the same name #120
Comments
Hi @ishuguru, Thank you for bringing this to our attention. As we support in all our modules names instead of ID's, there is no way to support entities with the same name. Maybe a change in the notation could be a way out. I can imagine something like As I do not have so much time to invest the needed effort, we need to search for volunteers to help to implement this feature. For now, there is only the possibility to avoid duplicate names. |
Thanks for the fast response, our structure is what it is so i cant change that. A quite fast thing to change the folder manualy however so i can work around it. |
I took a quick look into the api responses, and it looks promising:
You could see that the structure is depicted via Unfortunately, I did not find a character which is not allowed in the folder name, yet.
This makes it more difficult to implement it in a simple way. |
Proposal for a possible implementation: ---
codeaffen.phpipam.subnet:
username: "admin"
password: "s3cr3t"
server_url: "https://ipam.example.com"
cidr: "192.0.2.128/28"
folder: "com.example.folder"
folder_path_delimiter: "." 1. Checking the delimiter As there are no characters forbidden for folder names, we need to take care of the not having a folder name that consists of the selected delimiter. To check it, we need a pre-query if there are folders with delimiter in the name.
The result needs to be null. In the upper example, we found an element, why the delimiter is not usable for our purpose. In case we do not have such a folder, the result looks as followed.
While we made use of the 2. Resolving path After we can guarantee that the delimiter could be used for our purpose, we can resolve the complete path to its ID's, and finally find the correct ID for the folder where the subnet is part of. Conditions and risks Finally, some though on conditions and risks.
Concluded, this feature needs a profound look at how to protect the automation against failures. |
We have our ipam structured like this
And in each dc we have nester folder like this.
This seems to cause some errors since there are a few folders named the same
When i try to create a subnet
It places all the subnets in the same folder
Is there any way to specify the master_folder somehow when creating a subnet?
The text was updated successfully, but these errors were encountered: