{"id":5921,"date":"2016-05-14T08:00:12","date_gmt":"2016-05-14T00:00:12","guid":{"rendered":"http:\/\/rmohan.com\/?p=5921"},"modified":"2016-05-14T08:00:12","modified_gmt":"2016-05-14T00:00:12","slug":"the-keystone-cli-is-deprecated-in-favor-of-python-openstackclient","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=5921","title":{"rendered":"The keystone CLI is deprecated in favor of python-openstackclient."},"content":{"rendered":"<p>The keystone CLI is deprecated in favor of python-openstackclient.<\/p>\n<p>UPDATE: It turns out that installing the new client can cause issues with Keystone. I found this out the hard way yesterday when it failed during a demo, preventing authentication from the command line. After a few hours troubleshooting it turns out Apache (httpd.service) and Keystone (openstack-keystone.service) were clashing. I was unable to fix this regardless of updating each of these services config files to separate them out. Finally guessed it might be the last package I installed that was the cause. After removing python-openstackclient and rebooting the controller node the issue was fixed.<\/p>\n<p>Original post<br \/>\n===============<br \/>\nIn OpenStack Kilo the Depreciation message for the Keystone CLI will be displayed whenever using invoking the keystone command. \u201cDeprecationWarning: The keystone CLI is deprecated in favor of python-openstackclient. For a Python library, continue using python-keystoneclient.\u201d<\/p>\n<p>To move to the new python-openstackclient, simply install it. On RHEL7.1:<br \/>\nyum install -y python-openstackclient.noarch<\/p>\n<p>After that it will be available as the command \u201copenstack\u201d. It can be invoked in interactive mode just by typing \u201copenstack\u201d or directly from the command line to get information. For example, to list users:<br \/>\nOld Keystone CLI: \u201ckeystone user-list\u201d<br \/>\nNew Openstack CLI: \u201copenstack user list\u201d<\/p>\n<p>To be more similar to the output of the old command issue \u201copenstack user list &#8211;long\u201d to get the extra fields.<\/p>\n<p>You may also want to update the script \u201copenstack-status\u201d so it uses the new client. To do so, please:<br \/>\n1. Edit \/usr\/bin\/openstack-status with your favorite editor<br \/>\n2. Replace the old command with the new one (around line 227) like so:<\/p>\n<p>#keystone user-list<br \/>\nopenstack user list &#8211;long<\/p>\n<p>The new CLI can do a lot more of course. For a full list of commands please refer to the below (executed with \u201copenstack\u201d + command):<\/p>\n<p>aggregate add host      ip fixed remove               server rescue<br \/>\naggregate create        ip floating add               server resize<br \/>\naggregate delete        ip floating create            server resume<br \/>\naggregate list          ip floating delete            server set<br \/>\naggregate remove host   ip floating list              server show<br \/>\naggregate set           ip floating pool list         server ssh<br \/>\naggregate show          ip floating remove            server suspend<br \/>\navailability zone list  keypair create                server unlock<br \/>\nbackup create           keypair delete                server unpause<br \/>\nbackup delete           keypair list                  server unrescue<br \/>\nbackup list             keypair show                  server unset<br \/>\nbackup restore          limits show                   service create<br \/>\nbackup show             module list                   service delete<br \/>\ncatalog list            network create                service list<br \/>\ncatalog show            network delete                service show<br \/>\ncommand list            network list                  snapshot create<br \/>\ncomplete                network set                   snapshot delete<br \/>\ncompute agent create    network show                  snapshot list<br \/>\ncompute agent delete    object create                 snapshot set<br \/>\ncompute agent list      object delete                 snapshot show<br \/>\ncompute agent set       object list                   snapshot unset<br \/>\ncompute service list    object save                   token issue<br \/>\ncompute service set     object show                   token revoke<br \/>\nconsole log show        project create                usage list<br \/>\nconsole url show        project delete                usage show<br \/>\ncontainer create        project list                  user create<br \/>\ncontainer delete        project set                   user delete<br \/>\ncontainer list          project show                  user list<br \/>\ncontainer save          project usage list            user role list<br \/>\ncontainer show          quota set                     user set<br \/>\nec2 credentials create  quota show                    user show<br \/>\nec2 credentials delete  role add                      volume create<br \/>\nec2 credentials list    role create                   volume delete<br \/>\nec2 credentials show    role delete                   volume list<br \/>\nendpoint create         role list                     volume set<br \/>\nendpoint delete         role remove                   volume show<br \/>\nendpoint list           role show                     volume type create<br \/>\nendpoint show           security group create         volume type delete<br \/>\nextension list          security group delete         volume type list<br \/>\nflavor create           security group list           volume type set<br \/>\nflavor delete           security group rule create    volume type unset<br \/>\nflavor list             security group rule delete    volume unset<br \/>\nflavor set              security group rule list<br \/>\nflavor show             security group set<br \/>\nflavor unset            security group show<br \/>\nhelp                    server add security group<br \/>\nhost list               server add volume<br \/>\nhost show               server create<br \/>\nhypervisor list         server delete<br \/>\nhypervisor show         server image create<br \/>\nhypervisor stats show   server list<br \/>\nimage create            server lock<br \/>\nimage delete            server migrate<br \/>\nimage list              server pause<br \/>\nimage save              server reboot<br \/>\nimage set               server rebuild<br \/>\nimage show              server remove security group<br \/>\nip fixed add            server remove volume<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The keystone CLI is deprecated in favor of python-openstackclient.<\/p>\n<p>UPDATE: It turns out that installing the new client can cause issues with Keystone. I found this out the hard way yesterday when it failed during a demo, preventing authentication from the command line. After a few hours troubleshooting it turns out Apache (httpd.service) and Keystone [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[66],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5921"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5921"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5921\/revisions"}],"predecessor-version":[{"id":5922,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5921\/revisions\/5922"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5921"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5921"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5921"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}