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

# coding: utf-8

"""
ThinVolume.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 ThinVolume(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self): """ ThinVolume - 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 = { 'volume_handle': 'int', # (required parameter) 'world_wide_name': 'str', # (required parameter) 'label': 'str', # (required parameter) 'allocation_granularity': 'int', # (required parameter) 'capacity': 'int', # (required parameter) 'recon_priority': 'int', # (required parameter) 'volume_ref': 'str', # (required parameter) 'status': 'str', # (required parameter) 'repository_ref': 'str', # (required parameter) 'current_manager': 'str', # (required parameter) 'preferred_manager': 'str', # (required parameter) 'perms': 'VolumePerms', # (required parameter) 'mgmt_client_attribute': 'int', # (required parameter) 'pre_read_redundancy_check_enabled': 'bool', # (required parameter) 'protection_type': 'str', # (required parameter) 'application_tag_owned': 'bool', # (required parameter) 'max_virtual_capacity': 'int', # (required parameter) 'initial_provisioned_capacity': 'int', # (required parameter) 'current_provisioned_capacity': 'int', # (required parameter) 'provisioned_capacity_quota': 'int', # (required parameter) 'growth_alert_threshold': 'int', # (required parameter) 'expansion_policy': 'str', # (required parameter) 'volume_cache': 'VolumeCache', # (required parameter) 'offline': 'bool', # (required parameter) 'reporting_policy': 'str', # (required parameter) 'id': 'str' } self.attribute_map = { 'volume_handle': 'volumeHandle', # (required parameter) 'world_wide_name': 'worldWideName', # (required parameter) 'label': 'label', # (required parameter) 'allocation_granularity': 'allocationGranularity', # (required parameter) 'capacity': 'capacity', # (required parameter) 'recon_priority': 'reconPriority', # (required parameter) 'volume_ref': 'volumeRef', # (required parameter) 'status': 'status', # (required parameter) 'repository_ref': 'repositoryRef', # (required parameter) 'current_manager': 'currentManager', # (required parameter) 'preferred_manager': 'preferredManager', # (required parameter) 'perms': 'perms', # (required parameter) 'mgmt_client_attribute': 'mgmtClientAttribute', # (required parameter) 'pre_read_redundancy_check_enabled': 'preReadRedundancyCheckEnabled', # (required parameter) 'protection_type': 'protectionType', # (required parameter) 'application_tag_owned': 'applicationTagOwned', # (required parameter) 'max_virtual_capacity': 'maxVirtualCapacity', # (required parameter) 'initial_provisioned_capacity': 'initialProvisionedCapacity', # (required parameter) 'current_provisioned_capacity': 'currentProvisionedCapacity', # (required parameter) 'provisioned_capacity_quota': 'provisionedCapacityQuota', # (required parameter) 'growth_alert_threshold': 'growthAlertThreshold', # (required parameter) 'expansion_policy': 'expansionPolicy', # (required parameter) 'volume_cache': 'volumeCache', # (required parameter) 'offline': 'offline', # (required parameter) 'reporting_policy': 'reportingPolicy', # (required parameter) 'id': 'id' } self._volume_handle = None self._world_wide_name = None self._label = None self._allocation_granularity = None self._capacity = None self._recon_priority = None self._volume_ref = None self._status = None self._repository_ref = None self._current_manager = None self._preferred_manager = None self._perms = None self._mgmt_client_attribute = None self._pre_read_redundancy_check_enabled = None self._protection_type = None self._application_tag_owned = None self._max_virtual_capacity = None self._initial_provisioned_capacity = None self._current_provisioned_capacity = None self._provisioned_capacity_quota = None self._growth_alert_threshold = None self._expansion_policy = None self._volume_cache = None self._offline = None self._reporting_policy = None self._id = None @property def volume_handle(self): """ Gets the volume_handle of this ThinVolume. The volumeHandle (SSID) for this volume. :return: The volume_handle of this ThinVolume. :rtype: int :required/optional: required """ return self._volume_handle @volume_handle.setter def volume_handle(self, volume_handle): """ Sets the volume_handle of this ThinVolume. The volumeHandle (SSID) for this volume. :param volume_handle: The volume_handle of this ThinVolume. :type: int """ self._volume_handle = volume_handle @property def world_wide_name(self): """ Gets the world_wide_name of this ThinVolume. The World wide name of the volume. :return: The world_wide_name of this ThinVolume. :rtype: str :required/optional: required """ return self._world_wide_name @world_wide_name.setter def world_wide_name(self, world_wide_name): """ Sets the world_wide_name of this ThinVolume. The World wide name of the volume. :param world_wide_name: The world_wide_name of this ThinVolume. :type: str """ self._world_wide_name = world_wide_name @property def label(self): """ Gets the label of this ThinVolume. The name of the volume. :return: The label of this ThinVolume. :rtype: str :required/optional: required """ return self._label @label.setter def label(self, label): """ Sets the label of this ThinVolume. The name of the volume. :param label: The label of this ThinVolume. :type: str """ self._label = label @property def allocation_granularity(self): """ Gets the allocation_granularity of this ThinVolume. The allocation cluster size for the Expandable Repository Volume. :return: The allocation_granularity of this ThinVolume. :rtype: int :required/optional: required """ return self._allocation_granularity @allocation_granularity.setter def allocation_granularity(self, allocation_granularity): """ Sets the allocation_granularity of this ThinVolume. The allocation cluster size for the Expandable Repository Volume. :param allocation_granularity: The allocation_granularity of this ThinVolume. :type: int """ self._allocation_granularity = allocation_granularity @property def capacity(self): """ Gets the capacity of this ThinVolume. The virtual capacity of the volume in bytes. :return: The capacity of this ThinVolume. :rtype: int :required/optional: required """ return self._capacity @capacity.setter def capacity(self, capacity): """ Sets the capacity of this ThinVolume. The virtual capacity of the volume in bytes. :param capacity: The capacity of this ThinVolume. :type: int """ self._capacity = capacity @property def recon_priority(self): """ Gets the recon_priority of this ThinVolume. Importance of fixing the volume if failed (0-4). :return: The recon_priority of this ThinVolume. :rtype: int :required/optional: required """ return self._recon_priority @recon_priority.setter def recon_priority(self, recon_priority): """ Sets the recon_priority of this ThinVolume. Importance of fixing the volume if failed (0-4). :param recon_priority: The recon_priority of this ThinVolume. :type: int """ self._recon_priority = recon_priority @property def volume_ref(self): """ Gets the volume_ref of this ThinVolume. The reference (key) for this volume. :return: The volume_ref of this ThinVolume. :rtype: str :required/optional: required """ return self._volume_ref @volume_ref.setter def volume_ref(self, volume_ref): """ Sets the volume_ref of this ThinVolume. The reference (key) for this volume. :param volume_ref: The volume_ref of this ThinVolume. :type: str """ self._volume_ref = volume_ref @property def status(self): """ Gets the status of this ThinVolume. The operational status of the volume. :return: The status of this ThinVolume. :rtype: str :required/optional: required """ return self._status @status.setter def status(self, status): """ Sets the status of this ThinVolume. The operational status of the volume. :param status: The status of this ThinVolume. :type: str """ allowed_values = ["unknown", "optimal", "full", "overThresh", "failed", "initializing", "__UNDEFINED"] if status not in allowed_values: raise ValueError( "Invalid value for `status`, must be one of {0}" .format(allowed_values) ) self._status = status @property def repository_ref(self): """ Gets the repository_ref of this ThinVolume. The Expandable Repository Volume underlying this Thin Volume. :return: The repository_ref of this ThinVolume. :rtype: str :required/optional: required """ return self._repository_ref @repository_ref.setter def repository_ref(self, repository_ref): """ Sets the repository_ref of this ThinVolume. The Expandable Repository Volume underlying this Thin Volume. :param repository_ref: The repository_ref of this ThinVolume. :type: str """ self._repository_ref = repository_ref @property def current_manager(self): """ Gets the current_manager of this ThinVolume. The controller that currently manages the volume. :return: The current_manager of this ThinVolume. :rtype: str :required/optional: required """ return self._current_manager @current_manager.setter def current_manager(self, current_manager): """ Sets the current_manager of this ThinVolume. The controller that currently manages the volume. :param current_manager: The current_manager of this ThinVolume. :type: str """ self._current_manager = current_manager @property def preferred_manager(self): """ Gets the preferred_manager of this ThinVolume. The controller that should manage the volume. :return: The preferred_manager of this ThinVolume. :rtype: str :required/optional: required """ return self._preferred_manager @preferred_manager.setter def preferred_manager(self, preferred_manager): """ Sets the preferred_manager of this ThinVolume. The controller that should manage the volume. :param preferred_manager: The preferred_manager of this ThinVolume. :type: str """ self._preferred_manager = preferred_manager @property def perms(self): """ Gets the perms of this ThinVolume. Operations allowed on this volume. :return: The perms of this ThinVolume. :rtype: VolumePerms :required/optional: required """ return self._perms @perms.setter def perms(self, perms): """ Sets the perms of this ThinVolume. Operations allowed on this volume. :param perms: The perms of this ThinVolume. :type: VolumePerms """ self._perms = perms @property def mgmt_client_attribute(self): """ Gets the mgmt_client_attribute of this ThinVolume. For use by management client. :return: The mgmt_client_attribute of this ThinVolume. :rtype: int :required/optional: required """ return self._mgmt_client_attribute @mgmt_client_attribute.setter def mgmt_client_attribute(self, mgmt_client_attribute): """ Sets the mgmt_client_attribute of this ThinVolume. For use by management client. :param mgmt_client_attribute: The mgmt_client_attribute of this ThinVolume. :type: int """ self._mgmt_client_attribute = mgmt_client_attribute @property def pre_read_redundancy_check_enabled(self): """ Gets the pre_read_redundancy_check_enabled of this ThinVolume. If true, verify RAID redundancy on read operations. :return: The pre_read_redundancy_check_enabled of this ThinVolume. :rtype: bool :required/optional: required """ return self._pre_read_redundancy_check_enabled @pre_read_redundancy_check_enabled.setter def pre_read_redundancy_check_enabled(self, pre_read_redundancy_check_enabled): """ Sets the pre_read_redundancy_check_enabled of this ThinVolume. If true, verify RAID redundancy on read operations. :param pre_read_redundancy_check_enabled: The pre_read_redundancy_check_enabled of this ThinVolume. :type: bool """ self._pre_read_redundancy_check_enabled = pre_read_redundancy_check_enabled @property def protection_type(self): """ Gets the protection_type of this ThinVolume. The protection type of the volume. :return: The protection_type of this ThinVolume. :rtype: str :required/optional: required """ return self._protection_type @protection_type.setter def protection_type(self, protection_type): """ Sets the protection_type of this ThinVolume. The protection type of the volume. :param protection_type: The protection_type of this ThinVolume. :type: str """ allowed_values = ["type0Protection", "type1Protection", "type2Protection", "type3Protection", "__UNDEFINED"] if protection_type not in allowed_values: raise ValueError( "Invalid value for `protection_type`, must be one of {0}" .format(allowed_values) ) self._protection_type = protection_type @property def application_tag_owned(self): """ Gets the application_tag_owned of this ThinVolume. True if application tag is owned by the storage array. :return: The application_tag_owned of this ThinVolume. :rtype: bool :required/optional: required """ return self._application_tag_owned @application_tag_owned.setter def application_tag_owned(self, application_tag_owned): """ Sets the application_tag_owned of this ThinVolume. True if application tag is owned by the storage array. :param application_tag_owned: The application_tag_owned of this ThinVolume. :type: bool """ self._application_tag_owned = application_tag_owned @property def max_virtual_capacity(self): """ Gets the max_virtual_capacity of this ThinVolume. The maximum virtual capacity to which this thin volume can grow (in bytes). :return: The max_virtual_capacity of this ThinVolume. :rtype: int :required/optional: required """ return self._max_virtual_capacity @max_virtual_capacity.setter def max_virtual_capacity(self, max_virtual_capacity): """ Sets the max_virtual_capacity of this ThinVolume. The maximum virtual capacity to which this thin volume can grow (in bytes). :param max_virtual_capacity: The max_virtual_capacity of this ThinVolume. :type: int """ self._max_virtual_capacity = max_virtual_capacity @property def initial_provisioned_capacity(self): """ Gets the initial_provisioned_capacity of this ThinVolume. The initial provisioned capacity for the Expandable Repository Volume for this thin volume (in bytes). :return: The initial_provisioned_capacity of this ThinVolume. :rtype: int :required/optional: required """ return self._initial_provisioned_capacity @initial_provisioned_capacity.setter def initial_provisioned_capacity(self, initial_provisioned_capacity): """ Sets the initial_provisioned_capacity of this ThinVolume. The initial provisioned capacity for the Expandable Repository Volume for this thin volume (in bytes). :param initial_provisioned_capacity: The initial_provisioned_capacity of this ThinVolume. :type: int """ self._initial_provisioned_capacity = initial_provisioned_capacity @property def current_provisioned_capacity(self): """ Gets the current_provisioned_capacity of this ThinVolume. The current provisioned capacity of the Expandable Repository Volume (in bytes). :return: The current_provisioned_capacity of this ThinVolume. :rtype: int :required/optional: required """ return self._current_provisioned_capacity @current_provisioned_capacity.setter def current_provisioned_capacity(self, current_provisioned_capacity): """ Sets the current_provisioned_capacity of this ThinVolume. The current provisioned capacity of the Expandable Repository Volume (in bytes). :param current_provisioned_capacity: The current_provisioned_capacity of this ThinVolume. :type: int """ self._current_provisioned_capacity = current_provisioned_capacity @property def provisioned_capacity_quota(self): """ Gets the provisioned_capacity_quota of this ThinVolume. The maximum capacity of the Expandable Repository Volume (in bytes). :return: The provisioned_capacity_quota of this ThinVolume. :rtype: int :required/optional: required """ return self._provisioned_capacity_quota @provisioned_capacity_quota.setter def provisioned_capacity_quota(self, provisioned_capacity_quota): """ Sets the provisioned_capacity_quota of this ThinVolume. The maximum capacity of the Expandable Repository Volume (in bytes). :param provisioned_capacity_quota: The provisioned_capacity_quota of this ThinVolume. :type: int """ self._provisioned_capacity_quota = provisioned_capacity_quota @property def growth_alert_threshold(self): """ Gets the growth_alert_threshold of this ThinVolume. The percent value at which an alert is generated. :return: The growth_alert_threshold of this ThinVolume. :rtype: int :required/optional: required """ return self._growth_alert_threshold @growth_alert_threshold.setter def growth_alert_threshold(self, growth_alert_threshold): """ Sets the growth_alert_threshold of this ThinVolume. The percent value at which an alert is generated. :param growth_alert_threshold: The growth_alert_threshold of this ThinVolume. :type: int """ self._growth_alert_threshold = growth_alert_threshold @property def expansion_policy(self): """ Gets the expansion_policy of this ThinVolume. The automatic Expandable Repository Volume expansion policy. :return: The expansion_policy of this ThinVolume. :rtype: str :required/optional: required """ return self._expansion_policy @expansion_policy.setter def expansion_policy(self, expansion_policy): """ Sets the expansion_policy of this ThinVolume. The automatic Expandable Repository Volume expansion policy. :param expansion_policy: The expansion_policy of this ThinVolume. :type: str """ allowed_values = ["unknown", "manual", "automatic", "__UNDEFINED"] if expansion_policy not in allowed_values: raise ValueError( "Invalid value for `expansion_policy`, must be one of {0}" .format(allowed_values) ) self._expansion_policy = expansion_policy @property def volume_cache(self): """ Gets the volume_cache of this ThinVolume. The cache parameters of the underlying repository. :return: The volume_cache of this ThinVolume. :rtype: VolumeCache :required/optional: required """ return self._volume_cache @volume_cache.setter def volume_cache(self, volume_cache): """ Sets the volume_cache of this ThinVolume. The cache parameters of the underlying repository. :param volume_cache: The volume_cache of this ThinVolume. :type: VolumeCache """ self._volume_cache = volume_cache @property def offline(self): """ Gets the offline of this ThinVolume. The thin volume is offline due to the associated repository volume state. :return: The offline of this ThinVolume. :rtype: bool :required/optional: required """ return self._offline @offline.setter def offline(self, offline): """ Sets the offline of this ThinVolume. The thin volume is offline due to the associated repository volume state. :param offline: The offline of this ThinVolume. :type: bool """ self._offline = offline @property def reporting_policy(self): """ Gets the reporting_policy of this ThinVolume. Indicates how the thin volume is reported on the SCSI interface. :return: The reporting_policy of this ThinVolume. :rtype: str :required/optional: required """ return self._reporting_policy @reporting_policy.setter def reporting_policy(self, reporting_policy): """ Sets the reporting_policy of this ThinVolume. Indicates how the thin volume is reported on the SCSI interface. :param reporting_policy: The reporting_policy of this ThinVolume. :type: str """ allowed_values = ["unknown", "asThick", "asThin", "__UNDEFINED"] if reporting_policy not in allowed_values: raise ValueError( "Invalid value for `reporting_policy`, must be one of {0}" .format(allowed_values) ) self._reporting_policy = reporting_policy @property def id(self): """ Gets the id of this ThinVolume. :return: The id of this ThinVolume. :rtype: str :required/optional: optional """ return self._id @id.setter def id(self, id): """ Sets the id of this ThinVolume. :param id: The id of this ThinVolume. :type: str """ self._id = id
[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