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

# coding: utf-8

"""
VolumeGroup.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 VolumeGroup(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self): """ VolumeGroup - 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 = { 'sequence_num': 'int', # (required parameter) 'offline': 'bool', # (required parameter) 'raid_level': 'str', # (required parameter) 'world_wide_name': 'str', # (required parameter) 'volume_group_ref': 'str', # (required parameter) 'reserved1': 'str', 'reserved2': 'str', 'tray_loss_protection': 'bool', # (required parameter) 'label': 'str', # (required parameter) 'state': 'str', # (required parameter) 'spindle_speed_match': 'bool', # (required parameter) 'spindle_speed': 'int', # (required parameter) 'is_inaccessible': 'bool', # (required parameter) 'security_type': 'str', # (required parameter) 'drawer_loss_protection': 'bool', # (required parameter) 'protection_information_capable': 'bool', # (required parameter) 'protection_information_capabilities': 'ProtectionInformationCapabilities', # (required parameter) 'volume_group_data': 'VolumeGroupTypeData', # (required parameter) 'usage': 'str', # (required parameter) 'drive_block_format': 'str', # (required parameter) 'reserved_space_allocated': 'bool', # (required parameter) 'security_level': 'str', # (required parameter) 'name': 'str', 'id': 'str' } self.attribute_map = { 'sequence_num': 'sequenceNum', # (required parameter) 'offline': 'offline', # (required parameter) 'raid_level': 'raidLevel', # (required parameter) 'world_wide_name': 'worldWideName', # (required parameter) 'volume_group_ref': 'volumeGroupRef', # (required parameter) 'reserved1': 'reserved1', 'reserved2': 'reserved2', 'tray_loss_protection': 'trayLossProtection', # (required parameter) 'label': 'label', # (required parameter) 'state': 'state', # (required parameter) 'spindle_speed_match': 'spindleSpeedMatch', # (required parameter) 'spindle_speed': 'spindleSpeed', # (required parameter) 'is_inaccessible': 'isInaccessible', # (required parameter) 'security_type': 'securityType', # (required parameter) 'drawer_loss_protection': 'drawerLossProtection', # (required parameter) 'protection_information_capable': 'protectionInformationCapable', # (required parameter) 'protection_information_capabilities': 'protectionInformationCapabilities', # (required parameter) 'volume_group_data': 'volumeGroupData', # (required parameter) 'usage': 'usage', # (required parameter) 'drive_block_format': 'driveBlockFormat', # (required parameter) 'reserved_space_allocated': 'reservedSpaceAllocated', # (required parameter) 'security_level': 'securityLevel', # (required parameter) 'name': 'name', 'id': 'id' } self._sequence_num = None self._offline = None self._raid_level = None self._world_wide_name = None self._volume_group_ref = None self._reserved1 = None self._reserved2 = None self._tray_loss_protection = None self._label = None self._state = None self._spindle_speed_match = None self._spindle_speed = None self._is_inaccessible = None self._security_type = None self._drawer_loss_protection = None self._protection_information_capable = None self._protection_information_capabilities = None self._volume_group_data = None self._usage = None self._drive_block_format = None self._reserved_space_allocated = None self._security_level = None self._name = None self._id = None @property def sequence_num(self): """ Gets the sequence_num of this VolumeGroup. A sequence number that uniquely identifies this volume group within the array in which it resides. Sequence numbers are assigned to volume groups when they are created or imported into a storage array. The controller assigns the lowest unused sequence number during a creation or import operation. :return: The sequence_num of this VolumeGroup. :rtype: int :required/optional: required """ return self._sequence_num @sequence_num.setter def sequence_num(self, sequence_num): """ Sets the sequence_num of this VolumeGroup. A sequence number that uniquely identifies this volume group within the array in which it resides. Sequence numbers are assigned to volume groups when they are created or imported into a storage array. The controller assigns the lowest unused sequence number during a creation or import operation. :param sequence_num: The sequence_num of this VolumeGroup. :type: int """ self._sequence_num = sequence_num @property def offline(self): """ Gets the offline of this VolumeGroup. An indication of whether the volume group is currently offline. A volume group can be taken offline by the operator in preparation for removing its drives and transporting them to another storage array. :return: The offline of this VolumeGroup. :rtype: bool :required/optional: required """ return self._offline @offline.setter def offline(self, offline): """ Sets the offline of this VolumeGroup. An indication of whether the volume group is currently offline. A volume group can be taken offline by the operator in preparation for removing its drives and transporting them to another storage array. :param offline: The offline of this VolumeGroup. :type: bool """ self._offline = offline @property def raid_level(self): """ Gets the raid_level of this VolumeGroup. The RAID level associated with this volume group. If the storage array supports multiple RAID levels per volume group, this value will be set to RAID_ALL. Otherwise, it will indicate the precise RAID level defined for the volume group. :return: The raid_level of this VolumeGroup. :rtype: str :required/optional: required """ return self._raid_level @raid_level.setter def raid_level(self, raid_level): """ Sets the raid_level of this VolumeGroup. The RAID level associated with this volume group. If the storage array supports multiple RAID levels per volume group, this value will be set to RAID_ALL. Otherwise, it will indicate the precise RAID level defined for the volume group. :param raid_level: The raid_level of this VolumeGroup. :type: str """ allowed_values = ["raidUnsupported", "raidAll", "raid0", "raid1", "raid3", "raid5", "raid6", "raidDiskPool", "__UNDEFINED"] if raid_level not in allowed_values: raise ValueError( "Invalid value for `raid_level`, must be one of {0}" .format(allowed_values) ) self._raid_level = raid_level @property def world_wide_name(self): """ Gets the world_wide_name of this VolumeGroup. A variable-length opaque field that provides the volume group's worldwide unique identification value. :return: The world_wide_name of this VolumeGroup. :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 VolumeGroup. A variable-length opaque field that provides the volume group's worldwide unique identification value. :param world_wide_name: The world_wide_name of this VolumeGroup. :type: str """ self._world_wide_name = world_wide_name @property def volume_group_ref(self): """ Gets the volume_group_ref of this VolumeGroup. The unique identification value for this volume group. Other objects may use this reference value to refer to the volume group. :return: The volume_group_ref of this VolumeGroup. :rtype: str :required/optional: required """ return self._volume_group_ref @volume_group_ref.setter def volume_group_ref(self, volume_group_ref): """ Sets the volume_group_ref of this VolumeGroup. The unique identification value for this volume group. Other objects may use this reference value to refer to the volume group. :param volume_group_ref: The volume_group_ref of this VolumeGroup. :type: str """ self._volume_group_ref = volume_group_ref @property def reserved1(self): """ Gets the reserved1 of this VolumeGroup. :return: The reserved1 of this VolumeGroup. :rtype: str :required/optional: optional """ return self._reserved1 @reserved1.setter def reserved1(self, reserved1): """ Sets the reserved1 of this VolumeGroup. :param reserved1: The reserved1 of this VolumeGroup. :type: str """ self._reserved1 = reserved1 @property def reserved2(self): """ Gets the reserved2 of this VolumeGroup. :return: The reserved2 of this VolumeGroup. :rtype: str :required/optional: optional """ return self._reserved2 @reserved2.setter def reserved2(self, reserved2): """ Sets the reserved2 of this VolumeGroup. :param reserved2: The reserved2 of this VolumeGroup. :type: str """ self._reserved2 = reserved2 @property def tray_loss_protection(self): """ Gets the tray_loss_protection of this VolumeGroup. An indication as to whether the volume group has tray loss protection. :return: The tray_loss_protection of this VolumeGroup. :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 VolumeGroup. An indication as to whether the volume group has tray loss protection. :param tray_loss_protection: The tray_loss_protection of this VolumeGroup. :type: bool """ self._tray_loss_protection = tray_loss_protection @property def label(self): """ Gets the label of this VolumeGroup. The volume group label, which can be set by the user. :return: The label of this VolumeGroup. :rtype: str :required/optional: required """ return self._label @label.setter def label(self, label): """ Sets the label of this VolumeGroup. The volume group label, which can be set by the user. :param label: The label of this VolumeGroup. :type: str """ self._label = label @property def state(self): """ Gets the state of this VolumeGroup. The state of the volume group. :return: The state of this VolumeGroup. :rtype: str :required/optional: required """ return self._state @state.setter def state(self, state): """ Sets the state of this VolumeGroup. The state of the volume group. :param state: The state of this VolumeGroup. :type: str """ allowed_values = ["contingent", "exported", "forced", "complete", "partial", "incomplete", "missing", "__UNDEFINED"] if state not in allowed_values: raise ValueError( "Invalid value for `state`, must be one of {0}" .format(allowed_values) ) self._state = state @property def spindle_speed_match(self): """ Gets the spindle_speed_match of this VolumeGroup. Set to true if all of the drives in the group have matching normalized spindle speeds. (Normalized spindle speeds are standardized norms (e.g., 5400, 7200, etc.) that are used for spindle speed matching, even though actual spindle speeds may be within a designated delta of the normalized speed.) :return: The spindle_speed_match of this VolumeGroup. :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 VolumeGroup. Set to true if all of the drives in the group have matching normalized spindle speeds. (Normalized spindle speeds are standardized norms (e.g., 5400, 7200, etc.) that are used for spindle speed matching, even though actual spindle speeds may be within a designated delta of the normalized speed.) :param spindle_speed_match: The spindle_speed_match of this VolumeGroup. :type: bool """ self._spindle_speed_match = spindle_speed_match @property def spindle_speed(self): """ Gets the spindle_speed of this VolumeGroup. Set to true if all of the drives in the group have matching normalized spindle speeds. (Normalized spindle speeds are standardized norms (e.g., 5400, 7200, etc.) that are used for spindle speed matching, even though actual spindle speeds may be within a designated delta of the normalized speed.) :return: The spindle_speed of this VolumeGroup. :rtype: int :required/optional: required """ return self._spindle_speed @spindle_speed.setter def spindle_speed(self, spindle_speed): """ Sets the spindle_speed of this VolumeGroup. Set to true if all of the drives in the group have matching normalized spindle speeds. (Normalized spindle speeds are standardized norms (e.g., 5400, 7200, etc.) that are used for spindle speed matching, even though actual spindle speeds may be within a designated delta of the normalized speed.) :param spindle_speed: The spindle_speed of this VolumeGroup. :type: int """ self._spindle_speed = spindle_speed @property def is_inaccessible(self): """ Gets the is_inaccessible of this VolumeGroup. True if the volume group contains incompatible drives that have been locked out. :return: The is_inaccessible of this VolumeGroup. :rtype: bool :required/optional: required """ return self._is_inaccessible @is_inaccessible.setter def is_inaccessible(self, is_inaccessible): """ Sets the is_inaccessible of this VolumeGroup. True if the volume group contains incompatible drives that have been locked out. :param is_inaccessible: The is_inaccessible of this VolumeGroup. :type: bool """ self._is_inaccessible = is_inaccessible @property def security_type(self): """ Gets the security_type of this VolumeGroup. security status of the drive group :return: The security_type of this VolumeGroup. :rtype: str :required/optional: required """ return self._security_type @security_type.setter def security_type(self, security_type): """ Sets the security_type of this VolumeGroup. security status of the drive group :param security_type: The security_type of this VolumeGroup. :type: str """ allowed_values = ["unknown", "none", "capable", "enabled", "__UNDEFINED"] if security_type not in allowed_values: raise ValueError( "Invalid value for `security_type`, must be one of {0}" .format(allowed_values) ) self._security_type = security_type @property def drawer_loss_protection(self): """ Gets the drawer_loss_protection of this VolumeGroup. This field is set to true when the volume group has drawer loss protection; otherwise it is set to false :return: The drawer_loss_protection of this VolumeGroup. :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 VolumeGroup. This field is set to true when the volume group has drawer loss protection; otherwise it is set to false :param drawer_loss_protection: The drawer_loss_protection of this VolumeGroup. :type: bool """ self._drawer_loss_protection = drawer_loss_protection @property def protection_information_capable(self): """ Gets the protection_information_capable of this VolumeGroup. This field is no longer used. :return: The protection_information_capable of this VolumeGroup. :rtype: bool :required/optional: required """ return self._protection_information_capable @protection_information_capable.setter def protection_information_capable(self, protection_information_capable): """ Sets the protection_information_capable of this VolumeGroup. This field is no longer used. :param protection_information_capable: The protection_information_capable of this VolumeGroup. :type: bool """ self._protection_information_capable = protection_information_capable @property def protection_information_capabilities(self): """ Gets the protection_information_capabilities of this VolumeGroup. This structure contains a protectionInformationCapable field which is set to true if all drives in the volume group are Protection Information (PI) capable. It also contains a field that is set to the protection type for the volume group. :return: The protection_information_capabilities of this VolumeGroup. :rtype: ProtectionInformationCapabilities :required/optional: required """ return self._protection_information_capabilities @protection_information_capabilities.setter def protection_information_capabilities(self, protection_information_capabilities): """ Sets the protection_information_capabilities of this VolumeGroup. This structure contains a protectionInformationCapable field which is set to true if all drives in the volume group are Protection Information (PI) capable. It also contains a field that is set to the protection type for the volume group. :param protection_information_capabilities: The protection_information_capabilities of this VolumeGroup. :type: ProtectionInformationCapabilities """ self._protection_information_capabilities = protection_information_capabilities @property def volume_group_data(self): """ Gets the volume_group_data of this VolumeGroup. Information about the Volume Group. :return: The volume_group_data of this VolumeGroup. :rtype: VolumeGroupTypeData :required/optional: required """ return self._volume_group_data @volume_group_data.setter def volume_group_data(self, volume_group_data): """ Sets the volume_group_data of this VolumeGroup. Information about the Volume Group. :param volume_group_data: The volume_group_data of this VolumeGroup. :type: VolumeGroupTypeData """ self._volume_group_data = volume_group_data @property def usage(self): """ Gets the usage of this VolumeGroup. the volume group usage. :return: The usage of this VolumeGroup. :rtype: str :required/optional: required """ return self._usage @usage.setter def usage(self, usage): """ Sets the usage of this VolumeGroup. the volume group usage. :param usage: The usage of this VolumeGroup. :type: str """ allowed_values = ["unknown", "standard", "flashcache", "__UNDEFINED"] if usage not in allowed_values: raise ValueError( "Invalid value for `usage`, must be one of {0}" .format(allowed_values) ) self._usage = usage @property def drive_block_format(self): """ Gets the drive_block_format of this VolumeGroup. Identifies the drive block format of the volume candidate. :return: The drive_block_format of this VolumeGroup. :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 VolumeGroup. Identifies the drive block format of the volume candidate. :param drive_block_format: The drive_block_format of this VolumeGroup. :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 @property def reserved_space_allocated(self): """ Gets the reserved_space_allocated of this VolumeGroup. This field will be used to report whether or not reserved space has been claimed on all drives in the volume group. The recovery-volume script will include this field for each volume group record it creates, so that during volume recovery the volume group is recreated correctly. :return: The reserved_space_allocated of this VolumeGroup. :rtype: bool :required/optional: required """ return self._reserved_space_allocated @reserved_space_allocated.setter def reserved_space_allocated(self, reserved_space_allocated): """ Sets the reserved_space_allocated of this VolumeGroup. This field will be used to report whether or not reserved space has been claimed on all drives in the volume group. The recovery-volume script will include this field for each volume group record it creates, so that during volume recovery the volume group is recreated correctly. :param reserved_space_allocated: The reserved_space_allocated of this VolumeGroup. :type: bool """ self._reserved_space_allocated = reserved_space_allocated @property def security_level(self): """ Gets the security_level of this VolumeGroup. Refines the information in the securityType field to describe the set of drives. :return: The security_level of this VolumeGroup. :rtype: str :required/optional: required """ return self._security_level @security_level.setter def security_level(self, security_level): """ Sets the security_level of this VolumeGroup. Refines the information in the securityType field to describe the set of drives. :param security_level: The security_level of this VolumeGroup. :type: str """ allowed_values = ["unknown", "none", "mixed", "fde", "fips", "__UNDEFINED"] if security_level not in allowed_values: raise ValueError( "Invalid value for `security_level`, must be one of {0}" .format(allowed_values) ) self._security_level = security_level @property def name(self): """ Gets the name of this VolumeGroup. :return: The name of this VolumeGroup. :rtype: str :required/optional: optional """ return self._name @name.setter def name(self, name): """ Sets the name of this VolumeGroup. :param name: The name of this VolumeGroup. :type: str """ self._name = name @property def id(self): """ Gets the id of this VolumeGroup. :return: The id of this VolumeGroup. :rtype: str :required/optional: optional """ return self._id @id.setter def id(self, id): """ Sets the id of this VolumeGroup. :param id: The id of this VolumeGroup. :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