| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 89d3f7b commit 52b51a9
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,7 +30,6 @@ | |||
| 30 | 30 | _transport_registry["grpc"] = CertificateAuthorityServiceGrpcTransport | |
| 31 | 31 | _transport_registry["grpc_asyncio"] = CertificateAuthorityServiceGrpcAsyncIOTransport | |
| 32 | 32 | ||
| 33 | - | ||
| 34 | 33 | __all__ = ( | |
| 35 | 34 | "CertificateAuthorityServiceTransport", | |
| 36 | 35 | "CertificateAuthorityServiceGrpcTransport", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -151,6 +151,10 @@ def __init__( | |||
| 151 | 151 | ssl_credentials=ssl_credentials, | |
| 152 | 152 | scopes=scopes or self.AUTH_SCOPES, | |
| 153 | 153 | quota_project_id=quota_project_id, | |
| 154 | + options=[ | ||
| 155 | + ("grpc.max_send_message_length", -1), | ||
| 156 | + ("grpc.max_receive_message_length", -1), | ||
| 157 | + ], | ||
| 154 | 158 | ) | |
| 155 | 159 | self._ssl_channel_credentials = ssl_credentials | |
| 156 | 160 | else: | |
@@ -169,9 +173,14 @@ def __init__( | |||
| 169 | 173 | ssl_credentials=ssl_channel_credentials, | |
| 170 | 174 | scopes=scopes or self.AUTH_SCOPES, | |
| 171 | 175 | quota_project_id=quota_project_id, | |
| 176 | + options=[ | ||
| 177 | + ("grpc.max_send_message_length", -1), | ||
| 178 | + ("grpc.max_receive_message_length", -1), | ||
| 179 | + ], | ||
| 172 | 180 | ) | |
| 173 | 181 | ||
| 174 | 182 | self._stubs = {} # type: Dict[str, Callable] | |
| 183 | + self._operations_client = None | ||
| 175 | 184 | ||
| 176 | 185 | # Run the base constructor. | |
| 177 | 186 | super().__init__( | |
@@ -195,7 +204,7 @@ def create_channel( | |||
| 195 | 204 | ) -> grpc.Channel: | |
| 196 | 205 | """Create and return a gRPC channel object. | |
| 197 | 206 | Args: | |
| 198 | - address (Optionsl[str]): The host for the channel to use. | ||
| 207 | + address (Optional[str]): The host for the channel to use. | ||
| 199 | 208 | credentials (Optional[~.Credentials]): The | |
| 200 | 209 | authorization credentials to attach to requests. These | |
| 201 | 210 | credentials identify this application to the service. If | |
@@ -242,13 +251,11 @@ def operations_client(self) -> operations_v1.OperationsClient: | |||
| 242 | 251 | client. | |
| 243 | 252 | """ | |
| 244 | 253 | # Sanity check: Only create a new client if we do not already have one. | |
| 245 | - if "operations_client" not in self.__dict__: | ||
| 246 | - self.__dict__["operations_client"] = operations_v1.OperationsClient( | ||
| 247 | - self.grpc_channel | ||
| 248 | - ) | ||
| 254 | + if self._operations_client is None: | ||
| 255 | + self._operations_client = operations_v1.OperationsClient(self.grpc_channel) | ||
| 249 | 256 | ||
| 250 | 257 | # Return the client from cache. | |
| 251 | - return self.__dict__["operations_client"] | ||
| 258 | + return self._operations_client | ||
| 252 | 259 | ||
| 253 | 260 | @property | |
| 254 | 261 | def create_certificate( | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -198,6 +198,10 @@ def __init__( | |||
| 198 | 198 | ssl_credentials=ssl_credentials, | |
| 199 | 199 | scopes=scopes or self.AUTH_SCOPES, | |
| 200 | 200 | quota_project_id=quota_project_id, | |
| 201 | + options=[ | ||
| 202 | + ("grpc.max_send_message_length", -1), | ||
| 203 | + ("grpc.max_receive_message_length", -1), | ||
| 204 | + ], | ||
| 201 | 205 | ) | |
| 202 | 206 | self._ssl_channel_credentials = ssl_credentials | |
| 203 | 207 | else: | |
@@ -216,6 +220,10 @@ def __init__( | |||
| 216 | 220 | ssl_credentials=ssl_channel_credentials, | |
| 217 | 221 | scopes=scopes or self.AUTH_SCOPES, | |
| 218 | 222 | quota_project_id=quota_project_id, | |
| 223 | + options=[ | ||
| 224 | + ("grpc.max_send_message_length", -1), | ||
| 225 | + ("grpc.max_receive_message_length", -1), | ||
| 226 | + ], | ||
| 219 | 227 | ) | |
| 220 | 228 | ||
| 221 | 229 | # Run the base constructor. | |
@@ -229,6 +237,7 @@ def __init__( | |||
| 229 | 237 | ) | |
| 230 | 238 | ||
| 231 | 239 | self._stubs = {} | |
| 240 | + self._operations_client = None | ||
| 232 | 241 | ||
| 233 | 242 | @property | |
| 234 | 243 | def grpc_channel(self) -> aio.Channel: | |
@@ -248,13 +257,13 @@ def operations_client(self) -> operations_v1.OperationsAsyncClient: | |||
| 248 | 257 | client. | |
| 249 | 258 | """ | |
| 250 | 259 | # Sanity check: Only create a new client if we do not already have one. | |
| 251 | - if "operations_client" not in self.__dict__: | ||
| 252 | - self.__dict__["operations_client"] = operations_v1.OperationsAsyncClient( | ||
| 260 | + if self._operations_client is None: | ||
| 261 | + self._operations_client = operations_v1.OperationsAsyncClient( | ||
| 253 | 262 | self.grpc_channel | |
| 254 | 263 | ) | |
| 255 | 264 | ||
| 256 | 265 | # Return the client from cache. | |
| 257 | - return self.__dict__["operations_client"] | ||
| 266 | + return self._operations_client | ||
| 258 | 267 | ||
| 259 | 268 | @property | |
| 260 | 269 | def create_certificate( | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,6 +31,7 @@ | |||
| 31 | 31 | KeyUsage, | |
| 32 | 32 | Subject, | |
| 33 | 33 | SubjectAltNames, | |
| 34 | + RevocationReason, | ||
| 34 | 35 | ) | |
| 35 | 36 | from .service import ( | |
| 36 | 37 | CreateCertificateRequest, | |
@@ -61,7 +62,6 @@ | |||
| 61 | 62 | OperationMetadata, | |
| 62 | 63 | ) | |
| 63 | 64 | ||
| 64 | - | ||
| 65 | 65 | __all__ = ( | |
| 66 | 66 | "CertificateAuthority", | |
| 67 | 67 | "CertificateRevocationList", | |
@@ -78,6 +78,7 @@ | |||
| 78 | 78 | "KeyUsage", | |
| 79 | 79 | "Subject", | |
| 80 | 80 | "SubjectAltNames", | |
| 81 | + "RevocationReason", | ||
| 81 | 82 | "CreateCertificateRequest", | |
| 82 | 83 | "GetCertificateRequest", | |
| 83 | 84 | "ListCertificatesRequest", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,15 +4,15 @@ | |||
| 4 | 4 | "git": { | |
| 5 | 5 | "name": ".", | |
| 6 | 6 | "remote": "https://github.com/googleapis/python-security-private-ca.git", | |
| 7 | - "sha": "bbe17c13e7af03c68f933bc2405522f227c0522e" | ||
| 7 | + "sha": "c984a7868b5a990d7ef02fd3894aa94ca913a308" | ||
| 8 | 8 | } | |
| 9 | 9 | }, | |
| 10 | 10 | { | |
| 11 | 11 | "git": { | |
| 12 | 12 | "name": "googleapis", | |
| 13 | 13 | "remote": "https://github.com/googleapis/googleapis.git", | |
| 14 | - "sha": "dabe30b45bc86fdaf4126f26cbcfd73babbfa3fe", | ||
| 15 | - "internalRef": "345194337" | ||
| 14 | + "sha": "dd372aa22ded7a8ba6f0e03a80e06358a3fa0907", | ||
| 15 | + "internalRef": "347055288" | ||
| 16 | 16 | } | |
| 17 | 17 | }, | |
| 18 | 18 | { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6015,6 +6015,10 @@ def test_certificate_authority_service_transport_channel_mtls_with_client_cert_s | |||
| 6015 | 6015 | scopes=("https://www.googleapis.com/auth/cloud-platform",), | |
| 6016 | 6016 | ssl_credentials=mock_ssl_cred, | |
| 6017 | 6017 | quota_project_id=None, | |
| 6018 | + options=[ | ||
| 6019 | + ("grpc.max_send_message_length", -1), | ||
| 6020 | + ("grpc.max_receive_message_length", -1), | ||
| 6021 | + ], | ||
| 6018 | 6022 | ) | |
| 6019 | 6023 | assert transport.grpc_channel == mock_grpc_channel | |
| 6020 | 6024 | assert transport._ssl_channel_credentials == mock_ssl_cred | |
@@ -6056,6 +6060,10 @@ def test_certificate_authority_service_transport_channel_mtls_with_adc(transport | |||
| 6056 | 6060 | scopes=("https://www.googleapis.com/auth/cloud-platform",), | |
| 6057 | 6061 | ssl_credentials=mock_ssl_cred, | |
| 6058 | 6062 | quota_project_id=None, | |
| 6063 | + options=[ | ||
| 6064 | + ("grpc.max_send_message_length", -1), | ||
| 6065 | + ("grpc.max_receive_message_length", -1), | ||
| 6066 | + ], | ||
| 6059 | 6067 | ) | |
| 6060 | 6068 | assert transport.grpc_channel == mock_grpc_channel | |
| 6061 | 6069 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments