Skip to content

Commit e18adc6

Browse files
committed
Changes to integrate with ACI 4.1 and new packages (SOC-10403)
This commit provides changes in plugin packages and config files needed for integration of SOC with ACI 4.1 and higher versions. ACI 4.1 uses a slightly different set of plugin packages and configs for integration with OpenStack. This includes: - python-gbpclient renamed to python-group-based-policy-client - ovs-bridge-name in opflex-agent-ovs.conf removed - addition of int-bridge-name and access-bridge-name in opflex-agent-ovs.conf - Renaming of agent-ovs to opflex-agent For uniformity, the template for opflex-agent-ovs.conf is now renamed from 10-opflex-agent-ovs.conf.erb to opflex-agent-ovs.conf.erb - The neutron template schema and json templates are updated to provide integration_bridge and access_bridge details with default values. The corresponding migration scripts are also updated.
1 parent 52b1342 commit e18adc6

File tree

6 files changed

+38
-10
lines changed

6 files changed

+38
-10
lines changed

chef/cookbooks/neutron/attributes/default.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
default[:neutron][:nsx_config_file] = "/etc/neutron/neutron.conf.d/110-nsx.conf"
3434
default[:neutron][:ml2_cisco_config_file] = "/etc/neutron/neutron.conf.d/115-ml2_cisco.conf"
3535
default[:neutron][:ml2_cisco_apic_config_file] = "/etc/neutron/neutron.conf.d/115-ml2_cisco_apic.conf"
36+
default[:neutron][:opflex_config_file] = "/etc/opflex-agent-ovs/conf.d/10-opflex-agent-ovs.conf"
3637
default[:neutron][:rpc_workers] = 1
3738

3839
default[:neutron][:db][:database] = "neutron"
@@ -128,8 +129,8 @@
128129
cisco_apic_pkgs: ["python-apicapi",
129130
"python-neutron-ml2-driver-apic"],
130131
cisco_apic_gbp_pkgs: ["openstack-neutron-gbp",
131-
"python-gbpclient"],
132-
cisco_opflex_pkgs: ["agent-ovs",
132+
"python-group-based-policy-client"],
133+
cisco_opflex_pkgs: ["opflex-agent",
133134
"lldpd",
134135
"openstack-neutron-opflex-agent"],
135136
infoblox_pkgs: ["python-infoblox-client",
@@ -174,8 +175,8 @@
174175
cisco_apic_pkgs: ["python-apicapi",
175176
"python-neutron-ml2-driver-apic"],
176177
cisco_apic_gbp_pkgs: ["openstack-neutron-gbp",
177-
"python-gbpclient"],
178-
cisco_opflex_pkgs: ["agent-ovs",
178+
"python-group-based-policy-client"],
179+
cisco_opflex_pkgs: ["opflex-agent",
179180
"lldpd",
180181
"neutron-opflex-agent"],
181182
infoblox_pkgs: [],

chef/cookbooks/neutron/recipes/cisco_apic_agents.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,14 @@
9191
end
9292

9393
# Update config file from template
94-
opflex_agent_conf = "/etc/opflex-agent-ovs/conf.d/10-opflex-agent-ovs.conf"
9594
apic = neutron[:neutron][:apic]
9695
opflex_list = apic[:opflex].select { |i| i[:nodes].include? node[:hostname] }
9796
opflex_list.any? || raise("Opflex instance not found for node '#{node[:hostname]}'")
9897
opflex_list.one? || raise("Multiple opflex instances found for node '#{node[:hostname]}'")
9998
opflex = opflex_list.first
100-
template opflex_agent_conf do
99+
template node[:neutron][:opflex_config_file] do
101100
cookbook "neutron"
102-
source "10-opflex-agent-ovs.conf.erb"
101+
source "opflex-agent-ovs.conf.erb"
103102
mode "0755"
104103
owner "root"
105104
group neutron[:neutron][:platform][:group]
@@ -109,6 +108,8 @@
109108
socketgroup: neutron[:neutron][:platform][:group],
110109
opflex_peer_ip: opflex[:peer_ip],
111110
opflex_peer_port: opflex[:peer_port],
111+
opflex_int_bridge: opflex[:integration_bridge],
112+
opflex_access_bridge: opflex[:access_bridge],
112113
opflex_vxlan_encap_iface: opflex[:vxlan][:encap_iface],
113114
opflex_vxlan_uplink_iface: opflex[:vxlan][:uplink_iface],
114115
opflex_vxlan_uplink_vlan: opflex[:vxlan][:uplink_vlan],

chef/cookbooks/neutron/templates/default/10-opflex-agent-ovs.conf.erb renamed to chef/cookbooks/neutron/templates/default/opflex-agent-ovs.conf.erb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636

3737
"renderers": {
3838
"stitched-mode": {
39-
"ovs-bridge-name": "br-int",
39+
"int-bridge-name": "<%= @opflex_int_bridge %>",
40+
"access-bridge-name": "<%= @opflex_access_bridge %>",
4041
"encap": {
4142
"vxlan" : {
4243
"encap-iface": "<%= @opflex_vxlan_encap_iface %>",
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
def upgrade(tattr, tdep, attr, dep)
2+
unless attr["apic"]["opflex"].key?("integration_bridge")
3+
attr["apic"]["opflex"]["integration_bridge"] = tattr["apic"]["opflex"]["integration_bridge"]
4+
end
5+
unless attr["apic"]["opflex"].key?("access_bridge")
6+
attr["apic"]["opflex"]["access_bridge"] = tattr["apic"]["opflex"]["access_bridge"]
7+
end
8+
9+
return attr, dep
10+
end
11+
12+
def downgrade(tattr, tdep, attr, dep)
13+
unless tattr["apic"]["opflex"].key?("integration_bridge")
14+
attr["apic"]["opflex"].delete("integration_bridge") if attr.key?("integration_bridge")
15+
end
16+
unless tattr["apic"]["opflex"].key?("access_bridge")
17+
attr["apic"]["opflex"].delete("access_bridge") if attr.key?("access_bridge")
18+
end
19+
20+
return attr, dep
21+
end

chef/data_bags/crowbar/template-neutron.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@
6464
"peer_ip": "",
6565
"peer_port": 8009,
6666
"encap": "vxlan",
67+
"integration_bridge": "br-int",
68+
"access_bridge": "br-fabric",
6769
"vxlan": {
68-
"encap_iface": "br-int_vxlan0",
70+
"encap_iface": "br-fab_vxlan0",
6971
"uplink_iface": "vlan.4093",
7072
"uplink_vlan": 4093,
7173
"remote_ip": "",
@@ -193,7 +195,7 @@
193195
"neutron": {
194196
"crowbar-revision": 0,
195197
"crowbar-applied": false,
196-
"schema-revision": 307,
198+
"schema-revision": 308,
197199
"element_states": {
198200
"neutron-server": [ "readying", "ready", "applying" ],
199201
"neutron-network": [ "readying", "ready", "applying" ],

chef/data_bags/crowbar/template-neutron.schema

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@
7272
"peer_ip": { "type": "str", "required" : true },
7373
"peer_port": { "type": "int", "required" : true },
7474
"encap": { "type": "str", "required": true },
75+
"integration_bridge": { "type": "str", "required": true },
76+
"access_bridge": { "type": "str", "required": true },
7577
"vxlan": { "type": "map", "required": true, "mapping" : {
7678
"encap_iface": {"type": "str", "required": true },
7779
"uplink_iface": { "type": "str", "required": true },

0 commit comments

Comments
 (0)