Return early from identity-service-relation-joined
After the previous commit landed it was suggested on that it would be cleaner to return early from identity-service-relation-joined if the cluster was partially formed rather than use a long if/else . This change makes that style update. Change-Id: I9dab5d930e13dda6cfe2c6e11648587c87bdb955 Partial-Bug: #1544959
This commit is contained in:
parent
36e9518921
commit
1fcbc69649
|
@ -517,15 +517,16 @@ def image_service_changed():
|
|||
def identity_joined(rid=None):
|
||||
if config('vip') and not is_clustered():
|
||||
log('Defering registration until clustered', level=DEBUG)
|
||||
else:
|
||||
public_url = canonical_url(CONFIGS, PUBLIC)
|
||||
internal_url = canonical_url(CONFIGS, INTERNAL)
|
||||
admin_url = canonical_url(CONFIGS, ADMIN)
|
||||
relation_set(
|
||||
relation_id=rid,
|
||||
**determine_endpoints(public_url,
|
||||
internal_url,
|
||||
admin_url))
|
||||
return
|
||||
|
||||
public_url = canonical_url(CONFIGS, PUBLIC)
|
||||
internal_url = canonical_url(CONFIGS, INTERNAL)
|
||||
admin_url = canonical_url(CONFIGS, ADMIN)
|
||||
relation_set(
|
||||
relation_id=rid,
|
||||
**determine_endpoints(public_url,
|
||||
internal_url,
|
||||
admin_url))
|
||||
|
||||
|
||||
@hooks.hook('identity-service-relation-changed')
|
||||
|
|
Loading…
Reference in New Issue