예제 #1
0
    def _get_max_io_ops_per_host(self, host_state, filter_properties):
        aggregate_vals = utils.aggregate_values_from_key(
            host_state,
            'max_io_ops_per_host')
        try:
            value = utils.validate_num_values(
                aggregate_vals, CONF.max_io_ops_per_host, cast_to=int)
        except ValueError as e:
            LOG.warning(_LW("Could not decode max_io_ops_per_host: '%s'"), e)
            value = CONF.max_io_ops_per_host

        return value
예제 #2
0
    def _get_cpu_allocation_ratio(self, host_state, filter_properties):
        aggregate_vals = utils.aggregate_values_from_key(
            host_state,
            'cpu_allocation_ratio')
        try:
            ratio = utils.validate_num_values(
                aggregate_vals, CONF.cpu_allocation_ratio, cast_to=float)
        except ValueError as e:
            LOG.warning(_LW("Could not decode cpu_allocation_ratio: '%s'"), e)
            ratio = CONF.cpu_allocation_ratio

        return ratio
예제 #3
0
    def _get_max_io_ops_per_host(self, host_state, filter_properties):
        aggregate_vals = utils.aggregate_values_from_key(
            host_state, 'max_io_ops_per_host')
        try:
            value = utils.validate_num_values(aggregate_vals,
                                              CONF.max_io_ops_per_host,
                                              cast_to=int)
        except ValueError as e:
            LOG.warning(_LW("Could not decode max_io_ops_per_host: '%s'"), e)
            value = CONF.max_io_ops_per_host

        return value