How to use the sfctl.custom_chaos.parse_chaos_parameters function in sfctl

To help you get started, we’ve selected a few sfctl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / service-fabric-cli / src / sfctl / custom_chaos_schedule.py View on Github external
from azure.servicefabric.models.chaos_parameters_dictionary_item import (
        ChaosParametersDictionaryItem
    )

    from sfctl.custom_chaos import (
        parse_chaos_parameters
    )

    if chaos_parameters_dictionary is None:
        return list()

    parsed_dictionary = list()

    for dictionary_entry in chaos_parameters_dictionary:
        key = dictionary_entry.get("Key")
        value = parse_chaos_parameters(dictionary_entry.get("Value"))

        parsed_dictionary.append(ChaosParametersDictionaryItem(key=key, value=value))

    return parsed_dictionary