Exemple #1
0
def config(general_config, config_file, config_options):
    """View and optionally update existing StakeHolder's configuration."""
    emitter = _setup_emitter(general_config)
    configuration_file_location = config_file or StakeHolderConfiguration.default_filepath()
    emitter.echo(f"StakeHolder Configuration {configuration_file_location} \n {'='*55}")
    return get_or_update_configuration(emitter=emitter,
                                       config_class=StakeHolderConfiguration,
                                       filepath=configuration_file_location,
                                       config_options=config_options)
Exemple #2
0
def config(general_config, config_options, config_file):
    """
    View and optionally update the Ursula node's configuration.
    """
    emitter = _setup_emitter(general_config, config_options.worker_address)
    filepath = config_file or UrsulaConfiguration.default_filepath()
    emitter.echo(f"Ursula Configuration {filepath} \n {'='*55}")
    return get_or_update_configuration(emitter=emitter,
                                       config_class=UrsulaConfiguration,
                                       filepath=filepath,
                                       config_options=config_options)
Exemple #3
0
def config(general_config, config_options, config_file):
    """
    View and optionally update existing Bob's configuration.
    """
    emitter = _setup_emitter(general_config)
    bob_config = config_options.create_config(emitter, config_file)
    filepath = config_file or bob_config.config_file_location
    emitter.echo(f"Bob Configuration {filepath} \n {'='*55}")
    return get_or_update_configuration(emitter=emitter,
                                       config_class=BobConfiguration,
                                       filepath=filepath,
                                       config_options=config_options)
Exemple #4
0
def config(general_config, config_options, config_file):
    """
    View and optionally update the Ursula node's configuration.
    """
    emitter = _setup_emitter(general_config, config_options.worker_address)
    if not config_file:
        config_file = select_config_file(
            emitter=emitter,
            checksum_address=config_options.worker_address,
            config_class=UrsulaConfiguration)
    emitter.echo(f"Ursula Configuration {config_file} \n {'='*55}")
    return get_or_update_configuration(emitter=emitter,
                                       config_class=UrsulaConfiguration,
                                       filepath=config_file,
                                       config_options=config_options)