From de1dd846bca2a44f8761e983953ac290c1fbfb33 Mon Sep 17 00:00:00 2001 From: Thomas Schultz Date: Wed, 6 Jul 2016 11:46:54 -0600 Subject: [PATCH 1/3] Update references to cloud logging. --- README.rst | 8 ++++---- docs/index.rst | 2 +- docs/logging-client.rst | 3 +-- gcloud/logging/__init__.py | 2 +- gcloud/logging/client.py | 2 +- gcloud/logging/connection.py | 6 +++--- gcloud/logging/entries.py | 2 +- gcloud/logging/metric.py | 2 +- gcloud/logging/sink.py | 2 +- system_tests/logging_.py | 6 +++--- 10 files changed, 17 insertions(+), 18 deletions(-) diff --git a/README.rst b/README.rst index e062737f9cc9..cb43d767c5ec 100644 --- a/README.rst +++ b/README.rst @@ -20,14 +20,14 @@ This client supports the following Google Cloud Platform services: - `Google Cloud Pub/Sub`_ - `Google BigQuery`_ - `Google Cloud Resource Manager`_ -- `Google Cloud Logging`_ +- `Google Stackdriver Logging`_ .. _Google Cloud Datastore: https://github.com/GoogleCloudPlatform/gcloud-python#google-cloud-datastore .. _Google Cloud Storage: https://github.com/GoogleCloudPlatform/gcloud-python#google-cloud-storage .. _Google Cloud Pub/Sub: https://github.com/GoogleCloudPlatform/gcloud-python#google-cloud-pubsub .. _Google BigQuery: https://github.com/GoogleCloudPlatform/gcloud-python#google-bigquery .. _Google Cloud Resource Manager: https://github.com/GoogleCloudPlatform/gcloud-python#google-cloud-resource-manager -.. _Google Cloud Logging: https://github.com/GoogleCloudPlatform/gcloud-python#google-cloud-logging +.. _Google Stackdriver Logging: https://github.com/GoogleCloudPlatform/gcloud-python#google-cloud-logging If you need support for other Google APIs, check out the `Google APIs Python Client library`_. @@ -239,7 +239,7 @@ manage projects using this Client Library. .. _Resource Manager documentation: https://googlecloudplatform.github.io/gcloud-python/stable/resource-manager-api.html -Google Cloud Logging +Google Stackdriver Logging -------------------- `Stackdriver Logging`_ API (`Logging API docs`_) allows you to store, search, @@ -264,7 +264,7 @@ Example of fetching entries: print entry.payload See the ``gcloud-python`` API `logging documentation`_ to learn how to connect -to Cloud logging using this Client Library. +to Stackdriver Logging using this Client Library. .. _logging documentation: https://googlecloudplatform.github.io/gcloud-python/stable/logging-usage.html diff --git a/docs/index.rst b/docs/index.rst index b263dba70531..56705eba9b15 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -102,7 +102,7 @@ .. toctree:: :maxdepth: 0 :hidden: - :caption: Cloud Logging + :caption: Stackdriver Logging logging-usage Client diff --git a/docs/logging-client.rst b/docs/logging-client.rst index 3b7db274a803..18ce6a3baf87 100644 --- a/docs/logging-client.rst +++ b/docs/logging-client.rst @@ -1,4 +1,4 @@ -Logging Client +Stackdriver Logging Client ============== .. automodule:: gcloud.logging.client @@ -11,4 +11,3 @@ Connection .. automodule:: gcloud.logging.connection :members: :show-inheritance: - diff --git a/gcloud/logging/__init__.py b/gcloud/logging/__init__.py index 67b0386329e9..578d1c70aa29 100644 --- a/gcloud/logging/__init__.py +++ b/gcloud/logging/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Google Cloud Logging API wrapper.""" +"""Google Stackdriver Logging API wrapper.""" from gcloud.logging.client import Client from gcloud.logging.connection import Connection diff --git a/gcloud/logging/client.py b/gcloud/logging/client.py index 8b4aae0bdf46..d662a3a2b349 100644 --- a/gcloud/logging/client.py +++ b/gcloud/logging/client.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Client for interacting with the Google Cloud Logging API.""" +"""Client for interacting with the Google Stackdriver Logging API.""" import os diff --git a/gcloud/logging/connection.py b/gcloud/logging/connection.py index 83e1eadcd74c..9f570cde398d 100644 --- a/gcloud/logging/connection.py +++ b/gcloud/logging/connection.py @@ -12,13 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Create / interact with gcloud logging connections.""" +"""Create / interact with Stackdriver Logging connections.""" from gcloud import connection as base_connection class Connection(base_connection.JSONConnection): - """A connection to Google Cloud Logging via the JSON REST API. + """A connection to Google Stackdriver Logging via the JSON REST API. :type credentials: :class:`oauth2client.client.OAuth2Credentials` :param credentials: (Optional) The OAuth2 Credentials to use for this @@ -45,7 +45,7 @@ class Connection(base_connection.JSONConnection): 'https://www.googleapis.com/auth/logging.write', 'https://www.googleapis.com/auth/logging.admin', 'https://www.googleapis.com/auth/cloud-platform') - """The scopes required for authenticating as a Cloud Logging consumer.""" + """The scopes required for authenticating as a Stackdriver Logging consumer.""" class _LoggingAPI(object): diff --git a/gcloud/logging/entries.py b/gcloud/logging/entries.py index ed492b86e8c8..f8caaba3cdbd 100644 --- a/gcloud/logging/entries.py +++ b/gcloud/logging/entries.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Log entries within the Google Cloud Logging API.""" +"""Log entries within the Google Stackdriver Logging API.""" import json import re diff --git a/gcloud/logging/metric.py b/gcloud/logging/metric.py index b22ced4349ba..b05269e39ac5 100644 --- a/gcloud/logging/metric.py +++ b/gcloud/logging/metric.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Define Logging API Metrics.""" +"""Define Stackdriver Logging API Metrics.""" from gcloud.exceptions import NotFound diff --git a/gcloud/logging/sink.py b/gcloud/logging/sink.py index b59096713731..07a6dba2a0d0 100644 --- a/gcloud/logging/sink.py +++ b/gcloud/logging/sink.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Define Logging API Sinks.""" +"""Define Stackdriver Logging API Sinks.""" from gcloud.exceptions import NotFound diff --git a/system_tests/logging_.py b/system_tests/logging_.py index db29f854d4d0..958b0af9c03e 100644 --- a/system_tests/logging_.py +++ b/system_tests/logging_.py @@ -206,7 +206,7 @@ def _init_storage_bucket(self): BUCKET_URI = 'storage.googleapis.com/%s' % (BUCKET_NAME,) # Create the destination bucket, and set up the ACL to allow - # Cloud Logging to write into it. + # Stackdriver Logging to write into it. storage_client = storage.Client() bucket = storage_client.create_bucket(BUCKET_NAME) self.to_delete.append(bucket) @@ -231,7 +231,7 @@ def test_create_sink_pubsub_topic(self): from gcloud import pubsub # Create the destination topic, and set up the IAM policy to allow - # Cloud Logging to write into it. + # Stackdriver Logging to write into it. pubsub_client = pubsub.Client() topic = pubsub_client.topic(TOPIC_NAME) topic.create() @@ -256,7 +256,7 @@ def _init_bigquery_dataset(self): Config.CLIENT.project, DATASET_NAME,) # Create the destination dataset, and set up the ACL to allow - # Cloud Logging to write into it. + # Stackdriver Logging to write into it. bigquery_client = bigquery.Client() dataset = bigquery_client.dataset(DATASET_NAME) dataset.create() From 6ec956b00ebff337be92fe658f0c6710300e0158 Mon Sep 17 00:00:00 2001 From: Thomas Schultz Date: Wed, 6 Jul 2016 12:15:41 -0600 Subject: [PATCH 2/3] Update Monitoring references. --- docs/index.rst | 2 +- docs/logging-usage.rst | 2 +- docs/monitoring-client.rst | 3 +-- docs/monitoring-usage.rst | 12 ++++++------ gcloud/monitoring/__init__.py | 2 +- gcloud/monitoring/client.py | 5 +++-- gcloud/monitoring/connection.py | 4 ++-- gcloud/monitoring/metric.py | 4 ++-- gcloud/monitoring/query.py | 4 ++-- gcloud/monitoring/resource.py | 5 +++-- gcloud/monitoring/timeseries.py | 4 ++-- 11 files changed, 24 insertions(+), 23 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 56705eba9b15..0c2b6ffbedb9 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -114,7 +114,7 @@ .. toctree:: :maxdepth: 0 :hidden: - :caption: Cloud Monitoring + :caption: Stackdriver Monitoring monitoring-usage Client diff --git a/docs/logging-usage.rst b/docs/logging-usage.rst index d0acc528f0f2..3dd2a6efab19 100644 --- a/docs/logging-usage.rst +++ b/docs/logging-usage.rst @@ -136,7 +136,7 @@ Manage log metrics ------------------ Metrics are counters of entries which match a given filter. They can be -used within Cloud Monitoring to create charts and alerts. +used within Stackdriver Monitoring to create charts and alerts. Create a metric: diff --git a/docs/monitoring-client.rst b/docs/monitoring-client.rst index abe1bdbac325..37e8bac8ed8b 100644 --- a/docs/monitoring-client.rst +++ b/docs/monitoring-client.rst @@ -1,4 +1,4 @@ -Monitoring Client +Stackdriver Monitoring Client ================= .. automodule:: gcloud.monitoring.client @@ -11,4 +11,3 @@ Connection .. automodule:: gcloud.monitoring.connection :members: :show-inheritance: - diff --git a/docs/monitoring-usage.rst b/docs/monitoring-usage.rst index 5fdfc8b3234c..adfd93cefe67 100644 --- a/docs/monitoring-usage.rst +++ b/docs/monitoring-usage.rst @@ -5,7 +5,7 @@ Using the API Introduction ------------ -With the Monitoring API, you can work with Stackdriver metric data +With the Stackdriver Monitoring API, you can work with Stackdriver metric data pertaining to monitored resources in Google Cloud Platform (GCP) or elsewhere. @@ -21,7 +21,7 @@ Essential concepts: - A **time series** is a collection of data points associated with points or intervals in time. -Please refer to the documentation for the `Monitoring API`_ for +Please refer to the documentation for the `Stackdriver Monitoring API`_ for more information. At present, this client library supports the following features @@ -32,13 +32,13 @@ of the API: - Creation and deletion of metric descriptors for custom metrics. - (Writing of custom metric data will be coming soon.) -.. _Monitoring API: https://cloud.google.com/monitoring/api/v3/ +.. _Stackdriver Monitoring API: https://cloud.google.com/monitoring/api/v3/ -The Monitoring Client Object ----------------------------- +The Stackdriver Monitoring Client Object +---------------------------------------- -The monitoring client library generally makes its +The Stackdriver Monitoring client library generally makes its functionality available as methods of the monitoring :class:`~gcloud.monitoring.client.Client` class. A :class:`~gcloud.monitoring.client.Client` instance holds diff --git a/gcloud/monitoring/__init__.py b/gcloud/monitoring/__init__.py index 31191d1660b0..26b92da74e40 100644 --- a/gcloud/monitoring/__init__.py +++ b/gcloud/monitoring/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Google Monitoring API wrapper.""" +"""Google Stackdriver Monitoring API wrapper.""" from gcloud.monitoring.client import Client from gcloud.monitoring.connection import Connection diff --git a/gcloud/monitoring/client.py b/gcloud/monitoring/client.py index fb7a06d0d0dd..25e729c5fc9c 100644 --- a/gcloud/monitoring/client.py +++ b/gcloud/monitoring/client.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Client for interacting with the `Google Monitoring API (V3)`_. +"""Client for interacting with the `Google Stackdriver Monitoring API (V3)`_. Example:: @@ -24,7 +24,8 @@ At present, the client supports querying of time series, metric descriptors, and monitored resource descriptors. -.. _Google Monitoring API (V3): https://cloud.google.com/monitoring/api/v3/ +.. _Google Stackdriver Monitoring API (V3): + https://cloud.google.com/monitoring/api/v3/ """ from gcloud.client import JSONClient diff --git a/gcloud/monitoring/connection.py b/gcloud/monitoring/connection.py index 5887da62e65d..c9f804e5e77e 100644 --- a/gcloud/monitoring/connection.py +++ b/gcloud/monitoring/connection.py @@ -12,13 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Create / interact with gcloud monitoring connections.""" +"""Create / interact with Stackdriver Monitoring connections.""" from gcloud import connection as base_connection class Connection(base_connection.JSONConnection): - """A connection to Google Monitoring via the JSON REST API. + """A connection to Google Stackdriver Monitoring via the JSON REST API. :type credentials: :class:`oauth2client.client.OAuth2Credentials` :param credentials: (Optional) The OAuth2 Credentials to use for this diff --git a/gcloud/monitoring/metric.py b/gcloud/monitoring/metric.py index 87e2a18ac99c..ea8b93a442a2 100644 --- a/gcloud/monitoring/metric.py +++ b/gcloud/monitoring/metric.py @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Metric Descriptors for the `Google Monitoring API (V3)`_. +"""Metric Descriptors for the `Google Stackdriver Monitoring API (V3)`_. -.. _Google Monitoring API (V3): +.. _Google Stackdriver Monitoring API (V3): https://cloud.google.com/monitoring/api/ref_v3/rest/v3/\ projects.metricDescriptors """ diff --git a/gcloud/monitoring/query.py b/gcloud/monitoring/query.py index 91838b6b52eb..44e7f917de87 100644 --- a/gcloud/monitoring/query.py +++ b/gcloud/monitoring/query.py @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Time series query for the `Google Monitoring API (V3)`_. +"""Time series query for the `Google Stackdriver Monitoring API (V3)`_. -.. _Google Monitoring API (V3): +.. _Google Stackdriver Monitoring API (V3): https://cloud.google.com/monitoring/api/ref_v3/rest/v3/\ projects.timeSeries/list """ diff --git a/gcloud/monitoring/resource.py b/gcloud/monitoring/resource.py index a992ff9f1312..b4391f28e757 100644 --- a/gcloud/monitoring/resource.py +++ b/gcloud/monitoring/resource.py @@ -12,9 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Monitored Resource Descriptors for the `Google Monitoring API (V3)`_. +"""Monitored Resource Descriptors for the +`Google Stackdriver Monitoring API (V3)`_. -.. _Google Monitoring API (V3): +.. _Google Stackdriver Monitoring API (V3): https://cloud.google.com/monitoring/api/ref_v3/rest/v3/\ projects.monitoredResourceDescriptors """ diff --git a/gcloud/monitoring/timeseries.py b/gcloud/monitoring/timeseries.py index 1b7e19f4a30c..0b4f98189d8c 100644 --- a/gcloud/monitoring/timeseries.py +++ b/gcloud/monitoring/timeseries.py @@ -12,13 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Time series for the `Google Monitoring API (V3)`_. +"""Time series for the `Google Stackdriver Monitoring API (V3)`_. Features intentionally omitted from this first version of the client library: * Writing time series. * Natural representation of distribution values. -.. _Google Monitoring API (V3): +.. _Google Stackdriver Monitoring API (V3): https://cloud.google.com/monitoring/api/ref_v3/rest/v3/TimeSeries """ From a2f4715348164cb1efea407ffa613377a34bacd1 Mon Sep 17 00:00:00 2001 From: Thomas Schultz Date: Wed, 6 Jul 2016 12:19:08 -0600 Subject: [PATCH 3/3] Fix sphinx warnings for headers. --- README.rst | 2 +- docs/logging-client.rst | 2 +- docs/monitoring-client.rst | 2 +- gcloud/logging/connection.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index cb43d767c5ec..3410150b7177 100644 --- a/README.rst +++ b/README.rst @@ -240,7 +240,7 @@ manage projects using this Client Library. .. _Resource Manager documentation: https://googlecloudplatform.github.io/gcloud-python/stable/resource-manager-api.html Google Stackdriver Logging --------------------- +-------------------------- `Stackdriver Logging`_ API (`Logging API docs`_) allows you to store, search, analyze, monitor, and alert on log data and events from Google Cloud Platform. diff --git a/docs/logging-client.rst b/docs/logging-client.rst index 18ce6a3baf87..fb5f009947cd 100644 --- a/docs/logging-client.rst +++ b/docs/logging-client.rst @@ -1,5 +1,5 @@ Stackdriver Logging Client -============== +========================== .. automodule:: gcloud.logging.client :members: diff --git a/docs/monitoring-client.rst b/docs/monitoring-client.rst index 37e8bac8ed8b..baea7d2fd592 100644 --- a/docs/monitoring-client.rst +++ b/docs/monitoring-client.rst @@ -1,5 +1,5 @@ Stackdriver Monitoring Client -================= +============================= .. automodule:: gcloud.monitoring.client :members: diff --git a/gcloud/logging/connection.py b/gcloud/logging/connection.py index 9f570cde398d..fa60e181b3fd 100644 --- a/gcloud/logging/connection.py +++ b/gcloud/logging/connection.py @@ -45,7 +45,7 @@ class Connection(base_connection.JSONConnection): 'https://www.googleapis.com/auth/logging.write', 'https://www.googleapis.com/auth/logging.admin', 'https://www.googleapis.com/auth/cloud-platform') - """The scopes required for authenticating as a Stackdriver Logging consumer.""" + """The scopes required for authenticating as a Logging consumer.""" class _LoggingAPI(object):