Public bug reported: The __init__ method of HasStandardAttributes incorrectly consumes the first positional argument as the description which leads to difficult to debug failures like the one below.
Traceback (most recent call last): File "neutron/tests/unit/objects/qos/test_policy.py", line 383, in test_object_version self._create_test_policy_with_bw_and_dscp()) File "neutron/tests/unit/objects/qos/test_policy.py", line 370, in _create_test_policy_with_bw_and_dscp policy_obj, rule_obj_band = self._create_test_policy_with_bwrule() File "neutron/tests/unit/objects/qos/test_policy.py", line 133, in _create_test_policy_with_bwrule policy_obj = self._create_test_policy() File "neutron/tests/unit/objects/qos/test_policy.py", line 129, in _create_test_policy policy_obj.create() File "neutron/objects/rbac_db.py", line 305, in func return new_method(self, orig_method) File "neutron/objects/rbac_db.py", line 247, in _create_hook orig_create(self) File "neutron/objects/qos/policy.py", line 144, in create super(QosPolicy, self).create() File "neutron/objects/base.py", line 498, in create self.modify_fields_to_db(fields)) File "neutron/objects/db/api.py", line 59, in create_object db_obj = model(**values) File "<string>", line 4, in __init__ File "/home/administrator/code/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/state.py", line 306, in _initialize_instance manager.dispatch.init_failure(self, args, kwargs) File "/home/administrator/code/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__ compat.reraise(exc_type, exc_value, exc_tb) File "/home/administrator/code/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/state.py", line 303, in _initialize_instance return manager.original_init(*mixed[1:], **kwargs) File "neutron/db/model_base.py", line 198, in __init__ super(HasStandardAttributes, self).__init__(*args, **kwargs) File "/home/administrator/code/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative/base.py", line 650, in _declarative_constructor setattr(self, k, kwargs[k]) File "/home/administrator/code/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/ext/associationproxy.py", line 276, in __set__ setattr(obj, self.target_collection, creator(values)) TypeError: __init__() takes exactly 1 argument (2 given) ** Affects: neutron Importance: Undecided Assignee: Kevin Benton (kevinbenton) Status: In Progress -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1614897 Title: HasStandardAttributes __init__ consumes positional as description Status in neutron: In Progress Bug description: The __init__ method of HasStandardAttributes incorrectly consumes the first positional argument as the description which leads to difficult to debug failures like the one below. Traceback (most recent call last): File "neutron/tests/unit/objects/qos/test_policy.py", line 383, in test_object_version self._create_test_policy_with_bw_and_dscp()) File "neutron/tests/unit/objects/qos/test_policy.py", line 370, in _create_test_policy_with_bw_and_dscp policy_obj, rule_obj_band = self._create_test_policy_with_bwrule() File "neutron/tests/unit/objects/qos/test_policy.py", line 133, in _create_test_policy_with_bwrule policy_obj = self._create_test_policy() File "neutron/tests/unit/objects/qos/test_policy.py", line 129, in _create_test_policy policy_obj.create() File "neutron/objects/rbac_db.py", line 305, in func return new_method(self, orig_method) File "neutron/objects/rbac_db.py", line 247, in _create_hook orig_create(self) File "neutron/objects/qos/policy.py", line 144, in create super(QosPolicy, self).create() File "neutron/objects/base.py", line 498, in create self.modify_fields_to_db(fields)) File "neutron/objects/db/api.py", line 59, in create_object db_obj = model(**values) File "<string>", line 4, in __init__ File "/home/administrator/code/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/state.py", line 306, in _initialize_instance manager.dispatch.init_failure(self, args, kwargs) File "/home/administrator/code/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__ compat.reraise(exc_type, exc_value, exc_tb) File "/home/administrator/code/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/state.py", line 303, in _initialize_instance return manager.original_init(*mixed[1:], **kwargs) File "neutron/db/model_base.py", line 198, in __init__ super(HasStandardAttributes, self).__init__(*args, **kwargs) File "/home/administrator/code/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative/base.py", line 650, in _declarative_constructor setattr(self, k, kwargs[k]) File "/home/administrator/code/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/ext/associationproxy.py", line 276, in __set__ setattr(obj, self.target_collection, creator(values)) TypeError: __init__() takes exactly 1 argument (2 given) To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1614897/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp