When I fix some bugs, I found that some code in

          sometimes we use db ,sometimes we use objects.... do we have any
criteria for it? I knew we can't access db in compute layer code, how about
others ? prefer object or db direct access? thanks

def service_delete(self, context, service_id):
        """Deletes the specified service."""
        objects.Service.get_by_id(context, service_id).destroy()

    def instance_get_all_by_host(self, context, host_name):
        """Return all instances on the given host."""
        return self.db.instance_get_all_by_host(context, host_name)

    def compute_node_get_all(self, context):
        return self.db.compute_node_get_all(context)

Best Regards!

Kevin (Chen) Ji 纪 晨

Engineer, zVM Development, CSTL
Notes: Chen CH Ji/China/IBM@IBMCN   Internet: jiche...@cn.ibm.com
Phone: +86-10-82454158
Address: 3/F Ring Building, ZhongGuanCun Software Park, Haidian District,
Beijing 100193, PRC
OpenStack-dev mailing list

Reply via email to