How to use the iotedgedev.decorators.with_telemetry function in iotedgedev

To help you get started, we’ve selected a few iotedgedev 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 Azure / iotedgedev / iotedgedev / cli.py View on Github external
@with_telemetry
def setup_simulator(gateway_host, iothub_connection_string):
    sim = Simulator(envvars, output)
    sim.setup(gateway_host, iothub_connection_string)
github Azure / iotedgedev / iotedgedev / cli.py View on Github external
@with_telemetry
def setup_iothub(credentials,
                 service_principal,
                 subscription,
                 resource_group_name,
                 resource_group_location,
                 iothub_sku,
                 iothub_name,
                 edge_device_id,
                 update_dotenv):
    if update_dotenv:
        if envvars.backup_dotenv():
            envvars.save_envvar("IOTHUB_CONNECTION_STRING", envvars.IOTHUB_CONNECTION_STRING)
            envvars.save_envvar("DEVICE_CONNECTION_STRING", envvars.DEVICE_CONNECTION_STRING)
            output.info("Updated current .env file")
github Azure / iotedgedev / iotedgedev / cli.py View on Github external
@with_telemetry
def push(ctx, do_deploy, no_build, template_file, platform):
    mod = Modules(envvars, output)
    mod.push(template_file, platform, no_build=no_build)

    if do_deploy:
        ctx.invoke(deploy)
github Azure / iotedgedev / iotedgedev / cli.py View on Github external
@with_telemetry
def stop_simulator():
    sim = Simulator(envvars, output)
    sim.stop()
github Azure / iotedgedev / iotedgedev / cli.py View on Github external
@with_telemetry
def start_simulator(setup, solution, build, manifest_file, platform, verbose, inputs, port, iothub_connection_string):
    sim = Simulator(envvars, output)

    if setup:
        sim.setup(socket.getfqdn(), iothub_connection_string)

    if solution or not inputs:
        sim.start_solution(manifest_file, platform, verbose, build)
    else:
        sim.start_single(inputs, port)
github Azure / iotedgedev / iotedgedev / cli.py View on Github external
@with_telemetry
def genconfig(template_file, platform, fail_on_validation_error):
    mod = Modules(envvars, output)
    mod.build_push(template_file, platform, no_build=True, no_push=True, fail_on_validation_error=fail_on_validation_error)
github Azure / iotedgedev / iotedgedev / cli.py View on Github external
@with_telemetry
def add(name, template, group_id):
    mod = Modules(envvars, output)
    mod.add(name, template, group_id)
github Azure / iotedgedev / iotedgedev / cli.py View on Github external
@with_telemetry
def build(ctx, push, do_deploy, template_file, platform):
    mod = Modules(envvars, output)
    mod.build_push(template_file, platform, no_push=not push)

    if do_deploy:
        ctx.invoke(deploy)
github Azure / iotedgedev / iotedgedev / cli.py View on Github external
@with_telemetry
def modulecred(local, output_file):
    sim = Simulator(envvars, output)
    sim.modulecred(local, output_file)