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

add_users_from_csv_cvaas.py only works with default group #207

Open
philippebureau opened this issue Jul 26, 2022 · 2 comments
Open

add_users_from_csv_cvaas.py only works with default group #207

philippebureau opened this issue Jul 26, 2022 · 2 comments
Assignees

Comments

@philippebureau
Copy link

User creation works with default groups (network-admin, network-operator...) but not work user created roles

This is the error :
POST: https://www.cv-prod-na-northeast1-b.arista.io:443/cvpservice/user/addUser.do : Request Error: Failure - Unable to add new entity

@noredistribution
Copy link
Contributor

That's because the addUser.do expects role IDs, the default roles have the same name as their role IDs, whereas user created roles have role_<unixtime> as their ID.
On cvprac side we could fix this by running /role/getRoles.do to fetch all roles and swap the name with the id in the call, ie validate if the name the user has input is a roleId or not, and if not push the roleID. Would that help?

@philippebureau
Copy link
Author

On cvprac side we could fix this by running /role/getRoles.do to fetch all roles and swap the name with the id in the call, ie validate if the name the user has input is a roleId or not, and if not push the roleID. Would that help?

That would help yes

@mharista mharista self-assigned this Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants