mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-03 20:19:07 +02:00
[management] expose peer MAC addresses and make peers searchable by MAC (#6553)
This commit is contained in:
@@ -826,6 +826,20 @@ components:
|
||||
- ssh_enabled
|
||||
- login_expiration_enabled
|
||||
- inactivity_expiration_enabled
|
||||
NetworkAddress:
|
||||
type: object
|
||||
properties:
|
||||
net_ip:
|
||||
description: IP address with CIDR of the interface
|
||||
type: string
|
||||
example: 192.168.0.11/24
|
||||
mac:
|
||||
description: MAC address of the interface
|
||||
type: string
|
||||
example: "00:93:37:bd:83:0f"
|
||||
required:
|
||||
- net_ip
|
||||
- mac
|
||||
Peer:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/PeerMinimum'
|
||||
@@ -845,6 +859,11 @@ components:
|
||||
type: string
|
||||
format: ipv6
|
||||
example: "fd00:4e42:ab12::1"
|
||||
network_addresses:
|
||||
description: Network interfaces (IP + MAC) reported by the peer
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/NetworkAddress'
|
||||
connection_ip:
|
||||
description: Peer's public connection IP address
|
||||
type: string
|
||||
@@ -7516,6 +7535,11 @@ paths:
|
||||
schema:
|
||||
type: string
|
||||
description: Filter peers by IP address
|
||||
- in: query
|
||||
name: mac
|
||||
schema:
|
||||
type: string
|
||||
description: Filter peers by MAC address of a network interface
|
||||
security:
|
||||
- BearerAuth: [ ]
|
||||
- TokenAuth: [ ]
|
||||
|
||||
@@ -3829,6 +3829,15 @@ type Network struct {
|
||||
RoutingPeersCount int `json:"routing_peers_count"`
|
||||
}
|
||||
|
||||
// NetworkAddress defines model for NetworkAddress.
|
||||
type NetworkAddress struct {
|
||||
// Mac MAC address of the interface
|
||||
Mac string `json:"mac"`
|
||||
|
||||
// NetIp IP address with CIDR of the interface
|
||||
NetIp string `json:"net_ip"`
|
||||
}
|
||||
|
||||
// NetworkRequest defines model for NetworkRequest.
|
||||
type NetworkRequest struct {
|
||||
// Description Network description
|
||||
@@ -4278,6 +4287,9 @@ type Peer struct {
|
||||
// Name Peer's hostname
|
||||
Name string `json:"name"`
|
||||
|
||||
// NetworkAddresses Network interfaces (IP + MAC) reported by the peer
|
||||
NetworkAddresses *[]NetworkAddress `json:"network_addresses,omitempty"`
|
||||
|
||||
// Os Peer's operating system and version
|
||||
Os string `json:"os"`
|
||||
|
||||
@@ -4372,6 +4384,9 @@ type PeerBatch struct {
|
||||
// Name Peer's hostname
|
||||
Name string `json:"name"`
|
||||
|
||||
// NetworkAddresses Network interfaces (IP + MAC) reported by the peer
|
||||
NetworkAddresses *[]NetworkAddress `json:"network_addresses,omitempty"`
|
||||
|
||||
// Os Peer's operating system and version
|
||||
Os string `json:"os"`
|
||||
|
||||
@@ -6294,6 +6309,9 @@ type GetApiPeersParams struct {
|
||||
|
||||
// Ip Filter peers by IP address
|
||||
Ip *string `form:"ip,omitempty" json:"ip,omitempty"`
|
||||
|
||||
// Mac Filter peers by MAC address of a network interface
|
||||
Mac *string `form:"mac,omitempty" json:"mac,omitempty"`
|
||||
}
|
||||
|
||||
// GetApiPeersPeerIdIngressPortsParams defines parameters for GetApiPeersPeerIdIngressPorts.
|
||||
|
||||
Reference in New Issue
Block a user