Re: [openstack-dev] [Openstack-dev] [Congress] [Designate]

2017-06-15 Thread Tim Hinrichs
This error happens happens when the translator thinks there's an
object/dictionary when in actuality there's just a string.  I don't know of
a good way to know where in the translator the problem is, other than
simplifying the input and the translator and rerunning (which you're
already doing).

Tim

On Thu, Jun 15, 2017 at 12:52 AM Carmine Annunziata <
carmine.annunziat...@gmail.com> wrote:

> Hi everyone,
> 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.
> Here is the traceback:
>
>  File "congress/tests/datasources/test_designate_driver.py", line 34, in
> setUp
> self.driver = designate_driver.DesignateDriver(args=args)
>   File "congress/datasources/designate_driver.py", line 150, in __init__
> super(DesignateDriver, self).__init__(name, args=args)
>   File "congress/datasources/datasource_driver.py", line 1282, in __init__
> super(PollingDataSourceDriver, self).__init__(name, args=args)
>   File "congress/datasources/datasource_driver.py", line 324, in __init__
> self.initialize_translators()
>   File "congress/datasources/datasource_driver.py", line 1324, in
> initialize_translators
> self.register_translator(translator)
>   File "congress/datasources/datasource_driver.py", line 457, in
> register_translator
> self._validate_translator(translator, related_tables)
>   File "congress/datasources/datasource_driver.py", line 446, in
> _validate_translator
> self._validate_by_translation_type(translator, related_tables)
>   File "congress/datasources/datasource_driver.py", line 428, in
> _validate_by_translation_type
> self._validate_hdict_type(translator, related_tables)
>   File "congress/datasources/datasource_driver.py", line 389, in
> _validate_hdict_type
> self._validate_translator(subtranslator, related_tables)
>   File "congress/datasources/datasource_driver.py", line 446, in
> _validate_translator
> self._validate_by_translation_type(translator, related_tables)
>   File "congress/datasources/datasource_driver.py", line 428, in
> _validate_by_translation_type
> self._validate_hdict_type(translator, related_tables)
>   File "congress/datasources/datasource_driver.py", line 386, in
> _validate_hdict_type
> self.check_params(field_translator.keys(),
> AttributeError: 'str' object has no attribute 'keys'
>
> Thank you,
> Carmine
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Openstack-dev] [Congress] [Designate]

2017-06-15 Thread Eric K
Hi Carmine,

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 =)

Eric

From:  Carmine Annunziata <carmine.annunziat...@gmail.com>
Reply-To:  "OpenStack Development Mailing List (not for usage questions)"
<openstack-dev@lists.openstack.org>
Date:  Thursday, June 15, 2017 at 12:51 AM
To:  <openstack-dev@lists.openstack.org>
Subject:  [openstack-dev] [Openstack-dev] [Congress] [Designate]

> Hi everyone,
> 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.
> Here is the traceback:
> 
>  File "congress/tests/datasources/test_designate_driver.py", line 34, in setUp
> self.driver = designate_driver.DesignateDriver(args=args)
>   File "congress/datasources/designate_driver.py", line 150, in __init__
> super(DesignateDriver, self).__init__(name, args=args)
>   File "congress/datasources/datasource_driver.py", line 1282, in __init__
> super(PollingDataSourceDriver, self).__init__(name, args=args)
>   File "congress/datasources/datasource_driver.py", line 324, in __init__
> self.initialize_translators()
>   File "congress/datasources/datasource_driver.py", line 1324, in
> initialize_translators
> self.register_translator(translator)
>   File "congress/datasources/datasource_driver.py", line 457, in
> register_translator
> self._validate_translator(translator, related_tables)
>   File "congress/datasources/datasource_driver.py", line 446, in
> _validate_translator
> self._validate_by_translation_type(translator, related_tables)
>   File "congress/datasources/datasource_driver.py", line 428, in
> _validate_by_translation_type
> self._validate_hdict_type(translator, related_tables)
>   File "congress/datasources/datasource_driver.py", line 389, in
> _validate_hdict_type
> self._validate_translator(subtranslator, related_tables)
>   File "congress/datasources/datasource_driver.py", line 446, in
> _validate_translator
> self._validate_by_translation_type(translator, related_tables)
>   File "congress/datasources/datasource_driver.py", line 428, in
> _validate_by_translation_type
> self._validate_hdict_type(translator, related_tables)
>   File "congress/datasources/datasource_driver.py", line 386, in
> _validate_hdict_type
> self.check_params(field_translator.keys(),
> AttributeError: 'str' object has no attribute 'keys'
> 
> Thank you,
> Carmine
> __
> OpenStack Development Mailing List (not for usage questions) Unsubscribe:
> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [Openstack-dev] [Congress] [Designate]

2017-06-15 Thread Carmine Annunziata
Hi everyone,
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.
Here is the traceback:

 File "congress/tests/datasources/test_designate_driver.py", line 34, in
setUp
self.driver = designate_driver.DesignateDriver(args=args)
  File "congress/datasources/designate_driver.py", line 150, in __init__
super(DesignateDriver, self).__init__(name, args=args)
  File "congress/datasources/datasource_driver.py", line 1282, in __init__
super(PollingDataSourceDriver, self).__init__(name, args=args)
  File "congress/datasources/datasource_driver.py", line 324, in __init__
self.initialize_translators()
  File "congress/datasources/datasource_driver.py", line 1324, in
initialize_translators
self.register_translator(translator)
  File "congress/datasources/datasource_driver.py", line 457, in
register_translator
self._validate_translator(translator, related_tables)
  File "congress/datasources/datasource_driver.py", line 446, in
_validate_translator
self._validate_by_translation_type(translator, related_tables)
  File "congress/datasources/datasource_driver.py", line 428, in
_validate_by_translation_type
self._validate_hdict_type(translator, related_tables)
  File "congress/datasources/datasource_driver.py", line 389, in
_validate_hdict_type
self._validate_translator(subtranslator, related_tables)
  File "congress/datasources/datasource_driver.py", line 446, in
_validate_translator
self._validate_by_translation_type(translator, related_tables)
  File "congress/datasources/datasource_driver.py", line 428, in
_validate_by_translation_type
self._validate_hdict_type(translator, related_tables)
  File "congress/datasources/datasource_driver.py", line 386, in
_validate_hdict_type
self.check_params(field_translator.keys(),
AttributeError: 'str' object has no attribute 'keys'

Thank you,
Carmine
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [openstack-dev[[Congress]

2014-09-17 Thread Madhu Mohan
Hi Congress Team,

Has anyone tried writing policies with Builtin operators like gt(), lt().

I see the class CongressBuiltinCategoryMap() to add/update the start map
defined in the same file.

However, these classes are never referred in any part of the code. So
clearly, I can assume Congress does not support such operators at this point

Is there a plan to implement this feature or someone looking into it
already ?

Thanks and Regards,
Madhu Mohan
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev