Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[monitoring] testing: start using build specific projects #3771

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .kokoro/python3.6/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ env_vars: {
# but we'll update the value once we have more Cloud projects.
env_vars: {
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
value: "python-docs-samples-tests"
value: "python-docs-samples-tests-py36"
}
2 changes: 1 addition & 1 deletion .kokoro/python3.7/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ env_vars: {
# Temporary setting my own project for testing the behavior on the PR.
env_vars: {
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
value: "python-docs-samples-tests"
value: "python-docs-samples-tests-py37"
}
2 changes: 1 addition & 1 deletion .kokoro/python3.8/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ env_vars: {
# but we'll update the value once we have more Cloud projects.
env_vars: {
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
value: "python-docs-samples-tests"
value: "python-docs-samples-tests-py38"
}
23 changes: 22 additions & 1 deletion monitoring/api/v3/alerts-client/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ This directory contains samples for Google Stackdriver Alerting API. Stackdriver

.. _Google Stackdriver Alerting API: https://cloud.google.com/monitoring/alerts/

To run the sample, you need to enable the API at: https://console.cloud.google.com/apis/library/monitoring.googleapis.com

To run the sample, you need to have `Monitoring Admin` role.

Please visit [the Cloud Console UI of this API](https://console.cloud.google.com/monitoring) and [create a new Workspace with the same name of your Cloud project](https://cloud.google.com/monitoring/workspaces/create).


Setup
-------------------------------------------------------------------------------

Expand Down Expand Up @@ -87,7 +94,21 @@ To run this sample:
list-alert-policies
list-notification-channels
enable-alert-policies
Enable or disable alert policies in a project.
Arguments: project_name (str) enable (bool): Enable or
disable the policies. filter_ (str, optional): Only
enable/disable alert policies that match this filter_.
See
https://cloud.google.com/monitoring/api/v3/sorting-
and-filtering
disable-alert-policies
Enable or disable alert policies in a project.
Arguments: project_name (str) enable (bool): Enable or
disable the policies. filter_ (str, optional): Only
enable/disable alert policies that match this filter_.
See
https://cloud.google.com/monitoring/api/v3/sorting-
and-filtering
replace-notification-channels
backup
restore
Expand All @@ -114,4 +135,4 @@ to `browse the source`_ and `report issues`_.
https://github.com/GoogleCloudPlatform/google-cloud-python/issues


.. _Google Cloud SDK: https://cloud.google.com/sdk/
.. _Google Cloud SDK: https://cloud.google.com/sdk/
9 changes: 8 additions & 1 deletion monitoring/api/v3/alerts-client/README.rst.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ product:
and many others. Stackdriver's Alerting API allows you to create,
delete, and make back up copies of your alert policies.

required_api_url: https://console.cloud.google.com/apis/library/monitoring.googleapis.com
required_role: Monitoring Admin
other_required_steps: >
Please visit [the Cloud Console UI of this
API](https://console.cloud.google.com/monitoring) and create a new
Workspace with the same name of your Cloud project.

setup:
- auth
- install_deps
Expand All @@ -23,4 +30,4 @@ samples:

cloud_client_library: true

folder: monitoring/api/v3/alerts-client
folder: monitoring/api/v3/alerts-client
10 changes: 10 additions & 0 deletions scripts/readme-gen/templates/README.tmpl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ This directory contains samples for {{product.name}}. {{product.description}}

.. _{{product.name}}: {{product.url}}

{% if required_api_url %}
To run the sample, you need to enable the API at: {{required_api_url}}
{% endif %}

{% if required_role %}
To run the sample, you need to have `{{required_role}}` role.
{% endif %}

{{other_required_steps}}

{% if setup %}
Setup
-------------------------------------------------------------------------------
Expand Down