Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions chef/cookbooks/neutron/recipes/cisco_apic_support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
end

aciswitches = node[:neutron][:apic][:apic_switches].to_hash
acivmms = node[:neutron][:apic][:apic_vmms].to_hash
template "/etc/neutron/neutron-server.conf.d/100-ml2_conf_cisco_apic.ini.conf" do
cookbook "neutron"
source "ml2_conf_cisco_apic.ini.erb"
Expand All @@ -29,6 +30,7 @@
group node[:neutron][:platform][:group]
variables(
apic_switches: aciswitches,
apic_vmms: acivmms,
ml2_mechanism_drivers: node[:neutron][:ml2_mechanism_drivers],
policy_drivers: "implicit_policy,apic",
default_ip_pool: "192.168.0.0/16",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apic_system_id=<%= node[:neutron][:apic][:system_id] %>
[opflex]
networks = *
[ml2_cisco_apic]
[apic]
apic_hosts=<%= node[:neutron][:apic][:hosts] %>
apic_username=<%= node[:neutron][:apic][:username] %>
apic_password=<%= node[:neutron][:apic][:password] %>
Expand All @@ -28,3 +28,9 @@ policy_drivers = <%= @policy_drivers %>
[group_policy_implicit_policy]
default_ip_pool = <%= @default_ip_pool %>
<% end -%>
<% @apic_vmms.keys.each do |ip| -%>
[apic_vmdom:<%=ip%>]
<% @apic_vmms[ip].each do |key, value| -%>
<%= key %> = <%= value %>
<% end -%>
<% end -%>
13 changes: 13 additions & 0 deletions chef/data_bags/crowbar/template-neutron.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,19 @@
}
}
}
},
"apic_vmms": {
"soc_kvm_domain": {
"apic_vmm_type": "openstack",
"enable_optimized_dhcp": "true",
"enable_optimized_metadata": "true",
"hosts" : ""
},
"soc_vm_domain": {
"apic_vmm_type": "vmware",
"enable_optimized_dhcp": "false",
"enable_optimized_metadata": "false"
}
}
},
"allow_overlapping_ips": true,
Expand Down
6 changes: 5 additions & 1 deletion chef/data_bags/crowbar/template-neutron.schema
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@
}}
}}
}}
}
},
"apic_vmms": { "type" : "map", "required" : true, "mapping" : {
= : { "type" : "map", "required" : true, "mapping" : {
= : { "type": "str", "required": true }}
}}
}},
"allow_overlapping_ips": { "type": "bool", "required": true },
"cisco_switches": {
Expand Down