From 5be219de4785aac346b636b66fd75b0384ad8447 Mon Sep 17 00:00:00 2001 From: postmasters Date: Wed, 3 Jan 2018 10:18:42 -0800 Subject: [PATCH] Trivial fix to Cloud IoT URL. --- .../end_to_end_example/README.rst.in | 6 +-- iot/api-client/http_example/README.rst.in | 8 ++-- iot/api-client/manager/README.rst | 38 +++++++++++-------- iot/api-client/manager/README.rst.in | 6 +-- iot/api-client/mqtt_example/README.rst.in | 12 +++--- iot/api-client/scripts/README.rst.in | 6 +-- scripts/readme-gen/templates/README.tmpl.rst | 2 +- 7 files changed, 42 insertions(+), 36 deletions(-) diff --git a/iot/api-client/end_to_end_example/README.rst.in b/iot/api-client/end_to_end_example/README.rst.in index 6216b17d3f23..2a6be05de8a3 100644 --- a/iot/api-client/end_to_end_example/README.rst.in +++ b/iot/api-client/end_to_end_example/README.rst.in @@ -1,7 +1,7 @@ # This file is used to generate README.rst product: - name: Google Cloud IoT Core API + name: Google Cloud IoT Core short_name: Cloud IoT Core url: https://cloud.google.com/iot/docs description: > @@ -10,8 +10,8 @@ product: authorization. Before you run the sample, you must retrieve the Google root certificate. - For example, `wget https://pki.goog/roots.pem` or - `curl https://pki.goog/roots.pem > roots.pem`. + For example, ``wget https://pki.goog/roots.pem`` or + ``curl https://pki.goog/roots.pem > roots.pem``. setup: - auth diff --git a/iot/api-client/http_example/README.rst.in b/iot/api-client/http_example/README.rst.in index 7fafd1049dda..3fdf6f4a4cdb 100644 --- a/iot/api-client/http_example/README.rst.in +++ b/iot/api-client/http_example/README.rst.in @@ -1,7 +1,7 @@ # This file is used to generate README.rst product: - name: Google Cloud IoT Core API + name: Google Cloud IoT Core short_name: Cloud IoT Core url: https://cloud.google.com/iot/docs description: > @@ -9,8 +9,8 @@ product: Subscribe functionality with devices and programmatically manage device authorization. - The following example runs the sample using the project ID `blue-jet-123` - and the device name `my-python-device`: + The following example runs the sample using the project ID ``blue-jet-123`` + and the device name ``my-python-device``:: python cloudiot_http_example.py \ --registry_id=my-registry \ @@ -30,4 +30,4 @@ samples: cloud_client_library: false -folder: iot/api-client/http_example \ No newline at end of file +folder: iot/api-client/http_example diff --git a/iot/api-client/manager/README.rst b/iot/api-client/manager/README.rst index dde4789c05c3..e432b8d38654 100644 --- a/iot/api-client/manager/README.rst +++ b/iot/api-client/manager/README.rst @@ -1,18 +1,18 @@ .. This file is automatically generated. Do not edit this file directly. -Google Cloud IoT Core API Python Samples +Google Cloud IoT Core Python Samples =============================================================================== .. image:: https://gstatic.com/cloudssh/images/open-btn.png :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=iot/api-client/manager/README.rst -This directory contains samples for Google Cloud IoT Core API. `Google Cloud IoT Core`_ allows developers to easily integrate Publish and Subscribe functionality with devices and programmatically manage device authorization. +This directory contains samples for Google Cloud IoT Core. `Google Cloud IoT Core`_ allows developers to easily integrate Publish and Subscribe functionality with devices and programmatically manage device authorization. -.. _Google Cloud IoT Core API: https://cloud.google.com/vision/docs +.. _Google Cloud IoT Core: https://cloud.google.com/iot/docs Setup ------------------------------------------------------------------------------- @@ -70,13 +70,15 @@ To run this sample: $ python manager.py - usage: manager.py [-h] --pubsub_topic PUBSUB_TOPIC [--project_id PROJECT_ID] + usage: manager.py [-h] --pubsub_topic PUBSUB_TOPIC + [--cloud_region CLOUD_REGION] [--config CONFIG] + [--device_id DEVICE_ID] [--ec_public_key_file EC_PUBLIC_KEY_FILE] + [--project_id PROJECT_ID] [--registry_id REGISTRY_ID] [--rsa_certificate_file RSA_CERTIFICATE_FILE] - [--cloud_region CLOUD_REGION] [--service_account_json SERVICE_ACCOUNT_JSON] - [--registry_id REGISTRY_ID] [--device_id DEVICE_ID] - {create-es256,create-registry,create-rsa256,create-topic,create-unauth,delete-device,delete-registry,get,get-registry,get-state,list,list-registries,patch-es256,patch-rs256} + [--version VERSION] + {create-es256,create-registry,create-rsa256,create-topic,create-unauth,delete-device,delete-registry,get,get-registry,get-state,list,list-registries,patch-es256,patch-rs256,set-config} ... Example of using the Google Cloud IoT Core device manager to administer @@ -93,7 +95,7 @@ To run this sample: list positional arguments: - {create-es256,create-registry,create-rsa256,create-topic,create-unauth,delete-device,delete-registry,get,get-registry,get-state,list,list-registries,patch-es256,patch-rs256} + {create-es256,create-registry,create-rsa256,create-topic,create-unauth,delete-device,delete-registry,get,get-registry,get-state,list,list-registries,patch-es256,patch-rs256,set-config} create-es256 Create a new device with the given id, using ES256 for authentication. create-registry Gets or creates a device registry. @@ -113,26 +115,30 @@ To run this sample: device. patch-rs256 Patch the device to add an RSA256 public key to the device. + set-config Patch the device to add an RSA256 public key to the + device. optional arguments: -h, --help show this help message and exit --pubsub_topic PUBSUB_TOPIC Google Cloud Pub/Sub topic. Format is projects/project_id/topics/topic-id - --project_id PROJECT_ID - GCP cloud project name. + --cloud_region CLOUD_REGION + GCP cloud region + --config CONFIG Configuration sent to a device. + --device_id DEVICE_ID + Device id. --ec_public_key_file EC_PUBLIC_KEY_FILE Path to public ES256 key file. + --project_id PROJECT_ID + GCP cloud project name. + --registry_id REGISTRY_ID + Registry id. If not set, a name will be generated. --rsa_certificate_file RSA_CERTIFICATE_FILE Path to RS256 certificate file. - --cloud_region CLOUD_REGION - GCP cloud region --service_account_json SERVICE_ACCOUNT_JSON Path to service account json file. - --registry_id REGISTRY_ID - Registry id. If not set, a name will be generated. - --device_id DEVICE_ID - Device id. + --version VERSION Version number for setting device configuration. diff --git a/iot/api-client/manager/README.rst.in b/iot/api-client/manager/README.rst.in index b019a4cc02b0..8debfbce735b 100644 --- a/iot/api-client/manager/README.rst.in +++ b/iot/api-client/manager/README.rst.in @@ -1,9 +1,9 @@ # This file is used to generate README.rst product: - name: Google Cloud IoT Core API + name: Google Cloud IoT Core short_name: Cloud IoT Core - url: https://cloud.google.com/vision/docs + url: https://cloud.google.com/iot/docs description: > `Google Cloud IoT Core`_ allows developers to easily integrate Publish and Subscribe functionality with devices and programmatically manage device @@ -20,4 +20,4 @@ samples: cloud_client_library: false -folder: iot/api-client/manager \ No newline at end of file +folder: iot/api-client/manager diff --git a/iot/api-client/mqtt_example/README.rst.in b/iot/api-client/mqtt_example/README.rst.in index be0e806e1910..958aa9641c4b 100644 --- a/iot/api-client/mqtt_example/README.rst.in +++ b/iot/api-client/mqtt_example/README.rst.in @@ -1,7 +1,7 @@ # This file is used to generate README.rst product: - name: Google Cloud IoT Core API + name: Google Cloud IoT Core short_name: Cloud IoT Core url: https://cloud.google.com/iot/docs description: > @@ -10,11 +10,11 @@ product: authorization. Before you run the sample, you must retrieve the Google root certificate. - For example, `wget https://pki.goog/roots.pem` or - `curl https://pki.goog/roots.pem > roots.pem`. + For example, ``wget https://pki.goog/roots.pem`` or + ``curl https://pki.goog/roots.pem > roots.pem``. - The following example runs the sample using the project ID `blue-jet-123` - and the device name `my-python-device`: + The following example runs the sample using the project ID ``blue-jet-123`` + and the device name ``my-python-device``:: python cloudiot_mqtt_example.py \ --registry_id=my-registry \ @@ -33,4 +33,4 @@ samples: cloud_client_library: false -folder: iot/api-client/mqtt_example \ No newline at end of file +folder: iot/api-client/mqtt_example diff --git a/iot/api-client/scripts/README.rst.in b/iot/api-client/scripts/README.rst.in index 75df8d46f25e..fb6ad0808446 100644 --- a/iot/api-client/scripts/README.rst.in +++ b/iot/api-client/scripts/README.rst.in @@ -3,11 +3,11 @@ product: name: Google Cloud IoT Core short_name: Cloud IoT Core - url: https://cloud.google.com/iot/ + url: https://cloud.google.com/iot/docs description: > `Google Cloud IoT Core`_ is a fully-managed, globally distributed solution for managing devices and sending / receiving messages from devices. Set the - `GOOGLE_CLOUD_PROJECT` environment variable and call the script with your + ``GOOGLE_CLOUD_PROJECT`` environment variable and call the script with your topic ID. setup: @@ -21,4 +21,4 @@ samples: cloud_client_library: true -folder: iot/api-client/scripts \ No newline at end of file +folder: iot/api-client/scripts diff --git a/scripts/readme-gen/templates/README.tmpl.rst b/scripts/readme-gen/templates/README.tmpl.rst index 6bcf46ab4aea..25b3eefd98d4 100644 --- a/scripts/readme-gen/templates/README.tmpl.rst +++ b/scripts/readme-gen/templates/README.tmpl.rst @@ -13,7 +13,7 @@ This directory contains samples for {{product.name}}. {{product.description}} {{description}} -.. _{{product.name}}: {{product.url}} +.. _{{product.name}}: {{product.url}} {% if setup %} Setup