Skip to content

Commit

Permalink
nad pkg: expand ipam types (#791)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaggapa authored Nov 21, 2024
1 parent 4a98ce4 commit 477b86e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/nad/nadtypes.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package nad

// Capability tells if the plugin supports MAC.
type (
// Capability tells if the plugin supports MAC.
Capability struct {
Mac bool `json:"mac,omitempty"`
IPs bool `json:"ips,omitempty"`
Expand Down Expand Up @@ -68,6 +68,12 @@ type (
Gateway string `json:"gateway,omitempty"`
}

// Routes represent routing entries for IPAM plugin.
Routes struct {
Dst string `json:"dst,omitempty"`
Gw string `json:"gw,omitempty"`
}

// IPAM container the IPAM configuration for a NAD.
IPAM struct {
Type string `json:"type,omitempty"`
Expand All @@ -76,6 +82,7 @@ type (
RangeEnd string `json:"range_end,omitempty"`
Gateway string `json:"gateway,omitempty"`
Exclude []string `json:"exclude,omitempty"`
Routes []Routes `json:"routes,omitempty"`
IPRanges []IPRanges `json:"ipRanges,omitempty"`
}
)

0 comments on commit 477b86e

Please sign in to comment.