示例#1
0
文件: manager.py 项目: ugvddm/cinder
    def create_volume(
        self, context, topic, volume_id, snapshot_id=None, image_id=None, request_spec=None, filter_properties=None
    ):

        try:
            flow_engine = create_volume.get_scheduler_flow(
                context, db, self.driver, request_spec, filter_properties, volume_id, snapshot_id, image_id
            )
        except Exception:
            LOG.exception(_("Failed to create scheduler manager volume flow"))
            raise exception.CinderException(_("Failed to create scheduler manager volume flow"))
        flow_engine.run()
示例#2
0
    def create_volume(self, context, topic, volume_id, snapshot_id=None,
                      image_id=None, request_spec=None,
                      filter_properties=None):

        flow = create_volume.get_scheduler_flow(db, self.driver,
                                                request_spec,
                                                filter_properties,
                                                volume_id, snapshot_id,
                                                image_id)
        assert flow, _('Schedule volume flow not retrieved')

        flow.run(context)
        if flow.state != states.SUCCESS:
            LOG.warn(_("Failed to successfully complete"
                       " schedule volume using flow: %s"), flow)
示例#3
0
    def create_volume(self, context, topic, volume_id, snapshot_id=None,
                      image_id=None, request_spec=None,
                      filter_properties=None):

        try:
            flow_engine = create_volume.get_scheduler_flow(context,
                                                           db, self.driver,
                                                           request_spec,
                                                           filter_properties,
                                                           volume_id,
                                                           snapshot_id,
                                                           image_id)
        except Exception:
            LOG.exception(_("Failed to create scheduler manager volume flow"))
            raise exception.CinderException(
                _("Failed to create scheduler manager volume flow"))
        flow_engine.run()
示例#4
0
    def create_volume(self,
                      context,
                      topic,
                      volume_id,
                      snapshot_id=None,
                      image_id=None,
                      request_spec=None,
                      filter_properties=None):

        flow = create_volume.get_scheduler_flow(db, self.driver, request_spec,
                                                filter_properties, volume_id,
                                                snapshot_id, image_id)
        assert flow, _('Schedule volume flow not retrieved')

        flow.run(context)
        if flow.state != states.SUCCESS:
            LOG.warn(
                _("Failed to successfully complete"
                  " schedule volume using flow: %s"), flow)