How about put it in storagemanagerimpl? It's the place you can put all the storage related query or operation.
Sent from my iPhone On Jul 24, 2012, at 10:48 PM, "Mice Xia" <mice_...@tcloudcomputing.com> wrote: > Making a public static method requires a lot of the fields in it to be > static, I'm not sure if it has some side-effect.. > Is it OK to extract the related logic into another private method in the > planner? > > Regards > Mice > > -----Original Message----- > From: Edison Su [mailto:edison...@citrix.com] > Sent: Wednesday, July 25, 2012 1:09 PM > To: Mice Xia > Cc: cloudstack-dev@incubator.apache.org; Prachi Damle; Nitin Mehta > Subject: Re: 答复: Review Request: CS-15609 Volumes can be created as a part of > VM creation when un-allocated space is insufficient on primary storage > > Yes, exactly. I don't want mess planner with storage allocator. The planner > itself is already complicated enough. How do you think? > > Sent from my iPhone > > On Jul 24, 2012, at 6:18 PM, "Mice Xia" <mice_...@tcloudcomputing.com> wrote: > >> Hi Edison, >> >> Do you mean I should add a new static public method >> (storagepoolhasenoughspace) in AbstractStoragePoolAllocator, and call it to >> check against storage space in findSuitablePoolsForVolumes after the for >> loop? >> >> Regards >> Mice >