diff --git a/chef/cookbooks/neutron/attributes/default.rb b/chef/cookbooks/neutron/attributes/default.rb index 27f00dfba8..80b7fc6bdc 100644 --- a/chef/cookbooks/neutron/attributes/default.rb +++ b/chef/cookbooks/neutron/attributes/default.rb @@ -63,6 +63,8 @@ ovs_agent_name: "openstack-neutron-openvswitch-agent", lb_agent_pkg: "openstack-neutron-linuxbridge-agent", lb_agent_name: "openstack-neutron-linuxbridge-agent", + zvm_agent_pkg: "openstack-neutron-zvm-agent", + zvm_agent_name: "openstack-neutron-zvm-agent", lbaas_agent_pkg: "openstack-neutron-lbaas-agent", lbaas_agent_name: "openstack-neutron-lbaas-agent", lbaas_haproxy_group: "haproxy", @@ -92,6 +94,8 @@ ovs_agent_name: "neutron-openvswitch-agent", lb_agent_pkg: "openstack-neutron-linuxbridge", lb_agent_name: "neutron-linuxbridge-agent", + zvm_agent_pkg: "openstack-neutron-zvm-agent", + zvm_agent_name: "openstack-neutron-zvm-agent", lbaas_agent_pkg: "openstack-neutron-lbaas-agent", lbaas_agent_name: "neutron-lbaas-agent", lbaas_haproxy_group: "nogroup", @@ -119,6 +123,8 @@ ovs_agent_name: "neutron-plugin-openvswitch-agent", lb_agent_pkg: "neutron-plugin-linuxbridge-agent", lb_agent_name: "neutron-plugin-linuxbridge-agent", + zvm_agent_pkg: "neutron-zvm-agent", + zvm_agent_name: "neutron-zvm-agent", lbaas_agent_pkg: "neutron-lbaas-agent", lbaas_agent_name: "neutron-lbaas-agent", lbaas_haproxy_group: "nogroup", diff --git a/chef/cookbooks/neutron/recipes/server.rb b/chef/cookbooks/neutron/recipes/server.rb index f06a2f375a..8fc1c282c4 100644 --- a/chef/cookbooks/neutron/recipes/server.rb +++ b/chef/cookbooks/neutron/recipes/server.rb @@ -160,6 +160,7 @@ #TODO(vuntz): temporarily disable the hyperv mechanism since we're lacking networking-hyperv from stackforge #ml2_mechanism_drivers = node[:neutron][:ml2_mechanism_drivers].dup.push("hyperv") ml2_mechanism_drivers = node[:neutron][:ml2_mechanism_drivers].dup + ml2_mechanism_drivers = "zvm" if node[:neutron][:use_l2pop] && (ml2_type_drivers.include?("gre") || ml2_type_drivers.include?("vxlan")) ml2_mechanism_drivers.push("l2population") end diff --git a/chef/cookbooks/neutron/templates/default/neutron_zvm_plugin.ini.erb b/chef/cookbooks/neutron/templates/default/neutron_zvm_plugin.ini.erb new file mode 100644 index 0000000000..7cbbf056f0 --- /dev/null +++ b/chef/cookbooks/neutron/templates/default/neutron_zvm_plugin.ini.erb @@ -0,0 +1,51 @@ +[AGENT] +# (StrOpt) xCat REST API username, default value is admin. +# zvm_xcat_username = admin +zvm_xcat_username = <%= @zvm[:zvm_xcat_username] %> +# Example: zvm_xcat_username = guest + +# (StrOpt) Password of the xCat REST API user, default value is admin +# zvm_xcat_password = admin +zvm_xcat_password = <%= @zvm[:zvm_xcat_password] %> +# Example: zvm_xcat_password = passw0rd + +# (StrOpt) xCat MN server address, IP address or host name +# zvm_xcat_server = YourxCATMNServerAddress +zvm_xcat_server = <%= @zvm[:zvm_xcat_server] %> +# Example: zvm_xcat_server = 10.0.0.1 + +# (StrOpt) xCat zHCP nodename in xCAT, default value is zhcp +# xcat_zhcp_nodename = zhcp +# Example: xcat_zhcp_nodename = myzhcp1 + +# (StrOpt) The compute node name neutron-zvm-agent work on, same as 'host'in nova.conf +# This property is optional. If it is not specified, 'host' in neutron.conf will be +# used. Moreover, 'host' in neutron.conf is recommended and this property is deprecated. +# zvm_host = opnstk1 +# Example: zvm_host = opnstk1 + +# (IntOpt) Agent's polling interval in seconds, default value is 2 seconds +# polling_interval = 2 +# Example: polling_interval = 5 + +# (IntOpt) The number of seconds the agent will wait for +# xCAT MN response, default value is 300 seconds +# zvm_xcat_timeout = 300 +# Example: zvm_xcat_timeout = 600 + +# (StrOpt ) xcat management NIC IP. +# xcat_mgt_ip = 10.1.0.1 +# Example: xcat_mgt_ip=10.1.0.1 + +# (StrOpt ) xcat management NIC mask. +# xcat_mgt_mask=255.255.0.0 +# Example: xcat_mgt_mask=255.255.0.0 + +# (StrOpt ) rdev_list for each vswitch's uplink real device(s), seperated by ','. +# If a vswitch does not connect an OSA, which means it does not connect to +# external network, rdev_list can be ignored. +# A new section is required for each vswitch which has a uplink port. +# rdev_list = 6000 +# Example: +# [ xcatvsw3 ] +# rdev_list = 6000,6003,6005 diff --git a/chef/data_bags/crowbar/migrate/neutron/043_add_zvm_attributes.rb b/chef/data_bags/crowbar/migrate/neutron/043_add_zvm_attributes.rb new file mode 100644 index 0000000000..69c90b66fd --- /dev/null +++ b/chef/data_bags/crowbar/migrate/neutron/043_add_zvm_attributes.rb @@ -0,0 +1,9 @@ +def upgrade ta, td, a, d + a['zvm'] = ta['zvm'] + return a, d +end + +def downgrade ta, td, a, d + a.delete('zvm') + return a, d +end diff --git a/chef/data_bags/crowbar/template-neutron.json b/chef/data_bags/crowbar/template-neutron.json index 812ccb87d3..16062109a2 100644 --- a/chef/data_bags/crowbar/template-neutron.json +++ b/chef/data_bags/crowbar/template-neutron.json @@ -49,6 +49,11 @@ "tz_uuid": "", "l3_gw_uuid": "" }, + "zvm": { + "zvm_xcat_server": "", + "zvm_xcat_username": "", + "zvm_xcat_password": "" + }, "ssl": { "certfile": "/etc/neutron/ssl/certs/signing_cert.pem", "keyfile": "/etc/neutron/ssl/private/signing_key.pem", diff --git a/chef/data_bags/crowbar/template-neutron.schema b/chef/data_bags/crowbar/template-neutron.schema index e286855940..c5f6a7ccba 100644 --- a/chef/data_bags/crowbar/template-neutron.schema +++ b/chef/data_bags/crowbar/template-neutron.schema @@ -83,6 +83,11 @@ "tz_uuid": { "type" : "str", "required" : true }, "l3_gw_uuid": { "type" : "str", "required" : true } }}, + "zvm": { "type": "map", "required": true, "mapping": { + "zvm_xcat_server": { "type": "str", "required": true }, + "zvm_xcat_username": { "type": "str", "required": true }, + "zvm_xcat_password": { "type": "str", "required": true } + }}, "ssl": { "type": "map", "required": true, "mapping": { "certfile": { "type" : "str", "required" : true }, "keyfile": { "type" : "str", "required" : true }, diff --git a/crowbar_framework/app/views/barclamp/neutron/_edit_attributes.html.haml b/crowbar_framework/app/views/barclamp/neutron/_edit_attributes.html.haml index 7b8ae743ba..479dfc2b26 100644 --- a/crowbar_framework/app/views/barclamp/neutron/_edit_attributes.html.haml +++ b/crowbar_framework/app/views/barclamp/neutron/_edit_attributes.html.haml @@ -124,6 +124,14 @@ %td = link_to t(".clear_port"), "#", :class => "btn btn-default btn-block", "data-clear" => node.handle + %fieldset + %legend + = t(".zvm_header") + + = string_field %w(zvm zvm_xcat_server) + = string_field %w(zvm zvm_xcat_username) + = password_field %w(zvm zvm_xcat_password) + %fieldset %legend = t(".ssl_header") diff --git a/crowbar_framework/config/locales/neutron/en.yml b/crowbar_framework/config/locales/neutron/en.yml index 08c2de93e3..86e31d5a6e 100644 --- a/crowbar_framework/config/locales/neutron/en.yml +++ b/crowbar_framework/config/locales/neutron/en.yml @@ -65,6 +65,11 @@ en: controllers: 'VMware NSX Controllers' tz_uuid: 'UUID of the NSX Transport Zone' l3_gw_uuid: 'UUID of the NSX Gateway Service' + zvm_header: 'z/VM Configuration' + zvm: + zvm_xcat_server: 'xCAT Host/IP Address' + zvm_xcat_username: 'xCAT Username' + zvm_xcat_password: 'xCAT Password' ssl_header: 'SSL Support' api: protocol: 'Protocol'