Commit 132e9003 authored by Christian Jung's avatar Christian Jung

more cleanup

parent c24734a8
Pipeline #57275933 passed with stage
in 4 seconds
......@@ -9,28 +9,18 @@ begin
lans['!'] = '-- select cluster first --'
else
cluster = $evm.vmdb(:ems_cluster).find_by_name(current_cluster)
tags = cluster.tags
$evm.log("info", "Current cluster #{cluster.name} tags: #{tags}")
$evm.log("info", "Checking if current tag matches department/#{tag_name}")
cluster.tags.each do |tag|
if tag == "security_zone/#{tag_name}" then
$evm.log("info", "Tag matches")
cluster.hosts.each do |host|
lans['!'] = '-- select from list --'
host.lans.each do |lan|
lans[lan.id] = "#{lan.name} (tag: #{lan.tag})"
end
end
else
$evm.log("info", "Tag does not match")
end
cluster = $evm.vmdb(:ems_cluster).find_by_name(current_cluster)
tags = cluster.tags
$evm.log("info", "Current cluster #{cluster.name} tags: #{tags}")
cluster.hosts.each do |host|
lans['!'] = '-- select from list --'
host.lans.each do |lan|
lans[lan.id] = "#{lan.name} (tag: #{lan.tag})"
end
end
if lans == {} then
lans['!'] = '-- select tag first --'
lans['!'] = '-- select cluster first --'
end
list_values = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment