75a7e6fc7d
The os-pci API was never part of the v2.0 API and was added to the v3 API, but when the v3 API turned into the v2.1 API which is backward compatible with the v2.0 API, the os-pci API was removed from v2.1. The original intent was to enable it in a microversion but that never happened. We should just delete this API since it has a number of issues anyway: 1. It's not documented (which makes sense since it's not enabled). 2. The PciHypervisorController just takes the compute_nodes.pci_stats dict and dumps it to json out of the REST API with no control over the keys in the response. That means if we ever change the fields in the PciDevicePool object, we implicitly introduce a backward incompatible change in the REST API. 3. We don't want to be reporting host stats out of the API [1]. 4. To make the os-hypervisors extension work in a multi-cell environment we'd have to add uuids to the PciDevices model and change the API to return and take in uuids to identify the devices for GET requests. 5. And last but not least, no one has asked for this in over two years. As a result of removing this API we can also remove the join on the pci_devices table when showing details about an instance or listing instances, which were added years ago because of the PciServerController: Id3c8a0b187e399ce2acecd4aaa37ac95e731d46c Id3e60c3c56c2eb4209e8aca8a2c26881ca86b435 [1] https://docs.openstack.org/developer/nova/policies.html?#metrics-gathering Closes-Bug: #1426241 Closes-Bug: #1673869 Change-Id: I9099744264eeec175672d10d04da69648dec1a9d
133 lines
5.8 KiB
Python
133 lines
5.8 KiB
Python
# Copyright (c) 2012 OpenStack Foundation
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
|
|
policy_data = """
|
|
{
|
|
"context_is_admin": "role:admin or role:administrator",
|
|
|
|
"os_compute_api:servers:show:host_status": "",
|
|
"os_compute_api:servers:migrations:force_complete": "",
|
|
"os_compute_api:os-admin-actions:inject_network_info": "",
|
|
"os_compute_api:os-admin-actions:reset_network": "",
|
|
"os_compute_api:os-admin-actions:reset_state": "",
|
|
"os_compute_api:os-admin-password": "",
|
|
"os_compute_api:os-agents": "",
|
|
"os_compute_api:os-attach-interfaces": "",
|
|
"os_compute_api:os-baremetal-nodes": "",
|
|
"os_compute_api:os-cells": "",
|
|
"os_compute_api:os-certificates:create": "",
|
|
"os_compute_api:os-certificates:show": "",
|
|
"os_compute_api:os-cloudpipe": "",
|
|
"os_compute_api:os-config-drive": "",
|
|
"os_compute_api:os-console-output": "",
|
|
"os_compute_api:os-remote-consoles": "",
|
|
"os_compute_api:os-consoles:create": "",
|
|
"os_compute_api:os-consoles:delete": "",
|
|
"os_compute_api:os-consoles:index": "",
|
|
"os_compute_api:os-consoles:show": "",
|
|
"os_compute_api:os-create-backup": "",
|
|
"os_compute_api:os-deferred-delete": "",
|
|
"os_compute_api:os-extended-server-attributes": "",
|
|
"os_compute_api:os-extended-status": "",
|
|
"os_compute_api:os-extended-availability-zone": "",
|
|
"os_compute_api:ips:index": "",
|
|
"os_compute_api:ips:show": "",
|
|
"os_compute_api:os-extended-volumes": "",
|
|
"os_compute_api:extensions": "",
|
|
"os_compute_api:os-fixed-ips": "",
|
|
"os_compute_api:os-flavor-access": "",
|
|
"os_compute_api:os-flavor-access:remove_tenant_access": "",
|
|
"os_compute_api:os-flavor-access:add_tenant_access": "",
|
|
"os_compute_api:os-flavor-rxtx": "",
|
|
"os_compute_api:os-flavor-extra-specs:index": "",
|
|
"os_compute_api:os-flavor-extra-specs:show": "",
|
|
"os_compute_api:os-flavor-manage": "",
|
|
"os_compute_api:os-floating-ip-dns": "",
|
|
"os_compute_api:os-floating-ip-dns:domain:update": "",
|
|
"os_compute_api:os-floating-ip-dns:domain:delete": "",
|
|
"os_compute_api:os-floating-ip-pools": "",
|
|
"os_compute_api:os-floating-ips": "",
|
|
"os_compute_api:os-floating-ips-bulk": "",
|
|
"os_compute_api:os-fping": "",
|
|
"os_compute_api:os-hide-server-addresses": "",
|
|
"os_compute_api:image-size": "",
|
|
"os_compute_api:os-instance-actions": "",
|
|
"os_compute_api:os-instance-usage-audit-log": "",
|
|
|
|
"os_compute_api:os-keypairs": "",
|
|
"os_compute_api:os-lock-server:lock": "",
|
|
"os_compute_api:os-lock-server:unlock": "",
|
|
"os_compute_api:os-migrate-server:migrate": "",
|
|
"os_compute_api:os-migrate-server:migrate_live": "",
|
|
"os_compute_api:os-multinic": "",
|
|
"os_compute_api:os-networks": "",
|
|
"os_compute_api:os-networks:view": "",
|
|
"os_compute_api:os-networks-associate": "",
|
|
"os_compute_api:os-tenant-networks": "",
|
|
"os_compute_api:os-pause-server:pause": "",
|
|
"os_compute_api:os-pause-server:unpause": "",
|
|
"os_compute_api:os-quota-sets:show": "",
|
|
"os_compute_api:os-quota-sets:update": "",
|
|
"os_compute_api:os-quota-sets:delete": "",
|
|
"os_compute_api:os-quota-sets:detail": "",
|
|
"os_compute_api:os-quota-sets:defaults": "",
|
|
"os_compute_api:os-quota-class-sets:update": "",
|
|
"os_compute_api:os-quota-class-sets:show": "",
|
|
"os_compute_api:os-rescue": "",
|
|
"os_compute_api:os-security-group-default-rules": "",
|
|
"os_compute_api:os-security-groups": "",
|
|
"os_compute_api:os-server-diagnostics": "",
|
|
"os_compute_api:os-server-password": "",
|
|
"os_compute_api:os-server-tags:index": "",
|
|
"os_compute_api:os-server-tags:show": "",
|
|
"os_compute_api:os-server-tags:update": "",
|
|
"os_compute_api:os-server-tags:update_all": "",
|
|
"os_compute_api:os-server-tags:delete": "",
|
|
"os_compute_api:os-server-tags:delete_all": "",
|
|
"os_compute_api:os-server-usage": "",
|
|
"os_compute_api:os-server-groups": "",
|
|
"os_compute_api:os-server-groups:show": "",
|
|
"os_compute_api:os-server-groups:index": "",
|
|
"os_compute_api:os-server-groups:create": "",
|
|
"os_compute_api:os-server-groups:delete": "",
|
|
"os_compute_api:os-services": "",
|
|
"os_compute_api:os-shelve:shelve": "",
|
|
"os_compute_api:os-shelve:shelve_offload": "",
|
|
"os_compute_api:os-simple-tenant-usage:show": "",
|
|
"os_compute_api:os-simple-tenant-usage:list": "",
|
|
"os_compute_api:os-shelve:unshelve": "",
|
|
"os_compute_api:os-suspend-server:suspend": "",
|
|
"os_compute_api:os-suspend-server:resume": "",
|
|
"os_compute_api:os-virtual-interfaces": "",
|
|
"os_compute_api:os-volumes": "",
|
|
"os_compute_api:os-volumes-attachments:index": "",
|
|
"os_compute_api:os-volumes-attachments:show": "",
|
|
"os_compute_api:os-volumes-attachments:create": "",
|
|
"os_compute_api:os-volumes-attachments:update": "",
|
|
"os_compute_api:os-volumes-attachments:delete": "",
|
|
"os_compute_api:os-availability-zone:list": "",
|
|
"os_compute_api:os-availability-zone:detail": "",
|
|
"os_compute_api:limits": "",
|
|
"os_compute_api:os-assisted-volume-snapshots:create": "",
|
|
"os_compute_api:os-assisted-volume-snapshots:delete": "",
|
|
"os_compute_api:server-metadata:create": "",
|
|
"os_compute_api:server-metadata:update": "",
|
|
"os_compute_api:server-metadata:update_all": "",
|
|
"os_compute_api:server-metadata:delete": "",
|
|
"os_compute_api:server-metadata:show": "",
|
|
"os_compute_api:server-metadata:index": ""
|
|
}
|
|
"""
|