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

import devices from csv into database, tesobjects in ldap_objects -> not final #16

Merged
merged 33 commits into from
Oct 21, 2024

Conversation

Dan1elRoos
Copy link
Collaborator

No description provided.

@Dan1elRoos Dan1elRoos linked an issue Aug 7, 2024 that may be closed by this pull request
Possible option to fix failed Tests, assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual(), switched both functions
Copy link
Collaborator

@weidenba weidenba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add some unit tests. Furthermore, there are some minor improvements regarding code readability that should be changed. Have a look at the single comments.

src/setup_scripts/__init__.py Outdated Show resolved Hide resolved
src/setup_scripts/ldap_objects.csv Outdated Show resolved Hide resolved
src/setup_scripts/db_import.py Outdated Show resolved Hide resolved
src/setup_scripts/db_import.py Outdated Show resolved Hide resolved
src/setup_scripts/db_import.py Outdated Show resolved Hide resolved
src/setup_scripts/db_import.py Outdated Show resolved Hide resolved
Dan1elRoos and others added 22 commits August 14, 2024 07:41
…tion-for-all-device-attributes-in-validationpy
… into 15-validation-for-all-device-attributes-in-validationpy
@weidenba weidenba self-requested a review September 16, 2024 11:50
Copy link
Collaborator

@weidenba weidenba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

src/helper/filesystem.py Outdated Show resolved Hide resolved
src/nac/management/commands/import_devices.py Outdated Show resolved Hide resolved
src/nac/management/commands/import_devices.py Outdated Show resolved Hide resolved
src/nac/management/commands/import_devices.py Outdated Show resolved Hide resolved
src/nac/management/commands/import_devices.py Outdated Show resolved Hide resolved
src/nac/management/commands/import_devices.py Outdated Show resolved Hide resolved
@weidenba
Copy link
Collaborator

weidenba commented Oct 2, 2024

grafik
The import script should check if an entry already exists. otherwise some strange stuff could happen. I think it would be best, if a command line switch controls if a device gets updated or if the add operation should fail.

@weidenba weidenba merged commit 7a72c6f into main Oct 21, 2024
4 checks passed
@weidenba weidenba deleted the 15-validation-for-all-device-attributes-in-validationpy branch October 21, 2024 13:01
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

Successfully merging this pull request may close these issues.

Implement Device Validation for Import Process
2 participants