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

# coding: utf-8

"""
VolumeGroupExpansionCandidate.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 VolumeGroupExpansionCandidate(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self): """ VolumeGroupExpansionCandidate - 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 = { 'drives': 'list[str]', # (required parameter) 'tray_loss_protection': 'bool', # (required parameter) 'wasted_capacity': 'int', # (required parameter) 'spindle_speed_match': 'bool', # (required parameter) 'drawer_loss_protection': 'bool', # (required parameter) 'usable_capacity': 'int', # (required parameter) 'drive_block_format': 'str' } self.attribute_map = { 'drives': 'drives', # (required parameter) 'tray_loss_protection': 'trayLossProtection', # (required parameter) 'wasted_capacity': 'wastedCapacity', # (required parameter) 'spindle_speed_match': 'spindleSpeedMatch', # (required parameter) 'drawer_loss_protection': 'drawerLossProtection', # (required parameter) 'usable_capacity': 'usableCapacity', # (required parameter) 'drive_block_format': 'driveBlockFormat' } self._drives = None self._tray_loss_protection = None self._wasted_capacity = None self._spindle_speed_match = None self._drawer_loss_protection = None self._usable_capacity = None self._drive_block_format = None @property def drives(self): """ Gets the drives of this VolumeGroupExpansionCandidate. An array of references to drives comprising the set that can be used to expand the volume group. :return: The drives of this VolumeGroupExpansionCandidate. :rtype: list[str] :required/optional: required """ return self._drives @drives.setter def drives(self, drives): """ Sets the drives of this VolumeGroupExpansionCandidate. An array of references to drives comprising the set that can be used to expand the volume group. :param drives: The drives of this VolumeGroupExpansionCandidate. :type: list[str] """ self._drives = drives @property def tray_loss_protection(self): """ Gets the tray_loss_protection of this VolumeGroupExpansionCandidate. Set to true if the expanded volume group will have tray loss protection. :return: The tray_loss_protection of this VolumeGroupExpansionCandidate. :rtype: bool :required/optional: required """ return self._tray_loss_protection @tray_loss_protection.setter def tray_loss_protection(self, tray_loss_protection): """ Sets the tray_loss_protection of this VolumeGroupExpansionCandidate. Set to true if the expanded volume group will have tray loss protection. :param tray_loss_protection: The tray_loss_protection of this VolumeGroupExpansionCandidate. :type: bool """ self._tray_loss_protection = tray_loss_protection @property def wasted_capacity(self): """ Gets the wasted_capacity of this VolumeGroupExpansionCandidate. The number of bytes of wasted capacity in the given drive set if is used to expand the volume. Wasting of capacity occurs when the drives in the set are larger than the drives in the volume group being expanded. :return: The wasted_capacity of this VolumeGroupExpansionCandidate. :rtype: int :required/optional: required """ return self._wasted_capacity @wasted_capacity.setter def wasted_capacity(self, wasted_capacity): """ Sets the wasted_capacity of this VolumeGroupExpansionCandidate. The number of bytes of wasted capacity in the given drive set if is used to expand the volume. Wasting of capacity occurs when the drives in the set are larger than the drives in the volume group being expanded. :param wasted_capacity: The wasted_capacity of this VolumeGroupExpansionCandidate. :type: int """ self._wasted_capacity = wasted_capacity @property def spindle_speed_match(self): """ Gets the spindle_speed_match of this VolumeGroupExpansionCandidate. Set to true if the expanded volume group will have uniform spindle speed across its drives. :return: The spindle_speed_match of this VolumeGroupExpansionCandidate. :rtype: bool :required/optional: required """ return self._spindle_speed_match @spindle_speed_match.setter def spindle_speed_match(self, spindle_speed_match): """ Sets the spindle_speed_match of this VolumeGroupExpansionCandidate. Set to true if the expanded volume group will have uniform spindle speed across its drives. :param spindle_speed_match: The spindle_speed_match of this VolumeGroupExpansionCandidate. :type: bool """ self._spindle_speed_match = spindle_speed_match @property def drawer_loss_protection(self): """ Gets the drawer_loss_protection of this VolumeGroupExpansionCandidate. Set to true if the expanded volume group will have drawer loss protection. :return: The drawer_loss_protection of this VolumeGroupExpansionCandidate. :rtype: bool :required/optional: required """ return self._drawer_loss_protection @drawer_loss_protection.setter def drawer_loss_protection(self, drawer_loss_protection): """ Sets the drawer_loss_protection of this VolumeGroupExpansionCandidate. Set to true if the expanded volume group will have drawer loss protection. :param drawer_loss_protection: The drawer_loss_protection of this VolumeGroupExpansionCandidate. :type: bool """ self._drawer_loss_protection = drawer_loss_protection @property def usable_capacity(self): """ Gets the usable_capacity of this VolumeGroupExpansionCandidate. The total usable capacity of the expansion candidate in bytes. :return: The usable_capacity of this VolumeGroupExpansionCandidate. :rtype: int :required/optional: required """ return self._usable_capacity @usable_capacity.setter def usable_capacity(self, usable_capacity): """ Sets the usable_capacity of this VolumeGroupExpansionCandidate. The total usable capacity of the expansion candidate in bytes. :param usable_capacity: The usable_capacity of this VolumeGroupExpansionCandidate. :type: int """ self._usable_capacity = usable_capacity @property def drive_block_format(self): """ Gets the drive_block_format of this VolumeGroupExpansionCandidate. Identifies the drive block format of the volume candidate. :return: The drive_block_format of this VolumeGroupExpansionCandidate. :rtype: str :required/optional: required """ return self._drive_block_format @drive_block_format.setter def drive_block_format(self, drive_block_format): """ Sets the drive_block_format of this VolumeGroupExpansionCandidate. Identifies the drive block format of the volume candidate. :param drive_block_format: The drive_block_format of this VolumeGroupExpansionCandidate. :type: str """ allowed_values = ["unknown", "allNative", "allEmulated", "mixed", "__UNDEFINED"] if drive_block_format not in allowed_values: raise ValueError( "Invalid value for `drive_block_format`, must be one of {0}" .format(allowed_values) ) self._drive_block_format = drive_block_format
[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