最終效果圖:sql
1 在instance表中添加字段 D:\queenDashboard\nova\db\sqlalchemy\api_migrations\migrate_repo\versions\004_add_request_spec.py 使用nova-manage db sync 命令便可修改數據庫。以下圖數據庫
2 在D:\queenDashboard\horizon-stable-queens\openstack_dashboard\dashboards\admin\instances\tables.pyapi
3 horizon中api包中功能,對內爲界面提供調用,對外提供調用novaclient 代碼。spa
D:\queenDashboard\horizon-stable-queens\openstack_dashboard\api\nova.py3d
4 horizon api將調用命令發給novaclient ,novaclient再轉給nova api處理調用D:\queenDashboard\nova\api\openstack\compute\servers.pyserver
5爲了讓nova返回的信息中包含添加的ha_enabled字段 在該文件中添加如圖所示代碼。blog
6 D:\queenDashboard\nova\db\sqlalchemy\models.py中添加sqlalchemy
7 D:\queenDashboard\nova\objects\instance.py 中添加io