code: func getNextAvailablePriority(rules []network.SecurityRule) (int32, error) {
  	var smallest int32 = loadBalancerMinimumPriority
  	var spread int32 = 1
  
  outer:
  	for smallest < loadBalancerMaximumPriority {
  		for _, rule := range rules {
  			if *rule.Priority == smallest {
  				smallest += spread
  				continue outer
  			}
  		}
  		// no one else had it
  		return smallest, nil
  	}
  
  	return -1, fmt.Errorf("securityGroup priorities are exhausted")
  }
docs: // This returns the next available rule priority level for a given set of security rules.