- On January 1, 2020 this library will no longer support Python 2 on the latest released version. - Previously released library versions will continue to be available. For more information please + As of January 1, 2020 this library no longer supports Python 2 on the latest released version. + Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.
{% block body %} {% endblock %} diff --git a/synth.metadata b/synth.metadata index 50c4922..237e3a8 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/python-containeranalysis.git", - "sha": "73fb8844c0aa822dbdc8de91ffdd034e0ceaeca6" + "sha": "be290885cef76ffdd27afb44cd858c6a89d4f280" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "cf2eff09d0f5319a4dc5cdce2b6356d85af4a798" + "sha": "303271797a360f8a439203413f13a160f2f5b3b4" } } ], From ddf95852778c0e60961516ecd77b793e6af3295b Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 14 Jul 2020 17:16:03 -0700 Subject: [PATCH 3/5] fix: update retry config (#23) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/53b42596-b590-4067-8006-cff3c7cfb2f1/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 318028816 Source-Link: https://github.com/googleapis/googleapis/commit/b882b8e6bfcd708042ff00f7adc67ce750817dd0 PiperOrigin-RevId: 317949519 Source-Link: https://github.com/googleapis/googleapis/commit/7157f9552747421572cf1ab3aec1105c05ebd4f9 PiperOrigin-RevId: 317872942 Source-Link: https://github.com/googleapis/googleapis/commit/df995b638ec02863323051599f1b4c41102ce211 --- .../gapic/container_analysis_client_config.py | 48 +++-- .../proto/containeranalysis_pb2.py | 2 +- .../proto/containeranalysis_pb2_grpc.py | 202 +++++++++++++----- synth.metadata | 4 +- 4 files changed, 181 insertions(+), 75 deletions(-) diff --git a/google/cloud/devtools/containeranalysis_v1/gapic/container_analysis_client_config.py b/google/cloud/devtools/containeranalysis_v1/gapic/container_analysis_client_config.py index 86030c0..90c1ddb 100644 --- a/google/cloud/devtools/containeranalysis_v1/gapic/container_analysis_client_config.py +++ b/google/cloud/devtools/containeranalysis_v1/gapic/container_analysis_client_config.py @@ -1,36 +1,42 @@ config = { "interfaces": { "google.devtools.containeranalysis.v1.ContainerAnalysis": { - "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], - }, + "retry_codes": {"no_retry_codes": [], "no_retry_1_codes": []}, "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 30000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, - } + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000, + }, }, "methods": { "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 30000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 30000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 30000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, }, } diff --git a/google/cloud/devtools/containeranalysis_v1/proto/containeranalysis_pb2.py b/google/cloud/devtools/containeranalysis_v1/proto/containeranalysis_pb2.py index a3b3ba4..bfdbfc3 100644 --- a/google/cloud/devtools/containeranalysis_v1/proto/containeranalysis_pb2.py +++ b/google/cloud/devtools/containeranalysis_v1/proto/containeranalysis_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/devtools/containeranalysis_v1/proto/containeranalysis.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection diff --git a/google/cloud/devtools/containeranalysis_v1/proto/containeranalysis_pb2_grpc.py b/google/cloud/devtools/containeranalysis_v1/proto/containeranalysis_pb2_grpc.py index e7de182..e6963a6 100644 --- a/google/cloud/devtools/containeranalysis_v1/proto/containeranalysis_pb2_grpc.py +++ b/google/cloud/devtools/containeranalysis_v1/proto/containeranalysis_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.iam.v1 import iam_policy_pb2 as google_dot_iam_dot_v1_dot_iam__policy__pb2 @@ -7,26 +8,26 @@ class ContainerAnalysisStub(object): """Retrieves analysis results of Cloud components such as Docker container - images. The Container Analysis API is an implementation of the - [Grafeas](https://grafeas.io) API. - - Analysis results are stored as a series of occurrences. An `Occurrence` - contains information about a specific analysis instance on a resource. An - occurrence refers to a `Note`. A note contains details describing the - analysis and is generally stored in a separate project, called a `Provider`. - Multiple occurrences can refer to the same note. - - For example, an SSL vulnerability could affect multiple images. In this case, - there would be one note for the vulnerability and an occurrence for each - image with the vulnerability referring to that note. - """ + images. The Container Analysis API is an implementation of the + [Grafeas](https://grafeas.io) API. + + Analysis results are stored as a series of occurrences. An `Occurrence` + contains information about a specific analysis instance on a resource. An + occurrence refers to a `Note`. A note contains details describing the + analysis and is generally stored in a separate project, called a `Provider`. + Multiple occurrences can refer to the same note. + + For example, an SSL vulnerability could affect multiple images. In this case, + there would be one note for the vulnerability and an occurrence for each + image with the vulnerability referring to that note. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.SetIamPolicy = channel.unary_unary( "/google.devtools.containeranalysis.v1.ContainerAnalysis/SetIamPolicy", request_serializer=google_dot_iam_dot_v1_dot_iam__policy__pb2.SetIamPolicyRequest.SerializeToString, @@ -46,57 +47,57 @@ def __init__(self, channel): class ContainerAnalysisServicer(object): """Retrieves analysis results of Cloud components such as Docker container - images. The Container Analysis API is an implementation of the - [Grafeas](https://grafeas.io) API. - - Analysis results are stored as a series of occurrences. An `Occurrence` - contains information about a specific analysis instance on a resource. An - occurrence refers to a `Note`. A note contains details describing the - analysis and is generally stored in a separate project, called a `Provider`. - Multiple occurrences can refer to the same note. - - For example, an SSL vulnerability could affect multiple images. In this case, - there would be one note for the vulnerability and an occurrence for each - image with the vulnerability referring to that note. - """ + images. The Container Analysis API is an implementation of the + [Grafeas](https://grafeas.io) API. + + Analysis results are stored as a series of occurrences. An `Occurrence` + contains information about a specific analysis instance on a resource. An + occurrence refers to a `Note`. A note contains details describing the + analysis and is generally stored in a separate project, called a `Provider`. + Multiple occurrences can refer to the same note. + + For example, an SSL vulnerability could affect multiple images. In this case, + there would be one note for the vulnerability and an occurrence for each + image with the vulnerability referring to that note. + """ def SetIamPolicy(self, request, context): """Sets the access control policy on the specified note or occurrence. - Requires `containeranalysis.notes.setIamPolicy` or - `containeranalysis.occurrences.setIamPolicy` permission if the resource is - a note or an occurrence, respectively. - - The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for - notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for - occurrences. - """ + Requires `containeranalysis.notes.setIamPolicy` or + `containeranalysis.occurrences.setIamPolicy` permission if the resource is + a note or an occurrence, respectively. + + The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for + notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for + occurrences. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetIamPolicy(self, request, context): """Gets the access control policy for a note or an occurrence resource. - Requires `containeranalysis.notes.setIamPolicy` or - `containeranalysis.occurrences.setIamPolicy` permission if the resource is - a note or occurrence, respectively. - - The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for - notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for - occurrences. - """ + Requires `containeranalysis.notes.setIamPolicy` or + `containeranalysis.occurrences.setIamPolicy` permission if the resource is + a note or occurrence, respectively. + + The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for + notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for + occurrences. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def TestIamPermissions(self, request, context): """Returns the permissions that a caller has on the specified note or - occurrence. Requires list permission on the project (for example, - `containeranalysis.notes.list`). + occurrence. Requires list permission on the project (for example, + `containeranalysis.notes.list`). - The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for - notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for - occurrences. - """ + The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for + notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for + occurrences. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -124,3 +125,102 @@ def add_ContainerAnalysisServicer_to_server(servicer, server): "google.devtools.containeranalysis.v1.ContainerAnalysis", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class ContainerAnalysis(object): + """Retrieves analysis results of Cloud components such as Docker container + images. The Container Analysis API is an implementation of the + [Grafeas](https://grafeas.io) API. + + Analysis results are stored as a series of occurrences. An `Occurrence` + contains information about a specific analysis instance on a resource. An + occurrence refers to a `Note`. A note contains details describing the + analysis and is generally stored in a separate project, called a `Provider`. + Multiple occurrences can refer to the same note. + + For example, an SSL vulnerability could affect multiple images. In this case, + there would be one note for the vulnerability and an occurrence for each + image with the vulnerability referring to that note. + """ + + @staticmethod + def SetIamPolicy( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.devtools.containeranalysis.v1.ContainerAnalysis/SetIamPolicy", + google_dot_iam_dot_v1_dot_iam__policy__pb2.SetIamPolicyRequest.SerializeToString, + google_dot_iam_dot_v1_dot_policy__pb2.Policy.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetIamPolicy( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.devtools.containeranalysis.v1.ContainerAnalysis/GetIamPolicy", + google_dot_iam_dot_v1_dot_iam__policy__pb2.GetIamPolicyRequest.SerializeToString, + google_dot_iam_dot_v1_dot_policy__pb2.Policy.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def TestIamPermissions( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.devtools.containeranalysis.v1.ContainerAnalysis/TestIamPermissions", + google_dot_iam_dot_v1_dot_iam__policy__pb2.TestIamPermissionsRequest.SerializeToString, + google_dot_iam_dot_v1_dot_iam__policy__pb2.TestIamPermissionsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/synth.metadata b/synth.metadata index 237e3a8..4439998 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "cf41866c6f14f10a07aa1e2a1260fc0a2727d889", - "internalRef": "317812187" + "sha": "b882b8e6bfcd708042ff00f7adc67ce750817dd0", + "internalRef": "318028816" } }, { From 160083ad7179feb69adac752bc8c6623a2d74e5b Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 16 Jul 2020 12:03:42 -0700 Subject: [PATCH 4/5] chore: update protobuf and gapic-generator-csharp versions. (#25) PiperOrigin-RevId: 320411362 Source-Author: Google APIs Source-Date: Thu Jul 9 09:26:49 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: db69b46790b55a82ab7cfa473d031da787bc7591 Source-Link: https://github.com/googleapis/googleapis/commit/db69b46790b55a82ab7cfa473d031da787bc7591 --- .../containeranalysis_v1/proto/containeranalysis_pb2.py | 2 +- synth.metadata | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/google/cloud/devtools/containeranalysis_v1/proto/containeranalysis_pb2.py b/google/cloud/devtools/containeranalysis_v1/proto/containeranalysis_pb2.py index bfdbfc3..a3b3ba4 100644 --- a/google/cloud/devtools/containeranalysis_v1/proto/containeranalysis_pb2.py +++ b/google/cloud/devtools/containeranalysis_v1/proto/containeranalysis_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/devtools/containeranalysis_v1/proto/containeranalysis.proto -"""Generated protocol buffer code.""" + from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection diff --git a/synth.metadata b/synth.metadata index 4439998..da2fe9f 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/python-containeranalysis.git", - "sha": "be290885cef76ffdd27afb44cd858c6a89d4f280" + "sha": "ddf95852778c0e60961516ecd77b793e6af3295b" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "b882b8e6bfcd708042ff00f7adc67ce750817dd0", - "internalRef": "318028816" + "sha": "db69b46790b55a82ab7cfa473d031da787bc7591", + "internalRef": "320411362" } }, { From fa1b4924edfea0d735252f51b53a54eece9279f2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2020 16:08:40 -0700 Subject: [PATCH 5/5] chore: release 1.0.2 (#22) * updated CHANGELOG.md [ci skip] * updated setup.cfg [ci skip] * updated setup.py Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 12 ++++++++++++ setup.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f71a6c..65f9834 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +### [1.0.2](https://www.github.com/googleapis/python-containeranalysis/compare/v1.0.1...v1.0.2) (2020-07-16) + + +### Bug Fixes + +* update retry config ([#23](https://www.github.com/googleapis/python-containeranalysis/issues/23)) ([ddf9585](https://www.github.com/googleapis/python-containeranalysis/commit/ddf95852778c0e60961516ecd77b793e6af3295b)) + + +### Documentation + +* add multiprocessing note ([#21](https://www.github.com/googleapis/python-containeranalysis/issues/21)) ([be29088](https://www.github.com/googleapis/python-containeranalysis/commit/be290885cef76ffdd27afb44cd858c6a89d4f280)) + ### [1.0.1](https://www.github.com/googleapis/python-containeranalysis/compare/v1.0.0...v1.0.1) (2020-06-16) diff --git a/setup.py b/setup.py index 05bef45..b46d135 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ name = "google-cloud-containeranalysis" description = "Container Analysis API API client library" -version = "1.0.1" +version = "1.0.2" release_status = "Development Status :: 5 - Production/Stable" dependencies = [ "google-api-core[grpc] >= 1.14.0, < 2.0.0dev",