Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1d76ef0

Browse filesBrowse files
ryanmatsdpebot
authored andcommitted
random generation of keyring / cryptokey names (GoogleCloudPlatform#786)
* random generation of keyring / cryptokey names * Fixed formatting of keyring name and cryptokey name
1 parent f7179af commit 1d76ef0
Copy full SHA for 1d76ef0

File tree

Expand file treeCollapse file tree

1 file changed

+7
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-2
lines changed

‎kms/api-client/snippets_test.py

Copy file name to clipboardExpand all lines: kms/api-client/snippets_test.py
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414
# See the License for the specific language governing permissions and
1515

16+
import random
17+
import string
18+
1619
from googleapiclient import discovery
1720

1821
import snippets
@@ -22,10 +25,12 @@
2225
LOCATION = 'global'
2326

2427
# Your Google Cloud Platform KeyRing name
25-
KEYRING = 'sample-keyring-43'
28+
KEYRING = ''.join(
29+
random.choice(string.ascii_lowercase + string.digits) for _ in range(12))
2630

2731
# Your Google Cloud Platform CryptoKey name
28-
CRYPTOKEY = 'sample-key-43'
32+
CRYPTOKEY = ''.join(
33+
random.choice(string.ascii_lowercase + string.digits) for _ in range(12))
2934

3035
# Your Google Cloud Platform CryptoKeyVersion name
3136
VERSION = 1

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.