Skip to content

Commit

Permalink
Merge pull request containers#12187 from Luap99/fix-swagger
Browse files Browse the repository at this point in the history
[CI:DOCS] Fix swagger definition for the new mac address type
  • Loading branch information
openshift-merge-robot authored Nov 5, 2021
2 parents 6c0690d + 02f6718 commit 6805bef
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions libpod/network/types/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ func (n *IPNet) UnmarshalText(text []byte) error {
// that it adds the json marshal/unmarshal methods.
// This allows us to read the mac from a json string
// and a byte array.
// swagger:model MacAddress
type HardwareAddr net.HardwareAddr

func (h *HardwareAddr) String() string {
Expand Down
1 change: 1 addition & 0 deletions pkg/specgen/podspecgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ type PodNetworkConfig struct {
// Only available if NetNS is set to Bridge (the default for root).
// As such, conflicts with NoInfra=true by proxy.
// Optional.
// swagger:strfmt string
StaticMAC *types.HardwareAddr `json:"static_mac,omitempty"`
// PortMappings is a set of ports to map into the infra container.
// As, by default, containers share their network with the infra
Expand Down
1 change: 1 addition & 0 deletions pkg/specgen/specgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ type ContainerNetworkConfig struct {
// StaticMAC is a static MAC address to set in the container.
// Only available if NetNS is set to bridge.
// Optional.
// swagger:strfmt string
StaticMAC *nettypes.HardwareAddr `json:"static_mac,omitempty"`
// PortBindings is a set of ports to map into the container.
// Only available if NetNS is set to bridge or slirp.
Expand Down

0 comments on commit 6805bef

Please sign in to comment.