Exemplo n.º 1
0
    def get_controller_metrics(self, storage_id, metrics, start_time,
                               end_time):
        """Get performance metrics."""
        try:
            be_perf_list, fe_perf_list, rdf_perf_list = self.rest.\
                get_controller_metrics(self.array_id,
                                       metrics, start_time, end_time)

            metrics_array = []
            metrics_list = perf_utils.construct_metrics(
                storage_id, consts.BEDIRECTOR_METRICS, consts.CONTROLLER_CAP,
                be_perf_list)
            metrics_array.extend(metrics_list)

            metrics_list = perf_utils.construct_metrics(
                storage_id, consts.FEDIRECTOR_METRICS, consts.CONTROLLER_CAP,
                fe_perf_list)
            metrics_array.extend(metrics_list)

            metrics_list = perf_utils.construct_metrics(
                storage_id, consts.RDFDIRECTOR_METRICS, consts.CONTROLLER_CAP,
                rdf_perf_list)
            metrics_array.extend(metrics_list)

            return metrics_array
        except Exception:
            LOG.error("Failed to get CONTROLLER metrics for VMAX")
            raise
Exemplo n.º 2
0
    def get_port_metrics(self, storage_id, metrics, start_time, end_time):
        """Get performance metrics."""
        try:
            be_perf_list, fe_perf_list, rdf_perf_list = \
                self.rest.get_port_metrics(self.array_id,
                                           metrics, start_time, end_time)

            metrics_array = []
            metrics_list = perf_utils.construct_metrics(
                storage_id, consts.BEPORT_METRICS, consts.PORT_CAP,
                be_perf_list)
            metrics_array.extend(metrics_list)

            metrics_list = perf_utils.construct_metrics(
                storage_id, consts.FEPORT_METRICS, consts.PORT_CAP,
                fe_perf_list)
            metrics_array.extend(metrics_list)

            metrics_list = perf_utils.construct_metrics(
                storage_id, consts.RDFPORT_METRICS, consts.PORT_CAP,
                rdf_perf_list)
            metrics_array.extend(metrics_list)
            return metrics_array
        except Exception:
            LOG.error("Failed to get PORT metrics for VMAX")
            raise
Exemplo n.º 3
0
    def get_storage_metrics(self, storage_id, metrics, start_time, end_time):
        """Get performance metrics."""
        try:
            perf_list = self.rest.get_storage_metrics(self.array_id, metrics,
                                                      start_time, end_time)

            return perf_utils.construct_metrics(storage_id,
                                                consts.STORAGE_METRICS,
                                                consts.STORAGE_CAP, perf_list)
        except Exception:
            LOG.error("Failed to get STORAGE metrics for VMAX")
            raise
Exemplo n.º 4
0
    def get_pool_metrics(self, storage_id, metrics, start_time, end_time):
        """Get performance metrics."""
        try:
            perf_list = self.rest.get_pool_metrics(self.array_id[storage_id],
                                                   metrics, start_time,
                                                   end_time)

            metrics_array = perf_utils.construct_metrics(
                storage_id, consts.POOL_METRICS, consts.POOL_CAP, perf_list)

            return metrics_array
        except Exception:
            LOG.error("Failed to get STORAGE POOL metrics for VMAX")
            raise
Exemplo n.º 5
0
    def get_disk_metrics(self, storage_id, metrics, start_time, end_time):
        """Get disk performance metrics."""
        if int(self.uni_version) < 91:
            return []

        try:
            perf_list = self.rest.get_disk_metrics(self.array_id, metrics,
                                                   start_time, end_time)

            metrics_array = perf_utils.construct_metrics(
                storage_id, consts.DISK_METRICS, consts.DISK_CAP, perf_list)

            return metrics_array
        except Exception:
            LOG.error("Failed to get DISK metrics for VMAX")
            raise