File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
google/cloud/sql/connector Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -91,12 +91,10 @@ async def _get_metadata(
9191 credentials .refresh (request )
9292
9393 headers = {
94- "Authorization" : "Bearer {}" . format ( credentials .token ) ,
94+ "Authorization" : f "Bearer { credentials .token } " ,
9595 }
9696
97- url = "{}/sql/{}/projects/{}/instances/{}/connectSettings" .format (
98- sqladmin_api_endpoint , _sql_api_version , project , instance
99- )
97+ url = f"{ sqladmin_api_endpoint } /sql/{ _sql_api_version } /projects/{ project } /instances/{ instance } /connectSettings"
10098
10199 logger .debug (f"['{ instance } ']: Requesting metadata" )
102100
@@ -176,9 +174,7 @@ async def _get_ephemeral(
176174 "Authorization" : f"Bearer { credentials .token } " ,
177175 }
178176
179- url = "{}/sql/{}/projects/{}/instances/{}:generateEphemeralCert" .format (
180- sqladmin_api_endpoint , _sql_api_version , project , instance
181- )
177+ url = f"{ sqladmin_api_endpoint } /sql/{ _sql_api_version } /projects/{ project } /instances/{ instance } :generateEphemeralCert"
182178
183179 data = {"public_key" : pub_key }
184180
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ def generate_cert(
9191 x509 .NameAttribute (NameOID .STATE_OR_PROVINCE_NAME , "California" ),
9292 x509 .NameAttribute (NameOID .LOCALITY_NAME , "Mountain View" ),
9393 x509 .NameAttribute (NameOID .ORGANIZATION_NAME , "Google Inc" ),
94- x509 .NameAttribute (NameOID .COMMON_NAME , "{}" . format ( common_name ) ),
94+ x509 .NameAttribute (NameOID .COMMON_NAME , common_name ),
9595 ]
9696 )
9797 # build cert
You can’t perform that action at this time.
0 commit comments