コード例 #1
0
    def schedule_deploy(self, context):
        """Schedule Node Driver for Node creation.

        Given a NodeContext, this method returns the driver capable of creating
        the specific node.
        """
        for driver in self.ordered_drivers:
            try:
                driver.obj.validate_create(context)
                if not model.get_node_owner(context):
                    model.set_node_owner(context, driver.obj.name)
                return driver.obj
            except n_exc.NeutronException as e:
                LOG.warning(e.message)
コード例 #2
0
 def get_owning_driver(self, context):
     owner = model.get_node_owner(context)
     if owner:
         driver = self.drivers.get(owner[0].driver_name)
         return driver.obj if driver else None
コード例 #3
0
 def get_owning_driver(self, context):
     owner = model.get_node_owner(context)
     if owner:
         driver = self.drivers.get(owner[0].driver_name)
         return driver.obj if driver else None