mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-13 06:24:45 -05:00
Sonarqube fixes.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
},
|
||||
]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user