命令使用之前需要 运行环境变量 source /etc/keystone/admin-openrc.sh 其中每个人环境变量路径可能不同 依自己修改
openstack user list
openstack user create [-h] [-f {json,shell,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--print-empty][--noindent][--prefix PREFIX]
[--domain <domain>] [--project <project>]
[--project-domain <project-domain>]
[--password <password>] [--password-prompt]
[--email <email-address>]
[--description <description>]
[--enable | --disable] [--or-show]
<name>
一般使用中只要写出自己需要的参数就好
以下创建或删除时名称或者id都可以用,为了简单下面只使用user-id
openstack user delete <user-id>
openstack user show <user-id>
openstack user set [-h] [--name <name>] [--domain <domain>]
[--project <project>]
[--project-domain <project-domain>]
[--password <password>] [--password-prompt]
[--email <email-address>]
[--description <description>] [--enable | --disable]
<user>
openstack project list
openstack project create (--domain domain名字) name
openstack project delete <project-id>
openstack project set [-h] [--name <name>] [--domain <domain>]
[--description <description>]
[--enable | --disable] [--property <key=value>]
<project-id>
openstack project show <project-id>
openstack role list
openstack role create name
openstack role delete <role-id>
openstack role show <role-id>
openstack role add --project(项目名) --user(用户名) role(角色名)
openstack role assignment list
openstack role remove [-h] [--domain <domain> | --project <project>]
[--user <user> | --group <group>]
[--group-domain <group-domain>]
[--project-domain <project-domain>]
[--user-domain <user-domain>] [--inherited]
<role-id>
openstack service list
openstack service create [-h] [-f {json,shell,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--print-empty] [--noindent] [--prefix PREFIX]
[--name <name>] [--description <description>]
[--enable | --disable]
<type>
openstack service delete <service-id>
openstack service show <service-id>
openstack endpoint list
openstack endpoint create [-h]
[-f {json,shell,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--print-empty] [--noindent]
[--prefix PREFIX] [--region <region-id>]
[--enable | --disable]
<service> <interface> <url>
openstack endpoint delete <endpoint-id>
openstack endpoint show <service-id>
openstack domain create <name>
openstack catalog list