Open garanews opened 3 years ago
Wanted to add that I am also experiencing this issue.
When I run the following:
python vmsgen.py -vc 10.0.100.100 -o .\out
The following error occurs:
Could not fetch structure info for com.vmware.vcenter.task.query_spec
Could not fetch structure info for com.vmware.vcenter.task.result_data
Could not fetch structure info for com.vmware.vcenter.task.task_info
Traceback (most recent call last):
File "C:\Users\abrewer\Downloads\vmware-openapi-generator-master\vmsgen.py", line 166, in <module>
main()
File "C:\Users\abrewer\Downloads\vmware-openapi-generator-master\vmsgen.py", line 150, in main
api_package_spec_dict = {package: future.result() for package, future in
File "C:\Users\abrewer\Downloads\vmware-openapi-generator-master\vmsgen.py", line 150, in <dictcomp>
api_package_spec_dict = {package: future.result() for package, future in
File "C:\Python310\lib\concurrent\futures\_base.py", line 439, in result
return self.__get_result()
File "C:\Python310\lib\concurrent\futures\_base.py", line 391, in __get_result
raise self._exception
File "C:\Python310\lib\concurrent\futures\thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "C:\Users\abrewer\Downloads\vmware-openapi-generator-master\lib\api_endpoint\api_metadata_processor.py", line 75, in get_path_and_type_dicts
path = openapi.get_path(
File "C:\Users\abrewer\Downloads\vmware-openapi-generator-master\lib\api_endpoint\oas3\api_metamodel2openapi.py", line 32, in get_path
par_array, url = self.handle_request_mapping(url, http_method, service_name,
TypeError: ApiMetamodel2Spec.handle_request_mapping() missing 1 required positional argument: 'spec'
Product: VMware vCenter Server Version: 7.0.3 Build: 20395099
After doing a little digging, it seems that the call to self.handle_request_mapping
in ApiMetamodel2Openapi
does not pass in the content_type
argument (should come right after the params
argument). I worked around this by passing in op_metadata.get("consumes")
judging off what is happening in other areas of the code base; fortunately it got the command to run through.
I have no idea if this behavior is correct. However, it works well enough for my purposes.
Hello, I am trying this script running as
Product: VMware vCenter Server Version: 7.0.1.00300 Build number 17491101
but getting an error: