Project

Profile

Help

Issue #8050

closed

ValueError: Invalid value for `artifact`, must not be `None` when listing on_demand disttrees

Added by ttereshc over 1 year ago. Updated over 1 year ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
API Bindings
Sprint:
Quarter:

Description

I can list it fine using REST API, but with bindings it fails.

To reproduce:

from pulpcore.client.pulp_rpm import (
    ApiClient as RpmApiClient,
    ContentDistributionTreesApi,
)

BINDINGS_CONFIGURATION = {
   'username': 'admin',
   'password': 'password',
   'host': 'http://pulp',
}

configuration = Configuration(**BINDINGS_CONFIGURATION)
rpm_client = RpmApiClient(configuration)
rpm_disttree_api = ContentDistributionTreesApi(rpm_client)
rpm_disttree_api.list()

The following error occurs:

ValueError                                Traceback (most recent call last)
<ipython-input-6-0f8cdf8d20e7> in <module>
----> 1 rpm_disttree_api.list()

/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/client/pulp_rpm/api/content_distribution_trees_api.py in list(self, **kwargs)
     68         """
     69         kwargs['_return_http_data_only'] = True
---> 70         return self.list_with_http_info(**kwargs)  # noqa: E501
     71 
     72     def list_with_http_info(self, **kwargs):  # noqa: E501

/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/client/pulp_rpm/api/content_distribution_trees_api.py in list_with_http_info(self, **kwargs)
    181             _preload_content=local_var_params.get('_preload_content', True),
    182             _request_timeout=local_var_params.get('_request_timeout'),
--> 183             collection_formats=collection_formats)
    184 
    185     def read(self, rpm_distribution_tree_href, **kwargs):  # noqa: E501

/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/client/pulp_rpm/api_client.py in call_api(self, resource_path, method, path_params, query_params, header_params, body, post_params, files, response_type, auth_settings, async_req, _return_http_data_only, collection_formats, _preload_content, _request_timeout, _host)
    368                                    response_type, auth_settings,
    369                                    _return_http_data_only, collection_formats,
--> 370                                    _preload_content, _request_timeout, _host)
    371 
    372         return self.pool.apply_async(self.__call_api, (resource_path,

/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/client/pulp_rpm/api_client.py in __call_api(self, resource_path, method, path_params, query_params, header_params, body, post_params, files, response_type, auth_settings, _return_http_data_only, collection_formats, _preload_content, _request_timeout, _host)
    207         # deserialize response data
    208         if response_type:
--> 209             return_data = self.deserialize(response_data, response_type)
    210         else:
    211             return_data = None

/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/client/pulp_rpm/api_client.py in deserialize(self, response, response_type)
    279             data = response.data
    280 
--> 281         return self.__deserialize(data, response_type)
    282 
    283     def __deserialize(self, data, klass):

/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/client/pulp_rpm/api_client.py in __deserialize(self, data, klass)
    318             return self.__deserialize_datetime(data)
    319         else:
--> 320             return self.__deserialize_model(data, klass)
    321 
    322     def call_api(self, resource_path, method,

/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/client/pulp_rpm/api_client.py in __deserialize_model(self, data, klass)
    657                 if klass.attribute_map[attr] in data:
    658                     value = data[klass.attribute_map[attr]]
--> 659                     kwargs[attr] = self.__deserialize(value, attr_type)
    660 
    661         instance = klass(**kwargs)

/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/client/pulp_rpm/api_client.py in __deserialize(self, data, klass)
    296                 sub_kls = re.match(r'list\[(.*)\]', klass).group(1)
    297                 return [self.__deserialize(sub_data, sub_kls)
--> 298                         for sub_data in data]
    299 
    300             if klass.startswith('dict('):

/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/client/pulp_rpm/api_client.py in <listcomp>(.0)
    296                 sub_kls = re.match(r'list\[(.*)\]', klass).group(1)
    297                 return [self.__deserialize(sub_data, sub_kls)
--> 298                         for sub_data in data]
    299 
    300             if klass.startswith('dict('):

/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/client/pulp_rpm/api_client.py in __deserialize(self, data, klass)
    318             return self.__deserialize_datetime(data)
    319         else:
--> 320             return self.__deserialize_model(data, klass)
    321 
    322     def call_api(self, resource_path, method,

/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/client/pulp_rpm/api_client.py in __deserialize_model(self, data, klass)
    657                 if klass.attribute_map[attr] in data:
    658                     value = data[klass.attribute_map[attr]]
--> 659                     kwargs[attr] = self.__deserialize(value, attr_type)
    660 
    661         instance = klass(**kwargs)

/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/client/pulp_rpm/api_client.py in __deserialize(self, data, klass)
    296                 sub_kls = re.match(r'list\[(.*)\]', klass).group(1)
    297                 return [self.__deserialize(sub_data, sub_kls)
--> 298                         for sub_data in data]
    299 
    300             if klass.startswith('dict('):

/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/client/pulp_rpm/api_client.py in <listcomp>(.0)
    296                 sub_kls = re.match(r'list\[(.*)\]', klass).group(1)
    297                 return [self.__deserialize(sub_data, sub_kls)
--> 298                         for sub_data in data]
    299 
    300             if klass.startswith('dict('):

/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/client/pulp_rpm/api_client.py in __deserialize(self, data, klass)
    318             return self.__deserialize_datetime(data)
    319         else:
--> 320             return self.__deserialize_model(data, klass)
    321 
    322     def call_api(self, resource_path, method,

/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/client/pulp_rpm/api_client.py in __deserialize_model(self, data, klass)
    659                     kwargs[attr] = self.__deserialize(value, attr_type)
    660 
--> 661         instance = klass(**kwargs)
    662 
    663         if has_discriminator:

/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/client/pulp_rpm/models/image_response.py in __init__(self, name, path, platforms, artifact, local_vars_configuration)
     63         self.path = path
     64         self.platforms = platforms
---> 65         self.artifact = artifact
     66 
     67     @property

/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/client/pulp_rpm/models/image_response.py in artifact(self, artifact)
    159         """
    160         if self.local_vars_configuration.client_side_validation and artifact is None:  # noqa: E501
--> 161             raise ValueError("Invalid value for `artifact`, must not be `None`")  # noqa: E501
    162 
    163         self._artifact = artifact

ValueError: Invalid value for `artifact`, must not be `None`
Actions #1

Updated by pulpbot over 1 year ago

  • Status changed from NEW to POST

Added by Fabricio Aguiar over 1 year ago

Revision 1309c4dc

Fixing OpenAPI schema for on demand Distribution Trees

https://pulp.plan.io/issues/8050 closes #8050 [nocoverage]

Actions #2

Updated by Anonymous over 1 year ago

  • Status changed from POST to MODIFIED
Actions #3

Updated by dalley over 1 year ago

  • Sprint/Milestone set to 3.9.0
Actions #4

Updated by pulpbot over 1 year ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF