Skip to content

Commit

Permalink
make ipam struct as private
Browse files Browse the repository at this point in the history
Signed-off-by: Periyasamy Palanisamy <[email protected]>
  • Loading branch information
pperiyasamy committed Apr 27, 2021
1 parent 6c68b7d commit ccf4430
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions pkg/plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,33 +54,33 @@ const (

type netConf struct {
types.NetConf
BrName string `json:"bridge,omitempty"`
IPAM *IPAM `json:"ipam,omitempty"`
VlanTag *uint `json:"vlan"`
MTU int `json:"mtu"`
Trunk []*trunk `json:"trunk,omitempty"`
DeviceID string `json:"deviceID"` // PCI address of a VF in valid sysfs format
ConfigurationPath string `json:"configuration_path"`
SocketFile string `json:"socket_file"`
BrName string `json:"bridge,omitempty"`
IPAM *ipamConfig `json:"ipam,omitempty"`
VlanTag *uint `json:"vlan"`
MTU int `json:"mtu"`
Trunk []*trunk `json:"trunk,omitempty"`
DeviceID string `json:"deviceID"` // PCI address of a VF in valid sysfs format
ConfigurationPath string `json:"configuration_path"`
SocketFile string `json:"socket_file"`
}

type trunk struct {
MinID *uint `json:"minID,omitempty"`
MaxID *uint `json:"maxID,omitempty"`
ID *uint `json:"id,omitempty"`
IPAM *IPAM `json:"ipam,omitempty"`
MinID *uint `json:"minID,omitempty"`
MaxID *uint `json:"maxID,omitempty"`
ID *uint `json:"id,omitempty"`
IPAM *ipamConfig `json:"ipam,omitempty"`
}

type IPAM struct {
*Range
type ipamConfig struct {
*ipRange
Type string `json:"type,omitempty"`
Routes []*types.Route `json:"routes,omitempty"`
Ranges []RangeSet `json:"ranges,omitempty"`
Ranges []rangeSet `json:"ranges,omitempty"`
}

type RangeSet []Range
type rangeSet []ipRange

type Range struct {
type ipRange struct {
RangeStart net.IP `json:"rangeStart,omitempty"` // The first ip, inclusive
RangeEnd net.IP `json:"rangeEnd,omitempty"` // The last ip, inclusive
Subnet types.IPNet `json:"subnet"`
Expand Down

0 comments on commit ccf4430

Please sign in to comment.