Пример #1
0
func deleteEgressNetworkPolicies(client osclient.Interface, ns string) error {
	items, err := client.EgressNetworkPolicies(ns).List(kapi.ListOptions{})
	if err != nil {
		return err
	}
	for i := range items.Items {
		err := client.EgressNetworkPolicies(ns).Delete(items.Items[i].Name)
		if err != nil && !errors.IsNotFound(err) {
			return err
		}
	}
	return nil
}