3 # Copyright (c) 2016 Open Platform for NFV Project, Inc. and its contributors
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
19 # access openstack cli
25 # Force update of vswitch agents
26 for i in `neutron agent-list | grep "Open vSwitch agent" | awk {'print $2'}`; do
27 neutron agent-update $i
33 # grep id and remove dead agent on all compute nodes
34 for i in `nova host-list | grep compute | awk {'print $2'}`; do
35 dead_agent_id=`neutron agent-list | grep $i | grep xxx | grep "Open vSwitch agent" | awk {'print $2'}`
36 neutron agent-delete $dead_agent_id
40 for i in `nova flavor-list | grep m1 | awk {'print $4'}`; do
41 nova flavor-key $i set "hw:mem_page_size=large"