Source code for netapp.santricity.models.symbol.volume_performance

# coding: utf-8

"""
VolumePerformance.py

 The Clear BSD License

 Copyright (c) – 2016, NetApp, Inc. All rights reserved.

 Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

 * Neither the name of NetApp, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

 NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""

from pprint import pformat
from six import iteritems


[docs]class VolumePerformance(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self): """ VolumePerformance - a model defined in Swagger :param dict swaggerTypes: The key is attribute name and the value is attribute type. :param dict attributeMap: The key is attribute name and the value is json key in definition. """ self.swagger_types = { 'time': 'int', # (required parameter) 'total_requests_serviced': 'int', # (required parameter) 'total_blocks_requested': 'int', # (required parameter) 'total_read_requests': 'int', # (required parameter) 'total_read_blocks_requested': 'int', # (required parameter) 'total_write_requests': 'int', # (required parameter) 'total_write_blocks_requested': 'int', # (required parameter) 'percent_read_requests': 'int', # (required parameter) 'average_blocks_requested': 'int', # (required parameter) 'total_large_reads': 'int', # (required parameter) 'total_large_read_blocks_requested': 'int', # (required parameter) 'total_large_writes': 'int', # (required parameter) 'total_large_write_blocks_requested': 'int', # (required parameter) 'total_cache_read_checks': 'int', # (required parameter) 'total_cache_read_check_hits': 'int', # (required parameter) 'total_cache_write_requests': 'int', # (required parameter) 'volume_ref': 'str', # (required parameter) 'total_cache_write_hits': 'int', # (required parameter) 'total_flash_cache_read_hits': 'int' } self.attribute_map = { 'time': 'time', # (required parameter) 'total_requests_serviced': 'totalRequestsServiced', # (required parameter) 'total_blocks_requested': 'totalBlocksRequested', # (required parameter) 'total_read_requests': 'totalReadRequests', # (required parameter) 'total_read_blocks_requested': 'totalReadBlocksRequested', # (required parameter) 'total_write_requests': 'totalWriteRequests', # (required parameter) 'total_write_blocks_requested': 'totalWriteBlocksRequested', # (required parameter) 'percent_read_requests': 'percentReadRequests', # (required parameter) 'average_blocks_requested': 'averageBlocksRequested', # (required parameter) 'total_large_reads': 'totalLargeReads', # (required parameter) 'total_large_read_blocks_requested': 'totalLargeReadBlocksRequested', # (required parameter) 'total_large_writes': 'totalLargeWrites', # (required parameter) 'total_large_write_blocks_requested': 'totalLargeWriteBlocksRequested', # (required parameter) 'total_cache_read_checks': 'totalCacheReadChecks', # (required parameter) 'total_cache_read_check_hits': 'totalCacheReadCheckHits', # (required parameter) 'total_cache_write_requests': 'totalCacheWriteRequests', # (required parameter) 'volume_ref': 'volumeRef', # (required parameter) 'total_cache_write_hits': 'totalCacheWriteHits', # (required parameter) 'total_flash_cache_read_hits': 'totalFlashCacheReadHits' } self._time = None self._total_requests_serviced = None self._total_blocks_requested = None self._total_read_requests = None self._total_read_blocks_requested = None self._total_write_requests = None self._total_write_blocks_requested = None self._percent_read_requests = None self._average_blocks_requested = None self._total_large_reads = None self._total_large_read_blocks_requested = None self._total_large_writes = None self._total_large_write_blocks_requested = None self._total_cache_read_checks = None self._total_cache_read_check_hits = None self._total_cache_write_requests = None self._volume_ref = None self._total_cache_write_hits = None self._total_flash_cache_read_hits = None @property def time(self): """ Gets the time of this VolumePerformance. Timestamp returned by controller with performance metrics. :return: The time of this VolumePerformance. :rtype: int :required/optional: required """ return self._time @time.setter def time(self, time): """ Sets the time of this VolumePerformance. Timestamp returned by controller with performance metrics. :param time: The time of this VolumePerformance. :type: int """ self._time = time @property def total_requests_serviced(self): """ Gets the total_requests_serviced of this VolumePerformance. Total number of requests. :return: The total_requests_serviced of this VolumePerformance. :rtype: int :required/optional: required """ return self._total_requests_serviced @total_requests_serviced.setter def total_requests_serviced(self, total_requests_serviced): """ Sets the total_requests_serviced of this VolumePerformance. Total number of requests. :param total_requests_serviced: The total_requests_serviced of this VolumePerformance. :type: int """ self._total_requests_serviced = total_requests_serviced @property def total_blocks_requested(self): """ Gets the total_blocks_requested of this VolumePerformance. Total number of blocks requested. :return: The total_blocks_requested of this VolumePerformance. :rtype: int :required/optional: required """ return self._total_blocks_requested @total_blocks_requested.setter def total_blocks_requested(self, total_blocks_requested): """ Sets the total_blocks_requested of this VolumePerformance. Total number of blocks requested. :param total_blocks_requested: The total_blocks_requested of this VolumePerformance. :type: int """ self._total_blocks_requested = total_blocks_requested @property def total_read_requests(self): """ Gets the total_read_requests of this VolumePerformance. Total number of read requests. :return: The total_read_requests of this VolumePerformance. :rtype: int :required/optional: required """ return self._total_read_requests @total_read_requests.setter def total_read_requests(self, total_read_requests): """ Sets the total_read_requests of this VolumePerformance. Total number of read requests. :param total_read_requests: The total_read_requests of this VolumePerformance. :type: int """ self._total_read_requests = total_read_requests @property def total_read_blocks_requested(self): """ Gets the total_read_blocks_requested of this VolumePerformance. Total number of read blocks requested. :return: The total_read_blocks_requested of this VolumePerformance. :rtype: int :required/optional: required """ return self._total_read_blocks_requested @total_read_blocks_requested.setter def total_read_blocks_requested(self, total_read_blocks_requested): """ Sets the total_read_blocks_requested of this VolumePerformance. Total number of read blocks requested. :param total_read_blocks_requested: The total_read_blocks_requested of this VolumePerformance. :type: int """ self._total_read_blocks_requested = total_read_blocks_requested @property def total_write_requests(self): """ Gets the total_write_requests of this VolumePerformance. Total number of write requests. :return: The total_write_requests of this VolumePerformance. :rtype: int :required/optional: required """ return self._total_write_requests @total_write_requests.setter def total_write_requests(self, total_write_requests): """ Sets the total_write_requests of this VolumePerformance. Total number of write requests. :param total_write_requests: The total_write_requests of this VolumePerformance. :type: int """ self._total_write_requests = total_write_requests @property def total_write_blocks_requested(self): """ Gets the total_write_blocks_requested of this VolumePerformance. Total number of write blocks requested. :return: The total_write_blocks_requested of this VolumePerformance. :rtype: int :required/optional: required """ return self._total_write_blocks_requested @total_write_blocks_requested.setter def total_write_blocks_requested(self, total_write_blocks_requested): """ Sets the total_write_blocks_requested of this VolumePerformance. Total number of write blocks requested. :param total_write_blocks_requested: The total_write_blocks_requested of this VolumePerformance. :type: int """ self._total_write_blocks_requested = total_write_blocks_requested @property def percent_read_requests(self): """ Gets the percent_read_requests of this VolumePerformance. The percentReadRequests is computed directly as: (totalReadRequests * 100) / totalRequests. :return: The percent_read_requests of this VolumePerformance. :rtype: int :required/optional: required """ return self._percent_read_requests @percent_read_requests.setter def percent_read_requests(self, percent_read_requests): """ Sets the percent_read_requests of this VolumePerformance. The percentReadRequests is computed directly as: (totalReadRequests * 100) / totalRequests. :param percent_read_requests: The percent_read_requests of this VolumePerformance. :type: int """ self._percent_read_requests = percent_read_requests @property def average_blocks_requested(self): """ Gets the average_blocks_requested of this VolumePerformance. Average number of blocks requested. :return: The average_blocks_requested of this VolumePerformance. :rtype: int :required/optional: required """ return self._average_blocks_requested @average_blocks_requested.setter def average_blocks_requested(self, average_blocks_requested): """ Sets the average_blocks_requested of this VolumePerformance. Average number of blocks requested. :param average_blocks_requested: The average_blocks_requested of this VolumePerformance. :type: int """ self._average_blocks_requested = average_blocks_requested @property def total_large_reads(self): """ Gets the total_large_reads of this VolumePerformance. Total number of reads considered large. :return: The total_large_reads of this VolumePerformance. :rtype: int :required/optional: required """ return self._total_large_reads @total_large_reads.setter def total_large_reads(self, total_large_reads): """ Sets the total_large_reads of this VolumePerformance. Total number of reads considered large. :param total_large_reads: The total_large_reads of this VolumePerformance. :type: int """ self._total_large_reads = total_large_reads @property def total_large_read_blocks_requested(self): """ Gets the total_large_read_blocks_requested of this VolumePerformance. Total requested blocks for large reads. :return: The total_large_read_blocks_requested of this VolumePerformance. :rtype: int :required/optional: required """ return self._total_large_read_blocks_requested @total_large_read_blocks_requested.setter def total_large_read_blocks_requested(self, total_large_read_blocks_requested): """ Sets the total_large_read_blocks_requested of this VolumePerformance. Total requested blocks for large reads. :param total_large_read_blocks_requested: The total_large_read_blocks_requested of this VolumePerformance. :type: int """ self._total_large_read_blocks_requested = total_large_read_blocks_requested @property def total_large_writes(self): """ Gets the total_large_writes of this VolumePerformance. Total number of writes considered large. :return: The total_large_writes of this VolumePerformance. :rtype: int :required/optional: required """ return self._total_large_writes @total_large_writes.setter def total_large_writes(self, total_large_writes): """ Sets the total_large_writes of this VolumePerformance. Total number of writes considered large. :param total_large_writes: The total_large_writes of this VolumePerformance. :type: int """ self._total_large_writes = total_large_writes @property def total_large_write_blocks_requested(self): """ Gets the total_large_write_blocks_requested of this VolumePerformance. Total requested blocks for large writes. :return: The total_large_write_blocks_requested of this VolumePerformance. :rtype: int :required/optional: required """ return self._total_large_write_blocks_requested @total_large_write_blocks_requested.setter def total_large_write_blocks_requested(self, total_large_write_blocks_requested): """ Sets the total_large_write_blocks_requested of this VolumePerformance. Total requested blocks for large writes. :param total_large_write_blocks_requested: The total_large_write_blocks_requested of this VolumePerformance. :type: int """ self._total_large_write_blocks_requested = total_large_write_blocks_requested @property def total_cache_read_checks(self): """ Gets the total_cache_read_checks of this VolumePerformance. This field tracks the number of calls to the cache manager to check if a host-initiated read request can be fully satisfied out of cache. :return: The total_cache_read_checks of this VolumePerformance. :rtype: int :required/optional: required """ return self._total_cache_read_checks @total_cache_read_checks.setter def total_cache_read_checks(self, total_cache_read_checks): """ Sets the total_cache_read_checks of this VolumePerformance. This field tracks the number of calls to the cache manager to check if a host-initiated read request can be fully satisfied out of cache. :param total_cache_read_checks: The total_cache_read_checks of this VolumePerformance. :type: int """ self._total_cache_read_checks = total_cache_read_checks @property def total_cache_read_check_hits(self): """ Gets the total_cache_read_check_hits of this VolumePerformance. Number of cache read check hits. :return: The total_cache_read_check_hits of this VolumePerformance. :rtype: int :required/optional: required """ return self._total_cache_read_check_hits @total_cache_read_check_hits.setter def total_cache_read_check_hits(self, total_cache_read_check_hits): """ Sets the total_cache_read_check_hits of this VolumePerformance. Number of cache read check hits. :param total_cache_read_check_hits: The total_cache_read_check_hits of this VolumePerformance. :type: int """ self._total_cache_read_check_hits = total_cache_read_check_hits @property def total_cache_write_requests(self): """ Gets the total_cache_write_requests of this VolumePerformance. Number of cache write requests. (This field is always set to zero by firmware releases prior to 7.10.) :return: The total_cache_write_requests of this VolumePerformance. :rtype: int :required/optional: required """ return self._total_cache_write_requests @total_cache_write_requests.setter def total_cache_write_requests(self, total_cache_write_requests): """ Sets the total_cache_write_requests of this VolumePerformance. Number of cache write requests. (This field is always set to zero by firmware releases prior to 7.10.) :param total_cache_write_requests: The total_cache_write_requests of this VolumePerformance. :type: int """ self._total_cache_write_requests = total_cache_write_requests @property def volume_ref(self): """ Gets the volume_ref of this VolumePerformance. The volume for which this information applies. :return: The volume_ref of this VolumePerformance. :rtype: str :required/optional: required """ return self._volume_ref @volume_ref.setter def volume_ref(self, volume_ref): """ Sets the volume_ref of this VolumePerformance. The volume for which this information applies. :param volume_ref: The volume_ref of this VolumePerformance. :type: str """ self._volume_ref = volume_ref @property def total_cache_write_hits(self): """ Gets the total_cache_write_hits of this VolumePerformance. The number of flash cache write hits. :return: The total_cache_write_hits of this VolumePerformance. :rtype: int :required/optional: required """ return self._total_cache_write_hits @total_cache_write_hits.setter def total_cache_write_hits(self, total_cache_write_hits): """ Sets the total_cache_write_hits of this VolumePerformance. The number of flash cache write hits. :param total_cache_write_hits: The total_cache_write_hits of this VolumePerformance. :type: int """ self._total_cache_write_hits = total_cache_write_hits @property def total_flash_cache_read_hits(self): """ Gets the total_flash_cache_read_hits of this VolumePerformance. The total number of flash cache read hits. :return: The total_flash_cache_read_hits of this VolumePerformance. :rtype: int :required/optional: required """ return self._total_flash_cache_read_hits @total_flash_cache_read_hits.setter def total_flash_cache_read_hits(self, total_flash_cache_read_hits): """ Sets the total_flash_cache_read_hits of this VolumePerformance. The total number of flash cache read hits. :param total_flash_cache_read_hits: The total_flash_cache_read_hits of this VolumePerformance. :type: int """ self._total_flash_cache_read_hits = total_flash_cache_read_hits
[docs] def to_dict(self): """ Returns the model properties as a dict """ result = {} for attr, _ in iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result
[docs] def to_str(self): """ Returns the string representation of the model """ return pformat(self.to_dict())
def __repr__(self): """ For `print` and `pprint` """ if self is None: return None return self.to_str() def __eq__(self, other): """ Returns true if both objects are equal """ if self is None or other is None: return None return self.__dict__ == other.__dict__ def __ne__(self, other): """ Returns true if both objects are not equal """ return not self == other