stacker/blueprints/base.py
def validate_allowed_values(allowed_values, value):
    """Support a variable defining which values it allows.

    Args:
        allowed_values (Optional[list]): A list of allowed values from the
            variable definition
        value (obj): The object representing the value provided for the
            variable

    Returns:
        bool: Boolean for whether or not the value is valid.

    """
    # ignore CFNParameter, troposphere handles these for us
    if not allowed_values or isinstance(value, CFNParameter):
        return True

    return value in allowed_values
Support a variable defining which values it allows.

    Args:
        allowed_values (Optional[list]): A list of allowed values from the
            variable definition
        value (obj): The object representing the value provided for the
            variable

    Returns:
        bool: Boolean for whether or not the value is valid.

    
Support a variable defining which values it allows.
Support a variable defining which values it allows .
def validate_allowed_values(allowed_values, value):
    if not allowed_values or isinstance(value, CFNParameter):
        return True
    return value in allowed_values
def validate_allowed_values ( allowed_values , value ) : if not allowed_values or isinstance ( value , CFNParameter ) : return True return value in allowed_values
Support a variable defining which values it allows.
Support a variable defining which values it allows .
"""Support a variable defining which values it allows.

    Args:
        allowed_values (Optional[list]): A list of allowed values from the
            variable definition
        value (obj): The object representing the value provided for the
            variable

    Returns:
        bool: Boolean for whether or not the value is valid.

    """ # ignore CFNParameter, troposphere handles these for us
Boolean for whether or not the value is valid.
Boolean for whether or not the value is valid .
bool
allowed_values
A list of allowed values from the
variable definition
A list of allowed values from the variable definition
value
The object representing the value provided for the
variable
The object representing the value provided for the variable