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

Extend lenght subnets name attribute #132

Open
romano80 opened this issue Mar 23, 2018 · 3 comments
Open

Extend lenght subnets name attribute #132

romano80 opened this issue Mar 23, 2018 · 3 comments
Labels

Comments

@romano80
Copy link

Hi all I need to have more lenght for subnet name, I just changed the lenght on db table but still have a limited lenght.
I use a dcm.pl module but it use a standard function of ONA subnet.inc.php file

bye Romano

@mattpascoe
Copy link
Member

I'm curious why the current limits are not meeting your needs?

Currently the database allows for 127 characters, and the GUI interface has a limit of 100 characters. I just placed the following subnet name "THIS-IS-MY-REALLY-LONG-SUBNETNAME-AND-IT-SHOULD-BE-ABOUT-THE-LENGTH-OF-100-BUT-I-NEED-25-CHARACTERS" in and it allowed me to put those 100 characters in.

This name is quite long and causes things to align in potentially undesired ways in the display of subnets.

I'm curious to know why this is too short for your use case. At this point I'm not sure I see a need to make it longer.

Thanks

@romano80
Copy link
Author

Hi Matt,
I can have subnet name like this

RAT DC D2 NAT POOL ENTRY IS READ BY ANT GBI DWH for 127.0.0.1 | VLAN=VLAN320| VRF=VRF1 VR=grt | S1=de2fff012345s | S2=FwBCat-H4123_4 | SEC=NAT | SECZONE: APPLICATION,
ps I don't have problem to insert it by graphics interface but with dcm.pl
In any case for my use I need to use name to implement a security zone parameter, I just tried to use a separate custom attribute but I need to load in massive way about 3000-4000 subnets.

@mattpascoe
Copy link
Member

My suggestion here would be to not place all of this information into the name field of the subnet. The subnet name will enforce upper case and hyphenated spaces which is likely not desired for this data. The subnet name should be a human friendly description of the subnet.

Most of this information should be defined as a custom attribute. The custom attribute definition also allow you to enforce some standard values if appropriate. Each of these sections in your example would become their own attribute. You will first need to define a custom attribute type (in the admin menu) such as SECZONE.. then you will assign a value to that type for that subnet.

Then if you have thousands to do, I would simply create a script to take a csv or similar input and create the specific dcm.pl commands to add the subnet, then add each of the custom attributes. This can easily be done with the dcm.pl tool.

If you still want to update the field length in the database then you would also need to update the following line in the GUI setup. https://github.com/opennetadmin/ona/blob/master/www/winc/edit_subnet.inc.php#L173

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

No branches or pull requests

2 participants