Documentation ¶
Index ¶
- func EnsureCIDR(cidr string) *net.IPNet
- func NewFakeNetAttachDef(namespace, name, config string) *netv1.NetworkAttachmentDefinition
- func NewFakeNetAttachDefAnnotation(namespace, name, config string) *netv1.NetworkAttachmentDefinition
- func NewFakeNetAttachDefFile(namespace, name, filePath, fileData string) *netv1.NetworkAttachmentDefinition
- func NewFakePod(name string, netAnnotation string, defaultNetAnnotation string) *v1.Pod
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureCIDR ¶
EnsureCIDR parses/verify CIDR ip string and convert to net.IPNet
func NewFakeNetAttachDef ¶
func NewFakeNetAttachDef(namespace, name, config string) *netv1.NetworkAttachmentDefinition
NewFakeNetAttachDef returns net-attach-def for testing
func NewFakeNetAttachDefAnnotation ¶
func NewFakeNetAttachDefAnnotation(namespace, name, config string) *netv1.NetworkAttachmentDefinition
NewFakeNetAttachDefAnnotation returns net-attach-def with resource annotation
func NewFakeNetAttachDefFile ¶
func NewFakeNetAttachDefFile(namespace, name, filePath, fileData string) *netv1.NetworkAttachmentDefinition
NewFakeNetAttachDefFile returns net-attach-def for testing with conf file
Types ¶
type Result ¶
type Result struct { CNIVersion string `json:"cniVersion,omitempty"` IP4 *types020.IPConfig `json:"ip4,omitempty"` IP6 *types020.IPConfig `json:"ip6,omitempty"` DNS types.DNS `json:"dns,omitempty"` }
Result is stub Result for testing
func (*Result) GetAsVersion ¶
GetAsVersion returns a Result object given a version
Click to show internal directories.
Click to hide internal directories.