Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
random generation of keyring / cryptokey names [(#786)](GoogleCloudPl…
Browse files Browse the repository at this point in the history
…atform/python-docs-samples#786)

* random generation of keyring / cryptokey names

* Fixed formatting of keyring name and cryptokey name
  • Loading branch information
ryanmats authored and busunkim96 committed Jun 4, 2020
1 parent c02fb40 commit 9c33bad
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions samples/snippets/snippets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and

import random
import string

from googleapiclient import discovery

import snippets
Expand All @@ -22,10 +25,12 @@
LOCATION = 'global'

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

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

# Your Google Cloud Platform CryptoKeyVersion name
VERSION = 1
Expand Down

0 comments on commit 9c33bad

Please sign in to comment.