openstack: 'domain' is not an openstack command.
在按照heat官方文档安装heat时,无法使用openstack domain
命令。
openstack domain list
openstack: 'domain' is not an openstack command. See 'openstack --help'.
查看下环境变量:
env | grep ^OS
OS_REGION_NAME=RegionOne
OS_PASSWORD=password
OS_AUTH_URL=http://192.168.1.1:5000/v2.0
OS_USERNAME=admin
OS_TENANT_NAME=admin
环境变量用的是OpenStack Identity API v2.0,这就是问题的关键,domain子命令不支持OpenStack Identity API v2.0,支持OpenStack Identity API v3.0.
export OS_AUTH_URL=http://192.168.1.1:5000
export OS_IDENTITY_API_VERSION=3
openstack domain list
+---------+---------+---------+--------------------+
| ID | Name | Enabled | Description |
+---------+---------+---------+--------------------+
| default | Default | True | The default domain |
+---------+---------+---------+--------------------+