def post(self, *args, **kwargs): """ Add a component. Args: [0]: the tenant id Request: version: protocol version (1.0) component: module name params: dictionary of parametes supported by the component as reported by the GET request Example URLs: POST /api/v1/components { "version" : 1.0, "component" : "empower.lvapp.bin_counter.bin_counter" "params": {} } """ func = getattr(import_module(kwargs["component"]), "launch") kwargs["params"]["tenant_id"] = UUID(args[0]) RUNTIME.register_app(kwargs["component"], func, kwargs["params"])