Re: [openstack-dev] [Fuel] Disable observing modifications of nested fields for MutableDict and MutableList

2016-03-09 Thread Bulat Gaifullin
Fuelers, please notice that the patch [1]  changes behaviour of MutableDict and 
MutableList.
observing of changes in nested objects has been disabled, because it is not 
trivial to handle this case properly.
It is much easier to notify about changes in nester fields  explicitly when it 
is needed.
Example:

# instance.roles_metadata is instance of MutableDict.
instance.roles_metadata[role['name']] = role['meta']
instance.volumes_metadata['volumes_roles_mapping'][role['name']] = 
role.get('volumes_roles_mapping', [])
# notify about changes
instance.volumes_metadata.changed()

[1]  https://review.openstack.org/#/c/289600/

PS:
  Added missing link

Regards,
Bulat Gaifullin
Mirantis Inc.


__
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] [Fuel] Disable observing modifications of nested fields for MutableDict and MutableList

2016-03-09 Thread Bulat Gaifullin
Fuelers, please notice that the patch [1]  changes behaviour of MutableDict and 
MutableList.
observing of changes in nested objects has been disabled, because it is not 
trivial to handle this case properly.
It is much easier to notify about changes in nester fields  explicitly when it 
is needed.
Example:

# instance.roles_metadata is instance of MutableDict.
instance.roles_metadata[role['name']] = role['meta']
instance.volumes_metadata['volumes_roles_mapping'][role['name']] = 
role.get('volumes_roles_mapping', [])
# notify about changes
instance.volumes_metadata.changed()


Regards,
Bulat Gaifullin
Mirantis Inc.




__
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