func (r IngressRule) Validate() error {
	if err := r.PortRange.Validate(); err != nil {
		return errors.Annotatef(err, "invalid destination for ingress rule")
	}

	for srcCIDR := range r.SourceCIDRs {
		if _, _, err := net.ParseCIDR(srcCIDR); err != nil {
			return errors.Trace(err)
		}
	}

	return nil
}
// Validate ensures that the ingress rule contains valid source and destination
// parameters.
Validate ensures that the ingress rule contains valid source and destination
parameters.
// Validate ensures that the ingress rule contains valid source and destination // parameters .
func (r IngressRule) Validate() error {
	if err := r.PortRange.Validate(); err != nil {
		return errors.Annotatef(err, "invalid destination for ingress rule")
	}
	for srcCIDR := range r.SourceCIDRs {
		if _, _, err := net.ParseCIDR(srcCIDR); err != nil {
			return errors.Trace(err)
		}
	}
	return nil
}
func ( r IngressRule ) Validate ( ) error { if err := r . PortRange . Validate ( ) ; err != nil { return errors . Annotatef ( err , " " ) } for srcCIDR := range r . SourceCIDRs { if _ , _ , err := net . ParseCIDR ( srcCIDR ) ; err != nil { return errors . Trace ( err ) } } return nil }
Validate ensures that the ingress rule contains valid source and destination
parameters.
Validate ensures that the ingress rule contains valid source and destination parameters .