在 controller 节点的/root 目录下按要求编写 Python 程序 create_route.py 文件,对接openstack api,要求获取 openstack 平台外网 ID,创建路由 pvm_router,添加内网子网接口到路由,实现内外网网络互通(如果存在同名路由,代码中需先进行删除操作)。输出路由名称、id 和详细信息。
运行失败,显示如下
Traceback (most recent call last):
File "create_router.py", line 25, in <module>
id = info["router"]["id"]
KeyError: 'router'