[openstack-dev] [Nova] Detect changes in object model

Murray, Paul (HP Cloud Services) pmurray at hp.com
Fri Jan 10 16:17:56 UTC 2014


Sounds good to me. The list base objects don't have methods to make changes to the list - so it would be a case of iterating looking at each object in the list. That would be ok. 

Do we need the contents of the lists to be modified without assigning a new list? - that would need a little more work to allow the changes and to track them there too.

Paul.

-----Original Message-----
From: Dan Smith [mailto:dms at danplanet.com] 
Sent: 10 January 2014 14:42
To: Wang, Shane; OpenStack Development Mailing List (not for usage questions)
Cc: Murray, Paul (HP Cloud Services); Lee, Alexis; Tan, Lin
Subject: Re: [Nova] Detect changes in object model

> If an object A contains another object or object list (called 
> sub-object), any change happened in the sub-object can't be detected 
> by obj_what_changed() in object A.

Well, like the Instance object does, you can override obj_what_changed() to expose that fact to the caller. However, I think it might be good to expand the base class to check, for any NovaObject fields, for the
obj_what_changed() of the child.

How does that sound?

--Dan



More information about the OpenStack-dev mailing list