Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenning committed Oct 10, 2023
2 parents 6710154 + db0dc94 commit 136bd8c
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions tests/fixtures/configs/build_big_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@
print(" switchport")
print(" switchport trunk encapsulation dot1q")
print(" switchport mode trunk")
print(" switchport trunk allowed vlan 1-{}".format(randint(2, 4094)))
# nosec will silence warnings about python random cryptographic inadequacy
print(" switchport trunk allowed vlan 1-{}".format(randint(2, 4094))) # nosec
print(" switchport nonnegotiate")
print(" spanning-tree guard root")
print("!")
elif mode=='access':
print(" switchport")
print(" switchport access vlan {}".format(randint(2, 4094)))
# nosec will silence warnings about python random cryptographic inadequacy
print(" switchport access vlan {}".format(randint(2, 4094))) # nosec
print(" switchport mode access")
print(" switchport nonnegotiate")
print(" spanning-tree portfast")
Expand All @@ -35,8 +37,9 @@
if mode=='vrf':
print("ip vrf forwarding VRF_{}".format(vlan))
print(" description Layer3 SVI: vlan {}".format(vlan))
print(" ip address {}.{}.{}.0 255.255.255.0".format(randint(1, 224),
randint(1, 255), randint(1, 255)))
print(" ip address {}.{}.{}.0 255.255.255.0".format(
randint(1, 224), # nosec
randint(1, 255), randint(1, 255))) # nosec
print("!")

elif sys.argv[1]=="5":
Expand All @@ -45,6 +48,11 @@
print("!")
for acl_number in range(0, 100):
print("ip access-list extended ACL_{}".format('%02i' % acl_number))
for ace in range(0, randint(20, 254)):
print(" permit {} any host 192.0.2.{}".format(choice(['tcp', 'udp', 'ip']), ace))
# nosec will silence warnings about python random cryptographic inadequacy
for ace in range(0, randint(20, 254)): # nosec
print(" permit {} any host 192.0.2.{}".format(
# nosec will silence warnings about python random cryptographic inadequacy
choice(['tcp', 'udp', 'ip']), ace # nosec
)
)
print("!")

0 comments on commit 136bd8c

Please sign in to comment.