def get_configuration_from_launch(manifest, launch_name):
    launch_details = manifest.get("launches").get(launch_name)
    configuration = {
        "status":
        launch_details.get("status", constants.PROVISIONED),
        "launch_name":
        launch_name,
        "portfolio":
        launch_details.get("portfolio"),
        "product":
        launch_details.get("product"),
        "version":
        launch_details.get("version"),
        "parameters": [],
        "ssm_param_inputs": [],
        "launch_parameters":
        launch_details.get("parameters", {}),
        "manifest_parameters":
        manifest.get("parameters", {}),
        "depends_on":
        launch_details.get("depends_on", []),
        "ssm_param_outputs":
        launch_details.get("outputs", {}).get("ssm", []),
        "retry_count":
        launch_details.get("retry_count", 1),
        "requested_priority":
        launch_details.get("requested_priority", 0),
        "worker_timeout":
        launch_details.get("timeoutInSeconds", constants.DEFAULT_TIMEOUT),
    }
    configuration.update(get_configuration_overrides(manifest, launch_details))
    return configuration
def get_configuration_from_spoke_local_portfolio(
    manifest, spoke_local_portfolio_details, spoke_local_portfolio_name
):
    configuration = {
        "spoke_local_portfolio_name": spoke_local_portfolio_name,
        "status": spoke_local_portfolio_details.get("status", "shared"),
        "portfolio": spoke_local_portfolio_details.get("portfolio"),
        "associations": spoke_local_portfolio_details.get("associations", []),
        "constraints": spoke_local_portfolio_details.get("constraints", {}),
        "depends_on": spoke_local_portfolio_details.get("depends_on", []),
        "retry_count": spoke_local_portfolio_details.get("retry_count", 1),
        "requested_priority": spoke_local_portfolio_details.get(
            "requested_priority", 0
        ),
        "worker_timeout": spoke_local_portfolio_details.get(
            "timeoutInSeconds", constants.DEFAULT_TIMEOUT
        ),
        "product_generation_method": spoke_local_portfolio_details.get(
            "product_generation_method", "copy"
        ),
    }
    configuration.update(
        get_configuration_overrides(manifest, spoke_local_portfolio_details)
    )
    return configuration
def get_configuration_from_spoke_local_portfolio(manifest,
                                                 spoke_local_portfolio_details,
                                                 spoke_local_portfolio_name):
    configuration = {
        'spoke_local_portfolio_name':
        spoke_local_portfolio_name,
        'status':
        spoke_local_portfolio_details.get('status', 'shared'),
        'portfolio':
        spoke_local_portfolio_details.get('portfolio'),
        'associations':
        spoke_local_portfolio_details.get('associations', []),
        'constraints':
        spoke_local_portfolio_details.get('constraints', {}),
        'depends_on':
        spoke_local_portfolio_details.get('depends_on', []),
        'retry_count':
        spoke_local_portfolio_details.get('retry_count', 1),
        'requested_priority':
        spoke_local_portfolio_details.get('requested_priority', 0),
        'worker_timeout':
        spoke_local_portfolio_details.get('timeoutInSeconds',
                                          constants.DEFAULT_TIMEOUT),
        'product_generation_method':
        spoke_local_portfolio_details.get('product_generation_method', 'copy'),
    }
    configuration.update(
        get_configuration_overrides(manifest, spoke_local_portfolio_details))
    return configuration
コード例 #4
0
def get_configuration_from_launch(manifest, launch_details, launch_name):
    configuration = {
        'status':
        launch_details.get('status', constants.PROVISIONED),
        'launch_name':
        launch_name,
        'portfolio':
        launch_details.get('portfolio'),
        'product':
        launch_details.get('product'),
        'version':
        launch_details.get('version'),
        'parameters': [],
        'ssm_param_inputs': [],
        'launch_parameters':
        launch_details.get('parameters', {}),
        'manifest_parameters':
        manifest.get('parameters', {}),
        'depends_on':
        launch_details.get('depends_on', []),
        'ssm_param_outputs':
        launch_details.get('outputs', {}).get('ssm', []),
        'retry_count':
        launch_details.get('retry_count', 1),
        'requested_priority':
        launch_details.get('requested_priority', 0),
        'worker_timeout':
        launch_details.get('timeoutInSeconds', constants.DEFAULT_TIMEOUT),
    }
    configuration.update(get_configuration_overrides(manifest, launch_details))
    return configuration