Class: MistApi::WxlanTunnelDmvpn

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/mist_api/models/wxlan_tunnel_dmvpn.rb

Overview

Dynamic Multipoint VPN configurations

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(enabled = false, holding_time = SKIP, host_routes = SKIP) ⇒ WxlanTunnelDmvpn

Returns a new instance of WxlanTunnelDmvpn.



49
50
51
52
53
# File 'lib/mist_api/models/wxlan_tunnel_dmvpn.rb', line 49

def initialize(enabled = false, holding_time = SKIP, host_routes = SKIP)
  @enabled = enabled unless enabled == SKIP
  @holding_time = holding_time unless holding_time == SKIP
  @host_routes = host_routes unless host_routes == SKIP
end

Instance Attribute Details

#enabledTrueClass | FalseClass

Whether DMVPN is enabled

Returns:

  • (TrueClass | FalseClass)


14
15
16
# File 'lib/mist_api/models/wxlan_tunnel_dmvpn.rb', line 14

def enabled
  @enabled
end

#holding_timeInteger

Optional; the holding time for NHRP ‘registration requests’ and ‘resolution replies’ sent from the Mist AP (in seconds); default 600

Returns:

  • (Integer)


19
20
21
# File 'lib/mist_api/models/wxlan_tunnel_dmvpn.rb', line 19

def holding_time
  @holding_time
end

#host_routesArray[String]

Optional; list of IPv4 DMVPN peer host ip-addresses to which traffic is forwarded

Returns:

  • (Array[String])


24
25
26
# File 'lib/mist_api/models/wxlan_tunnel_dmvpn.rb', line 24

def host_routes
  @host_routes
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/mist_api/models/wxlan_tunnel_dmvpn.rb', line 56

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  enabled = hash['enabled'] ||= false
  holding_time = hash.key?('holding_time') ? hash['holding_time'] : SKIP
  host_routes = hash.key?('host_routes') ? hash['host_routes'] : SKIP

  # Create object from extracted values.
  WxlanTunnelDmvpn.new(enabled,
                       holding_time,
                       host_routes)
end

.namesObject

A mapping from model property names to API property names.



27
28
29
30
31
32
33
# File 'lib/mist_api/models/wxlan_tunnel_dmvpn.rb', line 27

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['enabled'] = 'enabled'
  @_hash['holding_time'] = 'holding_time'
  @_hash['host_routes'] = 'host_routes'
  @_hash
end

.nullablesObject

An array for nullable fields



45
46
47
# File 'lib/mist_api/models/wxlan_tunnel_dmvpn.rb', line 45

def self.nullables
  []
end

.optionalsObject

An array for optional fields



36
37
38
39
40
41
42
# File 'lib/mist_api/models/wxlan_tunnel_dmvpn.rb', line 36

def self.optionals
  %w[
    enabled
    holding_time
    host_routes
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



78
79
80
81
82
# File 'lib/mist_api/models/wxlan_tunnel_dmvpn.rb', line 78

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} enabled: #{@enabled.inspect}, holding_time: #{@holding_time.inspect},"\
  " host_routes: #{@host_routes.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



71
72
73
74
75
# File 'lib/mist_api/models/wxlan_tunnel_dmvpn.rb', line 71

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} enabled: #{@enabled}, holding_time: #{@holding_time}, host_routes:"\
  " #{@host_routes}>"
end