-
Notifications
You must be signed in to change notification settings - Fork 64
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
"Exception: Invalid policy: Invalid classMapRef" when importing policies #14
Comments
I believe when importing "vmanage_policy_lists", vmanage isn't preserving the "listId" of the classmap as listed in the json file. I separated the "vmanage_policy_lists" to import it separately into vmanage, them immediately export it and can see that the"listID" is not the same as the original json file. So when it starts to import "vmanage_policy_definitions" the "classMapRef" is no longer references a valid id. |
Thanks for the find @sethbeauchamp Added to our project plan and someone will get assigned to look at it. |
@sethbeauchamp, any chance that we can get a sample import file? |
@stevenca See the files and screenshot below. The two text files need to be changed to ".json", github would not let me upload that file format so I changed it to .txt. The file "policy.txt" is the full policy exported from another vmanage and exhibits the issue when importing. I tested this by spinning up the SD-WAN sandbox in devnet, upgrading vmanage to 19.2.1, then using the tool to import the policies. See the screenshot for the commands ran and the results. |
The fundamental problem is that we are not processing class maps. I need to get a vmanage setup with them so that I can process. I might be able to use your policy to re-create. |
Let me know if there is something else I can provide. |
When importing policies into a fresh vmanage I am getting error "Exception: Invalid policy: Invalid classMapRef ".
I exported policies from an existing vmanage, then immediatley try to import that policy to another vmanage. �Both are running 19.2.1. I can provide the json file to someone privately if needed.
Traceback (most recent call last): File "/Users/seth/Desktop/SDWAN_PE_Build/bin/vmanage", line 11, in <module> load_entry_point('viptela', 'console_scripts', 'vmanage')() File "/Users/seth/Desktop/SDWAN_PE_Build/lib/python3.7/site-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "/Users/seth/Desktop/SDWAN_PE_Build/lib/python3.7/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/Users/seth/Desktop/SDWAN_PE_Build/lib/python3.7/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/Users/seth/Desktop/SDWAN_PE_Build/lib/python3.7/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/Users/seth/Desktop/SDWAN_PE_Build/lib/python3.7/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/Users/seth/Desktop/SDWAN_PE_Build/lib/python3.7/site-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/Users/seth/Desktop/SDWAN_PE_Build/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), *args, **kwargs) File "/Users/seth/Desktop/SDWAN_PE_Build/python-viptela/vmanage/cli/import_cmd/policies.py", line 24, in policies result = vmanage_session.import_policy_from_file(file, update=update, check_mode=check, push=push) File "/Users/seth/Desktop/SDWAN_PE_Build/python-viptela/vmanage/api.py", line 829, in import_policy_from_file diff = self.import_policy_definition(definition, check_mode=check_mode, update=update, push=push) File "/Users/seth/Desktop/SDWAN_PE_Build/python-viptela/vmanage/api.py", line 938, in import_policy_definition method='POST', payload=payload) File "/Users/seth/Desktop/SDWAN_PE_Build/python-viptela/vmanage/api.py", line 122, in request raise Exception('{0}: {1}'.format(error, details)) Exception: Invalid policy: Invalid classMapRef 1f15b42a-bfd3-4018-bcd7-9db1bfeb7ad9
The text was updated successfully, but these errors were encountered: