-
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
Can't add VLAN to subnet #80
Comments
Hi @TafkaMax Thank you for bringing this issue to our attention. I was able to reproduce the issue on my side and I was also able to found the root cause of the issue. Just to explain it a bit this issue once again resulting of weird implementation in phpipam. All entities in phpipam are formated as this:
all but vlans. Vlans have this format:
As you see vlan entities have no I will work on this issue and be optimistic to get a solution for that. Give me a bit of time please. |
As reported in codeaffen#80 it is currently not possible to resolve a vlan number to its id. This relies on a different structure of vlan entities. Vlan entities has `vlanId` instead of `id` as usual. We decided to use the same approach as for device_type to add `vlanId` as `id` to the resolved entity.
As reported in codeaffen#80 it is currently not possible to resolve a vlan number to its id. This relies on a different structure of vlan entities. Vlan entities has `vlanId` instead of `id` as usual. We decided to use the same approach as for device_type to add `vlanId` as `id` to the resolved entity.
As reported in codeaffen#80 it is currently not possible to resolve a vlan number to its id. This relies on a different structure of vlan entities. Vlan entities has `vlanId` instead of `id` as usual. We decided to use the same approach as for device_type to add `vlanId` as `id` to the resolved entity.
@TafkaMax can you please check the attached PR if it fixes your issue? |
Yes i can add the VLAN to the subnet, but now when creating VLAN-s when I specify routing_domain, it does not specify the l2 routing domain for the vlan, and they are added to the same domain, so I have duplicates. With the 1.5.0 version from pip, it works. I cloned your repo and used the bugfix/80 branch. |
Okay, thank you for testing. Can you please provide an example that I'll be able to reproduce the behavior and work on the newly introduced issue. |
I created two different l2 domains. (vlans shown on the picture are after the ansible) I added one of the vlans to the first l2 domain and the other one to the other l2 domain. First of all it went to my other routing_domain that is not listed here and found a vlan with the same number there and changed it there. Then it changed the one modified, because the VLAN number is the same, and put it in the test1 l2 domain. with version 1.5.0 it could differentiate between l2 domains and I had duplicate vlan numbers in different l2 domains, but currently it overwrites it.
|
This is with version 1.5.0 |
As reported in codeaffen#80 it is currently not possible to resolve a vlan number to its id. This relies on a different structure of vlan entities. Vlan entities has `vlanId` instead of `id` as usual. We decided to use the same approach as for device_type to add `vlanId` as `id` to the resolved entity.
Can you please provide the playbooks you are using here. So I'll be able to reproduce it on my side. You can either put the playbook in here or push files accordingly to the existing test cases. I must confess that I'm currently not working actively with phpipam and I have to dig a bit to get what you mean. |
@TafkaMax seems to be fixed now. Please check again. Hope all works as expected. |
Hi, I will send the variables I was using. A new problem seems to have arisen.
I have also deleted the default l2 domain that exists with a fresh install.
|
Can you please provide
To be able to let you playbook run for reproducing the issue is used:
With this data I can't reproduce the newly issue. |
Hmm I was just about to suggest
The problem arises with the vlan module for me, I will try to use another version of phpipam module again. i am compiling the codeaffen.phpipam from branch bugfix/80 from your repository. |
With the develop branch i could create the vlans.
|
I tested the playbook against phpip1m 1.4.4 and 1.5.0. All without error. But what I observed, and I guess this is the main issue, is that you try to assign a vlan with same vlan id to different routing domains. |
Ok thanks for the information. I will close the PR, as I could assign vlans to subnets now. |
* fix testcase for subnet module * Fix vlan to id resolve mechanism As reported in #80 it is currently not possible to resolve a vlan number to its id. This relies on a different structure of vlan entities. Vlan entities has `vlanId` instead of `id` as usual. We decided to use the same approach as for device_type to add `vlanId` as `id` to the resolved entity. * Add changlog entry * Add vlan domain mapping test * Fix domain resolution in vlan module * Cleanup conditions for selecting the correct find_* method * Add comment for later understanding
Describe the bug
Can't set VLAN_ID on subnets
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The subnet is created with the vlan,
Versions:
Additional context
Creating the vlan using ansible
The text was updated successfully, but these errors were encountered: