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

Murray, Paul (HP Cloud Services) pmurray at hp.com
Mon Jan 13 15:02:59 UTC 2014


Hi Dan,

I was actually thinking of changes to the list itself rather than the objects in the list. To try and be clear, I actually mean the following:

ObjectListBase has a field called objects that is typed fields.ListOfObjectsField('NovaObject'). I can see methods for count and index, and I guess you are talking about adding a method for "are any of your contents changed" here. I don't see other list operations (like append, insert, remove, pop) that modify the list. If these were included they would have to mark the list as changed so it is picked up when looking for changes. 

Do you see these belonging here or would you expect those to go in a sub-class if they were wanted?

Paul.

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

> 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. 

Hmm? You mean for NovaObjects that are lists? I hesitate to expose lists as changed when one of the objects inside has changed because I think that sends the wrong message. However, I think it makes sense to have a different method on lists for "are any of your contents changed?"

I'll cook up a patch to implement what I'm talking about so you can take a look.

--Dan



More information about the OpenStack-dev mailing list