Merge pull request #12187 from Luap99/fix-swagger

[CI:DOCS] Fix swagger definition for the new mac address type
This commit is contained in:
OpenShift Merge Robot
2021-11-05 22:14:01 +01:00
committed by GitHub
3 changed files with 3 additions and 0 deletions

View File

@ -99,6 +99,7 @@ func (n *IPNet) UnmarshalText(text []byte) error {
// that it adds the json marshal/unmarshal methods. // that it adds the json marshal/unmarshal methods.
// This allows us to read the mac from a json string // This allows us to read the mac from a json string
// and a byte array. // and a byte array.
// swagger:model MacAddress
type HardwareAddr net.HardwareAddr type HardwareAddr net.HardwareAddr
func (h *HardwareAddr) String() string { func (h *HardwareAddr) String() string {

View File

@ -99,6 +99,7 @@ type PodNetworkConfig struct {
// Only available if NetNS is set to Bridge (the default for root). // Only available if NetNS is set to Bridge (the default for root).
// As such, conflicts with NoInfra=true by proxy. // As such, conflicts with NoInfra=true by proxy.
// Optional. // Optional.
// swagger:strfmt string
StaticMAC *types.HardwareAddr `json:"static_mac,omitempty"` StaticMAC *types.HardwareAddr `json:"static_mac,omitempty"`
// PortMappings is a set of ports to map into the infra container. // PortMappings is a set of ports to map into the infra container.
// As, by default, containers share their network with the infra // As, by default, containers share their network with the infra

View File

@ -401,6 +401,7 @@ type ContainerNetworkConfig struct {
// StaticMAC is a static MAC address to set in the container. // StaticMAC is a static MAC address to set in the container.
// Only available if NetNS is set to bridge. // Only available if NetNS is set to bridge.
// Optional. // Optional.
// swagger:strfmt string
StaticMAC *nettypes.HardwareAddr `json:"static_mac,omitempty"` StaticMAC *nettypes.HardwareAddr `json:"static_mac,omitempty"`
// PortBindings is a set of ports to map into the container. // PortBindings is a set of ports to map into the container.
// Only available if NetNS is set to bridge or slirp. // Only available if NetNS is set to bridge or slirp.