1

I see in the source file service/iothub_service_client_python.py that the class IoTHubRegistryManager has methods to create and update devices and methods. They are largely used in samples and EtE tests.

Is there a counterpart to managed EdgeDevices via this python sdk? I don't see any sample or test using it.

Here on StackOverflow i found only this question but the answer is not complete. They propose a solution based on some TypeScript code that adds a device with a capability but there is no such a thing on the python sdk. For instance, the current api is

def create_device(self, device_id, primary_key, secondary_key, auth_method):
    """Creates a device on IoTHub using the given parameters.

    :param device_id: The name of the device
    :type device_id: str
    :param primary_key: The primary key of the device
    :type primary_key: str
    :param secondary_key: The secondary key of the device
    :type secondary_key: str
    :param auth_method: The authentication method used to authenticate the device client
    :type auth_method: IoTHubRegistryManagerAuthMethod(Enum)
    :return: The device client instance
    :rtype: IoTHubDevice
    """
    pass

Thanks

alevincio
  • 23
  • 4
  • Have you seen the class [IoTHubDeviceCapabilities](https://github.com/Azure/azure-iot-sdk-python/blob/144f780b9bbd7937fc3d7910c749c95c858d777d/service/src/iothub_service_client_python.cpp#L835-L855)? it has a bool property called iotEdge. This class can be passed as parameter to the [CreateDevice](https://github.com/Azure/azure-iot-sdk-python/blob/144f780b9bbd7937fc3d7910c749c95c858d777d/service/src/iothub_service_client_python.cpp#L956-L995) function. However I do not see that available in the Python wrapper. You could create an issue on the Python SDK repo. – Alberto Vega Apr 16 '19 at 18:53

0 Answers0