V2T migration: ensure dvs.ca_file is set for admin shell
Ensure the the ca_file value for validating vCenter server certificate is alway set when running V2T pre-migration validation. The ca_file parameter is set to a particular default value as it would otherwise default to None Change-Id: I5b640e47c644dc5c5352b3c7ef80bbb1a7470d34
This commit is contained in:
parent
5d5cab6e99
commit
e643f01d14
@ -519,7 +519,6 @@ def _validate_config():
|
||||
@admin_utils.output_header
|
||||
def validate_config_for_migration(resource, event, trigger, **kwargs):
|
||||
"""Validate the nsxv configuration before migration to nsx-t"""
|
||||
|
||||
# Read the command line parameters
|
||||
transit_networks = ["100.64.0.0/16"]
|
||||
strict = False
|
||||
@ -533,6 +532,13 @@ def validate_config_for_migration(resource, event, trigger, **kwargs):
|
||||
strict = bool(properties.get('strict', 'false').lower() == 'true')
|
||||
out_file = properties.get('summary-file-name')
|
||||
|
||||
# Ensure ca_file in DVS section is always set otherwise secure connection
|
||||
# to vcenter will fail
|
||||
if not cfg.CONF.dvs.ca_file:
|
||||
ca_file_default = "/etc/ssl/certs/vcenter.pem"
|
||||
LOG.info("ca_file for vCenter unset, defaulting to: %s",
|
||||
ca_file_default)
|
||||
cfg.CONF.set_override('ca_file', ca_file_default, 'dvs')
|
||||
LOG.info("Running migration config validation in %sstrict mode",
|
||||
'' if strict else 'non-')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user