def config_cascaded_az(): """Update parameter for neutron-server and cinder-volume, then restart them.""" params = { 'mechanism_drivers': 'openvswitch,l2populationcascaded,evs,sriovnicswitch,netmapnicswitch' } ret = cps_server.update_template_params('neutron', 'neutron-server', params) if not ret: LOG.error("cps update_template_params for neutron-server failed.") return ret params = { 'volume_driver': 'cinder.volume.drivers.ec2.driver.AwsEc2VolumeDriver' } ret = cps_server.update_template_params('cinder', 'cinder-volume', params) if not ret: LOG.error("cps update_template_params for cinder-volume failed.") return ret cps_server.cps_commit() restart_component('neutron', 'neutron-openvswitch-agent') restart_component('cinder', 'cinder-volume') restart_component('nova', 'nova-compute')
def cps_server_update_params_list(service_name, template_name, update_params_list): while len(update_params_list) != 0: update_params_item = update_params_list.pop() if not cps_server.update_template_params(service_name, template_name, update_params_item): LOG.error("update service %s template %s params failed."%(service_name,template_name)) update_params_list.append(update_params_item) sleep(5) else: LOG.info("update service %s template %s params successed."%(service_name,template_name)) cps_server.cps_commit()
def cps_server_update_params_list(service_name, template_name, update_params_list): while len(update_params_list) != 0: update_params_item = update_params_list.pop() if not cps_server.update_template_params( service_name, template_name, update_params_item): LOG.error("update service %s template %s params failed." % (service_name, template_name)) update_params_list.append(update_params_item) sleep(5) else: LOG.info("update service %s template %s params successed." % (service_name, template_name)) cps_server.cps_commit()
def config_cascaded_az(): """Update parameter for neutron-server and cinder-volume, then restart them.""" params = {"mechanism_drivers": "openvswitch,l2populationcascaded,evs,sriovnicswitch,netmapnicswitch"} ret = cps_server.update_template_params("neutron", "neutron-server", params) if not ret: LOG.error("cps update_template_params for neutron-server failed.") return ret params = {"volume_driver": "cinder.volume.drivers.vcloud.driver.VMwareVcloudVolumeDriver"} ret = cps_server.update_template_params("cinder", "cinder-volume", params) if not ret: LOG.error("cps update_template_params for neutron-server failed.") return ret cps_server.cps_commit() restart_component("neutron", "neutron-openvswitch-agent") restart_component("cinder", "cinder-volume") restart_component("nova", "nova-compute")
def config_cascaded_az(): """Update parameter for neutron-server and cinder-volume, then restart them.""" params = {'mechanism_drivers': 'openvswitch,l2populationcascaded,evs,sriovnicswitch,netmapnicswitch'} ret = cps_server.update_template_params('neutron', 'neutron-server', params) if not ret: LOG.error("cps update_template_params for neutron-server failed.") return ret params = {'volume_driver': 'cinder.volume.drivers.ec2.driver.AwsEc2VolumeDriver'} ret = cps_server.update_template_params('cinder', 'cinder-volume', params) if not ret: LOG.error("cps update_template_params for cinder-volume failed.") return ret cps_server.cps_commit() restart_component('neutron', 'neutron-openvswitch-agent') restart_component('cinder', 'cinder-volume') restart_component('nova', 'nova-compute')
def _commit(self): LOG.info("cps_server cps_commit") cps_server.cps_commit()