def schedule_create_group(self, context, group, group_spec,
                              request_spec_list, group_filter_properties,
                              filter_properties_list):
        weighed_host = self._schedule_generic_group(context, group_spec,
                                                    request_spec_list,
                                                    group_filter_properties,
                                                    filter_properties_list)

        if not weighed_host:
            raise exception.NoValidHost(reason=_("No weighed hosts available"))

        host = weighed_host.obj.host

        updated_group = driver.generic_group_update_db(context, group, host)

        self.volume_rpcapi.create_group(context, updated_group, host)
Beispiel #2
0
    def schedule_create_group(self, context, group, group_spec,
                              request_spec_list, group_filter_properties,
                              filter_properties_list):
        weighed_backend = self._schedule_generic_group(
            context, group_spec, request_spec_list, group_filter_properties,
            filter_properties_list)

        if not weighed_backend:
            raise exception.NoValidBackend(reason=_("No weighed backends "
                                                    "available"))

        backend = weighed_backend.obj

        updated_group = driver.generic_group_update_db(context, group,
                                                       backend.host,
                                                       backend.cluster_name)

        self.volume_rpcapi.create_group(context, updated_group)
Beispiel #3
0
    def schedule_create_group(self, context, group,
                              group_spec,
                              request_spec_list,
                              group_filter_properties,
                              filter_properties_list):
        weighed_host = self._schedule_generic_group(
            context,
            group_spec,
            request_spec_list,
            group_filter_properties,
            filter_properties_list)

        if not weighed_host:
            raise exception.NoValidHost(reason=_("No weighed hosts available"))

        host = weighed_host.obj.host

        updated_group = driver.generic_group_update_db(context, group, host)

        self.volume_rpcapi.create_group(context,
                                        updated_group, host)
Beispiel #4
0
    def schedule_create_group(self, context, group,
                              group_spec,
                              request_spec_list,
                              group_filter_properties,
                              filter_properties_list):
        weighed_backend = self._schedule_generic_group(
            context,
            group_spec,
            request_spec_list,
            group_filter_properties,
            filter_properties_list)

        if not weighed_backend:
            raise exception.NoValidBackend(reason=_("No weighed backends "
                                                    "available"))

        backend = weighed_backend.obj

        updated_group = driver.generic_group_update_db(context, group,
                                                       backend.host,
                                                       backend.cluster_name)

        self.volume_rpcapi.create_group(context, updated_group)