Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def add(name, template, group_id):
mod = Modules(envvars, output)
mod.add(name, template, group_id)
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)
def start_solution(self, manifest_file, default_platform, verbose=True, build=False):
if build:
mod = Modules(self.envvars, self.output)
manifest_file = mod.build(manifest_file, default_platform)
if not os.path.exists(manifest_file):
raise FileNotFoundError("Deployment manifest {0} not found. Please build the solution before starting IoT Edge simulator.".format(self.envvars.DEPLOYMENT_CONFIG_FILE_PATH))
self.output.header("Starting IoT Edge Simulator in Solution Mode")
cmd = ["iotedgehubdev", "start", "-d", manifest_file]
if verbose:
cmd.append("-v")
self.utility.call_proc(cmd)
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)
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)