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

# coding: utf-8

"""
EthernetInterface.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 EthernetInterface(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self): """ EthernetInterface - 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 = { 'interface_name': 'str', # (required parameter) 'channel': 'int', # (required parameter) 'speed': 'int', # (required parameter) 'ip': 'int', # (required parameter) 'alias': 'str', # (required parameter) 'mac_addr': 'str', # (required parameter) 'gateway_ip': 'int', # (required parameter) 'subnet_mask': 'int', # (required parameter) 'bootp_used': 'bool', # (required parameter) 'rlogin_enabled': 'bool', # (required parameter) 'reserved1': 'str', 'setup_error': 'bool', # (required parameter) 'reserved2': 'str', 'interface_ref': 'str', # (required parameter) 'link_status': 'str', # (required parameter) 'ipv4_enabled': 'bool', # (required parameter) 'ipv4_address': 'str', # (required parameter) 'ipv4_subnet_mask': 'str', # (required parameter) 'ipv4_address_config_method': 'str', # (required parameter) 'ipv6_enabled': 'bool', # (required parameter) 'ipv6_local_address': 'IpV6AddressData', # (required parameter) 'ipv6_port_static_routable_address': 'IpV6AddressData', # (required parameter) 'ipv6_port_routable_addresses': 'list[IpV6AddressData]', # (required parameter) 'ipv6_address_config_method': 'str', # (required parameter) 'full_duplex': 'bool', # (required parameter) 'supported_speed_settings': 'list[str]', # (required parameter) 'configured_speed_setting': 'str', # (required parameter) 'current_speed': 'str', # (required parameter) 'physical_location': 'Location' } self.attribute_map = { 'interface_name': 'interfaceName', # (required parameter) 'channel': 'channel', # (required parameter) 'speed': 'speed', # (required parameter) 'ip': 'ip', # (required parameter) 'alias': 'alias', # (required parameter) 'mac_addr': 'macAddr', # (required parameter) 'gateway_ip': 'gatewayIp', # (required parameter) 'subnet_mask': 'subnetMask', # (required parameter) 'bootp_used': 'bootpUsed', # (required parameter) 'rlogin_enabled': 'rloginEnabled', # (required parameter) 'reserved1': 'reserved1', 'setup_error': 'setupError', # (required parameter) 'reserved2': 'reserved2', 'interface_ref': 'interfaceRef', # (required parameter) 'link_status': 'linkStatus', # (required parameter) 'ipv4_enabled': 'ipv4Enabled', # (required parameter) 'ipv4_address': 'ipv4Address', # (required parameter) 'ipv4_subnet_mask': 'ipv4SubnetMask', # (required parameter) 'ipv4_address_config_method': 'ipv4AddressConfigMethod', # (required parameter) 'ipv6_enabled': 'ipv6Enabled', # (required parameter) 'ipv6_local_address': 'ipv6LocalAddress', # (required parameter) 'ipv6_port_static_routable_address': 'ipv6PortStaticRoutableAddress', # (required parameter) 'ipv6_port_routable_addresses': 'ipv6PortRoutableAddresses', # (required parameter) 'ipv6_address_config_method': 'ipv6AddressConfigMethod', # (required parameter) 'full_duplex': 'fullDuplex', # (required parameter) 'supported_speed_settings': 'supportedSpeedSettings', # (required parameter) 'configured_speed_setting': 'configuredSpeedSetting', # (required parameter) 'current_speed': 'currentSpeed', # (required parameter) 'physical_location': 'physicalLocation' } self._interface_name = None self._channel = None self._speed = None self._ip = None self._alias = None self._mac_addr = None self._gateway_ip = None self._subnet_mask = None self._bootp_used = None self._rlogin_enabled = None self._reserved1 = None self._setup_error = None self._reserved2 = None self._interface_ref = None self._link_status = None self._ipv4_enabled = None self._ipv4_address = None self._ipv4_subnet_mask = None self._ipv4_address_config_method = None self._ipv6_enabled = None self._ipv6_local_address = None self._ipv6_port_static_routable_address = None self._ipv6_port_routable_addresses = None self._ipv6_address_config_method = None self._full_duplex = None self._supported_speed_settings = None self._configured_speed_setting = None self._current_speed = None self._physical_location = None @property def interface_name(self): """ Gets the interface_name of this EthernetInterface. Name of the Ethernet port, as reported by the controller. :return: The interface_name of this EthernetInterface. :rtype: str :required/optional: required """ return self._interface_name @interface_name.setter def interface_name(self, interface_name): """ Sets the interface_name of this EthernetInterface. Name of the Ethernet port, as reported by the controller. :param interface_name: The interface_name of this EthernetInterface. :type: str """ self._interface_name = interface_name @property def channel(self): """ Gets the channel of this EthernetInterface. The channel number of this Ethernet interface. :return: The channel of this EthernetInterface. :rtype: int :required/optional: required """ return self._channel @channel.setter def channel(self, channel): """ Sets the channel of this EthernetInterface. The channel number of this Ethernet interface. :param channel: The channel of this EthernetInterface. :type: int """ self._channel = channel @property def speed(self): """ Gets the speed of this EthernetInterface. The speed of the interface, as currently configured, in Mbit/sec. :return: The speed of this EthernetInterface. :rtype: int :required/optional: required """ return self._speed @speed.setter def speed(self, speed): """ Sets the speed of this EthernetInterface. The speed of the interface, as currently configured, in Mbit/sec. :param speed: The speed of this EthernetInterface. :type: int """ self._speed = speed @property def ip(self): """ Gets the ip of this EthernetInterface. The 32-bit IP protocol address assigned to the interface. :return: The ip of this EthernetInterface. :rtype: int :required/optional: required """ return self._ip @ip.setter def ip(self, ip): """ Sets the ip of this EthernetInterface. The 32-bit IP protocol address assigned to the interface. :param ip: The ip of this EthernetInterface. :type: int """ self._ip = ip @property def alias(self): """ Gets the alias of this EthernetInterface. An ASCII string that identifies the alias name for the interface; this name is presumed to be associated with the IP protocol address. :return: The alias of this EthernetInterface. :rtype: str :required/optional: required """ return self._alias @alias.setter def alias(self, alias): """ Sets the alias of this EthernetInterface. An ASCII string that identifies the alias name for the interface; this name is presumed to be associated with the IP protocol address. :param alias: The alias of this EthernetInterface. :type: str """ self._alias = alias @property def mac_addr(self): """ Gets the mac_addr of this EthernetInterface. An ASCII string representation of the globally-unique 48-bit MAC address assigned to the Ethernet interface. :return: The mac_addr of this EthernetInterface. :rtype: str :required/optional: required """ return self._mac_addr @mac_addr.setter def mac_addr(self, mac_addr): """ Sets the mac_addr of this EthernetInterface. An ASCII string representation of the globally-unique 48-bit MAC address assigned to the Ethernet interface. :param mac_addr: The mac_addr of this EthernetInterface. :type: str """ self._mac_addr = mac_addr @property def gateway_ip(self): """ Gets the gateway_ip of this EthernetInterface. IP address of the gateway. :return: The gateway_ip of this EthernetInterface. :rtype: int :required/optional: required """ return self._gateway_ip @gateway_ip.setter def gateway_ip(self, gateway_ip): """ Sets the gateway_ip of this EthernetInterface. IP address of the gateway. :param gateway_ip: The gateway_ip of this EthernetInterface. :type: int """ self._gateway_ip = gateway_ip @property def subnet_mask(self): """ Gets the subnet_mask of this EthernetInterface. Network subnet mask. :return: The subnet_mask of this EthernetInterface. :rtype: int :required/optional: required """ return self._subnet_mask @subnet_mask.setter def subnet_mask(self, subnet_mask): """ Sets the subnet_mask of this EthernetInterface. Network subnet mask. :param subnet_mask: The subnet_mask of this EthernetInterface. :type: int """ self._subnet_mask = subnet_mask @property def bootp_used(self): """ Gets the bootp_used of this EthernetInterface. Bootpserver used to get network parameters. :return: The bootp_used of this EthernetInterface. :rtype: bool :required/optional: required """ return self._bootp_used @bootp_used.setter def bootp_used(self, bootp_used): """ Sets the bootp_used of this EthernetInterface. Bootpserver used to get network parameters. :param bootp_used: The bootp_used of this EthernetInterface. :type: bool """ self._bootp_used = bootp_used @property def rlogin_enabled(self): """ Gets the rlogin_enabled of this EthernetInterface. True if rlogin sessions are allowed. :return: The rlogin_enabled of this EthernetInterface. :rtype: bool :required/optional: required """ return self._rlogin_enabled @rlogin_enabled.setter def rlogin_enabled(self, rlogin_enabled): """ Sets the rlogin_enabled of this EthernetInterface. True if rlogin sessions are allowed. :param rlogin_enabled: The rlogin_enabled of this EthernetInterface. :type: bool """ self._rlogin_enabled = rlogin_enabled @property def reserved1(self): """ Gets the reserved1 of this EthernetInterface. :return: The reserved1 of this EthernetInterface. :rtype: str :required/optional: optional """ return self._reserved1 @reserved1.setter def reserved1(self, reserved1): """ Sets the reserved1 of this EthernetInterface. :param reserved1: The reserved1 of this EthernetInterface. :type: str """ self._reserved1 = reserved1 @property def setup_error(self): """ Gets the setup_error of this EthernetInterface. Set to true if there is a configuration error. :return: The setup_error of this EthernetInterface. :rtype: bool :required/optional: required """ return self._setup_error @setup_error.setter def setup_error(self, setup_error): """ Sets the setup_error of this EthernetInterface. Set to true if there is a configuration error. :param setup_error: The setup_error of this EthernetInterface. :type: bool """ self._setup_error = setup_error @property def reserved2(self): """ Gets the reserved2 of this EthernetInterface. :return: The reserved2 of this EthernetInterface. :rtype: str :required/optional: optional """ return self._reserved2 @reserved2.setter def reserved2(self, reserved2): """ Sets the reserved2 of this EthernetInterface. :param reserved2: The reserved2 of this EthernetInterface. :type: str """ self._reserved2 = reserved2 @property def interface_ref(self): """ Gets the interface_ref of this EthernetInterface. The unique identifier for a given instance of this structure. :return: The interface_ref of this EthernetInterface. :rtype: str :required/optional: required """ return self._interface_ref @interface_ref.setter def interface_ref(self, interface_ref): """ Sets the interface_ref of this EthernetInterface. The unique identifier for a given instance of this structure. :param interface_ref: The interface_ref of this EthernetInterface. :type: str """ self._interface_ref = interface_ref @property def link_status(self): """ Gets the link_status of this EthernetInterface. The status of the network link for this interface. :return: The link_status of this EthernetInterface. :rtype: str :required/optional: required """ return self._link_status @link_status.setter def link_status(self, link_status): """ Sets the link_status of this EthernetInterface. The status of the network link for this interface. :param link_status: The link_status of this EthernetInterface. :type: str """ allowed_values = ["none", "up", "down", "failed", "__UNDEFINED"] if link_status not in allowed_values: raise ValueError( "Invalid value for `link_status`, must be one of {0}" .format(allowed_values) ) self._link_status = link_status @property def ipv4_enabled(self): """ Gets the ipv4_enabled of this EthernetInterface. True if IPV4 is enabled for this interface; otherwise false. :return: The ipv4_enabled of this EthernetInterface. :rtype: bool :required/optional: required """ return self._ipv4_enabled @ipv4_enabled.setter def ipv4_enabled(self, ipv4_enabled): """ Sets the ipv4_enabled of this EthernetInterface. True if IPV4 is enabled for this interface; otherwise false. :param ipv4_enabled: The ipv4_enabled of this EthernetInterface. :type: bool """ self._ipv4_enabled = ipv4_enabled @property def ipv4_address(self): """ Gets the ipv4_address of this EthernetInterface. The IPV4 address for the interface. :return: The ipv4_address of this EthernetInterface. :rtype: str :required/optional: required """ return self._ipv4_address @ipv4_address.setter def ipv4_address(self, ipv4_address): """ Sets the ipv4_address of this EthernetInterface. The IPV4 address for the interface. :param ipv4_address: The ipv4_address of this EthernetInterface. :type: str """ self._ipv4_address = ipv4_address @property def ipv4_subnet_mask(self): """ Gets the ipv4_subnet_mask of this EthernetInterface. The IPV4 subnet mask for the interface. :return: The ipv4_subnet_mask of this EthernetInterface. :rtype: str :required/optional: required """ return self._ipv4_subnet_mask @ipv4_subnet_mask.setter def ipv4_subnet_mask(self, ipv4_subnet_mask): """ Sets the ipv4_subnet_mask of this EthernetInterface. The IPV4 subnet mask for the interface. :param ipv4_subnet_mask: The ipv4_subnet_mask of this EthernetInterface. :type: str """ self._ipv4_subnet_mask = ipv4_subnet_mask @property def ipv4_address_config_method(self): """ Gets the ipv4_address_config_method of this EthernetInterface. The method by which the IPV4 address information is configured. :return: The ipv4_address_config_method of this EthernetInterface. :rtype: str :required/optional: required """ return self._ipv4_address_config_method @ipv4_address_config_method.setter def ipv4_address_config_method(self, ipv4_address_config_method): """ Sets the ipv4_address_config_method of this EthernetInterface. The method by which the IPV4 address information is configured. :param ipv4_address_config_method: The ipv4_address_config_method of this EthernetInterface. :type: str """ allowed_values = ["configDhcp", "configStatic", "__UNDEFINED"] if ipv4_address_config_method not in allowed_values: raise ValueError( "Invalid value for `ipv4_address_config_method`, must be one of {0}" .format(allowed_values) ) self._ipv4_address_config_method = ipv4_address_config_method @property def ipv6_enabled(self): """ Gets the ipv6_enabled of this EthernetInterface. True if IPV6 is enabled for this interface; otherwise false. :return: The ipv6_enabled of this EthernetInterface. :rtype: bool :required/optional: required """ return self._ipv6_enabled @ipv6_enabled.setter def ipv6_enabled(self, ipv6_enabled): """ Sets the ipv6_enabled of this EthernetInterface. True if IPV6 is enabled for this interface; otherwise false. :param ipv6_enabled: The ipv6_enabled of this EthernetInterface. :type: bool """ self._ipv6_enabled = ipv6_enabled @property def ipv6_local_address(self): """ Gets the ipv6_local_address of this EthernetInterface. The IPV6 local address for the interface and associated data. :return: The ipv6_local_address of this EthernetInterface. :rtype: IpV6AddressData :required/optional: required """ return self._ipv6_local_address @ipv6_local_address.setter def ipv6_local_address(self, ipv6_local_address): """ Sets the ipv6_local_address of this EthernetInterface. The IPV6 local address for the interface and associated data. :param ipv6_local_address: The ipv6_local_address of this EthernetInterface. :type: IpV6AddressData """ self._ipv6_local_address = ipv6_local_address @property def ipv6_port_static_routable_address(self): """ Gets the ipv6_port_static_routable_address of this EthernetInterface. The IPV6 static routable address for the interface and associated data. :return: The ipv6_port_static_routable_address of this EthernetInterface. :rtype: IpV6AddressData :required/optional: required """ return self._ipv6_port_static_routable_address @ipv6_port_static_routable_address.setter def ipv6_port_static_routable_address(self, ipv6_port_static_routable_address): """ Sets the ipv6_port_static_routable_address of this EthernetInterface. The IPV6 static routable address for the interface and associated data. :param ipv6_port_static_routable_address: The ipv6_port_static_routable_address of this EthernetInterface. :type: IpV6AddressData """ self._ipv6_port_static_routable_address = ipv6_port_static_routable_address @property def ipv6_port_routable_addresses(self): """ Gets the ipv6_port_routable_addresses of this EthernetInterface. The set of IPV6 port routable addresses for the interface. :return: The ipv6_port_routable_addresses of this EthernetInterface. :rtype: list[IpV6AddressData] :required/optional: required """ return self._ipv6_port_routable_addresses @ipv6_port_routable_addresses.setter def ipv6_port_routable_addresses(self, ipv6_port_routable_addresses): """ Sets the ipv6_port_routable_addresses of this EthernetInterface. The set of IPV6 port routable addresses for the interface. :param ipv6_port_routable_addresses: The ipv6_port_routable_addresses of this EthernetInterface. :type: list[IpV6AddressData] """ self._ipv6_port_routable_addresses = ipv6_port_routable_addresses @property def ipv6_address_config_method(self): """ Gets the ipv6_address_config_method of this EthernetInterface. The method by which the IPV6 address information is configured for the interface. :return: The ipv6_address_config_method of this EthernetInterface. :rtype: str :required/optional: required """ return self._ipv6_address_config_method @ipv6_address_config_method.setter def ipv6_address_config_method(self, ipv6_address_config_method): """ Sets the ipv6_address_config_method of this EthernetInterface. The method by which the IPV6 address information is configured for the interface. :param ipv6_address_config_method: The ipv6_address_config_method of this EthernetInterface. :type: str """ allowed_values = ["configStatic", "configStateless", "__UNDEFINED"] if ipv6_address_config_method not in allowed_values: raise ValueError( "Invalid value for `ipv6_address_config_method`, must be one of {0}" .format(allowed_values) ) self._ipv6_address_config_method = ipv6_address_config_method @property def full_duplex(self): """ Gets the full_duplex of this EthernetInterface. If set to true, the interface is operating in full duplex mode; otherwise, it is operating in half-duplex mode. :return: The full_duplex of this EthernetInterface. :rtype: bool :required/optional: required """ return self._full_duplex @full_duplex.setter def full_duplex(self, full_duplex): """ Sets the full_duplex of this EthernetInterface. If set to true, the interface is operating in full duplex mode; otherwise, it is operating in half-duplex mode. :param full_duplex: The full_duplex of this EthernetInterface. :type: bool """ self._full_duplex = full_duplex @property def supported_speed_settings(self): """ Gets the supported_speed_settings of this EthernetInterface. Support speed setting for interface :return: The supported_speed_settings of this EthernetInterface. :rtype: list[str] :required/optional: required """ return self._supported_speed_settings @supported_speed_settings.setter def supported_speed_settings(self, supported_speed_settings): """ Sets the supported_speed_settings of this EthernetInterface. Support speed setting for interface :param supported_speed_settings: The supported_speed_settings of this EthernetInterface. :type: list[str] """ self._supported_speed_settings = supported_speed_settings @property def configured_speed_setting(self): """ Gets the configured_speed_setting of this EthernetInterface. Configured setting for the interface. :return: The configured_speed_setting of this EthernetInterface. :rtype: str :required/optional: required """ return self._configured_speed_setting @configured_speed_setting.setter def configured_speed_setting(self, configured_speed_setting): """ Sets the configured_speed_setting of this EthernetInterface. Configured setting for the interface. :param configured_speed_setting: The configured_speed_setting of this EthernetInterface. :type: str """ allowed_values = ["speedNone", "speedAutoNegotiated", "speed10MbitHalfDuplex", "speed10MbitFullDuplex", "speed100MbitHalfDuplex", "speed100MbitFullDuplex", "speed1000MbitHalfDuplex", "speed1000MbitFullDuplex", "__UNDEFINED"] if configured_speed_setting not in allowed_values: raise ValueError( "Invalid value for `configured_speed_setting`, must be one of {0}" .format(allowed_values) ) self._configured_speed_setting = configured_speed_setting @property def current_speed(self): """ Gets the current_speed of this EthernetInterface. Current speed of the interface. :return: The current_speed of this EthernetInterface. :rtype: str :required/optional: required """ return self._current_speed @current_speed.setter def current_speed(self, current_speed): """ Sets the current_speed of this EthernetInterface. Current speed of the interface. :param current_speed: The current_speed of this EthernetInterface. :type: str """ allowed_values = ["speedUnknown", "speed1gig", "speed2gig", "speed4gig", "speed10gig", "speed15gig", "speed3gig", "speed10meg", "speed100meg", "speed2pt5Gig", "speed5gig", "speed20gig", "speed30gig", "speed60gig", "speed8gig", "speed6gig", "speed40gig", "speed16gig", "speed56gig", "speed12gig", "__UNDEFINED"] if current_speed not in allowed_values: raise ValueError( "Invalid value for `current_speed`, must be one of {0}" .format(allowed_values) ) self._current_speed = current_speed @property def physical_location(self): """ Gets the physical_location of this EthernetInterface. The physical location of the Ethernet interface. The parent reference in Location identifies the physical component (e.g., controller or host card) where the interface circuitry is located, and the position field is a firmware-assigned 1-relative number signifying \"1st ethernet interface relative to the parent,\" \"2nd ethernet interface relative to the parent,\" etc. This \"interface number\" is independent of the interface's channel association. :return: The physical_location of this EthernetInterface. :rtype: Location :required/optional: required """ return self._physical_location @physical_location.setter def physical_location(self, physical_location): """ Sets the physical_location of this EthernetInterface. The physical location of the Ethernet interface. The parent reference in Location identifies the physical component (e.g., controller or host card) where the interface circuitry is located, and the position field is a firmware-assigned 1-relative number signifying \"1st ethernet interface relative to the parent,\" \"2nd ethernet interface relative to the parent,\" etc. This \"interface number\" is independent of the interface's channel association. :param physical_location: The physical_location of this EthernetInterface. :type: Location """ self._physical_location = physical_location
[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