mirror of
https://github.com/internetee/registry.git
synced 2025-05-31 09:53:56 +02:00
109012608-ip-split
This commit is contained in:
parent
1ac33f1df6
commit
0431543f77
1 changed files with 9 additions and 5 deletions
|
@ -172,11 +172,15 @@ namespace :import do
|
||||||
x.acl.all.each do |y|
|
x.acl.all.each do |y|
|
||||||
next if existing_ips.include?(y.ipaddr)
|
next if existing_ips.include?(y.ipaddr)
|
||||||
if !y.ipaddr.nil? && y.ipaddr != ''
|
if !y.ipaddr.nil? && y.ipaddr != ''
|
||||||
ips << WhiteIp.new({
|
|
||||||
registrar_id: Registrar.find_by(legacy_id: x.try(:id)).try(:id),
|
y.ipaddr.split(',').each do |ip|
|
||||||
ipv4: y.ipaddr,
|
ips << WhiteIp.new({
|
||||||
interfaces: ['api', 'registrar']
|
registrar_id: Registrar.find_by(legacy_id: x.try(:id)).try(:id),
|
||||||
})
|
ipv4: ip,
|
||||||
|
interfaces: ['api', 'registrar']
|
||||||
|
})
|
||||||
|
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue