Hi Bin,
It's not a migration issue, it's an issue with the bindings that cropped up
after a schema change. The fix will be pushed some time this week.
https://pulp.plan.io/issues/9056#note-7
https://github.com/tfranzel/drf-spectacular/blob/812d3ffd39347241ea9ac38793d6801cc6b17136/docs/client_generation.rst#enum-issues
On Wed, Aug 18, 2021 at 3:16 PM Bin Li (BLOOMBERG/ 120 PARK) <
[email protected]> wrote:
> I was able to migrate to the 3.14.4 with updated pulp settings. However, I
> got this error when tried to use the pulp_rpm api:
> AttributeError: module 'pulpcore.client.pulp_rpm.models' has no attribute
> 'OneOf MetadataChecksumTypeEnumNullEnum'
>
> The error went away if I erase and reset the db completely. I think this
> error is still somehow related to the migration from 3.7. Please advise.
>
> The below is the entire error messages:
> # ./test.py
> Traceback (most recent call last):
> File "./test.py", line 17, in
> RepositoriesRpmApi(api_client=rpm_client).list().results
> File
> "/opt/utils/venv/pulp/3.8.8/lib64/python3.8/site-packages/pulpcore/client
> /pulp_rpm/api/repositories_rpm_api.py", line 305, in list
> return self.list_with_http_info(**kwargs) # noqa: E501
> File
> "/opt/utils/venv/pulp/3.8.8/lib64/python3.8/site-packages/pulpcore/client
> /pulp_rpm/api/repositories_rpm_api.py", line 417, in list_with_http_info
> return self.api_client.call_api(
> File
> "/opt/utils/venv/pulp/3.8.8/lib64/python3.8/site-packages/pulpcore/client
> /pulp_rpm/api_client.py", line 365, in call_api
> return self.__call_api(resource_path, method,
> File
> "/opt/utils/venv/pulp/3.8.8/lib64/python3.8/site-packages/pulpcore/client
> /pulp_rpm/api_client.py", line 209, in __call_api
> return_data = self.deserialize(response_data, response_type)
> File
> "/opt/utils/venv/pulp/3.8.8/lib64/python3.8/site-packages/pulpcore/client
> /pulp_rpm/api_client.py", line 281, in deserialize
> return self.__deserialize(data, response_type)
> File
> "/opt/utils/venv/pulp/3.8.8/lib64/python3.8/site-packages/pulpcore/client
> /pulp_rpm/api_client.py", line 320, in __deserialize
> return self.__deserialize_model(data, klass)
> File
> "/opt/utils/venv/pulp/3.8.8/lib64/python3.8/site-packages/pulpcore/client
> /pulp_rpm/api_client.py", line 659, in __deserialize_model
> kwargs[attr] = self.__deserialize(value, attr_type)
> File
> "/opt/utils/venv/pulp/3.8.8/lib64/python3.8/site-packages/pulpcore/client
> /pulp_rpm/api_client.py", line 297, in __deserialize
> return [self.__deserialize(sub_data, sub_kls)
> File
> "/opt/utils/venv/pulp/3.8.8/lib64/python3.8/site-packages/pulpcore/client
> /pulp_rpm/api_client.py", line 297, in
> return [self.__deserialize(sub_data, sub_kls)
> File
> "/opt/utils/venv/pulp/3.8.8/lib64/python3.8/site-packages/pulpcore/client
> /pulp_rpm/api_client.py", line 320, in __deserialize
> return self.__deserialize_model(data, klass)
> File
> "/opt/utils/venv/pulp/3.8.8/lib64/python3.8/site-packages/pulpcore/client
> /pulp_rpm/api_client.py", line 659, in __deserialize_model
> kwargs[attr] = self.__deserialize(value, attr_type)
> File
> "/opt/utils/venv/pulp/3.8.8/lib64/python3.8/site-packages/pulpcore/client
> /pulp_rpm/api_client.py", line 309, in __deserialize
> klass = getattr(pulpcore.client.pulp_rpm.models, klass)
> AttributeError: module 'pulpcore.client.pulp_rpm.models' has no attribute
> 'OneOf MetadataChecksumTypeEnumNullEnum'
>
> The test.py is as following:
> #!/opt/utils/venv/pulp/3.8.8/bin/python
> from pulpcore.client import pulpcore
> from pulpcore.client import pulp_rpm
> from pulpcore.client.pulp_rpm import (
> RepositoriesRpmApi
> )
>
>
> # Configure HTTP basic authorization: basic
> configuration = pulpcore.Configuration()
> configuration.host = 'http://localhost'
> configuration.username = 'pulp'
> configuration.password = 'pulp'
> configuration.safe_chars_for_path_param = '/'
>
> rpm_client = pulp_rpm.ApiClient(configuration)
> #RepositoriesRpmApi <#m_-3250670613409565681_RepositoriesRpmApi>
> (api_client=rpm_client).list().results
> RepositoriesRpmApi(api_client=rpm_client).list()
>
> I am running:
> {
> "versions": [
> {
> "component": "core",
> "version": "3.14.4"
> },
> {
> "component": "rpm",
> "version": "3.14.1"
> },
> {
> "component": "file",
> "version": "1.8.2"
> }
>
>
> # pip list |grep pulp
> pulp-file 1.8.2
> pulp-rpm 3.14.1
> pulp-rpm-client 3.14.1
> pulpcore 3.14.4
> pulpcore-client 3.14.4
>
> From: [email protected] At: 08/06/21 02:44:17 UTC-4:00
> To: [email protected]
> Subject: Pulp-list Digest, Vol 141, Issue 4
>
> Send Pulp-list mailing list submissions to
> [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://listman.redhat.com/mailman/listinfo/pulp-list
> or, via email, send a message with subject or body 'help' to
> [email protected]
>
> You can reach the person managing the list at
> [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents