Sonarqube fixes.

This commit is contained in:
Dave Page
2022-08-26 10:07:59 +01:00
parent 92741680b5
commit 37082a955b
6 changed files with 8 additions and 11 deletions
+3 -3
View File
@@ -83,11 +83,11 @@ class BigAnimalProvider(AbsProvider):
try:
private_network = True if args.private_network == '1' else False
ip = args.public_ip if args.public_ip else '0.0.0.0/0'
IpRanges = []
ip_ranges = []
ip = ip.split(',')
for i in ip:
IpRanges.append([i, 'pgcloud client {}'.format(i)])
ip_ranges.append([i, 'pgcloud client {}'.format(i)])
debug('Creating BigAnimal cluster: {}...'.format(args.name))
@@ -114,7 +114,7 @@ class BigAnimalProvider(AbsProvider):
}
if not private_network:
_data['allowIpRangeMap'] = IpRanges
_data['allowIpRangeMap'] = ip_ranges
cluster_resp = requests.post(_url,
headers=_headers,
+3 -3
View File
@@ -162,11 +162,11 @@ class RdsProvider(AbsProvider):
ip = args.public_ip if args.public_ip else\
'{}/32'.format(get_my_ip())
port = args.db_port or 5432
IpRanges = []
ip_ranges = []
ip = ip.split(',')
for i in ip:
IpRanges.append({
ip_ranges.append({
'CidrIp': i,
'Description': 'pgcloud client {}'.format(i)
})
@@ -180,7 +180,7 @@ class RdsProvider(AbsProvider):
'FromPort': port,
'ToPort': port,
'IpProtocol': 'tcp',
'IpRanges': IpRanges
'IpRanges': ip_ranges
},
]
)