def set_largepages(cls): do_large_page = cls.config["nova"]["large_page"] pages = cls.config["nova"]["large_page_num"] baremetal = cls.config["baremetal"] if do_large_page: for name, ip in baremetal.items(): num = base.set_hugepages(ip, int(pages)) _ = Command("openstack-service restart nova", host=ip)() if num != pages: raise Exception("Unable to set huge pages")
def set_large_page_info(self, bare_metal, num_pages=128): return base.set_hugepages(bare_metal, num_pages=num_pages)