Documentation ¶
Overview ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Variables
- func CleanEtcd()
- func CreateNewIPPool(c client.Client, poolSubnet string, ipip, natOut, ipam bool)
- func CreateRule(ipv, icmpType, icmpCode int, ...) (api.Rule, api.Rule)
- func DumpEtcd()
- func HookLogrusForGinkgo()
- func MustParseCIDR(c string) net.IPNet
- func MustParseIP(i string) net.IP
- func NewClient(cf string) (*client.Client, error)
Constants ¶
This section is empty.
Variables ¶
var EgressRule1 = api.Rule{ Action: "pass", IPVersion: &ipv4, Protocol: &numProtocol1, ICMP: &icmp1, Source: api.EntityRule{ Tag: "tag3", Net: &cidr2, Selector: "selector3", }, }
var EgressRule2 = api.Rule{ Action: "allow", IPVersion: &ipv6, Protocol: &strProtocol2, ICMP: &icmp1, Source: api.EntityRule{ Tag: "tag4", Net: &cidrv62, Selector: "selector4", }, }
var InRule1 = api.Rule{ Action: "allow", IPVersion: &ipv4, Protocol: &strProtocol1, ICMP: &icmp1, Source: api.EntityRule{ Tag: "tag1", Net: &cidr1, Selector: "selector1", }, }
var InRule2 = api.Rule{ Action: "deny", IPVersion: &ipv6, Protocol: &numProtocol1, ICMP: &icmp1, Source: api.EntityRule{ Tag: "tag2", Net: &cidrv61, Selector: "selector2", }, }
Functions ¶
func CleanEtcd ¶
func CleanEtcd()
CleanEtcd is a utility function to wipe clean "/calico" recursively from etcd.
func CreateNewIPPool ¶
CreateNewIPPool takes a client.Client with a poolSubnet CIDR (in "192.168.1.0/24" format) with ipip, natOut, and ipam bools for the pool to be setup and creates a new pool.
func CreateRule ¶
func CreateRule(ipv, icmpType, icmpCode int, proto, cidrStr, tag, selector, inAction, eAction string) (api.Rule, api.Rule)
CreateRule takes all fields necessary to create a api.Rule object and returns ingress and egress api.Rules.
func HookLogrusForGinkgo ¶
func HookLogrusForGinkgo()
func MustParseCIDR ¶
func MustParseIP ¶
Types ¶
This section is empty.