14995eb1b0921a5afbfb094993aeb0485f3f4d55,iot/api-client/manager/manager.py,,get_config_versions,#Any#Any#Any#Any#Any#,484
Before Change
device_id):
Lists versions of a device config in descending order (newest first).
// [START iot_get_device_configs]
client = get_client(service_account_json)
registry_name = "projects/{}/locations/{}/registries/{}".format(
project_id, cloud_region, registry_id)
device_name = "{}/devices/{}".format(registry_name, device_id)
devices = client.projects().locations().registries().devices()
configs = devices.configVersions().list(
name=device_name).execute().get(
"deviceConfigs", [])
for config in configs:
print("version: {}\n\tcloudUpdateTime: {}\n\t binaryData: {}".format(
config.get("version"),
config.get("cloudUpdateTime"),
config.get("binaryData")))
return configs
// [END iot_get_device_configs]
After Change
device_id):
Lists versions of a device config in descending order (newest first).
// [START iot_get_device_configs]
client = iot_v1.DeviceManagerClient()
device_path = client.device_path(
project_id, cloud_region, registry_id, device_id)
configs = client.list_device_config_versions(device_path)
for config in configs.device_configs:
print("version: {}\n\tcloudUpdateTime: {}\n\t data: {}".format(
config.version,
config.cloud_update_time,
config.binary_data))
return configs
// [END iot_get_device_configs]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 14
Instances
Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 14995eb1b0921a5afbfb094993aeb0485f3f4d55
Time: 2019-10-18
Author: gguuss@gmail.com
File Name: iot/api-client/manager/manager.py
Class Name:
Method Name: get_config_versions
Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 14995eb1b0921a5afbfb094993aeb0485f3f4d55
Time: 2019-10-18
Author: gguuss@gmail.com
File Name: iot/api-client/manager/manager.py
Class Name:
Method Name: get_config_versions
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