<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;"><div>Hi Carmine,</div><div><br></div><div>Yes, I’d guess that the translator you defined attempted to go deeper than the structure obtained by API. If you push the changes to review.openstack.org you may get better feedback =)</div><div><br></div><div>Eric</div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> Carmine Annunziata <<a href="mailto:carmine.annunziata02@gmail.com">carmine.annunziata02@gmail.com</a>><br><span style="font-weight:bold">Reply-To: </span> "OpenStack Development Mailing List (not for usage questions)" <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>><br><span style="font-weight:bold">Date: </span> Thursday, June 15, 2017 at 12:51 AM<br><span style="font-weight:bold">To: </span> <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>><br><span style="font-weight:bold">Subject: </span> [openstack-dev] [Openstack-dev] [Congress] [Designate]<br></div><div><br></div><blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;"><div dir="ltr">Hi everyone,<div><div style="font-size:12.8px">I wrote a congress datasource driver and its unit test for designate, but i got the following errors in the method test_update_from_datasource. It's something wrong in the translation.<br></div><span style="font-size:12.8px">Here is the traceback:</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px"> File "congress/tests/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">test_designate_driver.py", line 34, in setUp</span><br style="font-size:12.8px"><span style="font-size:12.8px">    self.driver = designate_driver.</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">DesignateDriver(args=args)</span><br style="font-size:12.8px"><span style="font-size:12.8px">  File "congress/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">designate_driver.py", line 150, in __init__</span><br style="font-size:12.8px"><span style="font-size:12.8px">    super(DesignateDriver, self).__init__(name, args=args)</span><br style="font-size:12.8px"><span style="font-size:12.8px">  File "congress/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">datasource_driver.py", line 1282, in __init__</span><br style="font-size:12.8px"><span style="font-size:12.8px">    super(PollingDataSourceDriver, self).__init__(name, args=args)</span><br style="font-size:12.8px"><span style="font-size:12.8px">  File "congress/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">datasource_driver.py", line 324, in __init__</span><br style="font-size:12.8px"><span style="font-size:12.8px">    self.initialize_translators()</span><br style="font-size:12.8px"><span style="font-size:12.8px">  File "congress/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">datasource_driver.py", line 1324, in initialize_translators</span><br style="font-size:12.8px"><span style="font-size:12.8px">    self.register_translator(</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">translator)</span><br style="font-size:12.8px"><span style="font-size:12.8px">  File "congress/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">datasource_driver.py", line 457, in register_translator</span><br style="font-size:12.8px"><span style="font-size:12.8px">    self._validate_translator(</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">translator, related_tables)</span><br style="font-size:12.8px"><span style="font-size:12.8px">  File "congress/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">datasource_driver.py", line 446, in _validate_translator</span><br style="font-size:12.8px"><span style="font-size:12.8px">    self._validate_by_translation_</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">type(translator, related_tables)</span><br style="font-size:12.8px"><span style="font-size:12.8px">  File "congress/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">datasource_driver.py", line 428, in _validate_by_translation_type</span><br style="font-size:12.8px"><span style="font-size:12.8px">    self._validate_hdict_type(</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">translator, related_tables)</span><br style="font-size:12.8px"><span style="font-size:12.8px">  File "congress/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">datasource_driver.py", line 389, in _validate_hdict_type</span><br style="font-size:12.8px"><span style="font-size:12.8px">    self._validate_translator(</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">subtranslator, related_tables)</span><br style="font-size:12.8px"><span style="font-size:12.8px">  File "congress/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">datasource_driver.py", line 446, in _validate_translator</span><br style="font-size:12.8px"><span style="font-size:12.8px">    self._validate_by_translation_</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">type(translator, related_tables)</span><br style="font-size:12.8px"><span style="font-size:12.8px">  File "congress/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">datasource_driver.py", line 428, in _validate_by_translation_type</span><br style="font-size:12.8px"><span style="font-size:12.8px">    self._validate_hdict_type(</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">translator, related_tables)</span><br style="font-size:12.8px"><span style="font-size:12.8px">  File "congress/datasources/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">datasource_driver.py", line 386, in _validate_hdict_type</span><br style="font-size:12.8px"><span style="font-size:12.8px">    self.check_params(field_</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">translator.keys(),</span><br style="font-size:12.8px"><span style="font-size:12.8px">AttributeError: 'str' object has no attribute 'keys'</span><br clear="all"><div><br></div><div>Thank you,</div><div class="gmail_signature"><div dir="ltr">Carmine</div></div></div></div>
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: <a href="mailto:OpenStack-dev-request@lists.openstack.org">OpenStack-dev-request@lists.openstack.org</a>?subject:unsubscribe
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</blockquote></span></body></html>