Command cover for below task
project/tenant - list,create,show,disable,enable,rename,delete
user -list,create,show,enable,disable,assign to a project,change password,add email address,delete
role -list,create,show,add to user,,list roles assign to a user,delete
service/endpoint -list,show,create test service and endpoint,delete
role/rule - check policy.json file
verify keystone/identity service - check keystone service ,execute command without importing rc file variable
Project
--------
openstack project list
openstack project create --description 'new project' new-project
openstack project show <project id>
openstack project set <project id> --disable
openstack project show <project id>
openstack project set <project id> --enable
openstack project show <project id>
openstack project set <project id> --name project-new
openstack project list
openstack project delete <project id>
User
-----
openstack user list
*associate tenant id
*set password else user will not able to login without password
openstack project create --description 'new project' new -project
openstack user create --project new-project --password openstack new-user
openstack user set new-user --disable
openstack user show new-user
openstack user set new-user --enable
openstack user show new-user
openstack user set new-user --email new-user@example.com
openstack user show new-user
openstack user delete new-user
Role
----
openstack role list
openstack role create new-role
openstack role add --user new-user --project new-project new-role
openstack role show new-role
openstack role list --user new-user --project new-project
service/catalog
----------------
openstack service list
openstack endpoint list
openstack endpoint show swift
openstack service create --name TEST --description 'test service' TEST
openstack service list
openstack enpoint create -- region RegionOne TEST adminurl http://192.168.4.16:353535 publicurl \
http://192.168.4.16:353535 --internalurl http://192.168.4.16:353535
openstack endpoint list
openstack enpoint show TEST
openstack endpoint delete <endpoint id>
openstack service delete <service id>
openstack service list
Identity service cerification:
unset OS_TOKEN OS_URL
openstack --os-auth-url http://192.168.4.15:35357/v3 --os-project-domain-id default --os-user-domain-id default
--os-project-name admin --os-username admin --os-auth-type password token issue
openstack --os-auth-url http://192.168.4.15:35357/v3 --os-project-domain-id default --os-user-domain-id default
--os-project-name admin --os-username admin --os-auth-type password project list
==================================================================
Lab:
==================================================================
[root@openstack-liberty ~]# openstack --os-identity-api-version 3 --os-username admin --os-password redhat --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-auth-url http://192.168.4.101:35357/v3 domain list
+----------------------------------+---------+---------+----------------------------------------------------------------------+
| ID | Name | Enabled | Description |
+----------------------------------+---------+---------+----------------------------------------------------------------------+
| 70625ce1d22644b4a80c051236ed63f5 | test | True | test domain |
| c8334d7077104846b1050132dafe980d | heat | True | |
| default | Default | True | Owns users and tenants (i.e. projects) available on Identity API v2. |
+----------------------------------+---------+---------+----------------------------------------------------------------------+
[root@openstack-liberty ~]# openstack --os-identity-api-version 3 --os-username admin --os-password redhat --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-auth-url http://192.168.4.101:35357/v3 group list --domain test
+----------------------------------+---------+
| ID | Name |
+----------------------------------+---------+
| e0eece4d0e7a4e7fbb2333bf29955a11 | testgrp |
+----------------------------------+---------+
[root@openstack-liberty ~]# openstack --os-identity-api-version 3 --os-username admin --os-password redhat --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-auth-url http://192.168.4.101:35357/v3 project list --domain test
+----------------------------------+----------+
| ID | Name |
+----------------------------------+----------+
| 0957bc7346134bca8afe574634c373c0 | testproj |
+----------------------------------+----------+
[root@openstack-liberty ~]# openstack --os-identity-api-version 3 --os-username admin --os-password redhat --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-auth-url http://192.168.4.101:35357/v3 user list --domain test
+----------------------------------+---------+
| ID | Name |
+----------------------------------+---------+
| 1f3fb036736c4b58bdca74f452e37fcb | test1 |
| a41921618ecd453eb59faa24d56eb253 | testusr |
+----------------------------------+---------+
[root@openstack-liberty ~]#
[root@openstack-liberty ~]#
[root@openstack-liberty ~]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default --os-region RegionOne project list
+----------------------------------+----------+
| ID | Name |
+----------------------------------+----------+
| 5ca446ce413143afb5c2671b183c35f2 | services |
| af4e5297fb3746cbb8af53b69251bf8f | demo |
| c1a535292a9943d59cdc3549bb66a619 | admin |
| e91e3b16935448919a3f77c1e84892d6 | lab |
+----------------------------------+----------+
[root@openstack-liberty ~]#
[root@openstack-liberty ~]#
[root@openstack-liberty ~]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default --os-region RegionOne project create --description 'project for doing lab' labproj
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | project for doing lab |
| enabled | True |
| id | a106b304064647c3868b217c388d1b35 |
| name | labproj |
+-------------+----------------------------------+
[root@openstack-liberty ~]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default --os-region RegionOne project list
+----------------------------------+----------+
| ID | Name |
+----------------------------------+----------+
| 5ca446ce413143afb5c2671b183c35f2 | services |
| a106b304064647c3868b217c388d1b35 | labproj |
| af4e5297fb3746cbb8af53b69251bf8f | demo |
| c1a535292a9943d59cdc3549bb66a619 | admin |
| e91e3b16935448919a3f77c1e84892d6 | lab |
+----------------------------------+----------+
[root@openstack-liberty ~]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default --os-region RegionOne project show labproj
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | project for doing lab |
| enabled | True |
| id | a106b304064647c3868b217c388d1b35 |
| name | labproj |
+-------------+----------------------------------+
[root@openstack-liberty ~]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default --os-region RegionOne project set a106b304064647c3868b217c388d1b35 --disable
[root@openstack-liberty ~]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default --os-region RegionOne project show labproj
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | project for doing lab |
| enabled | False |
| id | a106b304064647c3868b217c388d1b35 |
| name | labproj |
+-------------+----------------------------------+
[root@openstack-liberty ~]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default --os-region RegionOne project set a106b304064647c3868b217c388d1b35 --enable
[root@openstack-liberty ~]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default --os-region RegionOne project show labproj
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | project for doing lab |
| enabled | True |
| id | a106b304064647c3868b217c388d1b35 |
| name | labproj |
+-------------+----------------------------------+
[root@openstack-liberty ~]#
[root@openstack-liberty ~]#
[root@openstack-liberty ~]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default --os-region RegionOne project set a106b304064647c3868b217c388d1b35 --name lab-proj
[root@openstack-liberty ~]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default --os-region RegionOne project show labproj
No tenant with a name or ID of 'labproj' exists.
[root@openstack-liberty ~]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default --os-region RegionOne project list
+----------------------------------+----------+
| ID | Name |
+----------------------------------+----------+
| 5ca446ce413143afb5c2671b183c35f2 | services |
| a106b304064647c3868b217c388d1b35 | lab-proj |
| af4e5297fb3746cbb8af53b69251bf8f | demo |
| c1a535292a9943d59cdc3549bb66a619 | admin |
| e91e3b16935448919a3f77c1e84892d6 | lab |
+----------------------------------+----------+
[root@openstack-liberty ~]#
[root@openstack-liberty ~]#
[root@openstack-liberty ~]#
[root@openstack-liberty ~]#
[root@openstack-liberty ~]#
[root@openstack-liberty ~]#
[root@openstack-liberty ~]# source key
key1.pem keystonerc_admin keystonerc_demo keystonerc_labadmin
[root@openstack-liberty ~]# source keystonerc_admin
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]# openstack project list
+----------------------------------+----------+
| ID | Name |
+----------------------------------+----------+
| 5ca446ce413143afb5c2671b183c35f2 | services |
| a106b304064647c3868b217c388d1b35 | lab-proj |
| af4e5297fb3746cbb8af53b69251bf8f | demo |
| c1a535292a9943d59cdc3549bb66a619 | admin |
| e91e3b16935448919a3f77c1e84892d6 | lab |
+----------------------------------+----------+
[root@openstack-liberty ~(keystone_admin)]# openstack project delete a106b304064647c3868b217c388d1b35
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]# openstack project list
+----------------------------------+----------+
| ID | Name |
+----------------------------------+----------+
| 5ca446ce413143afb5c2671b183c35f2 | services |
| af4e5297fb3746cbb8af53b69251bf8f | demo |
| c1a535292a9943d59cdc3549bb66a619 | admin |
| e91e3b16935448919a3f77c1e84892d6 | lab |
+----------------------------------+----------+
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]# openstack user list
+----------------------------------+------------+
| ID | Name |
+----------------------------------+------------+
| 0578f7ed1ec74d9380ef600187b87c10 | ceilometer |
| 1dab1030f3fc4f139152aa7c97ada0a2 | swift |
| 25a914b4ca504f93ba23f48354021864 | cinder |
| 32ecee3bda0b4269bb2353ecfd26f1ae | labuser1 |
| 3a2ad7f134ae42d59a3d631cef31a7c2 | demo |
| 57265c3941b84846800a6bcc43564656 | neutron |
| 6777e15da87a44ad82566fc285d58535 | nova |
| 9c357453f93944ef859b9914b6989ac2 | heat |
| aab7d3e95f524b979540caecbf36a34e | labadmin |
| b514ac7e271449c7b6b9b61c98c32a4b | glance |
| b5b270c0f5104924a773e6e140f859d1 | admin |
+----------------------------------+------------+
[root@openstack-liberty ~(keystone_admin)]# unset OS_URL OS_TOKEN
[root@openstack-liberty ~(keystone_admin)]# openstack user list
+----------------------------------+------------+
| ID | Name |
+----------------------------------+------------+
| 0578f7ed1ec74d9380ef600187b87c10 | ceilometer |
| 1dab1030f3fc4f139152aa7c97ada0a2 | swift |
| 25a914b4ca504f93ba23f48354021864 | cinder |
| 32ecee3bda0b4269bb2353ecfd26f1ae | labuser1 |
| 3a2ad7f134ae42d59a3d631cef31a7c2 | demo |
| 57265c3941b84846800a6bcc43564656 | neutron |
| 6777e15da87a44ad82566fc285d58535 | nova |
| 9c357453f93944ef859b9914b6989ac2 | heat |
| aab7d3e95f524b979540caecbf36a34e | labadmin |
| b514ac7e271449c7b6b9b61c98c32a4b | glance |
| b5b270c0f5104924a773e6e140f859d1 | admin |
+----------------------------------+------------+
[root@openstack-liberty ~(keystone_admin)]# source keystonerc_admin
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]# openstack user list
+----------------------------------+------------+
| ID | Name |
+----------------------------------+------------+
| 0578f7ed1ec74d9380ef600187b87c10 | ceilometer |
| 1dab1030f3fc4f139152aa7c97ada0a2 | swift |
| 25a914b4ca504f93ba23f48354021864 | cinder |
| 32ecee3bda0b4269bb2353ecfd26f1ae | labuser1 |
| 3a2ad7f134ae42d59a3d631cef31a7c2 | demo |
| 57265c3941b84846800a6bcc43564656 | neutron |
| 6777e15da87a44ad82566fc285d58535 | nova |
| 9c357453f93944ef859b9914b6989ac2 | heat |
| aab7d3e95f524b979540caecbf36a34e | labadmin |
| b514ac7e271449c7b6b9b61c98c32a4b | glance |
| b5b270c0f5104924a773e6e140f859d1 | admin |
+----------------------------------+------------+
[root@openstack-liberty ~(keystone_admin)]# openstack user create usr1 --password redhat
+----------+----------------------------------+
| Field | Value |
+----------+----------------------------------+
| email | None |
| enabled | True |
| id | 69e37900a8f944ffbe7bcb51c7e1e425 |
| name | usr1 |
| username | usr1 |
+----------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack user set 69e37900a8f944ffbe7bcb51c7e1e425 --disable
[root@openstack-liberty ~(keystone_admin)]# openstack user list
+----------------------------------+------------+
| ID | Name |
+----------------------------------+------------+
| 0578f7ed1ec74d9380ef600187b87c10 | ceilometer |
| 1dab1030f3fc4f139152aa7c97ada0a2 | swift |
| 25a914b4ca504f93ba23f48354021864 | cinder |
| 32ecee3bda0b4269bb2353ecfd26f1ae | labuser1 |
| 3a2ad7f134ae42d59a3d631cef31a7c2 | demo |
| 57265c3941b84846800a6bcc43564656 | neutron |
| 6777e15da87a44ad82566fc285d58535 | nova |
| 69e37900a8f944ffbe7bcb51c7e1e425 | usr1 |
| 9c357453f93944ef859b9914b6989ac2 | heat |
| aab7d3e95f524b979540caecbf36a34e | labadmin |
| b514ac7e271449c7b6b9b61c98c32a4b | glance |
| b5b270c0f5104924a773e6e140f859d1 | admin |
+----------------------------------+------------+
[root@openstack-liberty ~(keystone_admin)]# openstack user show 69e37900a8f944ffbe7bcb51c7e1e425
+----------+----------------------------------+
| Field | Value |
+----------+----------------------------------+
| email | None |
| enabled | False |
| id | 69e37900a8f944ffbe7bcb51c7e1e425 |
| name | usr1 |
| username | usr1 |
+----------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]# openstack user set 69e37900a8f944ffbe7bcb51c7e1e425 --enable
[root@openstack-liberty ~(keystone_admin)]# openstack user show 69e37900a8f944ffbe7bcb51c7e1e425
+----------+----------------------------------+
| Field | Value |
+----------+----------------------------------+
| email | None |
| enabled | True |
| id | 69e37900a8f944ffbe7bcb51c7e1e425 |
| name | usr1 |
| username | usr1 |
+----------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack user set 69e37900a8f944ffbe7bcb51c7e1e425 --project ^C
[root@openstack-liberty ~(keystone_admin)]# openstack project list
+----------------------------------+----------+
| ID | Name |
+----------------------------------+----------+
| 5ca446ce413143afb5c2671b183c35f2 | services |
| af4e5297fb3746cbb8af53b69251bf8f | demo |
| c1a535292a9943d59cdc3549bb66a619 | admin |
| e91e3b16935448919a3f77c1e84892d6 | lab |
+----------------------------------+----------+
[root@openstack-liberty ~(keystone_admin)]# openstack user set 69e37900a8f944ffbe7bcb51c7e1e425 --project e91e3b16935448919a3f77c1e84892d6
[root@openstack-liberty ~(keystone_admin)]# openstack project list
+----------------------------------+----------+
| ID | Name |
+----------------------------------+----------+
| 5ca446ce413143afb5c2671b183c35f2 | services |
| af4e5297fb3746cbb8af53b69251bf8f | demo |
| c1a535292a9943d59cdc3549bb66a619 | admin |
| e91e3b16935448919a3f77c1e84892d6 | lab |
+----------------------------------+----------+
[root@openstack-liberty ~(keystone_admin)]# openstack user show 69e37900a8f944ffbe7bcb51c7e1e425
+------------+----------------------------------+
| Field | Value |
+------------+----------------------------------+
| email | None |
| enabled | True |
| id | 69e37900a8f944ffbe7bcb51c7e1e425 |
| name | usr1 |
| project_id | e91e3b16935448919a3f77c1e84892d6 |
| username | usr1 |
+------------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack user set e91e3b16935448919a3f77c1e84892d6 --email usr1@lab.com
No user with a name or ID of 'e91e3b16935448919a3f77c1e84892d6' exists.
[root@openstack-liberty ~(keystone_admin)]# openstack user set 69e37900a8f944ffbe7bcb51c7e1e425 --email usr1@lab.com
[root@openstack-liberty ~(keystone_admin)]# openstack user show 69e37900a8f944ffbe7bcb51c7e1e425
+------------+----------------------------------+
| Field | Value |
+------------+----------------------------------+
| email | usr1@lab.com |
| enabled | True |
| id | 69e37900a8f944ffbe7bcb51c7e1e425 |
| name | usr1 |
| project_id | e91e3b16935448919a3f77c1e84892d6 |
| username | usr1 |
+------------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack user set 69e37900a8f944ffbe7bcb51c7e1e425 --password changeme
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]# openstack user delete usr1
[root@openstack-liberty ~(keystone_admin)]# openstack user list
+----------------------------------+------------+
| ID | Name |
+----------------------------------+------------+
| 0578f7ed1ec74d9380ef600187b87c10 | ceilometer |
| 1dab1030f3fc4f139152aa7c97ada0a2 | swift |
| 25a914b4ca504f93ba23f48354021864 | cinder |
| 32ecee3bda0b4269bb2353ecfd26f1ae | labuser1 |
| 3a2ad7f134ae42d59a3d631cef31a7c2 | demo |
| 57265c3941b84846800a6bcc43564656 | neutron |
| 6777e15da87a44ad82566fc285d58535 | nova |
| 9c357453f93944ef859b9914b6989ac2 | heat |
| aab7d3e95f524b979540caecbf36a34e | labadmin |
| b514ac7e271449c7b6b9b61c98c32a4b | glance |
| b5b270c0f5104924a773e6e140f859d1 | admin |
+----------------------------------+------------+
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]# openstack role list
+----------------------------------+------------------+
| ID | Name |
+----------------------------------+------------------+
| 1d828996ad5a4e8dbac6df3c16859fde | tadmin |
| 20662aa25f3742e39d8bacbc583a5bdb | ladmin |
| 28a64e69089a435cb0fdb6e74c9513b7 | ResellerAdmin |
| 4b82972fe2804532a39d32330a607410 | heat_stack_owner |
| 4d500a1c35384b8581157da55c423d0b | SwiftOperator |
| 9b5e2c65cce148dcbc79e2a066d498cf | heat_stack_user |
| 9fe2ff9ee4384b1894a90878d3e92bab | _member_ |
| bf7155c7450f40ceb9245e30f98e2b82 | prole |
| cfc5c218d72d4c0d866679ede4ee427a | admin |
+----------------------------------+------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack role show 20662aa25f3742e39d8bacbc583a5bdb
+-------+----------------------------------+
| Field | Value |
+-------+----------------------------------+
| id | 20662aa25f3742e39d8bacbc583a5bdb |
| name | ladmin |
+-------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack role create role1
+-------+----------------------------------+
| Field | Value |
+-------+----------------------------------+
| id | b2cd9673ffa3413e8f8713ee060a00f8 |
| name | role1 |
+-------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack role list
+----------------------------------+------------------+
| ID | Name |
+----------------------------------+------------------+
| 1d828996ad5a4e8dbac6df3c16859fde | tadmin |
| 20662aa25f3742e39d8bacbc583a5bdb | ladmin |
| 28a64e69089a435cb0fdb6e74c9513b7 | ResellerAdmin |
| 4b82972fe2804532a39d32330a607410 | heat_stack_owner |
| 4d500a1c35384b8581157da55c423d0b | SwiftOperator |
| 9b5e2c65cce148dcbc79e2a066d498cf | heat_stack_user |
| 9fe2ff9ee4384b1894a90878d3e92bab | _member_ |
| b2cd9673ffa3413e8f8713ee060a00f8 | role1 |
| bf7155c7450f40ceb9245e30f98e2b82 | prole |
| cfc5c218d72d4c0d866679ede4ee427a | admin |
+----------------------------------+------------------+
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]# openstack role show role1
+-------+----------------------------------+
| Field | Value |
+-------+----------------------------------+
| id | b2cd9673ffa3413e8f8713ee060a00f8 |
| name | role1 |
+-------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack user list
+----------------------------------+------------+
| ID | Name |
+----------------------------------+------------+
| 0578f7ed1ec74d9380ef600187b87c10 | ceilometer |
| 1dab1030f3fc4f139152aa7c97ada0a2 | swift |
| 25a914b4ca504f93ba23f48354021864 | cinder |
| 32ecee3bda0b4269bb2353ecfd26f1ae | labuser1 |
| 3a2ad7f134ae42d59a3d631cef31a7c2 | demo |
| 57265c3941b84846800a6bcc43564656 | neutron |
| 6777e15da87a44ad82566fc285d58535 | nova |
| 9c357453f93944ef859b9914b6989ac2 | heat |
| aab7d3e95f524b979540caecbf36a34e | labadmin |
| b514ac7e271449c7b6b9b61c98c32a4b | glance |
| b5b270c0f5104924a773e6e140f859d1 | admin |
+----------------------------------+------------+
[root@openstack-liberty ~(keystone_admin)]# openstack role add --user 3a2ad7f134ae42d59a3d631cef31a7c2 --project demo role1^C
[root@openstack-liberty ~(keystone_admin)]# openstack role list --user 3a2ad7f134ae42d59a3d631cef31a7c2 --project demo
+----------------------------------+------------------+---------+------+
| ID | Name | Project | User |
+----------------------------------+------------------+---------+------+
| 4b82972fe2804532a39d32330a607410 | heat_stack_owner | demo | demo |
| 9fe2ff9ee4384b1894a90878d3e92bab | _member_ | demo | demo |
+----------------------------------+------------------+---------+------+
[root@openstack-liberty ~(keystone_admin)]# openstack role add --user 3a2ad7f134ae42d59a3d631cef31a7c2 --project demo role1
+-------+----------------------------------+
| Field | Value |
+-------+----------------------------------+
| id | b2cd9673ffa3413e8f8713ee060a00f8 |
| name | role1 |
+-------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack role list --user 3a2ad7f134ae42d59a3d631cef31a7c2 --project demo
+----------------------------------+------------------+---------+------+
| ID | Name | Project | User |
+----------------------------------+------------------+---------+------+
| 4b82972fe2804532a39d32330a607410 | heat_stack_owner | demo | demo |
| 9fe2ff9ee4384b1894a90878d3e92bab | _member_ | demo | demo |
| b2cd9673ffa3413e8f8713ee060a00f8 | role1 | demo | demo |
+----------------------------------+------------------+---------+------+
[root@openstack-liberty ~(keystone_admin)]# openstack role delete role1
[root@openstack-liberty ~(keystone_admin)]# openstack role list --user 3a2ad7f134ae42d59a3d631cef31a7c2 --project demo
+----------------------------------+------------------+---------+------+
| ID | Name | Project | User |
+----------------------------------+------------------+---------+------+
| 4b82972fe2804532a39d32330a607410 | heat_stack_owner | demo | demo |
| 9fe2ff9ee4384b1894a90878d3e92bab | _member_ | demo | demo |
+----------------------------------+------------------+---------+------+
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-region RegionOne --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default service list
+----------------------------------+------------+---------------+
| ID | Name | Type |
+----------------------------------+------------+---------------+
| 1c65e4c4b35145549393112a5ba9b398 | heat | orchestration |
| 2d1687a7984749ceb6247c4d23c45e9a | nova_ec2 | ec2 |
| 45fb840e1f084db4914174289ff54bee | keystone | identity |
| 5c16d2d172b149cea827c4363d1480da | ceilometer | metering |
| 613f7fb000a44519a286b818e7b4a218 | nova | compute |
| 8004edfde34d49818ac04f65c6a2cd6e | neutron | network |
| 92bedc4c6fd44e2d8eb32c719ab15ea6 | swift | object-store |
| 9b381f4893554c479ecaee82e9b2a4d1 | cinderv2 | volumev2 |
| c35fab0daf7448b3952182c17adb3b03 | novav3 | computev3 |
| d3fdbe2a63d44f74804d3c5c55ed229a | glance | image |
| ea4355f40cf04942a8457d9efc8c778b | cinder | volume |
+----------------------------------+------------+---------------+
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-region RegionOne --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default service show 613f7fb000a44519a286b818e7b4a218
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Openstack Compute Service |
| enabled | True |
| id | 613f7fb000a44519a286b818e7b4a218 |
| name | nova |
| type | compute |
+-------------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-region RegionOne --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default service create --description 'test service' --name TEST TEST
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | test service |
| enabled | True |
| id | 7f7dde3e5c38459abc26602ad8204978 |
| name | TEST |
| type | TEST |
+-------------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-region RegionOne --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default service list
+----------------------------------+------------+---------------+
| ID | Name | Type |
+----------------------------------+------------+---------------+
| 1c65e4c4b35145549393112a5ba9b398 | heat | orchestration |
| 2d1687a7984749ceb6247c4d23c45e9a | nova_ec2 | ec2 |
| 45fb840e1f084db4914174289ff54bee | keystone | identity |
| 5c16d2d172b149cea827c4363d1480da | ceilometer | metering |
| 613f7fb000a44519a286b818e7b4a218 | nova | compute |
| 7f7dde3e5c38459abc26602ad8204978 | TEST | TEST |
| 8004edfde34d49818ac04f65c6a2cd6e | neutron | network |
| 92bedc4c6fd44e2d8eb32c719ab15ea6 | swift | object-store |
| 9b381f4893554c479ecaee82e9b2a4d1 | cinderv2 | volumev2 |
| c35fab0daf7448b3952182c17adb3b03 | novav3 | computev3 |
| d3fdbe2a63d44f74804d3c5c55ed229a | glance | image |
| ea4355f40cf04942a8457d9efc8c778b | cinder | volume |
+----------------------------------+------------+---------------+
[root@openstack-liberty ~(keystone_admin)]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-region RegionOne --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default service show TEST
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | test service |
| enabled | True |
| id | 7f7dde3e5c38459abc26602ad8204978 |
| name | TEST |
| type | TEST |
+-------------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-region RegionOne --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default endpoint list
+----------------------------------+-----------+--------------+---------------+
| ID | Region | Service Name | Service Type |
+----------------------------------+-----------+--------------+---------------+
| 410bbd6406044ab1ac4d78a6b0859d91 | RegionOne | nova | compute |
| ec1914c903c34e67bd82cd3f34643573 | RegionOne | novav3 | computev3 |
| 626e94055d8c45ce8b5f1fc55739e9bc | RegionOne | cinderv2 | volumev2 |
| ebdb2fe3df034fdcb760395fa92c275d | RegionOne | swift | object-store |
| fe2792862b2841cbb33d682c4685781c | RegionOne | heat | orchestration |
| 8fd682a833aa40f48d11d201072233e6 | RegionOne | neutron | network |
| 2b03346cdb7d4253a91f3ee6ef2cca00 | RegionOne | glance | image |
| b85a1d07a03842a28c0bb808d2516a62 | RegionOne | cinder | volume |
| f127a1352f634755af3b9cfa54254cc8 | RegionOne | nova_ec2 | ec2 |
| c71fe856cf334582a2925a0cd42d8424 | RegionOne | ceilometer | metering |
| bc599660c6fc430da44343a1f39c717e | RegionOne | keystone | identity |
+----------------------------------+-----------+--------------+---------------+
[root@openstack-liberty ~(keystone_admin)]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-region RegionOne --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default endpoint show fe2792862b2841cbb33d682c4685781c
+--------------+--------------------------------------------+
| Field | Value |
+--------------+--------------------------------------------+
| adminurl | http://192.168.4.101:8004/v1/%(tenant_id)s |
| enabled | True |
| id | fe2792862b2841cbb33d682c4685781c |
| internalurl | http://192.168.4.101:8004/v1/%(tenant_id)s |
| publicurl | http://192.168.4.101:8004/v1/%(tenant_id)s |
| region | RegionOne |
| service_id | 1c65e4c4b35145549393112a5ba9b398 |
| service_name | heat |
| service_type | orchestration |
+--------------+--------------------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-region RegionOne --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default endpoint create
usage: openstack endpoint create [-h]
[-f {html,json,json,shell,table,value,yaml,yaml}]
[-c COLUMN] [--max-width <integer>]
[--noindent] [--prefix PREFIX] --publicurl
<url> [--adminurl <url>]
[--internalurl <url>] [--region <region-id>]
<service>
openstack endpoint create: error: too few arguments
[root@openstack-liberty ~(keystone_admin)]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-region RegionOne --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default endpoint create --region RegionOne --internalurl http://192.168.4.101:89898 --publicurl http://192.168.4.101:89898 --adminurl http://192.168.4.101:89898 TEST
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| adminurl | http://192.168.4.101:89898 |
| id | 0542df72c174435b9fdfa6b8ea25c858 |
| internalurl | http://192.168.4.101:89898 |
| publicurl | http://192.168.4.101:89898 |
| region | RegionOne |
| service_id | 7f7dde3e5c38459abc26602ad8204978 |
| service_name | TEST |
| service_type | TEST |
+--------------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-region RegionOne --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default endpoint list
+----------------------------------+-----------+--------------+---------------+
| ID | Region | Service Name | Service Type |
+----------------------------------+-----------+--------------+---------------+
| 410bbd6406044ab1ac4d78a6b0859d91 | RegionOne | nova | compute |
| ec1914c903c34e67bd82cd3f34643573 | RegionOne | novav3 | computev3 |
| 626e94055d8c45ce8b5f1fc55739e9bc | RegionOne | cinderv2 | volumev2 |
| 0542df72c174435b9fdfa6b8ea25c858 | RegionOne | TEST | TEST |
| ebdb2fe3df034fdcb760395fa92c275d | RegionOne | swift | object-store |
| fe2792862b2841cbb33d682c4685781c | RegionOne | heat | orchestration |
| 8fd682a833aa40f48d11d201072233e6 | RegionOne | neutron | network |
| 2b03346cdb7d4253a91f3ee6ef2cca00 | RegionOne | glance | image |
| b85a1d07a03842a28c0bb808d2516a62 | RegionOne | cinder | volume |
| f127a1352f634755af3b9cfa54254cc8 | RegionOne | nova_ec2 | ec2 |
| c71fe856cf334582a2925a0cd42d8424 | RegionOne | ceilometer | metering |
| bc599660c6fc430da44343a1f39c717e | RegionOne | keystone | identity |
+----------------------------------+-----------+--------------+---------------+
[root@openstack-liberty ~(keystone_admin)]# openstack endpoint show 0542df72c174435b9fdfa6b8ea25c858
Missing parameter(s):
Set a username with --os-username, OS_USERNAME, or auth.username
Set an authentication URL, with --os-auth-url, OS_AUTH_URL or auth.auth_url
Set a scope, such as a project or domain, set a project scope with --os-project-name, OS_PROJECT_NAME or auth.project_name, set a domain scope with --os-domain-name, OS_DOMAIN_NAME or auth.domain_name
[root@openstack-liberty ~(keystone_admin)]# source keystonerc_admin
[root@openstack-liberty ~(keystone_admin)]# openstack endpoint show 0542df72c174435b9fdfa6b8ea25c858
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| adminurl | http://192.168.4.101:89898 |
| enabled | True |
| id | 0542df72c174435b9fdfa6b8ea25c858 |
| internalurl | http://192.168.4.101:89898 |
| publicurl | http://192.168.4.101:89898 |
| region | RegionOne |
| service_id | 7f7dde3e5c38459abc26602ad8204978 |
| service_name | TEST |
| service_type | TEST |
+--------------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack endpoint delete TEST
Could not find endpoint: TEST (HTTP 404) (Request-ID: req-ab06ce6f-548a-432e-9ad4-0042440458a5)
[root@openstack-liberty ~(keystone_admin)]# openstack endpoint delete 0542df72c174435b9fdfa6b8ea25c858
[root@openstack-liberty ~(keystone_admin)]# openstack endpoint list
+----------------------------------+-----------+--------------+---------------+
| ID | Region | Service Name | Service Type |
+----------------------------------+-----------+--------------+---------------+
| 410bbd6406044ab1ac4d78a6b0859d91 | RegionOne | nova | compute |
| ec1914c903c34e67bd82cd3f34643573 | RegionOne | novav3 | computev3 |
| 626e94055d8c45ce8b5f1fc55739e9bc | RegionOne | cinderv2 | volumev2 |
| ebdb2fe3df034fdcb760395fa92c275d | RegionOne | swift | object-store |
| fe2792862b2841cbb33d682c4685781c | RegionOne | heat | orchestration |
| 8fd682a833aa40f48d11d201072233e6 | RegionOne | neutron | network |
| 2b03346cdb7d4253a91f3ee6ef2cca00 | RegionOne | glance | image |
| b85a1d07a03842a28c0bb808d2516a62 | RegionOne | cinder | volume |
| f127a1352f634755af3b9cfa54254cc8 | RegionOne | nova_ec2 | ec2 |
| c71fe856cf334582a2925a0cd42d8424 | RegionOne | ceilometer | metering |
| bc599660c6fc430da44343a1f39c717e | RegionOne | keystone | identity |
+----------------------------------+-----------+--------------+---------------+
[root@openstack-liberty ~(keystone_admin)]# openstack service list
+----------------------------------+------------+---------------+
| ID | Name | Type |
+----------------------------------+------------+---------------+
| 1c65e4c4b35145549393112a5ba9b398 | heat | orchestration |
| 2d1687a7984749ceb6247c4d23c45e9a | nova_ec2 | ec2 |
| 45fb840e1f084db4914174289ff54bee | keystone | identity |
| 5c16d2d172b149cea827c4363d1480da | ceilometer | metering |
| 613f7fb000a44519a286b818e7b4a218 | nova | compute |
| 7f7dde3e5c38459abc26602ad8204978 | TEST | TEST |
| 8004edfde34d49818ac04f65c6a2cd6e | neutron | network |
| 92bedc4c6fd44e2d8eb32c719ab15ea6 | swift | object-store |
| 9b381f4893554c479ecaee82e9b2a4d1 | cinderv2 | volumev2 |
| c35fab0daf7448b3952182c17adb3b03 | novav3 | computev3 |
| d3fdbe2a63d44f74804d3c5c55ed229a | glance | image |
| ea4355f40cf04942a8457d9efc8c778b | cinder | volume |
+----------------------------------+------------+---------------+
[root@openstack-liberty ~(keystone_admin)]# openstack service delete 7f7dde3e5c38459abc26602ad8204978
[root@openstack-liberty ~(keystone_admin)]# openstack service list
+----------------------------------+------------+---------------+
| ID | Name | Type |
+----------------------------------+------------+---------------+
| 1c65e4c4b35145549393112a5ba9b398 | heat | orchestration |
| 2d1687a7984749ceb6247c4d23c45e9a | nova_ec2 | ec2 |
| 45fb840e1f084db4914174289ff54bee | keystone | identity |
| 5c16d2d172b149cea827c4363d1480da | ceilometer | metering |
| 613f7fb000a44519a286b818e7b4a218 | nova | compute |
| 8004edfde34d49818ac04f65c6a2cd6e | neutron | network |
| 92bedc4c6fd44e2d8eb32c719ab15ea6 | swift | object-store |
| 9b381f4893554c479ecaee82e9b2a4d1 | cinderv2 | volumev2 |
| c35fab0daf7448b3952182c17adb3b03 | novav3 | computev3 |
| d3fdbe2a63d44f74804d3c5c55ed229a | glance | image |
| ea4355f40cf04942a8457d9efc8c778b | cinder | volume |
+----------------------------------+------------+---------------+
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
project/tenant - list,create,show,disable,enable,rename,delete
user -list,create,show,enable,disable,assign to a project,change password,add email address,delete
role -list,create,show,add to user,,list roles assign to a user,delete
service/endpoint -list,show,create test service and endpoint,delete
role/rule - check policy.json file
verify keystone/identity service - check keystone service ,execute command without importing rc file variable
Project
--------
openstack project list
openstack project create --description 'new project' new-project
openstack project show <project id>
openstack project set <project id> --disable
openstack project show <project id>
openstack project set <project id> --enable
openstack project show <project id>
openstack project set <project id> --name project-new
openstack project list
openstack project delete <project id>
User
-----
openstack user list
*associate tenant id
*set password else user will not able to login without password
openstack project create --description 'new project' new -project
openstack user create --project new-project --password openstack new-user
openstack user set new-user --disable
openstack user show new-user
openstack user set new-user --enable
openstack user show new-user
openstack user set new-user --email new-user@example.com
openstack user show new-user
openstack user delete new-user
Role
----
openstack role list
openstack role create new-role
openstack role add --user new-user --project new-project new-role
openstack role show new-role
openstack role list --user new-user --project new-project
service/catalog
----------------
openstack service list
openstack endpoint list
openstack endpoint show swift
openstack service create --name TEST --description 'test service' TEST
openstack service list
openstack enpoint create -- region RegionOne TEST adminurl http://192.168.4.16:353535 publicurl \
http://192.168.4.16:353535 --internalurl http://192.168.4.16:353535
openstack endpoint list
openstack enpoint show TEST
openstack endpoint delete <endpoint id>
openstack service delete <service id>
openstack service list
Identity service cerification:
unset OS_TOKEN OS_URL
openstack --os-auth-url http://192.168.4.15:35357/v3 --os-project-domain-id default --os-user-domain-id default
--os-project-name admin --os-username admin --os-auth-type password token issue
openstack --os-auth-url http://192.168.4.15:35357/v3 --os-project-domain-id default --os-user-domain-id default
--os-project-name admin --os-username admin --os-auth-type password project list
==================================================================
Lab:
==================================================================
[root@openstack-liberty ~]# openstack --os-identity-api-version 3 --os-username admin --os-password redhat --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-auth-url http://192.168.4.101:35357/v3 domain list
+----------------------------------+---------+---------+----------------------------------------------------------------------+
| ID | Name | Enabled | Description |
+----------------------------------+---------+---------+----------------------------------------------------------------------+
| 70625ce1d22644b4a80c051236ed63f5 | test | True | test domain |
| c8334d7077104846b1050132dafe980d | heat | True | |
| default | Default | True | Owns users and tenants (i.e. projects) available on Identity API v2. |
+----------------------------------+---------+---------+----------------------------------------------------------------------+
[root@openstack-liberty ~]# openstack --os-identity-api-version 3 --os-username admin --os-password redhat --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-auth-url http://192.168.4.101:35357/v3 group list --domain test
+----------------------------------+---------+
| ID | Name |
+----------------------------------+---------+
| e0eece4d0e7a4e7fbb2333bf29955a11 | testgrp |
+----------------------------------+---------+
[root@openstack-liberty ~]# openstack --os-identity-api-version 3 --os-username admin --os-password redhat --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-auth-url http://192.168.4.101:35357/v3 project list --domain test
+----------------------------------+----------+
| ID | Name |
+----------------------------------+----------+
| 0957bc7346134bca8afe574634c373c0 | testproj |
+----------------------------------+----------+
[root@openstack-liberty ~]# openstack --os-identity-api-version 3 --os-username admin --os-password redhat --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-auth-url http://192.168.4.101:35357/v3 user list --domain test
+----------------------------------+---------+
| ID | Name |
+----------------------------------+---------+
| 1f3fb036736c4b58bdca74f452e37fcb | test1 |
| a41921618ecd453eb59faa24d56eb253 | testusr |
+----------------------------------+---------+
[root@openstack-liberty ~]#
[root@openstack-liberty ~]#
[root@openstack-liberty ~]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default --os-region RegionOne project list
+----------------------------------+----------+
| ID | Name |
+----------------------------------+----------+
| 5ca446ce413143afb5c2671b183c35f2 | services |
| af4e5297fb3746cbb8af53b69251bf8f | demo |
| c1a535292a9943d59cdc3549bb66a619 | admin |
| e91e3b16935448919a3f77c1e84892d6 | lab |
+----------------------------------+----------+
[root@openstack-liberty ~]#
[root@openstack-liberty ~]#
[root@openstack-liberty ~]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default --os-region RegionOne project create --description 'project for doing lab' labproj
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | project for doing lab |
| enabled | True |
| id | a106b304064647c3868b217c388d1b35 |
| name | labproj |
+-------------+----------------------------------+
[root@openstack-liberty ~]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default --os-region RegionOne project list
+----------------------------------+----------+
| ID | Name |
+----------------------------------+----------+
| 5ca446ce413143afb5c2671b183c35f2 | services |
| a106b304064647c3868b217c388d1b35 | labproj |
| af4e5297fb3746cbb8af53b69251bf8f | demo |
| c1a535292a9943d59cdc3549bb66a619 | admin |
| e91e3b16935448919a3f77c1e84892d6 | lab |
+----------------------------------+----------+
[root@openstack-liberty ~]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default --os-region RegionOne project show labproj
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | project for doing lab |
| enabled | True |
| id | a106b304064647c3868b217c388d1b35 |
| name | labproj |
+-------------+----------------------------------+
[root@openstack-liberty ~]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default --os-region RegionOne project set a106b304064647c3868b217c388d1b35 --disable
[root@openstack-liberty ~]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default --os-region RegionOne project show labproj
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | project for doing lab |
| enabled | False |
| id | a106b304064647c3868b217c388d1b35 |
| name | labproj |
+-------------+----------------------------------+
[root@openstack-liberty ~]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default --os-region RegionOne project set a106b304064647c3868b217c388d1b35 --enable
[root@openstack-liberty ~]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default --os-region RegionOne project show labproj
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | project for doing lab |
| enabled | True |
| id | a106b304064647c3868b217c388d1b35 |
| name | labproj |
+-------------+----------------------------------+
[root@openstack-liberty ~]#
[root@openstack-liberty ~]#
[root@openstack-liberty ~]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default --os-region RegionOne project set a106b304064647c3868b217c388d1b35 --name lab-proj
[root@openstack-liberty ~]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default --os-region RegionOne project show labproj
No tenant with a name or ID of 'labproj' exists.
[root@openstack-liberty ~]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default --os-region RegionOne project list
+----------------------------------+----------+
| ID | Name |
+----------------------------------+----------+
| 5ca446ce413143afb5c2671b183c35f2 | services |
| a106b304064647c3868b217c388d1b35 | lab-proj |
| af4e5297fb3746cbb8af53b69251bf8f | demo |
| c1a535292a9943d59cdc3549bb66a619 | admin |
| e91e3b16935448919a3f77c1e84892d6 | lab |
+----------------------------------+----------+
[root@openstack-liberty ~]#
[root@openstack-liberty ~]#
[root@openstack-liberty ~]#
[root@openstack-liberty ~]#
[root@openstack-liberty ~]#
[root@openstack-liberty ~]#
[root@openstack-liberty ~]# source key
key1.pem keystonerc_admin keystonerc_demo keystonerc_labadmin
[root@openstack-liberty ~]# source keystonerc_admin
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]# openstack project list
+----------------------------------+----------+
| ID | Name |
+----------------------------------+----------+
| 5ca446ce413143afb5c2671b183c35f2 | services |
| a106b304064647c3868b217c388d1b35 | lab-proj |
| af4e5297fb3746cbb8af53b69251bf8f | demo |
| c1a535292a9943d59cdc3549bb66a619 | admin |
| e91e3b16935448919a3f77c1e84892d6 | lab |
+----------------------------------+----------+
[root@openstack-liberty ~(keystone_admin)]# openstack project delete a106b304064647c3868b217c388d1b35
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]# openstack project list
+----------------------------------+----------+
| ID | Name |
+----------------------------------+----------+
| 5ca446ce413143afb5c2671b183c35f2 | services |
| af4e5297fb3746cbb8af53b69251bf8f | demo |
| c1a535292a9943d59cdc3549bb66a619 | admin |
| e91e3b16935448919a3f77c1e84892d6 | lab |
+----------------------------------+----------+
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]# openstack user list
+----------------------------------+------------+
| ID | Name |
+----------------------------------+------------+
| 0578f7ed1ec74d9380ef600187b87c10 | ceilometer |
| 1dab1030f3fc4f139152aa7c97ada0a2 | swift |
| 25a914b4ca504f93ba23f48354021864 | cinder |
| 32ecee3bda0b4269bb2353ecfd26f1ae | labuser1 |
| 3a2ad7f134ae42d59a3d631cef31a7c2 | demo |
| 57265c3941b84846800a6bcc43564656 | neutron |
| 6777e15da87a44ad82566fc285d58535 | nova |
| 9c357453f93944ef859b9914b6989ac2 | heat |
| aab7d3e95f524b979540caecbf36a34e | labadmin |
| b514ac7e271449c7b6b9b61c98c32a4b | glance |
| b5b270c0f5104924a773e6e140f859d1 | admin |
+----------------------------------+------------+
[root@openstack-liberty ~(keystone_admin)]# unset OS_URL OS_TOKEN
[root@openstack-liberty ~(keystone_admin)]# openstack user list
+----------------------------------+------------+
| ID | Name |
+----------------------------------+------------+
| 0578f7ed1ec74d9380ef600187b87c10 | ceilometer |
| 1dab1030f3fc4f139152aa7c97ada0a2 | swift |
| 25a914b4ca504f93ba23f48354021864 | cinder |
| 32ecee3bda0b4269bb2353ecfd26f1ae | labuser1 |
| 3a2ad7f134ae42d59a3d631cef31a7c2 | demo |
| 57265c3941b84846800a6bcc43564656 | neutron |
| 6777e15da87a44ad82566fc285d58535 | nova |
| 9c357453f93944ef859b9914b6989ac2 | heat |
| aab7d3e95f524b979540caecbf36a34e | labadmin |
| b514ac7e271449c7b6b9b61c98c32a4b | glance |
| b5b270c0f5104924a773e6e140f859d1 | admin |
+----------------------------------+------------+
[root@openstack-liberty ~(keystone_admin)]# source keystonerc_admin
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]# openstack user list
+----------------------------------+------------+
| ID | Name |
+----------------------------------+------------+
| 0578f7ed1ec74d9380ef600187b87c10 | ceilometer |
| 1dab1030f3fc4f139152aa7c97ada0a2 | swift |
| 25a914b4ca504f93ba23f48354021864 | cinder |
| 32ecee3bda0b4269bb2353ecfd26f1ae | labuser1 |
| 3a2ad7f134ae42d59a3d631cef31a7c2 | demo |
| 57265c3941b84846800a6bcc43564656 | neutron |
| 6777e15da87a44ad82566fc285d58535 | nova |
| 9c357453f93944ef859b9914b6989ac2 | heat |
| aab7d3e95f524b979540caecbf36a34e | labadmin |
| b514ac7e271449c7b6b9b61c98c32a4b | glance |
| b5b270c0f5104924a773e6e140f859d1 | admin |
+----------------------------------+------------+
[root@openstack-liberty ~(keystone_admin)]# openstack user create usr1 --password redhat
+----------+----------------------------------+
| Field | Value |
+----------+----------------------------------+
| email | None |
| enabled | True |
| id | 69e37900a8f944ffbe7bcb51c7e1e425 |
| name | usr1 |
| username | usr1 |
+----------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack user set 69e37900a8f944ffbe7bcb51c7e1e425 --disable
[root@openstack-liberty ~(keystone_admin)]# openstack user list
+----------------------------------+------------+
| ID | Name |
+----------------------------------+------------+
| 0578f7ed1ec74d9380ef600187b87c10 | ceilometer |
| 1dab1030f3fc4f139152aa7c97ada0a2 | swift |
| 25a914b4ca504f93ba23f48354021864 | cinder |
| 32ecee3bda0b4269bb2353ecfd26f1ae | labuser1 |
| 3a2ad7f134ae42d59a3d631cef31a7c2 | demo |
| 57265c3941b84846800a6bcc43564656 | neutron |
| 6777e15da87a44ad82566fc285d58535 | nova |
| 69e37900a8f944ffbe7bcb51c7e1e425 | usr1 |
| 9c357453f93944ef859b9914b6989ac2 | heat |
| aab7d3e95f524b979540caecbf36a34e | labadmin |
| b514ac7e271449c7b6b9b61c98c32a4b | glance |
| b5b270c0f5104924a773e6e140f859d1 | admin |
+----------------------------------+------------+
[root@openstack-liberty ~(keystone_admin)]# openstack user show 69e37900a8f944ffbe7bcb51c7e1e425
+----------+----------------------------------+
| Field | Value |
+----------+----------------------------------+
| email | None |
| enabled | False |
| id | 69e37900a8f944ffbe7bcb51c7e1e425 |
| name | usr1 |
| username | usr1 |
+----------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]# openstack user set 69e37900a8f944ffbe7bcb51c7e1e425 --enable
[root@openstack-liberty ~(keystone_admin)]# openstack user show 69e37900a8f944ffbe7bcb51c7e1e425
+----------+----------------------------------+
| Field | Value |
+----------+----------------------------------+
| email | None |
| enabled | True |
| id | 69e37900a8f944ffbe7bcb51c7e1e425 |
| name | usr1 |
| username | usr1 |
+----------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack user set 69e37900a8f944ffbe7bcb51c7e1e425 --project ^C
[root@openstack-liberty ~(keystone_admin)]# openstack project list
+----------------------------------+----------+
| ID | Name |
+----------------------------------+----------+
| 5ca446ce413143afb5c2671b183c35f2 | services |
| af4e5297fb3746cbb8af53b69251bf8f | demo |
| c1a535292a9943d59cdc3549bb66a619 | admin |
| e91e3b16935448919a3f77c1e84892d6 | lab |
+----------------------------------+----------+
[root@openstack-liberty ~(keystone_admin)]# openstack user set 69e37900a8f944ffbe7bcb51c7e1e425 --project e91e3b16935448919a3f77c1e84892d6
[root@openstack-liberty ~(keystone_admin)]# openstack project list
+----------------------------------+----------+
| ID | Name |
+----------------------------------+----------+
| 5ca446ce413143afb5c2671b183c35f2 | services |
| af4e5297fb3746cbb8af53b69251bf8f | demo |
| c1a535292a9943d59cdc3549bb66a619 | admin |
| e91e3b16935448919a3f77c1e84892d6 | lab |
+----------------------------------+----------+
[root@openstack-liberty ~(keystone_admin)]# openstack user show 69e37900a8f944ffbe7bcb51c7e1e425
+------------+----------------------------------+
| Field | Value |
+------------+----------------------------------+
| email | None |
| enabled | True |
| id | 69e37900a8f944ffbe7bcb51c7e1e425 |
| name | usr1 |
| project_id | e91e3b16935448919a3f77c1e84892d6 |
| username | usr1 |
+------------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack user set e91e3b16935448919a3f77c1e84892d6 --email usr1@lab.com
No user with a name or ID of 'e91e3b16935448919a3f77c1e84892d6' exists.
[root@openstack-liberty ~(keystone_admin)]# openstack user set 69e37900a8f944ffbe7bcb51c7e1e425 --email usr1@lab.com
[root@openstack-liberty ~(keystone_admin)]# openstack user show 69e37900a8f944ffbe7bcb51c7e1e425
+------------+----------------------------------+
| Field | Value |
+------------+----------------------------------+
| email | usr1@lab.com |
| enabled | True |
| id | 69e37900a8f944ffbe7bcb51c7e1e425 |
| name | usr1 |
| project_id | e91e3b16935448919a3f77c1e84892d6 |
| username | usr1 |
+------------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack user set 69e37900a8f944ffbe7bcb51c7e1e425 --password changeme
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]# openstack user delete usr1
[root@openstack-liberty ~(keystone_admin)]# openstack user list
+----------------------------------+------------+
| ID | Name |
+----------------------------------+------------+
| 0578f7ed1ec74d9380ef600187b87c10 | ceilometer |
| 1dab1030f3fc4f139152aa7c97ada0a2 | swift |
| 25a914b4ca504f93ba23f48354021864 | cinder |
| 32ecee3bda0b4269bb2353ecfd26f1ae | labuser1 |
| 3a2ad7f134ae42d59a3d631cef31a7c2 | demo |
| 57265c3941b84846800a6bcc43564656 | neutron |
| 6777e15da87a44ad82566fc285d58535 | nova |
| 9c357453f93944ef859b9914b6989ac2 | heat |
| aab7d3e95f524b979540caecbf36a34e | labadmin |
| b514ac7e271449c7b6b9b61c98c32a4b | glance |
| b5b270c0f5104924a773e6e140f859d1 | admin |
+----------------------------------+------------+
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]# openstack role list
+----------------------------------+------------------+
| ID | Name |
+----------------------------------+------------------+
| 1d828996ad5a4e8dbac6df3c16859fde | tadmin |
| 20662aa25f3742e39d8bacbc583a5bdb | ladmin |
| 28a64e69089a435cb0fdb6e74c9513b7 | ResellerAdmin |
| 4b82972fe2804532a39d32330a607410 | heat_stack_owner |
| 4d500a1c35384b8581157da55c423d0b | SwiftOperator |
| 9b5e2c65cce148dcbc79e2a066d498cf | heat_stack_user |
| 9fe2ff9ee4384b1894a90878d3e92bab | _member_ |
| bf7155c7450f40ceb9245e30f98e2b82 | prole |
| cfc5c218d72d4c0d866679ede4ee427a | admin |
+----------------------------------+------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack role show 20662aa25f3742e39d8bacbc583a5bdb
+-------+----------------------------------+
| Field | Value |
+-------+----------------------------------+
| id | 20662aa25f3742e39d8bacbc583a5bdb |
| name | ladmin |
+-------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack role create role1
+-------+----------------------------------+
| Field | Value |
+-------+----------------------------------+
| id | b2cd9673ffa3413e8f8713ee060a00f8 |
| name | role1 |
+-------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack role list
+----------------------------------+------------------+
| ID | Name |
+----------------------------------+------------------+
| 1d828996ad5a4e8dbac6df3c16859fde | tadmin |
| 20662aa25f3742e39d8bacbc583a5bdb | ladmin |
| 28a64e69089a435cb0fdb6e74c9513b7 | ResellerAdmin |
| 4b82972fe2804532a39d32330a607410 | heat_stack_owner |
| 4d500a1c35384b8581157da55c423d0b | SwiftOperator |
| 9b5e2c65cce148dcbc79e2a066d498cf | heat_stack_user |
| 9fe2ff9ee4384b1894a90878d3e92bab | _member_ |
| b2cd9673ffa3413e8f8713ee060a00f8 | role1 |
| bf7155c7450f40ceb9245e30f98e2b82 | prole |
| cfc5c218d72d4c0d866679ede4ee427a | admin |
+----------------------------------+------------------+
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]# openstack role show role1
+-------+----------------------------------+
| Field | Value |
+-------+----------------------------------+
| id | b2cd9673ffa3413e8f8713ee060a00f8 |
| name | role1 |
+-------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack user list
+----------------------------------+------------+
| ID | Name |
+----------------------------------+------------+
| 0578f7ed1ec74d9380ef600187b87c10 | ceilometer |
| 1dab1030f3fc4f139152aa7c97ada0a2 | swift |
| 25a914b4ca504f93ba23f48354021864 | cinder |
| 32ecee3bda0b4269bb2353ecfd26f1ae | labuser1 |
| 3a2ad7f134ae42d59a3d631cef31a7c2 | demo |
| 57265c3941b84846800a6bcc43564656 | neutron |
| 6777e15da87a44ad82566fc285d58535 | nova |
| 9c357453f93944ef859b9914b6989ac2 | heat |
| aab7d3e95f524b979540caecbf36a34e | labadmin |
| b514ac7e271449c7b6b9b61c98c32a4b | glance |
| b5b270c0f5104924a773e6e140f859d1 | admin |
+----------------------------------+------------+
[root@openstack-liberty ~(keystone_admin)]# openstack role add --user 3a2ad7f134ae42d59a3d631cef31a7c2 --project demo role1^C
[root@openstack-liberty ~(keystone_admin)]# openstack role list --user 3a2ad7f134ae42d59a3d631cef31a7c2 --project demo
+----------------------------------+------------------+---------+------+
| ID | Name | Project | User |
+----------------------------------+------------------+---------+------+
| 4b82972fe2804532a39d32330a607410 | heat_stack_owner | demo | demo |
| 9fe2ff9ee4384b1894a90878d3e92bab | _member_ | demo | demo |
+----------------------------------+------------------+---------+------+
[root@openstack-liberty ~(keystone_admin)]# openstack role add --user 3a2ad7f134ae42d59a3d631cef31a7c2 --project demo role1
+-------+----------------------------------+
| Field | Value |
+-------+----------------------------------+
| id | b2cd9673ffa3413e8f8713ee060a00f8 |
| name | role1 |
+-------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack role list --user 3a2ad7f134ae42d59a3d631cef31a7c2 --project demo
+----------------------------------+------------------+---------+------+
| ID | Name | Project | User |
+----------------------------------+------------------+---------+------+
| 4b82972fe2804532a39d32330a607410 | heat_stack_owner | demo | demo |
| 9fe2ff9ee4384b1894a90878d3e92bab | _member_ | demo | demo |
| b2cd9673ffa3413e8f8713ee060a00f8 | role1 | demo | demo |
+----------------------------------+------------------+---------+------+
[root@openstack-liberty ~(keystone_admin)]# openstack role delete role1
[root@openstack-liberty ~(keystone_admin)]# openstack role list --user 3a2ad7f134ae42d59a3d631cef31a7c2 --project demo
+----------------------------------+------------------+---------+------+
| ID | Name | Project | User |
+----------------------------------+------------------+---------+------+
| 4b82972fe2804532a39d32330a607410 | heat_stack_owner | demo | demo |
| 9fe2ff9ee4384b1894a90878d3e92bab | _member_ | demo | demo |
+----------------------------------+------------------+---------+------+
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-region RegionOne --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default service list
+----------------------------------+------------+---------------+
| ID | Name | Type |
+----------------------------------+------------+---------------+
| 1c65e4c4b35145549393112a5ba9b398 | heat | orchestration |
| 2d1687a7984749ceb6247c4d23c45e9a | nova_ec2 | ec2 |
| 45fb840e1f084db4914174289ff54bee | keystone | identity |
| 5c16d2d172b149cea827c4363d1480da | ceilometer | metering |
| 613f7fb000a44519a286b818e7b4a218 | nova | compute |
| 8004edfde34d49818ac04f65c6a2cd6e | neutron | network |
| 92bedc4c6fd44e2d8eb32c719ab15ea6 | swift | object-store |
| 9b381f4893554c479ecaee82e9b2a4d1 | cinderv2 | volumev2 |
| c35fab0daf7448b3952182c17adb3b03 | novav3 | computev3 |
| d3fdbe2a63d44f74804d3c5c55ed229a | glance | image |
| ea4355f40cf04942a8457d9efc8c778b | cinder | volume |
+----------------------------------+------------+---------------+
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-region RegionOne --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default service show 613f7fb000a44519a286b818e7b4a218
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Openstack Compute Service |
| enabled | True |
| id | 613f7fb000a44519a286b818e7b4a218 |
| name | nova |
| type | compute |
+-------------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-region RegionOne --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default service create --description 'test service' --name TEST TEST
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | test service |
| enabled | True |
| id | 7f7dde3e5c38459abc26602ad8204978 |
| name | TEST |
| type | TEST |
+-------------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-region RegionOne --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default service list
+----------------------------------+------------+---------------+
| ID | Name | Type |
+----------------------------------+------------+---------------+
| 1c65e4c4b35145549393112a5ba9b398 | heat | orchestration |
| 2d1687a7984749ceb6247c4d23c45e9a | nova_ec2 | ec2 |
| 45fb840e1f084db4914174289ff54bee | keystone | identity |
| 5c16d2d172b149cea827c4363d1480da | ceilometer | metering |
| 613f7fb000a44519a286b818e7b4a218 | nova | compute |
| 7f7dde3e5c38459abc26602ad8204978 | TEST | TEST |
| 8004edfde34d49818ac04f65c6a2cd6e | neutron | network |
| 92bedc4c6fd44e2d8eb32c719ab15ea6 | swift | object-store |
| 9b381f4893554c479ecaee82e9b2a4d1 | cinderv2 | volumev2 |
| c35fab0daf7448b3952182c17adb3b03 | novav3 | computev3 |
| d3fdbe2a63d44f74804d3c5c55ed229a | glance | image |
| ea4355f40cf04942a8457d9efc8c778b | cinder | volume |
+----------------------------------+------------+---------------+
[root@openstack-liberty ~(keystone_admin)]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-region RegionOne --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default service show TEST
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | test service |
| enabled | True |
| id | 7f7dde3e5c38459abc26602ad8204978 |
| name | TEST |
| type | TEST |
+-------------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-region RegionOne --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default endpoint list
+----------------------------------+-----------+--------------+---------------+
| ID | Region | Service Name | Service Type |
+----------------------------------+-----------+--------------+---------------+
| 410bbd6406044ab1ac4d78a6b0859d91 | RegionOne | nova | compute |
| ec1914c903c34e67bd82cd3f34643573 | RegionOne | novav3 | computev3 |
| 626e94055d8c45ce8b5f1fc55739e9bc | RegionOne | cinderv2 | volumev2 |
| ebdb2fe3df034fdcb760395fa92c275d | RegionOne | swift | object-store |
| fe2792862b2841cbb33d682c4685781c | RegionOne | heat | orchestration |
| 8fd682a833aa40f48d11d201072233e6 | RegionOne | neutron | network |
| 2b03346cdb7d4253a91f3ee6ef2cca00 | RegionOne | glance | image |
| b85a1d07a03842a28c0bb808d2516a62 | RegionOne | cinder | volume |
| f127a1352f634755af3b9cfa54254cc8 | RegionOne | nova_ec2 | ec2 |
| c71fe856cf334582a2925a0cd42d8424 | RegionOne | ceilometer | metering |
| bc599660c6fc430da44343a1f39c717e | RegionOne | keystone | identity |
+----------------------------------+-----------+--------------+---------------+
[root@openstack-liberty ~(keystone_admin)]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-region RegionOne --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default endpoint show fe2792862b2841cbb33d682c4685781c
+--------------+--------------------------------------------+
| Field | Value |
+--------------+--------------------------------------------+
| adminurl | http://192.168.4.101:8004/v1/%(tenant_id)s |
| enabled | True |
| id | fe2792862b2841cbb33d682c4685781c |
| internalurl | http://192.168.4.101:8004/v1/%(tenant_id)s |
| publicurl | http://192.168.4.101:8004/v1/%(tenant_id)s |
| region | RegionOne |
| service_id | 1c65e4c4b35145549393112a5ba9b398 |
| service_name | heat |
| service_type | orchestration |
+--------------+--------------------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-region RegionOne --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default endpoint create
usage: openstack endpoint create [-h]
[-f {html,json,json,shell,table,value,yaml,yaml}]
[-c COLUMN] [--max-width <integer>]
[--noindent] [--prefix PREFIX] --publicurl
<url> [--adminurl <url>]
[--internalurl <url>] [--region <region-id>]
<service>
openstack endpoint create: error: too few arguments
[root@openstack-liberty ~(keystone_admin)]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-region RegionOne --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default endpoint create --region RegionOne --internalurl http://192.168.4.101:89898 --publicurl http://192.168.4.101:89898 --adminurl http://192.168.4.101:89898 TEST
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| adminurl | http://192.168.4.101:89898 |
| id | 0542df72c174435b9fdfa6b8ea25c858 |
| internalurl | http://192.168.4.101:89898 |
| publicurl | http://192.168.4.101:89898 |
| region | RegionOne |
| service_id | 7f7dde3e5c38459abc26602ad8204978 |
| service_name | TEST |
| service_type | TEST |
+--------------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack --os-username admin --os-password redhat --os-auth-url http://192.168.4.101:5000/v3 --os-region RegionOne --os-project-name admin --os-project-id c1a535292a9943d59cdc3549bb66a619 --os-user-domain-name default endpoint list
+----------------------------------+-----------+--------------+---------------+
| ID | Region | Service Name | Service Type |
+----------------------------------+-----------+--------------+---------------+
| 410bbd6406044ab1ac4d78a6b0859d91 | RegionOne | nova | compute |
| ec1914c903c34e67bd82cd3f34643573 | RegionOne | novav3 | computev3 |
| 626e94055d8c45ce8b5f1fc55739e9bc | RegionOne | cinderv2 | volumev2 |
| 0542df72c174435b9fdfa6b8ea25c858 | RegionOne | TEST | TEST |
| ebdb2fe3df034fdcb760395fa92c275d | RegionOne | swift | object-store |
| fe2792862b2841cbb33d682c4685781c | RegionOne | heat | orchestration |
| 8fd682a833aa40f48d11d201072233e6 | RegionOne | neutron | network |
| 2b03346cdb7d4253a91f3ee6ef2cca00 | RegionOne | glance | image |
| b85a1d07a03842a28c0bb808d2516a62 | RegionOne | cinder | volume |
| f127a1352f634755af3b9cfa54254cc8 | RegionOne | nova_ec2 | ec2 |
| c71fe856cf334582a2925a0cd42d8424 | RegionOne | ceilometer | metering |
| bc599660c6fc430da44343a1f39c717e | RegionOne | keystone | identity |
+----------------------------------+-----------+--------------+---------------+
[root@openstack-liberty ~(keystone_admin)]# openstack endpoint show 0542df72c174435b9fdfa6b8ea25c858
Missing parameter(s):
Set a username with --os-username, OS_USERNAME, or auth.username
Set an authentication URL, with --os-auth-url, OS_AUTH_URL or auth.auth_url
Set a scope, such as a project or domain, set a project scope with --os-project-name, OS_PROJECT_NAME or auth.project_name, set a domain scope with --os-domain-name, OS_DOMAIN_NAME or auth.domain_name
[root@openstack-liberty ~(keystone_admin)]# source keystonerc_admin
[root@openstack-liberty ~(keystone_admin)]# openstack endpoint show 0542df72c174435b9fdfa6b8ea25c858
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| adminurl | http://192.168.4.101:89898 |
| enabled | True |
| id | 0542df72c174435b9fdfa6b8ea25c858 |
| internalurl | http://192.168.4.101:89898 |
| publicurl | http://192.168.4.101:89898 |
| region | RegionOne |
| service_id | 7f7dde3e5c38459abc26602ad8204978 |
| service_name | TEST |
| service_type | TEST |
+--------------+----------------------------------+
[root@openstack-liberty ~(keystone_admin)]# openstack endpoint delete TEST
Could not find endpoint: TEST (HTTP 404) (Request-ID: req-ab06ce6f-548a-432e-9ad4-0042440458a5)
[root@openstack-liberty ~(keystone_admin)]# openstack endpoint delete 0542df72c174435b9fdfa6b8ea25c858
[root@openstack-liberty ~(keystone_admin)]# openstack endpoint list
+----------------------------------+-----------+--------------+---------------+
| ID | Region | Service Name | Service Type |
+----------------------------------+-----------+--------------+---------------+
| 410bbd6406044ab1ac4d78a6b0859d91 | RegionOne | nova | compute |
| ec1914c903c34e67bd82cd3f34643573 | RegionOne | novav3 | computev3 |
| 626e94055d8c45ce8b5f1fc55739e9bc | RegionOne | cinderv2 | volumev2 |
| ebdb2fe3df034fdcb760395fa92c275d | RegionOne | swift | object-store |
| fe2792862b2841cbb33d682c4685781c | RegionOne | heat | orchestration |
| 8fd682a833aa40f48d11d201072233e6 | RegionOne | neutron | network |
| 2b03346cdb7d4253a91f3ee6ef2cca00 | RegionOne | glance | image |
| b85a1d07a03842a28c0bb808d2516a62 | RegionOne | cinder | volume |
| f127a1352f634755af3b9cfa54254cc8 | RegionOne | nova_ec2 | ec2 |
| c71fe856cf334582a2925a0cd42d8424 | RegionOne | ceilometer | metering |
| bc599660c6fc430da44343a1f39c717e | RegionOne | keystone | identity |
+----------------------------------+-----------+--------------+---------------+
[root@openstack-liberty ~(keystone_admin)]# openstack service list
+----------------------------------+------------+---------------+
| ID | Name | Type |
+----------------------------------+------------+---------------+
| 1c65e4c4b35145549393112a5ba9b398 | heat | orchestration |
| 2d1687a7984749ceb6247c4d23c45e9a | nova_ec2 | ec2 |
| 45fb840e1f084db4914174289ff54bee | keystone | identity |
| 5c16d2d172b149cea827c4363d1480da | ceilometer | metering |
| 613f7fb000a44519a286b818e7b4a218 | nova | compute |
| 7f7dde3e5c38459abc26602ad8204978 | TEST | TEST |
| 8004edfde34d49818ac04f65c6a2cd6e | neutron | network |
| 92bedc4c6fd44e2d8eb32c719ab15ea6 | swift | object-store |
| 9b381f4893554c479ecaee82e9b2a4d1 | cinderv2 | volumev2 |
| c35fab0daf7448b3952182c17adb3b03 | novav3 | computev3 |
| d3fdbe2a63d44f74804d3c5c55ed229a | glance | image |
| ea4355f40cf04942a8457d9efc8c778b | cinder | volume |
+----------------------------------+------------+---------------+
[root@openstack-liberty ~(keystone_admin)]# openstack service delete 7f7dde3e5c38459abc26602ad8204978
[root@openstack-liberty ~(keystone_admin)]# openstack service list
+----------------------------------+------------+---------------+
| ID | Name | Type |
+----------------------------------+------------+---------------+
| 1c65e4c4b35145549393112a5ba9b398 | heat | orchestration |
| 2d1687a7984749ceb6247c4d23c45e9a | nova_ec2 | ec2 |
| 45fb840e1f084db4914174289ff54bee | keystone | identity |
| 5c16d2d172b149cea827c4363d1480da | ceilometer | metering |
| 613f7fb000a44519a286b818e7b4a218 | nova | compute |
| 8004edfde34d49818ac04f65c6a2cd6e | neutron | network |
| 92bedc4c6fd44e2d8eb32c719ab15ea6 | swift | object-store |
| 9b381f4893554c479ecaee82e9b2a4d1 | cinderv2 | volumev2 |
| c35fab0daf7448b3952182c17adb3b03 | novav3 | computev3 |
| d3fdbe2a63d44f74804d3c5c55ed229a | glance | image |
| ea4355f40cf04942a8457d9efc8c778b | cinder | volume |
+----------------------------------+------------+---------------+
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
[root@openstack-liberty ~(keystone_admin)]#
No comments:
Post a Comment