Class: MistApi::StatsGateway
- Defined in:
- lib/mist_api/models/stats_gateway.rb
Overview
Gateway statistics
Instance Attribute Summary collapse
-
#ap_redundancy ⇒ ApRedundancy
TODO: Write general description for this method.
-
#arp_table_stats ⇒ ArpTableStats
TODO: Write general description for this method.
-
#auto_upgrade_stat ⇒ StatsApAutoUpgrade
TODO: Write general description for this method.
-
#bgp_peers ⇒ Array[BgpPeer]
Only present when ‘bgp_peers` in `fields` query parameter.
-
#cert_expiry ⇒ Integer
Only present when ‘bgp_peers` in `fields` query parameter.
-
#cluster_config ⇒ StatsClusterConfig
Only present when ‘bgp_peers` in `fields` query parameter.
-
#cluster_stat ⇒ StatsGatewayCluster
Only present when ‘bgp_peers` in `fields` query parameter.
-
#conductor_name ⇒ String
Only present when ‘bgp_peers` in `fields` query parameter.
-
#config_status ⇒ String
Only present when ‘bgp_peers` in `fields` query parameter.
-
#config_timestamp ⇒ Integer
Only present when ‘bgp_peers` in `fields` query parameter.
-
#config_version ⇒ Integer
Only present when ‘bgp_peers` in `fields` query parameter.
-
#cpu2_stat ⇒ CpuStat
Only present when ‘bgp_peers` in `fields` query parameter.
-
#cpu_stat ⇒ CpuStat
Only present when ‘bgp_peers` in `fields` query parameter.
-
#created_time ⇒ Float
When the object has been created, in epoch.
-
#deviceprofile_id ⇒ UUID | String
When the object has been created, in epoch.
-
#deviceprofile_name ⇒ String
When the object has been created, in epoch.
-
#dhcpd2_stat ⇒ Hash[String, DhcpdStatLan]
Property key is the network name.
-
#dhcpd_stat ⇒ Hash[String, DhcpdStatLan]
Property key is the network name.
-
#evpntopo_id ⇒ UUID | String
Property key is the network name.
-
#ext_ip ⇒ String
IP address.
-
#fwupdate ⇒ FwupdateStat
IP address.
-
#has_pcap ⇒ TrueClass | FalseClass
IP address.
-
#hostname ⇒ String
Hostname reported by the device.
-
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization.
-
#if2_stat ⇒ Hash[String, IfStatProperty]
Property key is the interface name.
-
#if_stat ⇒ Hash[String, IfStatProperty]
Property key is the interface name.
-
#ip ⇒ String
IP address.
-
#ip2_stat ⇒ IpStat
IP address.
-
#ip_stat ⇒ IpStat
IP address.
-
#is_ha ⇒ TrueClass | FalseClass
IP address.
-
#last_seen ⇒ Float
Last seen timestamp.
-
#mac ⇒ String
Device mac.
-
#mac_table_stats ⇒ StatsGatewayMacTableStats
Device mac.
-
#map_id ⇒ UUID | String
Serial Number.
-
#memory2_stat ⇒ MemoryStat
Memory usage stat (for virtual chassis, memory usage of master RE).
-
#memory_stat ⇒ MemoryStat
Memory usage stat (for virtual chassis, memory usage of master RE).
-
#model ⇒ String
Device model.
-
#modified_time ⇒ Float
When the object has been modified for the last time, in epoch.
-
#module2_stat ⇒ Array[StatsGatewayModuleStatItem]
When the object has been modified for the last time, in epoch.
-
#module_stat ⇒ Array[StatsGatewayModuleStatItem]
When the object has been modified for the last time, in epoch.
-
#name ⇒ String
Device name if configured.
-
#node_name ⇒ String
Device name if configured.
-
#org_id ⇒ UUID | String
Device name if configured.
-
#ports ⇒ Array[StatsGatewayPort]
Only present when ‘ports` in `fields` query parameter.
-
#route_summary_stats ⇒ RouteSummaryStats
Only present when ‘ports` in `fields` query parameter.
-
#router_name ⇒ String
Device name if configured.
-
#serial ⇒ String
Serial Number.
-
#service2_stat ⇒ Hash[String, ServiceStatProperty]
Serial Number.
-
#service_stat ⇒ Hash[String, ServiceStatProperty]
Serial Number.
-
#service_status ⇒ StatsGatewayServiceStatus
Serial Number.
-
#site_id ⇒ UUID | String
Serial Number.
-
#spu2_stat ⇒ Array[StatsGatewaySpuItem]
Serial Number.
-
#spu_stat ⇒ Array[StatsGatewaySpuItem]
Serial Number.
-
#status ⇒ String
Serial Number.
-
#tag_id ⇒ Integer
Serial Number.
-
#tag_uuid ⇒ UUID | String
Serial Number.
-
#tunnels ⇒ Array[StatsGatewayWanTunnel]
Only present when ‘tunnels` in `fields` query parameter.
-
#type ⇒ String
readonly
Device Type.
-
#uptime ⇒ Float
Device Type.
-
#version ⇒ String
Device Type.
-
#vpn_peers ⇒ Array[StatsGatewayVpnPeer]
Only present when ‘vpn_peers` in `fields` query parameter.
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.
Instance Method Summary collapse
-
#initialize(mac = nil, ap_redundancy = SKIP, arp_table_stats = SKIP, auto_upgrade_stat = SKIP, bgp_peers = SKIP, cert_expiry = SKIP, cluster_config = SKIP, cluster_stat = SKIP, conductor_name = SKIP, config_status = SKIP, config_timestamp = SKIP, config_version = SKIP, cpu2_stat = SKIP, cpu_stat = SKIP, created_time = SKIP, deviceprofile_id = SKIP, deviceprofile_name = SKIP, dhcpd2_stat = SKIP, dhcpd_stat = SKIP, evpntopo_id = SKIP, ext_ip = SKIP, fwupdate = SKIP, has_pcap = SKIP, hostname = SKIP, id = SKIP, if2_stat = SKIP, if_stat = SKIP, ip = SKIP, ip2_stat = SKIP, ip_stat = SKIP, is_ha = SKIP, last_seen = SKIP, mac_table_stats = SKIP, map_id = SKIP, memory2_stat = SKIP, memory_stat = SKIP, model = SKIP, modified_time = SKIP, module2_stat = SKIP, module_stat = SKIP, name = SKIP, node_name = SKIP, org_id = SKIP, ports = SKIP, route_summary_stats = SKIP, router_name = SKIP, serial = SKIP, service2_stat = SKIP, service_stat = SKIP, service_status = SKIP, site_id = SKIP, spu2_stat = SKIP, spu_stat = SKIP, status = SKIP, tag_id = SKIP, tag_uuid = SKIP, tunnels = SKIP, uptime = SKIP, version = SKIP, vpn_peers = SKIP, additional_properties = nil) ⇒ StatsGateway
constructor
A new instance of StatsGateway.
-
#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(mac = nil, ap_redundancy = SKIP, arp_table_stats = SKIP, auto_upgrade_stat = SKIP, bgp_peers = SKIP, cert_expiry = SKIP, cluster_config = SKIP, cluster_stat = SKIP, conductor_name = SKIP, config_status = SKIP, config_timestamp = SKIP, config_version = SKIP, cpu2_stat = SKIP, cpu_stat = SKIP, created_time = SKIP, deviceprofile_id = SKIP, deviceprofile_name = SKIP, dhcpd2_stat = SKIP, dhcpd_stat = SKIP, evpntopo_id = SKIP, ext_ip = SKIP, fwupdate = SKIP, has_pcap = SKIP, hostname = SKIP, id = SKIP, if2_stat = SKIP, if_stat = SKIP, ip = SKIP, ip2_stat = SKIP, ip_stat = SKIP, is_ha = SKIP, last_seen = SKIP, mac_table_stats = SKIP, map_id = SKIP, memory2_stat = SKIP, memory_stat = SKIP, model = SKIP, modified_time = SKIP, module2_stat = SKIP, module_stat = SKIP, name = SKIP, node_name = SKIP, org_id = SKIP, ports = SKIP, route_summary_stats = SKIP, router_name = SKIP, serial = SKIP, service2_stat = SKIP, service_stat = SKIP, service_status = SKIP, site_id = SKIP, spu2_stat = SKIP, spu_stat = SKIP, status = SKIP, tag_id = SKIP, tag_uuid = SKIP, tunnels = SKIP, uptime = SKIP, version = SKIP, vpn_peers = SKIP, additional_properties = nil) ⇒ StatsGateway
Returns a new instance of StatsGateway.
432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 |
# File 'lib/mist_api/models/stats_gateway.rb', line 432 def initialize(mac = nil, ap_redundancy = SKIP, arp_table_stats = SKIP, auto_upgrade_stat = SKIP, bgp_peers = SKIP, cert_expiry = SKIP, cluster_config = SKIP, cluster_stat = SKIP, conductor_name = SKIP, config_status = SKIP, = SKIP, config_version = SKIP, cpu2_stat = SKIP, cpu_stat = SKIP, created_time = SKIP, deviceprofile_id = SKIP, deviceprofile_name = SKIP, dhcpd2_stat = SKIP, dhcpd_stat = SKIP, evpntopo_id = SKIP, ext_ip = SKIP, fwupdate = SKIP, has_pcap = SKIP, hostname = SKIP, id = SKIP, if2_stat = SKIP, if_stat = SKIP, ip = SKIP, ip2_stat = SKIP, ip_stat = SKIP, is_ha = SKIP, last_seen = SKIP, mac_table_stats = SKIP, map_id = SKIP, memory2_stat = SKIP, memory_stat = SKIP, model = SKIP, modified_time = SKIP, module2_stat = SKIP, module_stat = SKIP, name = SKIP, node_name = SKIP, org_id = SKIP, ports = SKIP, route_summary_stats = SKIP, router_name = SKIP, serial = SKIP, service2_stat = SKIP, service_stat = SKIP, service_status = SKIP, site_id = SKIP, spu2_stat = SKIP, spu_stat = SKIP, status = SKIP, tag_id = SKIP, tag_uuid = SKIP, tunnels = SKIP, uptime = SKIP, version = SKIP, vpn_peers = SKIP, additional_properties = nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @ap_redundancy = ap_redundancy unless ap_redundancy == SKIP @arp_table_stats = arp_table_stats unless arp_table_stats == SKIP @auto_upgrade_stat = auto_upgrade_stat unless auto_upgrade_stat == SKIP @bgp_peers = bgp_peers unless bgp_peers == SKIP @cert_expiry = cert_expiry unless cert_expiry == SKIP @cluster_config = cluster_config unless cluster_config == SKIP @cluster_stat = cluster_stat unless cluster_stat == SKIP @conductor_name = conductor_name unless conductor_name == SKIP @config_status = config_status unless config_status == SKIP @config_timestamp = unless == SKIP @config_version = config_version unless config_version == SKIP @cpu2_stat = cpu2_stat unless cpu2_stat == SKIP @cpu_stat = cpu_stat unless cpu_stat == SKIP @created_time = created_time unless created_time == SKIP @deviceprofile_id = deviceprofile_id unless deviceprofile_id == SKIP @deviceprofile_name = deviceprofile_name unless deviceprofile_name == SKIP @dhcpd2_stat = dhcpd2_stat unless dhcpd2_stat == SKIP @dhcpd_stat = dhcpd_stat unless dhcpd_stat == SKIP @evpntopo_id = evpntopo_id unless evpntopo_id == SKIP @ext_ip = ext_ip unless ext_ip == SKIP @fwupdate = fwupdate unless fwupdate == SKIP @has_pcap = has_pcap unless has_pcap == SKIP @hostname = hostname unless hostname == SKIP @id = id unless id == SKIP @if2_stat = if2_stat unless if2_stat == SKIP @if_stat = if_stat unless if_stat == SKIP @ip = ip unless ip == SKIP @ip2_stat = ip2_stat unless ip2_stat == SKIP @ip_stat = ip_stat unless ip_stat == SKIP @is_ha = is_ha unless is_ha == SKIP @last_seen = last_seen unless last_seen == SKIP @mac = mac @mac_table_stats = mac_table_stats unless mac_table_stats == SKIP @map_id = map_id unless map_id == SKIP @memory2_stat = memory2_stat unless memory2_stat == SKIP @memory_stat = memory_stat unless memory_stat == SKIP @model = model unless model == SKIP @modified_time = modified_time unless modified_time == SKIP @module2_stat = module2_stat unless module2_stat == SKIP @module_stat = module_stat unless module_stat == SKIP @name = name unless name == SKIP @node_name = node_name unless node_name == SKIP @org_id = org_id unless org_id == SKIP @ports = ports unless ports == SKIP @route_summary_stats = route_summary_stats unless route_summary_stats == SKIP @router_name = router_name unless router_name == SKIP @serial = serial unless serial == SKIP @service2_stat = service2_stat unless service2_stat == SKIP @service_stat = service_stat unless service_stat == SKIP @service_status = service_status unless service_status == SKIP @site_id = site_id unless site_id == SKIP @spu2_stat = spu2_stat unless spu2_stat == SKIP @spu_stat = spu_stat unless spu_stat == SKIP @status = status unless status == SKIP @tag_id = tag_id unless tag_id == SKIP @tag_uuid = tag_uuid unless tag_uuid == SKIP @tunnels = tunnels unless tunnels == SKIP @type = 'gateway' @uptime = uptime unless uptime == SKIP @version = version unless version == SKIP @vpn_peers = vpn_peers unless vpn_peers == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#ap_redundancy ⇒ ApRedundancy
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/stats_gateway.rb', line 14 def ap_redundancy @ap_redundancy end |
#arp_table_stats ⇒ ArpTableStats
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/stats_gateway.rb', line 18 def arp_table_stats @arp_table_stats end |
#auto_upgrade_stat ⇒ StatsApAutoUpgrade
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/stats_gateway.rb', line 22 def auto_upgrade_stat @auto_upgrade_stat end |
#bgp_peers ⇒ Array[BgpPeer]
Only present when ‘bgp_peers` in `fields` query parameter. Each port object is same as `GET /api/v1/sites/#site_id/stats/bgp_peers/search` result object, except that org_id, site_id, mac, model are removed
28 29 30 |
# File 'lib/mist_api/models/stats_gateway.rb', line 28 def bgp_peers @bgp_peers end |
#cert_expiry ⇒ Integer
Only present when ‘bgp_peers` in `fields` query parameter. Each port object is same as `GET /api/v1/sites/#site_id/stats/bgp_peers/search` result object, except that org_id, site_id, mac, model are removed
34 35 36 |
# File 'lib/mist_api/models/stats_gateway.rb', line 34 def cert_expiry @cert_expiry end |
#cluster_config ⇒ StatsClusterConfig
Only present when ‘bgp_peers` in `fields` query parameter. Each port object is same as `GET /api/v1/sites/#site_id/stats/bgp_peers/search` result object, except that org_id, site_id, mac, model are removed
40 41 42 |
# File 'lib/mist_api/models/stats_gateway.rb', line 40 def cluster_config @cluster_config end |
#cluster_stat ⇒ StatsGatewayCluster
Only present when ‘bgp_peers` in `fields` query parameter. Each port object is same as `GET /api/v1/sites/#site_id/stats/bgp_peers/search` result object, except that org_id, site_id, mac, model are removed
46 47 48 |
# File 'lib/mist_api/models/stats_gateway.rb', line 46 def cluster_stat @cluster_stat end |
#conductor_name ⇒ String
Only present when ‘bgp_peers` in `fields` query parameter. Each port object is same as `GET /api/v1/sites/#site_id/stats/bgp_peers/search` result object, except that org_id, site_id, mac, model are removed
52 53 54 |
# File 'lib/mist_api/models/stats_gateway.rb', line 52 def conductor_name @conductor_name end |
#config_status ⇒ String
Only present when ‘bgp_peers` in `fields` query parameter. Each port object is same as `GET /api/v1/sites/#site_id/stats/bgp_peers/search` result object, except that org_id, site_id, mac, model are removed
58 59 60 |
# File 'lib/mist_api/models/stats_gateway.rb', line 58 def config_status @config_status end |
#config_timestamp ⇒ Integer
Only present when ‘bgp_peers` in `fields` query parameter. Each port object is same as `GET /api/v1/sites/#site_id/stats/bgp_peers/search` result object, except that org_id, site_id, mac, model are removed
64 65 66 |
# File 'lib/mist_api/models/stats_gateway.rb', line 64 def @config_timestamp end |
#config_version ⇒ Integer
Only present when ‘bgp_peers` in `fields` query parameter. Each port object is same as `GET /api/v1/sites/#site_id/stats/bgp_peers/search` result object, except that org_id, site_id, mac, model are removed
70 71 72 |
# File 'lib/mist_api/models/stats_gateway.rb', line 70 def config_version @config_version end |
#cpu2_stat ⇒ CpuStat
Only present when ‘bgp_peers` in `fields` query parameter. Each port object is same as `GET /api/v1/sites/#site_id/stats/bgp_peers/search` result object, except that org_id, site_id, mac, model are removed
76 77 78 |
# File 'lib/mist_api/models/stats_gateway.rb', line 76 def cpu2_stat @cpu2_stat end |
#cpu_stat ⇒ CpuStat
Only present when ‘bgp_peers` in `fields` query parameter. Each port object is same as `GET /api/v1/sites/#site_id/stats/bgp_peers/search` result object, except that org_id, site_id, mac, model are removed
82 83 84 |
# File 'lib/mist_api/models/stats_gateway.rb', line 82 def cpu_stat @cpu_stat end |
#created_time ⇒ Float
When the object has been created, in epoch
86 87 88 |
# File 'lib/mist_api/models/stats_gateway.rb', line 86 def created_time @created_time end |
#deviceprofile_id ⇒ UUID | String
When the object has been created, in epoch
90 91 92 |
# File 'lib/mist_api/models/stats_gateway.rb', line 90 def deviceprofile_id @deviceprofile_id end |
#deviceprofile_name ⇒ String
When the object has been created, in epoch
94 95 96 |
# File 'lib/mist_api/models/stats_gateway.rb', line 94 def deviceprofile_name @deviceprofile_name end |
#dhcpd2_stat ⇒ Hash[String, DhcpdStatLan]
Property key is the network name
98 99 100 |
# File 'lib/mist_api/models/stats_gateway.rb', line 98 def dhcpd2_stat @dhcpd2_stat end |
#dhcpd_stat ⇒ Hash[String, DhcpdStatLan]
Property key is the network name
102 103 104 |
# File 'lib/mist_api/models/stats_gateway.rb', line 102 def dhcpd_stat @dhcpd_stat end |
#evpntopo_id ⇒ UUID | String
Property key is the network name
106 107 108 |
# File 'lib/mist_api/models/stats_gateway.rb', line 106 def evpntopo_id @evpntopo_id end |
#ext_ip ⇒ String
IP address
110 111 112 |
# File 'lib/mist_api/models/stats_gateway.rb', line 110 def ext_ip @ext_ip end |
#fwupdate ⇒ FwupdateStat
IP address
114 115 116 |
# File 'lib/mist_api/models/stats_gateway.rb', line 114 def fwupdate @fwupdate end |
#has_pcap ⇒ TrueClass | FalseClass
IP address
118 119 120 |
# File 'lib/mist_api/models/stats_gateway.rb', line 118 def has_pcap @has_pcap end |
#hostname ⇒ String
Hostname reported by the device
122 123 124 |
# File 'lib/mist_api/models/stats_gateway.rb', line 122 def hostname @hostname end |
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization
126 127 128 |
# File 'lib/mist_api/models/stats_gateway.rb', line 126 def id @id end |
#if2_stat ⇒ Hash[String, IfStatProperty]
Property key is the interface name
130 131 132 |
# File 'lib/mist_api/models/stats_gateway.rb', line 130 def if2_stat @if2_stat end |
#if_stat ⇒ Hash[String, IfStatProperty]
Property key is the interface name
134 135 136 |
# File 'lib/mist_api/models/stats_gateway.rb', line 134 def if_stat @if_stat end |
#ip ⇒ String
IP address
138 139 140 |
# File 'lib/mist_api/models/stats_gateway.rb', line 138 def ip @ip end |
#ip2_stat ⇒ IpStat
IP address
142 143 144 |
# File 'lib/mist_api/models/stats_gateway.rb', line 142 def ip2_stat @ip2_stat end |
#ip_stat ⇒ IpStat
IP address
146 147 148 |
# File 'lib/mist_api/models/stats_gateway.rb', line 146 def ip_stat @ip_stat end |
#is_ha ⇒ TrueClass | FalseClass
IP address
150 151 152 |
# File 'lib/mist_api/models/stats_gateway.rb', line 150 def is_ha @is_ha end |
#last_seen ⇒ Float
Last seen timestamp
154 155 156 |
# File 'lib/mist_api/models/stats_gateway.rb', line 154 def last_seen @last_seen end |
#mac ⇒ String
Device mac
158 159 160 |
# File 'lib/mist_api/models/stats_gateway.rb', line 158 def mac @mac end |
#mac_table_stats ⇒ StatsGatewayMacTableStats
Device mac
162 163 164 |
# File 'lib/mist_api/models/stats_gateway.rb', line 162 def mac_table_stats @mac_table_stats end |
#map_id ⇒ UUID | String
Serial Number
166 167 168 |
# File 'lib/mist_api/models/stats_gateway.rb', line 166 def map_id @map_id end |
#memory2_stat ⇒ MemoryStat
Memory usage stat (for virtual chassis, memory usage of master RE)
170 171 172 |
# File 'lib/mist_api/models/stats_gateway.rb', line 170 def memory2_stat @memory2_stat end |
#memory_stat ⇒ MemoryStat
Memory usage stat (for virtual chassis, memory usage of master RE)
174 175 176 |
# File 'lib/mist_api/models/stats_gateway.rb', line 174 def memory_stat @memory_stat end |
#model ⇒ String
Device model
178 179 180 |
# File 'lib/mist_api/models/stats_gateway.rb', line 178 def model @model end |
#modified_time ⇒ Float
When the object has been modified for the last time, in epoch
182 183 184 |
# File 'lib/mist_api/models/stats_gateway.rb', line 182 def modified_time @modified_time end |
#module2_stat ⇒ Array[StatsGatewayModuleStatItem]
When the object has been modified for the last time, in epoch
186 187 188 |
# File 'lib/mist_api/models/stats_gateway.rb', line 186 def module2_stat @module2_stat end |
#module_stat ⇒ Array[StatsGatewayModuleStatItem]
When the object has been modified for the last time, in epoch
190 191 192 |
# File 'lib/mist_api/models/stats_gateway.rb', line 190 def module_stat @module_stat end |
#name ⇒ String
Device name if configured
194 195 196 |
# File 'lib/mist_api/models/stats_gateway.rb', line 194 def name @name end |
#node_name ⇒ String
Device name if configured
198 199 200 |
# File 'lib/mist_api/models/stats_gateway.rb', line 198 def node_name @node_name end |
#org_id ⇒ UUID | String
Device name if configured
202 203 204 |
# File 'lib/mist_api/models/stats_gateway.rb', line 202 def org_id @org_id end |
#ports ⇒ Array[StatsGatewayPort]
Only present when ‘ports` in `fields` query parameter. Each port object is same as `GET /api/v1/sites/#site_id/stats/ports/search` result object, except that org_id, site_id, mac, model are removed
208 209 210 |
# File 'lib/mist_api/models/stats_gateway.rb', line 208 def ports @ports end |
#route_summary_stats ⇒ RouteSummaryStats
Only present when ‘ports` in `fields` query parameter. Each port object is same as `GET /api/v1/sites/#site_id/stats/ports/search` result object, except that org_id, site_id, mac, model are removed
214 215 216 |
# File 'lib/mist_api/models/stats_gateway.rb', line 214 def route_summary_stats @route_summary_stats end |
#router_name ⇒ String
Device name if configured
218 219 220 |
# File 'lib/mist_api/models/stats_gateway.rb', line 218 def router_name @router_name end |
#serial ⇒ String
Serial Number
222 223 224 |
# File 'lib/mist_api/models/stats_gateway.rb', line 222 def serial @serial end |
#service2_stat ⇒ Hash[String, ServiceStatProperty]
Serial Number
226 227 228 |
# File 'lib/mist_api/models/stats_gateway.rb', line 226 def service2_stat @service2_stat end |
#service_stat ⇒ Hash[String, ServiceStatProperty]
Serial Number
230 231 232 |
# File 'lib/mist_api/models/stats_gateway.rb', line 230 def service_stat @service_stat end |
#service_status ⇒ StatsGatewayServiceStatus
Serial Number
234 235 236 |
# File 'lib/mist_api/models/stats_gateway.rb', line 234 def service_status @service_status end |
#site_id ⇒ UUID | String
Serial Number
238 239 240 |
# File 'lib/mist_api/models/stats_gateway.rb', line 238 def site_id @site_id end |
#spu2_stat ⇒ Array[StatsGatewaySpuItem]
Serial Number
242 243 244 |
# File 'lib/mist_api/models/stats_gateway.rb', line 242 def spu2_stat @spu2_stat end |
#spu_stat ⇒ Array[StatsGatewaySpuItem]
Serial Number
246 247 248 |
# File 'lib/mist_api/models/stats_gateway.rb', line 246 def spu_stat @spu_stat end |
#status ⇒ String
Serial Number
250 251 252 |
# File 'lib/mist_api/models/stats_gateway.rb', line 250 def status @status end |
#tag_id ⇒ Integer
Serial Number
254 255 256 |
# File 'lib/mist_api/models/stats_gateway.rb', line 254 def tag_id @tag_id end |
#tag_uuid ⇒ UUID | String
Serial Number
258 259 260 |
# File 'lib/mist_api/models/stats_gateway.rb', line 258 def tag_uuid @tag_uuid end |
#tunnels ⇒ Array[StatsGatewayWanTunnel]
Only present when ‘tunnels` in `fields` query parameter. Each port object is same as `GET /api/v1/sites/#site_id/stats/tunnels/search` result object, except that org_id, site_id, mac, model are removed
264 265 266 |
# File 'lib/mist_api/models/stats_gateway.rb', line 264 def tunnels @tunnels end |
#type ⇒ String (readonly)
Device Type. enum: ‘gateway`
268 269 270 |
# File 'lib/mist_api/models/stats_gateway.rb', line 268 def type @type end |
#uptime ⇒ Float
Device Type. enum: ‘gateway`
272 273 274 |
# File 'lib/mist_api/models/stats_gateway.rb', line 272 def uptime @uptime end |
#version ⇒ String
Device Type. enum: ‘gateway`
276 277 278 |
# File 'lib/mist_api/models/stats_gateway.rb', line 276 def version @version end |
#vpn_peers ⇒ Array[StatsGatewayVpnPeer]
Only present when ‘vpn_peers` in `fields` query parameter. Each port object is same as `GET /api/v1/sites/#site_id/stats/vpn_peers/search` result object, except that org_id, site_id, mac, model are removed
282 283 284 |
# File 'lib/mist_api/models/stats_gateway.rb', line 282 def vpn_peers @vpn_peers end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 |
# File 'lib/mist_api/models/stats_gateway.rb', line 523 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. mac = hash.key?('mac') ? hash['mac'] : nil ap_redundancy = ApRedundancy.from_hash(hash['ap_redundancy']) if hash['ap_redundancy'] arp_table_stats = ArpTableStats.from_hash(hash['arp_table_stats']) if hash['arp_table_stats'] auto_upgrade_stat = StatsApAutoUpgrade.from_hash(hash['auto_upgrade_stat']) if hash['auto_upgrade_stat'] # Parameter is an array, so we need to iterate through it bgp_peers = nil unless hash['bgp_peers'].nil? bgp_peers = [] hash['bgp_peers'].each do |structure| bgp_peers << (BgpPeer.from_hash(structure) if structure) end end bgp_peers = SKIP unless hash.key?('bgp_peers') cert_expiry = hash.key?('cert_expiry') ? hash['cert_expiry'] : SKIP cluster_config = StatsClusterConfig.from_hash(hash['cluster_config']) if hash['cluster_config'] cluster_stat = StatsGatewayCluster.from_hash(hash['cluster_stat']) if hash['cluster_stat'] conductor_name = hash.key?('conductor_name') ? hash['conductor_name'] : SKIP config_status = hash.key?('config_status') ? hash['config_status'] : SKIP = hash.key?('config_timestamp') ? hash['config_timestamp'] : SKIP config_version = hash.key?('config_version') ? hash['config_version'] : SKIP cpu2_stat = CpuStat.from_hash(hash['cpu2_stat']) if hash['cpu2_stat'] cpu_stat = CpuStat.from_hash(hash['cpu_stat']) if hash['cpu_stat'] created_time = hash.key?('created_time') ? hash['created_time'] : SKIP deviceprofile_id = hash.key?('deviceprofile_id') ? hash['deviceprofile_id'] : SKIP deviceprofile_name = hash.key?('deviceprofile_name') ? hash['deviceprofile_name'] : SKIP dhcpd2_stat = DhcpdStatLan.from_hash(hash['dhcpd2_stat']) if hash['dhcpd2_stat'] dhcpd2_stat = SKIP unless hash.key?('dhcpd2_stat') dhcpd_stat = DhcpdStatLan.from_hash(hash['dhcpd_stat']) if hash['dhcpd_stat'] dhcpd_stat = SKIP unless hash.key?('dhcpd_stat') evpntopo_id = hash.key?('evpntopo_id') ? hash['evpntopo_id'] : SKIP ext_ip = hash.key?('ext_ip') ? hash['ext_ip'] : SKIP fwupdate = FwupdateStat.from_hash(hash['fwupdate']) if hash['fwupdate'] has_pcap = hash.key?('has_pcap') ? hash['has_pcap'] : SKIP hostname = hash.key?('hostname') ? hash['hostname'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP if2_stat = IfStatProperty.from_hash(hash['if2_stat']) if hash['if2_stat'] if2_stat = SKIP unless hash.key?('if2_stat') if_stat = IfStatProperty.from_hash(hash['if_stat']) if hash['if_stat'] if_stat = SKIP unless hash.key?('if_stat') ip = hash.key?('ip') ? hash['ip'] : SKIP ip2_stat = IpStat.from_hash(hash['ip2_stat']) if hash['ip2_stat'] ip_stat = IpStat.from_hash(hash['ip_stat']) if hash['ip_stat'] is_ha = hash.key?('is_ha') ? hash['is_ha'] : SKIP last_seen = hash.key?('last_seen') ? hash['last_seen'] : SKIP mac_table_stats = StatsGatewayMacTableStats.from_hash(hash['mac_table_stats']) if hash['mac_table_stats'] map_id = hash.key?('map_id') ? hash['map_id'] : SKIP memory2_stat = MemoryStat.from_hash(hash['memory2_stat']) if hash['memory2_stat'] memory_stat = MemoryStat.from_hash(hash['memory_stat']) if hash['memory_stat'] model = hash.key?('model') ? hash['model'] : SKIP modified_time = hash.key?('modified_time') ? hash['modified_time'] : SKIP # Parameter is an array, so we need to iterate through it module2_stat = nil unless hash['module2_stat'].nil? module2_stat = [] hash['module2_stat'].each do |structure| module2_stat << (StatsGatewayModuleStatItem.from_hash(structure) if structure) end end module2_stat = SKIP unless hash.key?('module2_stat') # Parameter is an array, so we need to iterate through it module_stat = nil unless hash['module_stat'].nil? module_stat = [] hash['module_stat'].each do |structure| module_stat << (StatsGatewayModuleStatItem.from_hash(structure) if structure) end end module_stat = SKIP unless hash.key?('module_stat') name = hash.key?('name') ? hash['name'] : SKIP node_name = hash.key?('node_name') ? hash['node_name'] : SKIP org_id = hash.key?('org_id') ? hash['org_id'] : SKIP # Parameter is an array, so we need to iterate through it ports = nil unless hash['ports'].nil? ports = [] hash['ports'].each do |structure| ports << (StatsGatewayPort.from_hash(structure) if structure) end end ports = SKIP unless hash.key?('ports') route_summary_stats = RouteSummaryStats.from_hash(hash['route_summary_stats']) if hash['route_summary_stats'] router_name = hash.key?('router_name') ? hash['router_name'] : SKIP serial = hash.key?('serial') ? hash['serial'] : SKIP service2_stat = ServiceStatProperty.from_hash(hash['service2_stat']) if hash['service2_stat'] service2_stat = SKIP unless hash.key?('service2_stat') service_stat = ServiceStatProperty.from_hash(hash['service_stat']) if hash['service_stat'] service_stat = SKIP unless hash.key?('service_stat') service_status = StatsGatewayServiceStatus.from_hash(hash['service_status']) if hash['service_status'] site_id = hash.key?('site_id') ? hash['site_id'] : SKIP # Parameter is an array, so we need to iterate through it spu2_stat = nil unless hash['spu2_stat'].nil? spu2_stat = [] hash['spu2_stat'].each do |structure| spu2_stat << (StatsGatewaySpuItem.from_hash(structure) if structure) end end spu2_stat = SKIP unless hash.key?('spu2_stat') # Parameter is an array, so we need to iterate through it spu_stat = nil unless hash['spu_stat'].nil? spu_stat = [] hash['spu_stat'].each do |structure| spu_stat << (StatsGatewaySpuItem.from_hash(structure) if structure) end end spu_stat = SKIP unless hash.key?('spu_stat') status = hash.key?('status') ? hash['status'] : SKIP tag_id = hash.key?('tag_id') ? hash['tag_id'] : SKIP tag_uuid = hash.key?('tag_uuid') ? hash['tag_uuid'] : SKIP # Parameter is an array, so we need to iterate through it tunnels = nil unless hash['tunnels'].nil? tunnels = [] hash['tunnels'].each do |structure| tunnels << (StatsGatewayWanTunnel.from_hash(structure) if structure) end end tunnels = SKIP unless hash.key?('tunnels') uptime = hash.key?('uptime') ? hash['uptime'] : SKIP version = hash.key?('version') ? hash['version'] : SKIP # Parameter is an array, so we need to iterate through it vpn_peers = nil unless hash['vpn_peers'].nil? vpn_peers = [] hash['vpn_peers'].each do |structure| vpn_peers << (StatsGatewayVpnPeer.from_hash(structure) if structure) end end vpn_peers = SKIP unless hash.key?('vpn_peers') # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. StatsGateway.new(mac, ap_redundancy, arp_table_stats, auto_upgrade_stat, bgp_peers, cert_expiry, cluster_config, cluster_stat, conductor_name, config_status, , config_version, cpu2_stat, cpu_stat, created_time, deviceprofile_id, deviceprofile_name, dhcpd2_stat, dhcpd_stat, evpntopo_id, ext_ip, fwupdate, has_pcap, hostname, id, if2_stat, if_stat, ip, ip2_stat, ip_stat, is_ha, last_seen, mac_table_stats, map_id, memory2_stat, memory_stat, model, modified_time, module2_stat, module_stat, name, node_name, org_id, ports, route_summary_stats, router_name, serial, service2_stat, service_stat, service_status, site_id, spu2_stat, spu_stat, status, tag_id, tag_uuid, tunnels, uptime, version, vpn_peers, additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'lib/mist_api/models/stats_gateway.rb', line 285 def self.names @_hash = {} if @_hash.nil? @_hash['ap_redundancy'] = 'ap_redundancy' @_hash['arp_table_stats'] = 'arp_table_stats' @_hash['auto_upgrade_stat'] = 'auto_upgrade_stat' @_hash['bgp_peers'] = 'bgp_peers' @_hash['cert_expiry'] = 'cert_expiry' @_hash['cluster_config'] = 'cluster_config' @_hash['cluster_stat'] = 'cluster_stat' @_hash['conductor_name'] = 'conductor_name' @_hash['config_status'] = 'config_status' @_hash['config_timestamp'] = 'config_timestamp' @_hash['config_version'] = 'config_version' @_hash['cpu2_stat'] = 'cpu2_stat' @_hash['cpu_stat'] = 'cpu_stat' @_hash['created_time'] = 'created_time' @_hash['deviceprofile_id'] = 'deviceprofile_id' @_hash['deviceprofile_name'] = 'deviceprofile_name' @_hash['dhcpd2_stat'] = 'dhcpd2_stat' @_hash['dhcpd_stat'] = 'dhcpd_stat' @_hash['evpntopo_id'] = 'evpntopo_id' @_hash['ext_ip'] = 'ext_ip' @_hash['fwupdate'] = 'fwupdate' @_hash['has_pcap'] = 'has_pcap' @_hash['hostname'] = 'hostname' @_hash['id'] = 'id' @_hash['if2_stat'] = 'if2_stat' @_hash['if_stat'] = 'if_stat' @_hash['ip'] = 'ip' @_hash['ip2_stat'] = 'ip2_stat' @_hash['ip_stat'] = 'ip_stat' @_hash['is_ha'] = 'is_ha' @_hash['last_seen'] = 'last_seen' @_hash['mac'] = 'mac' @_hash['mac_table_stats'] = 'mac_table_stats' @_hash['map_id'] = 'map_id' @_hash['memory2_stat'] = 'memory2_stat' @_hash['memory_stat'] = 'memory_stat' @_hash['model'] = 'model' @_hash['modified_time'] = 'modified_time' @_hash['module2_stat'] = 'module2_stat' @_hash['module_stat'] = 'module_stat' @_hash['name'] = 'name' @_hash['node_name'] = 'node_name' @_hash['org_id'] = 'org_id' @_hash['ports'] = 'ports' @_hash['route_summary_stats'] = 'route_summary_stats' @_hash['router_name'] = 'router_name' @_hash['serial'] = 'serial' @_hash['service2_stat'] = 'service2_stat' @_hash['service_stat'] = 'service_stat' @_hash['service_status'] = 'service_status' @_hash['site_id'] = 'site_id' @_hash['spu2_stat'] = 'spu2_stat' @_hash['spu_stat'] = 'spu_stat' @_hash['status'] = 'status' @_hash['tag_id'] = 'tag_id' @_hash['tag_uuid'] = 'tag_uuid' @_hash['tunnels'] = 'tunnels' @_hash['type'] = 'type' @_hash['uptime'] = 'uptime' @_hash['version'] = 'version' @_hash['vpn_peers'] = 'vpn_peers' @_hash end |
.nullables ⇒ Object
An array for nullable fields
417 418 419 420 421 422 423 424 425 426 427 428 429 430 |
# File 'lib/mist_api/models/stats_gateway.rb', line 417 def self.nullables %w[ deviceprofile_id evpntopo_id ext_ip has_pcap ip is_ha last_seen map_id uptime version ] end |
.optionals ⇒ Object
An array for optional fields
352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 |
# File 'lib/mist_api/models/stats_gateway.rb', line 352 def self.optionals %w[ ap_redundancy arp_table_stats auto_upgrade_stat bgp_peers cert_expiry cluster_config cluster_stat conductor_name config_status config_timestamp config_version cpu2_stat cpu_stat created_time deviceprofile_id deviceprofile_name dhcpd2_stat dhcpd_stat evpntopo_id ext_ip fwupdate has_pcap hostname id if2_stat if_stat ip ip2_stat ip_stat is_ha last_seen mac_table_stats map_id memory2_stat memory_stat model modified_time module2_stat module_stat name node_name org_id ports route_summary_stats router_name serial service2_stat service_stat service_status site_id spu2_stat spu_stat status tag_id tag_uuid tunnels uptime version vpn_peers ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 |
# File 'lib/mist_api/models/stats_gateway.rb', line 782 def inspect class_name = self.class.name.split('::').last "<#{class_name} ap_redundancy: #{@ap_redundancy.inspect}, arp_table_stats:"\ " #{@arp_table_stats.inspect}, auto_upgrade_stat: #{@auto_upgrade_stat.inspect}, bgp_peers:"\ " #{@bgp_peers.inspect}, cert_expiry: #{@cert_expiry.inspect}, cluster_config:"\ " #{@cluster_config.inspect}, cluster_stat: #{@cluster_stat.inspect}, conductor_name:"\ " #{@conductor_name.inspect}, config_status: #{@config_status.inspect}, config_timestamp:"\ " #{@config_timestamp.inspect}, config_version: #{@config_version.inspect}, cpu2_stat:"\ " #{@cpu2_stat.inspect}, cpu_stat: #{@cpu_stat.inspect}, created_time:"\ " #{@created_time.inspect}, deviceprofile_id: #{@deviceprofile_id.inspect},"\ " deviceprofile_name: #{@deviceprofile_name.inspect}, dhcpd2_stat: #{@dhcpd2_stat.inspect},"\ " dhcpd_stat: #{@dhcpd_stat.inspect}, evpntopo_id: #{@evpntopo_id.inspect}, ext_ip:"\ " #{@ext_ip.inspect}, fwupdate: #{@fwupdate.inspect}, has_pcap: #{@has_pcap.inspect},"\ " hostname: #{@hostname.inspect}, id: #{@id.inspect}, if2_stat: #{@if2_stat.inspect},"\ " if_stat: #{@if_stat.inspect}, ip: #{@ip.inspect}, ip2_stat: #{@ip2_stat.inspect}, ip_stat:"\ " #{@ip_stat.inspect}, is_ha: #{@is_ha.inspect}, last_seen: #{@last_seen.inspect}, mac:"\ " #{@mac.inspect}, mac_table_stats: #{@mac_table_stats.inspect}, map_id: #{@map_id.inspect},"\ " memory2_stat: #{@memory2_stat.inspect}, memory_stat: #{@memory_stat.inspect}, model:"\ " #{@model.inspect}, modified_time: #{@modified_time.inspect}, module2_stat:"\ " #{@module2_stat.inspect}, module_stat: #{@module_stat.inspect}, name: #{@name.inspect},"\ " node_name: #{@node_name.inspect}, org_id: #{@org_id.inspect}, ports: #{@ports.inspect},"\ " route_summary_stats: #{@route_summary_stats.inspect}, router_name:"\ " #{@router_name.inspect}, serial: #{@serial.inspect}, service2_stat:"\ " #{@service2_stat.inspect}, service_stat: #{@service_stat.inspect}, service_status:"\ " #{@service_status.inspect}, site_id: #{@site_id.inspect}, spu2_stat:"\ " #{@spu2_stat.inspect}, spu_stat: #{@spu_stat.inspect}, status: #{@status.inspect}, tag_id:"\ " #{@tag_id.inspect}, tag_uuid: #{@tag_uuid.inspect}, tunnels: #{@tunnels.inspect}, type:"\ " #{@type.inspect}, uptime: #{@uptime.inspect}, version: #{@version.inspect}, vpn_peers:"\ " #{@vpn_peers.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 |
# File 'lib/mist_api/models/stats_gateway.rb', line 756 def to_s class_name = self.class.name.split('::').last "<#{class_name} ap_redundancy: #{@ap_redundancy}, arp_table_stats: #{@arp_table_stats},"\ " auto_upgrade_stat: #{@auto_upgrade_stat}, bgp_peers: #{@bgp_peers}, cert_expiry:"\ " #{@cert_expiry}, cluster_config: #{@cluster_config}, cluster_stat: #{@cluster_stat},"\ " conductor_name: #{@conductor_name}, config_status: #{@config_status}, config_timestamp:"\ " #{@config_timestamp}, config_version: #{@config_version}, cpu2_stat: #{@cpu2_stat},"\ " cpu_stat: #{@cpu_stat}, created_time: #{@created_time}, deviceprofile_id:"\ " #{@deviceprofile_id}, deviceprofile_name: #{@deviceprofile_name}, dhcpd2_stat:"\ " #{@dhcpd2_stat}, dhcpd_stat: #{@dhcpd_stat}, evpntopo_id: #{@evpntopo_id}, ext_ip:"\ " #{@ext_ip}, fwupdate: #{@fwupdate}, has_pcap: #{@has_pcap}, hostname: #{@hostname}, id:"\ " #{@id}, if2_stat: #{@if2_stat}, if_stat: #{@if_stat}, ip: #{@ip}, ip2_stat: #{@ip2_stat},"\ " ip_stat: #{@ip_stat}, is_ha: #{@is_ha}, last_seen: #{@last_seen}, mac: #{@mac},"\ " mac_table_stats: #{@mac_table_stats}, map_id: #{@map_id}, memory2_stat: #{@memory2_stat},"\ " memory_stat: #{@memory_stat}, model: #{@model}, modified_time: #{@modified_time},"\ " module2_stat: #{@module2_stat}, module_stat: #{@module_stat}, name: #{@name}, node_name:"\ " #{@node_name}, org_id: #{@org_id}, ports: #{@ports}, route_summary_stats:"\ " #{@route_summary_stats}, router_name: #{@router_name}, serial: #{@serial}, service2_stat:"\ " #{@service2_stat}, service_stat: #{@service_stat}, service_status: #{@service_status},"\ " site_id: #{@site_id}, spu2_stat: #{@spu2_stat}, spu_stat: #{@spu_stat}, status:"\ " #{@status}, tag_id: #{@tag_id}, tag_uuid: #{@tag_uuid}, tunnels: #{@tunnels}, type:"\ " #{@type}, uptime: #{@uptime}, version: #{@version}, vpn_peers: #{@vpn_peers},"\ " additional_properties: #{@additional_properties}>" end |