Class: MistApi::NetworkVpnAccessConfig
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::NetworkVpnAccessConfig
- Defined in:
- lib/mist_api/models/network_vpn_access_config.rb
Overview
NetworkVpnAccessConfig Model.
Instance Attribute Summary collapse
-
#advertised_subnet ⇒ String
If ‘routed`==`true`, whether to advertise an aggregated subnet toward HUB this is useful when there are multiple networks on SPOKE’s side.
-
#allow_ping ⇒ TrueClass | FalseClass
Whether to allow ping from vpn into this routed network.
-
#destination_nat ⇒ Hash[String, NetworkVpnAccessDestinationNatProperty]
Property key can be an External IP (i.e. “63.16.0.3”), an External IP:Port (i.e. “63.16.0.3:443”), an External Port (i.e. “:443”), an External CIDR (i.e. “63.16.0.0/30”), an External CIDR:Port (i.e. “63.16.0.0/30:443”) or a Variable (i.e. “{myvar}”).
-
#nat_pool ⇒ String
If ‘routed`==`false` (usually at Spoke), but some hosts needs to be reachable from Hub, a subnet is required to create and advertise the route to Hub.
-
#no_readvertise_to_lan_bgp ⇒ TrueClass | FalseClass
toward LAN-side BGP peers.
-
#no_readvertise_to_lan_ospf ⇒ TrueClass | FalseClass
toward LAN-side OSPF peers.
-
#no_readvertise_to_overlay ⇒ TrueClass | FalseClass
toward overlay, how HUB should deal with routes it received from Spokes.
-
#other_vrfs ⇒ Array[String]
By default, the routes are only readvertised toward the same vrf on spoke.
-
#routed ⇒ TrueClass | FalseClass
Whether this network is routable.
-
#source_nat ⇒ NetworkSourceNat
If ‘routed`==`false` (usually at Spoke), but some hosts needs to be reachable from Hub.
-
#static_nat ⇒ Hash[String, NetworkVpnAccessStaticNatProperty]
Property key may be an External IP Address (i.e. “63.16.0.3”), a CIDR (i.e. “63.16.0.12/20”) or a Variable (i.e. “{myvar}”).
-
#summarized_subnet ⇒ String
toward overlay, how HUB should deal with routes it received from Spokes.
-
#summarized_subnet_to_lan_bgp ⇒ String
toward LAN-side BGP peers.
-
#summarized_subnet_to_lan_ospf ⇒ String
toward LAN-side OSPF peers.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(advertised_subnet = SKIP, allow_ping = SKIP, destination_nat = SKIP, nat_pool = SKIP, no_readvertise_to_lan_bgp = false, no_readvertise_to_lan_ospf = false, no_readvertise_to_overlay = SKIP, other_vrfs = SKIP, routed = SKIP, source_nat = SKIP, static_nat = SKIP, summarized_subnet = SKIP, summarized_subnet_to_lan_bgp = SKIP, summarized_subnet_to_lan_ospf = SKIP) ⇒ NetworkVpnAccessConfig
constructor
A new instance of NetworkVpnAccessConfig.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(advertised_subnet = SKIP, allow_ping = SKIP, destination_nat = SKIP, nat_pool = SKIP, no_readvertise_to_lan_bgp = false, no_readvertise_to_lan_ospf = false, no_readvertise_to_overlay = SKIP, other_vrfs = SKIP, routed = SKIP, source_nat = SKIP, static_nat = SKIP, summarized_subnet = SKIP, summarized_subnet_to_lan_bgp = SKIP, summarized_subnet_to_lan_ospf = SKIP) ⇒ NetworkVpnAccessConfig
Returns a new instance of NetworkVpnAccessConfig.
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/mist_api/models/network_vpn_access_config.rb', line 124 def initialize(advertised_subnet = SKIP, allow_ping = SKIP, destination_nat = SKIP, nat_pool = SKIP, no_readvertise_to_lan_bgp = false, no_readvertise_to_lan_ospf = false, = SKIP, other_vrfs = SKIP, routed = SKIP, source_nat = SKIP, static_nat = SKIP, summarized_subnet = SKIP, summarized_subnet_to_lan_bgp = SKIP, summarized_subnet_to_lan_ospf = SKIP) @advertised_subnet = advertised_subnet unless advertised_subnet == SKIP @allow_ping = allow_ping unless allow_ping == SKIP @destination_nat = destination_nat unless destination_nat == SKIP @nat_pool = nat_pool unless nat_pool == SKIP unless no_readvertise_to_lan_bgp == SKIP @no_readvertise_to_lan_bgp = no_readvertise_to_lan_bgp end unless no_readvertise_to_lan_ospf == SKIP @no_readvertise_to_lan_ospf = no_readvertise_to_lan_ospf end unless == SKIP @no_readvertise_to_overlay = end @other_vrfs = other_vrfs unless other_vrfs == SKIP @routed = routed unless routed == SKIP @source_nat = source_nat unless source_nat == SKIP @static_nat = static_nat unless static_nat == SKIP @summarized_subnet = summarized_subnet unless summarized_subnet == SKIP unless summarized_subnet_to_lan_bgp == SKIP @summarized_subnet_to_lan_bgp = summarized_subnet_to_lan_bgp end unless summarized_subnet_to_lan_ospf == SKIP @summarized_subnet_to_lan_ospf = summarized_subnet_to_lan_ospf end end |
Instance Attribute Details
#advertised_subnet ⇒ String
If ‘routed`==`true`, whether to advertise an aggregated subnet toward HUB this is useful when there are multiple networks on SPOKE’s side
15 16 17 |
# File 'lib/mist_api/models/network_vpn_access_config.rb', line 15 def advertised_subnet @advertised_subnet end |
#allow_ping ⇒ TrueClass | FalseClass
Whether to allow ping from vpn into this routed network
19 20 21 |
# File 'lib/mist_api/models/network_vpn_access_config.rb', line 19 def allow_ping @allow_ping end |
#destination_nat ⇒ Hash[String, NetworkVpnAccessDestinationNatProperty]
Property key can be an External IP (i.e. “63.16.0.3”), an External IP:Port (i.e. “63.16.0.3:443”), an External Port (i.e. “:443”), an External CIDR (i.e. “63.16.0.0/30”), an External CIDR:Port (i.e. “63.16.0.0/30:443”) or a Variable (i.e. “{myvar}”). At least one of the ‘internal_ip` or `port` must be defined
27 28 29 |
# File 'lib/mist_api/models/network_vpn_access_config.rb', line 27 def destination_nat @destination_nat end |
#nat_pool ⇒ String
If ‘routed`==`false` (usually at Spoke), but some hosts needs to be reachable from Hub, a subnet is required to create and advertise the route to Hub
33 34 35 |
# File 'lib/mist_api/models/network_vpn_access_config.rb', line 33 def nat_pool @nat_pool end |
#no_readvertise_to_lan_bgp ⇒ TrueClass | FalseClass
toward LAN-side BGP peers
37 38 39 |
# File 'lib/mist_api/models/network_vpn_access_config.rb', line 37 def no_readvertise_to_lan_bgp @no_readvertise_to_lan_bgp end |
#no_readvertise_to_lan_ospf ⇒ TrueClass | FalseClass
toward LAN-side OSPF peers
41 42 43 |
# File 'lib/mist_api/models/network_vpn_access_config.rb', line 41 def no_readvertise_to_lan_ospf @no_readvertise_to_lan_ospf end |
#no_readvertise_to_overlay ⇒ TrueClass | FalseClass
toward overlay, how HUB should deal with routes it received from Spokes
45 46 47 |
# File 'lib/mist_api/models/network_vpn_access_config.rb', line 45 def @no_readvertise_to_overlay end |
#other_vrfs ⇒ Array[String]
By default, the routes are only readvertised toward the same vrf on spoke. To allow it to be leaked to other vrfs
50 51 52 |
# File 'lib/mist_api/models/network_vpn_access_config.rb', line 50 def other_vrfs @other_vrfs end |
#routed ⇒ TrueClass | FalseClass
Whether this network is routable
54 55 56 |
# File 'lib/mist_api/models/network_vpn_access_config.rb', line 54 def routed @routed end |
#source_nat ⇒ NetworkSourceNat
If ‘routed`==`false` (usually at Spoke), but some hosts needs to be reachable from Hub
59 60 61 |
# File 'lib/mist_api/models/network_vpn_access_config.rb', line 59 def source_nat @source_nat end |
#static_nat ⇒ Hash[String, NetworkVpnAccessStaticNatProperty]
Property key may be an External IP Address (i.e. “63.16.0.3”), a CIDR (i.e. “63.16.0.12/20”) or a Variable (i.e. “{myvar}”)
64 65 66 |
# File 'lib/mist_api/models/network_vpn_access_config.rb', line 64 def static_nat @static_nat end |
#summarized_subnet ⇒ String
toward overlay, how HUB should deal with routes it received from Spokes
68 69 70 |
# File 'lib/mist_api/models/network_vpn_access_config.rb', line 68 def summarized_subnet @summarized_subnet end |
#summarized_subnet_to_lan_bgp ⇒ String
toward LAN-side BGP peers
72 73 74 |
# File 'lib/mist_api/models/network_vpn_access_config.rb', line 72 def summarized_subnet_to_lan_bgp @summarized_subnet_to_lan_bgp end |
#summarized_subnet_to_lan_ospf ⇒ String
toward LAN-side OSPF peers
76 77 78 |
# File 'lib/mist_api/models/network_vpn_access_config.rb', line 76 def summarized_subnet_to_lan_ospf @summarized_subnet_to_lan_ospf end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/mist_api/models/network_vpn_access_config.rb', line 165 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. advertised_subnet = hash.key?('advertised_subnet') ? hash['advertised_subnet'] : SKIP allow_ping = hash.key?('allow_ping') ? hash['allow_ping'] : SKIP destination_nat = NetworkVpnAccessDestinationNatProperty.from_hash(hash['destination_nat']) if hash['destination_nat'] destination_nat = SKIP unless hash.key?('destination_nat') nat_pool = hash.key?('nat_pool') ? hash['nat_pool'] : SKIP no_readvertise_to_lan_bgp = hash['no_readvertise_to_lan_bgp'] ||= false no_readvertise_to_lan_ospf = hash['no_readvertise_to_lan_ospf'] ||= false = hash.key?('no_readvertise_to_overlay') ? hash['no_readvertise_to_overlay'] : SKIP other_vrfs = hash.key?('other_vrfs') ? hash['other_vrfs'] : SKIP routed = hash.key?('routed') ? hash['routed'] : SKIP source_nat = NetworkSourceNat.from_hash(hash['source_nat']) if hash['source_nat'] static_nat = NetworkVpnAccessStaticNatProperty.from_hash(hash['static_nat']) if hash['static_nat'] static_nat = SKIP unless hash.key?('static_nat') summarized_subnet = hash.key?('summarized_subnet') ? hash['summarized_subnet'] : SKIP summarized_subnet_to_lan_bgp = hash.key?('summarized_subnet_to_lan_bgp') ? hash['summarized_subnet_to_lan_bgp'] : SKIP summarized_subnet_to_lan_ospf = hash.key?('summarized_subnet_to_lan_ospf') ? hash['summarized_subnet_to_lan_ospf'] : SKIP # Create object from extracted values. NetworkVpnAccessConfig.new(advertised_subnet, allow_ping, destination_nat, nat_pool, no_readvertise_to_lan_bgp, no_readvertise_to_lan_ospf, , other_vrfs, routed, source_nat, static_nat, summarized_subnet, summarized_subnet_to_lan_bgp, summarized_subnet_to_lan_ospf) end |
.names ⇒ Object
A mapping from model property names to API property names.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/mist_api/models/network_vpn_access_config.rb', line 79 def self.names @_hash = {} if @_hash.nil? @_hash['advertised_subnet'] = 'advertised_subnet' @_hash['allow_ping'] = 'allow_ping' @_hash['destination_nat'] = 'destination_nat' @_hash['nat_pool'] = 'nat_pool' @_hash['no_readvertise_to_lan_bgp'] = 'no_readvertise_to_lan_bgp' @_hash['no_readvertise_to_lan_ospf'] = 'no_readvertise_to_lan_ospf' @_hash['no_readvertise_to_overlay'] = 'no_readvertise_to_overlay' @_hash['other_vrfs'] = 'other_vrfs' @_hash['routed'] = 'routed' @_hash['source_nat'] = 'source_nat' @_hash['static_nat'] = 'static_nat' @_hash['summarized_subnet'] = 'summarized_subnet' @_hash['summarized_subnet_to_lan_bgp'] = 'summarized_subnet_to_lan_bgp' @_hash['summarized_subnet_to_lan_ospf'] = 'summarized_subnet_to_lan_ospf' @_hash end |
.nullables ⇒ Object
An array for nullable fields
120 121 122 |
# File 'lib/mist_api/models/network_vpn_access_config.rb', line 120 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/mist_api/models/network_vpn_access_config.rb', line 100 def self.optionals %w[ advertised_subnet allow_ping destination_nat nat_pool no_readvertise_to_lan_bgp no_readvertise_to_lan_ospf no_readvertise_to_overlay other_vrfs routed source_nat static_nat summarized_subnet summarized_subnet_to_lan_bgp summarized_subnet_to_lan_ospf ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
214 215 216 217 218 219 220 |
# File 'lib/mist_api/models/network_vpn_access_config.rb', line 214 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
236 237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/mist_api/models/network_vpn_access_config.rb', line 236 def inspect class_name = self.class.name.split('::').last "<#{class_name} advertised_subnet: #{@advertised_subnet.inspect}, allow_ping:"\ " #{@allow_ping.inspect}, destination_nat: #{@destination_nat.inspect}, nat_pool:"\ " #{@nat_pool.inspect}, no_readvertise_to_lan_bgp: #{@no_readvertise_to_lan_bgp.inspect},"\ " no_readvertise_to_lan_ospf: #{@no_readvertise_to_lan_ospf.inspect},"\ " no_readvertise_to_overlay: #{@no_readvertise_to_overlay.inspect}, other_vrfs:"\ " #{@other_vrfs.inspect}, routed: #{@routed.inspect}, source_nat: #{@source_nat.inspect},"\ " static_nat: #{@static_nat.inspect}, summarized_subnet: #{@summarized_subnet.inspect},"\ " summarized_subnet_to_lan_bgp: #{@summarized_subnet_to_lan_bgp.inspect},"\ " summarized_subnet_to_lan_ospf: #{@summarized_subnet_to_lan_ospf.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
223 224 225 226 227 228 229 230 231 232 233 |
# File 'lib/mist_api/models/network_vpn_access_config.rb', line 223 def to_s class_name = self.class.name.split('::').last "<#{class_name} advertised_subnet: #{@advertised_subnet}, allow_ping: #{@allow_ping},"\ " destination_nat: #{@destination_nat}, nat_pool: #{@nat_pool}, no_readvertise_to_lan_bgp:"\ " #{@no_readvertise_to_lan_bgp}, no_readvertise_to_lan_ospf: #{@no_readvertise_to_lan_ospf},"\ " no_readvertise_to_overlay: #{@no_readvertise_to_overlay}, other_vrfs: #{@other_vrfs},"\ " routed: #{@routed}, source_nat: #{@source_nat}, static_nat: #{@static_nat},"\ " summarized_subnet: #{@summarized_subnet}, summarized_subnet_to_lan_bgp:"\ " #{@summarized_subnet_to_lan_bgp}, summarized_subnet_to_lan_ospf:"\ " #{@summarized_subnet_to_lan_ospf}>" end |