Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does openstack enable non-admin users to see the host where the virtual machine is located

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

The editor today shows you how openstack allows non-admin users to see the host where the virtual machine is located. The knowledge points in this article are described in great detail. Friends who feel helpful can browse the content of the article with the editor, hoping to help more friends who want to solve this problem find the answer to the problem. Let's follow the editor to learn more about "how openstack enables non-admin users to see the host where the virtual machine is located".

# modify the installation of horizon in / usr/share/openstack-dashboard under horizon ubuntu

# / usr/share/openstack-dashboard/openstack_dashboard/dashboards/project/instances/tables.py [...] class InstancesTable (tables.DataTable): TASK_STATUS_CHOICES = ((None, True), ("none", True)) STATUS_CHOICES = (("active", True), ("shutoff", True), ("suspended", True), ("paused", True) ("error", False), ("rescue", True), ("shelved", True), ("shelved_offloaded", True), name= tables.Column ("name", link= "horizon:project:instances:detail", verbose_name=_ ("Instance Name")) host = tables.Column ("OS-EXT-SRV-ATTR:host") Verbose_name=_ ("Host") image_name = tables.Column ("image_name", verbose_name=_ ("Image Name")) [...]

Add a host line between name and image_name

Restart apache

Service apache2 restart

# configure nova-api to open / etc/nova/policy.json file

"compute_extension:extended_server_attributes": "rule:admin_api"

Find the above line and remove the rule:admin_api from it

Restart nova-api

Service nova-api restart

# verify that a non-admin user is logged in to horizon. Go to Project-> Compute- > instance to view. You can see that there is an extra column of host fields in the table. if the value in the host shows -, you need to make sure that the policy configuration at nova-api is correct.

# debug if the modified code does not take effect, try deleting the pyc file: find / usr/share/openstack-dashboard-name "* .pyc"-exec rm-rf {}\

Thank you for your reading. this is all about "how openstack makes non-admin users see the host where the virtual machine is located". Let's get started. I believe that the editor will certainly bring you better quality articles. Thank you for your support to the website!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report