- max_other_cores = (total_cpus - total_vpp_cpus) / 2
- question = 'How many core(s) do you want to reserve for ' \
- 'processes other than VPP? [0-{}][0]? '. \
- format(str(max_other_cores))
- total_other_cpus = self._ask_user_range(
- question, 0, max_other_cores, 0)
- node['cpu']['total_other_cpus'] = total_other_cpus
+ total_other_cpus = 0
+ max_other_cores = total_cpus - total_vpp_cpus
+ if max_other_cores > 0:
+ question = 'How many core(s) do you want to reserve for ' \
+ 'processes other than VPP? [0-{}][0]? '. \
+ format(str(max_other_cores))
+ total_other_cpus = self._ask_user_range(question, 0, max_other_cores, 0)
+ node['cpu']['total_other_cpus'] = total_other_cpus