def validate_os_name(os_name, platform): # TODO DCOS-14033: [gen.internals] Source validate functions are global only if platform == 'bare_cluster': return elif platform == 'aws': validate_one_of(os_name, list(test_util.aws.OS_SSH_INFO.keys())) else: raise AssertionError('Support not yet implemented for {} bare cluster'.format(platform))
def validate_os_name(os_name, platform, provider): # TODO DCOS-14033: [gen.internals] Source validate functions are global only if provider != 'onprem': # the os_name parameter only applies to homogenous clusters that need # to be created by dcos-launch for an onprem install. In other cases, # the deployment template is parameterized for OS selection return if platform == 'aws': validate_one_of(os_name, list(test_util.aws.OS_SSH_INFO.keys())) else: raise AssertionError('Support not yet implemented for {} bare cluster'.format(platform))
def validate_os_name(os_name, platform, provider): # TODO DCOS-14033: [gen.internals] Source validate functions are global only if provider != 'onprem': # the os_name parameter only applies to homogenous clusters that need # to be created by dcos-launch for an onprem install. In other cases, # the deployment template is parameterized for OS selection return if platform == 'aws': validate_one_of(os_name, list(test_util.aws.OS_SSH_INFO.keys())) else: raise AssertionError( 'Support not yet implemented for {} bare cluster'.format(platform))
if ssh_private_key_filename == '': return 'NO KEY PROVIDED - CANNOT TEST' return load_string(ssh_private_key_filename) entry = { 'validate': [ validate_installer_url, validate_launch_config_version, validate_onprem_dcos_config_contents, validate_key_helper_parameters, validate_key_helper_support, validate_onprem_provider_platform, lambda key_helper: gen.calc.validate_true_false(key_helper), lambda zen_helper: gen.calc.validate_true_false(zen_helper), lambda provider: validate_one_of(provider, ['aws', 'azure', 'onprem']), lambda platform: validate_one_of(platform, ['aws', 'azure', 'bare_cluster']), ], 'default': { 'ssh_port': '22', 'ssh_private_key': calculate_ssh_private_key, # TODO DCOS-14033: [gen.internals] Source validate functions are global only # not "real" defaults, but rather intended for allowing validation 'key_helper': 'false', 'zen_helper': 'false', 'platform_info_filename': '', }, 'conditional': { 'provider': { 'aws': {
# add one for the installer bootstrap host return str(1 + int(num_masters) + int(num_private_agents) + int(num_public_agents)) entry = { 'validate': [ validate_installer_url, validate_launch_config_version, validate_onprem_dcos_config_contents, validate_key_helper_parameters, validate_key_helper_support, validate_onprem_provider_platform, validate_os_name, lambda key_helper: gen.calc.validate_true_false(key_helper), lambda zen_helper: gen.calc.validate_true_false(zen_helper), lambda provider: validate_one_of(provider, ['aws', 'azure', 'onprem']), lambda platform: validate_one_of(platform, ['aws', 'azure']), ], 'default': { 'ssh_port': '22', 'ssh_private_key': calculate_ssh_private_key, 'instance_ami': calculate_instance_ami, 'os_name': 'cent-os-7-prereqs', 'key_helper': 'false', 'zen_helper': 'false' }, 'conditional': { 'provider': { 'aws': { 'default': { # allow untest-able deployment