in templates/http_load_balancer.py [0:0]
def GenerateGlobalForwardingRule(context, number):
"""Generates a Global Forwarding Rule with the passed name."""
name = context.env['name']
prop = context.properties
protocol = prop[IP_PROTO]
return {
'name': common.AutoName(name, default.GF_RULE, str(number)),
'type': default.GF_RULE,
'properties': {
'IPProtocol': protocol,
'portRange': prop[PORT],
'target': common.AutoRef(name, default.PROXY),
}
} # pyformat: disable