<html><head><title></title></head><body><!-- rte-version 0.2 9947551637294008b77bce25eb683dac --><div class="rte-style-maintainer rte-pre-wrap" data-color="global-default" bbg-color="default" data-bb-font-size="medium"bbg-font-size="medium" style="white-space: pre-wrap; font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth";"style="white-space: pre-wrap; font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth"; color: rgb(0, 0, 0);">pulp_created field seems misformed from pprint(remotes_rpm_api.list().results)   Anyone noticed the same issue?<div><br><div> {'description': 'Red Hat Enterprise Linux 7 Server - Fastrack (Debug RPMs)',</div><div> 'latest_version_href': '/pulp/api/v3/repositories/9cfab8d1-84b3-417f-81f8-c29d3e46c872/versions/1/',</div><div> 'name': 'rhel-7-server-fastrack-debug-rpms',</div><div> 'plugin_managed': False,</div><div> 'pulp_created': datetime.datetime(2019, 10, 28, 2, 15, 20, 638246, tzinfo=tzutc()),</div><div> 'pulp_href': '/pulp/api/v3/repositories/9cfab8d1-84b3-417f-81f8-c29d3e46c872/',</div><div> 'versions_href': '/pulp/api/v3/repositories/9cfab8d1-84b3-417f-81f8-c29d3e46c872/versions/'},</div><div><br></div><div>Thanks</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br><br><div class="rte-style-maintainer" data-color="global-default"bbg-color="default" data-bb-font-size="medium" bbg-font-size="medium" style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth";"style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth"; color: rgb(0, 0, 0);"><div><div class="bbg-rte-fold-content" data-header="From: dkliban@redhat.com At: 10/25/19 03:51:15" data-digest="From: dkliban@redhat.com At: 10/25/19 03:51:15" style=""><div class="bbg-rte-fold-summary">From: dkliban@redhat.com At: 10/25/19 03:51:15</div>To: <a spellcheck="false" bbg-destination="mailto:bli111@bloomberg.net" href="mailto:bli111@bloomberg.net"> Bin Li (BLOOMBERG/ 120 PARK ) </a><br>Cc: <a spellcheck="false"bbg-destination="mailto:daviddavis@redhat.com" href="mailto:daviddavis@redhat.com"> daviddavis@redhat.com</a>, <a spellcheck="false"bbg-destination="mailto:pulp-list@redhat.com" href="mailto:pulp-list@redhat.com"> pulp-list@redhat.com</a><br>Subject: Re: [Pulp-list] Pulp 3 Python client</div><br></div><div class="rte-internet-block-wrapper" style="background: white; color: black; font-family: Arial, "BB.Proportional"; font-size: small; white-space: normal;"><div class="rte-internet-block"><blockquote><div dir="ltr"><div>The docs are out of date[0]. The bindings should use an OpenAPI schema requested with the 'bindings' GET parameter. Here is an example[1]. I'll update the docs.<br></div><div><br></div><div>[0] <a spellcheck="false" bbg-destination="rte:bind" class=""href="https://docs.pulpproject.org/en/3.0/nightly/integration-guide/index.html#client-in-a-language-of-your-choice"data-destination="rte:bind">https://docs.pulpproject.org/en/3.0/nightly/integration-guide/index.html#client-in-a-language-of-your-choice</a></div><div>[1] <a spellcheck="false" bbg-destination="rte:bind" class=""href="https://github.com/pulp/pulp-openapi-generator/blob/master/generate.sh#L7"data-destination="rte:bind">https://github.com/pulp/pulp-openapi-generator/blob/master/generate.sh#L7</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 22, 2019 at 11:04 AM Bin Li (BLOOMBERG/ 120 PARK) <<a spellcheck="false"bbg-destination="mailto:rte:bind" class="" href="mailto:bli111@bloomberg.net" data-destination="mailto:rte:bind">bli111@bloomberg.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth"; white-space: pre-wrap;">I tried adding the client api by using openapi generator and installing from pypi.  It looks the client api method name are different.<div><br></div><div>the pypi module has short name.</div><div>>>> dir(pulpcore.client.pulp_rpm.api.RemotesRpmApi)</div><div>['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'create', 'create_with_http_info', 'delete', 'delete_with_http_info', 'list', 'list_with_http_info', 'partial_update', 'partial_update_with_http_info', 'read', 'read_with_http_info', 'sync', 'sync_with_http_info', 'update', 'update_with_http_info']</div><div><br></div><div><br></div><div>Openapi generated classes has longer name.</div><div>>>> dir(pulp3_client.api.RemotesRpmApi)</div><div>['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'remotes_rpm_rpm_create', 'remotes_rpm_rpm_create_with_http_info', 'remotes_rpm_rpm_delete', 'remotes_rpm_rpm_delete_with_http_info', 'remotes_rpm_rpm_list', 'remotes_rpm_rpm_list_with_http_info', 'remotes_rpm_rpm_partial_update', 'remotes_rpm_rpm_partial_update_with_http_info', 'remotes_rpm_rpm_read', 'remotes_rpm_rpm_read_with_http_info', 'remotes_rpm_rpm_sync', 'remotes_rpm_rpm_sync_with_http_info', 'remotes_rpm_rpm_update', 'remotes_rpm_rpm_update_with_http_info']</div><div><br><br>I am wondering why they are different and which one I should use?</div><div><br></div><div>Thanks</div><div><br></div><div><br><div style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth";"><div><div><div>From: <a spellcheck="false" bbg-destination="mailto:rte:bind"class="" href="mailto:daviddavis@redhat.com" data-destination="mailto:rte:bind">daviddavis@redhat.com</a> At: 10/17/19 11:16:35</div>To: <a spellcheck="false" bbg-destination="mailto:bli111@bloomberg.net" class="" href="mailto:bli111@bloomberg.net" data-destination="mailto:bli111@bloomberg.net"> Bin Li (BLOOMBERG/ 120 PARK ) </a><br>Cc: <a spellcheck="false"bbg-destination="mailto:dkliban@redhat.com" class="" href="mailto:dkliban@redhat.com" data-destination="mailto:dkliban@redhat.com"> dkliban@redhat.com</a>, <a spellcheck="false" bbg-destination="mailto:pulp-list@redhat.com" class=""href="mailto:pulp-list@redhat.com" data-destination="mailto:pulp-list@redhat.com"> pulp-list@redhat.com</a><br>Subject: Re: [Pulp-list] Pulp 3 Python client</div><br></div><div style="background: none 0% 0% repeat scroll white; color: black; font-family: Arial, "BB.Proportional"; font-size: small; white-space: normal;"><div><blockquote><div dir="ltr">Yes, up until we the 3.0 GA in December, we're not supporting release to release upgrades. So upgrading from release to release (or nightly to nightly) is not guaranteed to work.<br><div><div><br></div><div>David<br></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 17, 2019 at 11:12 AM Bin Li (BLOOMBERG/ 120 PARK) <<a spellcheck="false"bbg-destination="mailto:rte:bind" class="" href="mailto:bli111@bloomberg.net" data-destination="mailto:rte:bind">bli111@bloomberg.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth"; white-space: pre-wrap;">Yeah, I pulled nightly build and it worked. Thanks a lot.  Do you know if it is required to erase the database when update from previous nightly build? I had some weird 500 errors until I drop all db tables and rerun the migration.<br><br><div style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth";"><div><div><div>From: <a spellcheck="false" bbg-destination="mailto:rte:bind"class="" href="mailto:dkliban@redhat.com" data-destination="mailto:rte:bind">dkliban@redhat.com</a> At: 10/16/19 12:29:21</div>To: <a spellcheck="false" bbg-destination="mailto:bli111@bloomberg.net" class="" href="mailto:bli111@bloomberg.net" data-destination="mailto:bli111@bloomberg.net"> Bin Li (BLOOMBERG/ 120 PARK ) </a><br>Cc: <a spellcheck="false"bbg-destination="mailto:pulp-list@redhat.com" class="" href="mailto:pulp-list@redhat.com" data-destination="mailto:pulp-list@redhat.com"> pulp-list@redhat.com</a><br>Subject: Re: [Pulp-list] Pulp 3 Python client</div><br></div><div style="background: none 0% 0% repeat scroll white; color: black; font-family: Arial, "BB.Proportional"; font-size: small; white-space: normal;"><div><blockquote><div dir="ltr">I've just confirmed that the latest pulp-rpm-client package on PyPI no longer has this problem. However, this latest package only works with the code on master branch. A new pulp_rpm package should be published to PyPI soon. <br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 8, 2019 at 4:29 PM Dennis Kliban <<a spellcheck="false"bbg-destination="mailto:rte:bind" class="" href="mailto:dkliban@redhat.com" data-destination="mailto:rte:bind">dkliban@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>This is a known problem with the OpenAPI schema[0]. Once the PRs for is 5550[1] are merged, a new version of the client will be published to PyPI and this problem will be resolved. I believe that should take place on October 9th[2].<br></div><div><br></div><div>[0] <a spellcheck="false" bbg-destination="rte:bind" class=""href="https://pulp.plan.io/issues/5093" data-destination="rte:bind">https://pulp.plan.io/issues/5093</a></div><div>[1] <a spellcheck="false" bbg-destination="rte:bind" class=""href="https://pulp.plan.io/issues/5550" data-destination="rte:bind">https://pulp.plan.io/issues/5550</a></div><div>[2] <a spellcheck="false" bbg-destination="rte:bind" class=""href="https://www.redhat.com/archives/pulp-dev/2019-October/msg00031.html"data-destination="rte:bind">https://www.redhat.com/archives/pulp-dev/2019-October/msg00031.html</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 8, 2019 at 2:13 PM Bin Li (BLOOMBERG/ 120 PARK) <<a spellcheck="false"bbg-destination="mailto:rte:bind" class="" href="mailto:bli111@bloomberg.net" data-destination="mailto:rte:bind">bli111@bloomberg.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth"; white-space: pre-wrap;">I have tried to follow the blog <a spellcheck="false"bbg-destination="rte:bind" class="" href="https://pulpproject.org/2018/09/04/generate-pulp-3-python-client-using-swagger-codegen/"data-destination="rte:bind">https://pulpproject.org/2018/09/04/generate-pulp-3-python-client-using-swagger-codegen/</a> and got a syntax error.<div>  File "/opt/utils/venv/pulp/3.6.5/lib64/python3.6/site-packages/pulp3_client/models/update_record.py", line 79</div><div>    def __init__(self, href=None, created=None, type=None, id=None, updated_date=None, description=None, issued_date=None, fromstr=None, status=None, title=None, summary=None, version=None, type=None, severity=None, solution=None, release=None, rights=None, pushcount=None, pkglist=None, references=None):  # noqa: E501</div><div>    ^</div><div>SyntaxError: duplicate argument 'type' in function definition</div><div><br></div><div>Type is declared twice in the __init__. There is a duplicate key 'type' in attribute_map models/update_record.py.</div><div><br></div><div>    attribute_map = {</div><div>        'href': '_href',</div><div>        'created': '_created',</div><div>        'type': '_type',</div><div>        'id': 'id',</div><div>        'updated_date': 'updated_date',</div><div>        'description': 'description',</div><div>        'issued_date': 'issued_date',</div><div>        'fromstr': 'fromstr',</div><div>        'status': 'status',</div><div>        'title': 'title',</div><div>        'summary': 'summary',</div><div>        'version': 'version',</div><div>        'type': 'type',</div><div>        'severity': 'severity',</div><div>        'solution': 'solution',</div><div>        'release': 'release',</div><div>        'rights': 'rights',</div><div>        'pushcount': 'pushcount',</div><div>        'pkglist': 'pkglist',</div><div>        'references': 'references'</div><div>    }</div><div><br></div><div>Anyone knows how this can be fixed?</div><div><br></div><div>Thanks</div><div><br></div></div>_______________________________________________<br>Pulp-list mailing list<br><a spellcheck="false"bbg-destination="mailto:rte:bind" class="" href="mailto:Pulp-list@redhat.com" data-destination="mailto:rte:bind">Pulp-list@redhat.com</a><br><a spellcheck="false"bbg-destination="rte:bind" class="" href="https://www.redhat.com/mailman/listinfo/pulp-list"data-destination="rte:bind">https://www.redhat.com/mailman/listinfo/pulp-list</a></blockquote></div></blockquote></div></blockquote><br></div></div></div></div>_______________________________________________<br>Pulp-list mailing list<br><a spellcheck="false"bbg-destination="mailto:rte:bind" class="" href="mailto:Pulp-list@redhat.com" data-destination="mailto:rte:bind">Pulp-list@redhat.com</a><br><a spellcheck="false"bbg-destination="rte:bind" class="" href="https://www.redhat.com/mailman/listinfo/pulp-list"data-destination="rte:bind">https://www.redhat.com/mailman/listinfo/pulp-list</a></blockquote></div></blockquote><br></div></div></div></div></div></blockquote></div></blockquote><br></div></div></div></div></div></div></body></html>