1# coding: utf-8 2# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. 3# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. 4 5 6from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 7from oci.decorators import init_model_state_from_kwargs 8 9 10@init_model_state_from_kwargs 11class MultipathDevice(object): 12 """ 13 Secondary multipath device, it uses the charUsername and chapSecret from primary volume attachment 14 """ 15 16 def __init__(self, **kwargs): 17 """ 18 Initializes a new MultipathDevice object with values from keyword arguments. 19 The following keyword arguments are supported (corresponding to the getters/setters of this class): 20 21 :param ipv4: 22 The value to assign to the ipv4 property of this MultipathDevice. 23 :type ipv4: str 24 25 :param iqn: 26 The value to assign to the iqn property of this MultipathDevice. 27 :type iqn: str 28 29 :param port: 30 The value to assign to the port property of this MultipathDevice. 31 :type port: int 32 33 """ 34 self.swagger_types = { 35 'ipv4': 'str', 36 'iqn': 'str', 37 'port': 'int' 38 } 39 40 self.attribute_map = { 41 'ipv4': 'ipv4', 42 'iqn': 'iqn', 43 'port': 'port' 44 } 45 46 self._ipv4 = None 47 self._iqn = None 48 self._port = None 49 50 @property 51 def ipv4(self): 52 """ 53 **[Required]** Gets the ipv4 of this MultipathDevice. 54 The volume's iSCSI IP address. 55 56 Example: `169.254.2.2` 57 58 59 :return: The ipv4 of this MultipathDevice. 60 :rtype: str 61 """ 62 return self._ipv4 63 64 @ipv4.setter 65 def ipv4(self, ipv4): 66 """ 67 Sets the ipv4 of this MultipathDevice. 68 The volume's iSCSI IP address. 69 70 Example: `169.254.2.2` 71 72 73 :param ipv4: The ipv4 of this MultipathDevice. 74 :type: str 75 """ 76 self._ipv4 = ipv4 77 78 @property 79 def iqn(self): 80 """ 81 **[Required]** Gets the iqn of this MultipathDevice. 82 The target volume's iSCSI Qualified Name in the format defined 83 by `RFC 3720`__. 84 85 Example: `iqn.2015-12.com.oracleiaas:40b7ee03-883f-46c6-a951-63d2841d2195` 86 87 __ https://tools.ietf.org/html/rfc3720#page-32 88 89 90 :return: The iqn of this MultipathDevice. 91 :rtype: str 92 """ 93 return self._iqn 94 95 @iqn.setter 96 def iqn(self, iqn): 97 """ 98 Sets the iqn of this MultipathDevice. 99 The target volume's iSCSI Qualified Name in the format defined 100 by `RFC 3720`__. 101 102 Example: `iqn.2015-12.com.oracleiaas:40b7ee03-883f-46c6-a951-63d2841d2195` 103 104 __ https://tools.ietf.org/html/rfc3720#page-32 105 106 107 :param iqn: The iqn of this MultipathDevice. 108 :type: str 109 """ 110 self._iqn = iqn 111 112 @property 113 def port(self): 114 """ 115 Gets the port of this MultipathDevice. 116 The volume's iSCSI port, usually port 860 or 3260. 117 118 Example: `3260` 119 120 121 :return: The port of this MultipathDevice. 122 :rtype: int 123 """ 124 return self._port 125 126 @port.setter 127 def port(self, port): 128 """ 129 Sets the port of this MultipathDevice. 130 The volume's iSCSI port, usually port 860 or 3260. 131 132 Example: `3260` 133 134 135 :param port: The port of this MultipathDevice. 136 :type: int 137 """ 138 self._port = port 139 140 def __repr__(self): 141 return formatted_flat_dict(self) 142 143 def __eq__(self, other): 144 if other is None: 145 return False 146 147 return self.__dict__ == other.__dict__ 148 149 def __ne__(self, other): 150 return not self == other 151