def list_device_templates(cmd,
                          app_id: str,
                          token=None,
                          central_dns_suffix=CENTRAL_ENDPOINT):
    provider = CentralDeviceTemplateProvider(cmd=cmd,
                                             app_id=app_id,
                                             token=token)
    templates = provider.list_device_templates(
        central_dns_suffix=central_dns_suffix)
    return {
        template.id: template.raw_template
        for template in templates.values()
    }
Esempio n. 2
0
def list_device_templates(
    cmd, app_id: str, token=None, central_dns_suffix="azureiotcentral.com"
):
    provider = CentralDeviceTemplateProvider(cmd=cmd, app_id=app_id, token=token)
    return provider.list_device_templates(central_dns_suffix=central_dns_suffix)