c8a2ce20be850ed99e8b7fb0d3ff48ec025fb4f0,iot/api-client/manager/manager.py,,list_registries,#Any#Any#Any#,306

Before Change


    print("Listing Registries")
    registry_path = "projects/{}/locations/{}".format(
            project_id, cloud_region)
    client = get_client(service_account_json)
    registries = client.projects().locations().registries().list(
        parent=registry_path).execute().get("deviceRegistries", [])

    for registry in registries:
        print("id: {}\n\tname: {}".format(
            registry.get("id"),
            registry.get("name")))

    return registries
    // [END iot_list_registries]

After Change


    List all registries in the project.
    // [START iot_list_registries]
    print("Listing Registries")
    client = iot_v1.DeviceManagerClient()
    parent = client.location_path(project_id, cloud_region)

    registries = list(client.list_device_registries(parent))
    for registry in registries:
        print("id: {}\n\tname: {}".format(
            registry.id,
            registry.name))

    return registries
    // [END iot_list_registries]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 14

Instances


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: c8a2ce20be850ed99e8b7fb0d3ff48ec025fb4f0
Time: 2019-09-26
Author: gguuss@gmail.com
File Name: iot/api-client/manager/manager.py
Class Name:
Method Name: list_registries


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 223abdede96295f7fba58a1d1e1fb63a961c33f5
Time: 2019-10-09
Author: gguuss@gmail.com
File Name: iot/api-client/manager/manager.py
Class Name:
Method Name: list_devices_for_gateway


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: c8a2ce20be850ed99e8b7fb0d3ff48ec025fb4f0
Time: 2019-09-26
Author: gguuss@gmail.com
File Name: iot/api-client/manager/manager.py
Class Name:
Method Name: list_devices


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: c8a2ce20be850ed99e8b7fb0d3ff48ec025fb4f0
Time: 2019-09-26
Author: gguuss@gmail.com
File Name: iot/api-client/manager/manager.py
Class Name:
Method Name: list_registries