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

# coding: utf-8

"""
StoragePoolBundle.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 StoragePoolBundle(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self): """ StoragePoolBundle - 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 = { 'sa_port_group': 'list[SAPortGroup]', # (required parameter) 'sa_port': 'list[SAPort]', # (required parameter) 'cluster': 'list[Cluster]', # (required parameter) 'host': 'list[Host]', # (required parameter) 'host_port': 'list[HostPort]', # (required parameter) 'lun_mapping': 'list[LUNMapping]', # (required parameter) 'initiator': 'list[Initiator]', # (required parameter) 'target': 'list[Target]', # (required parameter) 'remote_target': 'list[RemoteTarget]' } self.attribute_map = { 'sa_port_group': 'saPortGroup', # (required parameter) 'sa_port': 'saPort', # (required parameter) 'cluster': 'cluster', # (required parameter) 'host': 'host', # (required parameter) 'host_port': 'hostPort', # (required parameter) 'lun_mapping': 'lunMapping', # (required parameter) 'initiator': 'initiator', # (required parameter) 'target': 'target', # (required parameter) 'remote_target': 'remoteTarget' } self._sa_port_group = None self._sa_port = None self._cluster = None self._host = None self._host_port = None self._lun_mapping = None self._initiator = None self._target = None self._remote_target = None @property def sa_port_group(self): """ Gets the sa_port_group of this StoragePoolBundle. A variable-length array containing all SAPortGroup objects that are currently configured and available. :return: The sa_port_group of this StoragePoolBundle. :rtype: list[SAPortGroup] :required/optional: required """ return self._sa_port_group @sa_port_group.setter def sa_port_group(self, sa_port_group): """ Sets the sa_port_group of this StoragePoolBundle. A variable-length array containing all SAPortGroup objects that are currently configured and available. :param sa_port_group: The sa_port_group of this StoragePoolBundle. :type: list[SAPortGroup] """ self._sa_port_group = sa_port_group @property def sa_port(self): """ Gets the sa_port of this StoragePoolBundle. A variable-length array containing all SAPortGroup objects that are currently configured and available. :return: The sa_port of this StoragePoolBundle. :rtype: list[SAPort] :required/optional: required """ return self._sa_port @sa_port.setter def sa_port(self, sa_port): """ Sets the sa_port of this StoragePoolBundle. A variable-length array containing all SAPortGroup objects that are currently configured and available. :param sa_port: The sa_port of this StoragePoolBundle. :type: list[SAPort] """ self._sa_port = sa_port @property def cluster(self): """ Gets the cluster of this StoragePoolBundle. A variable-length array containing all defined Cluster objects for the storage array configuration. :return: The cluster of this StoragePoolBundle. :rtype: list[Cluster] :required/optional: required """ return self._cluster @cluster.setter def cluster(self, cluster): """ Sets the cluster of this StoragePoolBundle. A variable-length array containing all defined Cluster objects for the storage array configuration. :param cluster: The cluster of this StoragePoolBundle. :type: list[Cluster] """ self._cluster = cluster @property def host(self): """ Gets the host of this StoragePoolBundle. A variable-length array containing all defined Host objects for the storage array configuration. :return: The host of this StoragePoolBundle. :rtype: list[Host] :required/optional: required """ return self._host @host.setter def host(self, host): """ Sets the host of this StoragePoolBundle. A variable-length array containing all defined Host objects for the storage array configuration. :param host: The host of this StoragePoolBundle. :type: list[Host] """ self._host = host @property def host_port(self): """ Gets the host_port of this StoragePoolBundle. A variable-length array containing all defined HostPort objects for the storage array configuration. :return: The host_port of this StoragePoolBundle. :rtype: list[HostPort] :required/optional: required """ return self._host_port @host_port.setter def host_port(self, host_port): """ Sets the host_port of this StoragePoolBundle. A variable-length array containing all defined HostPort objects for the storage array configuration. :param host_port: The host_port of this StoragePoolBundle. :type: list[HostPort] """ self._host_port = host_port @property def lun_mapping(self): """ Gets the lun_mapping of this StoragePoolBundle. A variable-length array containing all defined LUNMapping objects for the storage array configuration. :return: The lun_mapping of this StoragePoolBundle. :rtype: list[LUNMapping] :required/optional: required """ return self._lun_mapping @lun_mapping.setter def lun_mapping(self, lun_mapping): """ Sets the lun_mapping of this StoragePoolBundle. A variable-length array containing all defined LUNMapping objects for the storage array configuration. :param lun_mapping: The lun_mapping of this StoragePoolBundle. :type: list[LUNMapping] """ self._lun_mapping = lun_mapping @property def initiator(self): """ Gets the initiator of this StoragePoolBundle. A variable-length array containing all Initiator objects defined in the storage array configuration. :return: The initiator of this StoragePoolBundle. :rtype: list[Initiator] :required/optional: required """ return self._initiator @initiator.setter def initiator(self, initiator): """ Sets the initiator of this StoragePoolBundle. A variable-length array containing all Initiator objects defined in the storage array configuration. :param initiator: The initiator of this StoragePoolBundle. :type: list[Initiator] """ self._initiator = initiator @property def target(self): """ Gets the target of this StoragePoolBundle. A variable-length array containing all Target objects defined in the storage array configuration. :return: The target of this StoragePoolBundle. :rtype: list[Target] :required/optional: required """ return self._target @target.setter def target(self, target): """ Sets the target of this StoragePoolBundle. A variable-length array containing all Target objects defined in the storage array configuration. :param target: The target of this StoragePoolBundle. :type: list[Target] """ self._target = target @property def remote_target(self): """ Gets the remote_target of this StoragePoolBundle. A variable-length array containing all Remote Target objects defined in the storage array configuration. Remote Target objects define the initiator/target on a remote array. :return: The remote_target of this StoragePoolBundle. :rtype: list[RemoteTarget] :required/optional: required """ return self._remote_target @remote_target.setter def remote_target(self, remote_target): """ Sets the remote_target of this StoragePoolBundle. A variable-length array containing all Remote Target objects defined in the storage array configuration. Remote Target objects define the initiator/target on a remote array. :param remote_target: The remote_target of this StoragePoolBundle. :type: list[RemoteTarget] """ self._remote_target = remote_target
[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