Add nosec in get_free_segmentation_id function

pep8 job fails due to bandit check with an error:
    [B311:blacklist] Standard pseudo-random generators are not suitable 
    for security/cryptographic purposes.

But using the standard random function in the get_free_segmentation_id 
function is suitable, so adding #nosec comment should unbblock the gate.

Change-Id: Iad8e376c503a32300b3e0b504f47a0c81e53a7a8
This commit is contained in:
Sergey Vilgelm 2019-05-13 08:09:52 -05:00
parent 35062ad415
commit 4ae79ba52b
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ class SegmentsExtRbacTest(base.BaseNetworkExtRbacTest):
# With 2+ concurrency, tests that ran in the same moment may fail due
# to usage conflict. To prevent it we select segmentation to start
# randomly.
segmentation_id = random.randint(1000, 5000)
segmentation_id = random.randint(1000, 5000) # nosec
while segmentation_id in segmentation_ids:
segmentation_id += 1