Merge "Truncate edge appliance name when too long"
This commit is contained in:
commit
8785d5fdde
@ -36,6 +36,9 @@ INTERNAL_TENANT_ID = 'a1b2c3d4-e5f6-eeff-ffee-6f5e4d3c2b1a'
|
||||
# L2 gateway edge name prefix
|
||||
L2_GATEWAY_EDGE = 'L2 bridging'
|
||||
|
||||
# An artificial limit for router name length - subtract 1 for the - separator
|
||||
ROUTER_NAME_LENGTH = (78 - 1)
|
||||
|
||||
# LoadBalancer Certificate constants
|
||||
#NOTE(abhiraut): Number of days specify the total number of days for which the
|
||||
# the certificate will be active. This certificate will expire
|
||||
|
@ -645,7 +645,10 @@ class EdgeManager(object):
|
||||
self, context, lrouter, lswitch=None, dist=False,
|
||||
appliance_size=vcns_const.SERVICE_SIZE_MAPPING['router']):
|
||||
"""Create an edge for logical router support."""
|
||||
router_name = lrouter['name'] + '-' + lrouter['id']
|
||||
router_name = (
|
||||
lrouter['name'][:nsxv_constants.ROUTER_NAME_LENGTH -
|
||||
len(lrouter['id'])] +
|
||||
'-' + lrouter['id'])
|
||||
self._allocate_edge_appliance(
|
||||
context, lrouter['id'], router_name,
|
||||
appliance_size=appliance_size,
|
||||
|
Loading…
Reference in New Issue
Block a user