diff --git a/doc/source/configuration/block-storage/samples/cinder.conf.rst b/doc/source/configuration/block-storage/samples/cinder.conf.rst index 858d85833dc..65937fc6bcd 100644 --- a/doc/source/configuration/block-storage/samples/cinder.conf.rst +++ b/doc/source/configuration/block-storage/samples/cinder.conf.rst @@ -6,10 +6,8 @@ The ``cinder.conf`` file is installed in ``/etc/cinder`` by default. When you manually install the Block Storage service, the options in the ``cinder.conf`` file are set to default values. -The ``cinder.conf`` file contains most of the options needed to configure -the Block Storage service. You can generate the latest configuration file -by using the tox provided by the Block Storage service. Here is a sample -configuration file: +The sample configuration file can also be viewed in +`file form <../../../_static/cinder.conf.sample>`_. .. literalinclude:: ../../../_static/cinder.conf.sample :language: ini diff --git a/doc/source/configuration/block-storage/samples/index.rst b/doc/source/configuration/block-storage/samples/index.rst index 0b759114f2d..161779c6066 100644 --- a/doc/source/configuration/block-storage/samples/index.rst +++ b/doc/source/configuration/block-storage/samples/index.rst @@ -11,5 +11,5 @@ All the files in this section can be found in ``/etc/cinder``. cinder.conf.rst api-paste.ini.rst - policy.json.rst + policy.yaml.rst rootwrap.conf.rst diff --git a/doc/source/configuration/block-storage/samples/policy.json.inc b/doc/source/configuration/block-storage/samples/policy.json.inc deleted file mode 100644 index 1cd641ce58c..00000000000 --- a/doc/source/configuration/block-storage/samples/policy.json.inc +++ /dev/null @@ -1,163 +0,0 @@ -{ - "admin_or_owner": "is_admin:True or (role:admin and is_admin_project:True) or project_id:%(project_id)s", - "default": "rule:admin_or_owner", - - "admin_api": "is_admin:True or (role:admin and is_admin_project:True)", - - "volume:create": "", - "volume:create_from_image": "", - "volume:delete": "rule:admin_or_owner", - "volume:force_delete": "rule:admin_api", - "volume:get": "rule:admin_or_owner", - "volume:get_all": "rule:admin_or_owner", - "volume:get_volume_metadata": "rule:admin_or_owner", - "volume:create_volume_metadata": "rule:admin_or_owner", - "volume:delete_volume_metadata": "rule:admin_or_owner", - "volume:update_volume_metadata": "rule:admin_or_owner", - "volume:get_volume_admin_metadata": "rule:admin_api", - "volume:update_volume_admin_metadata": "rule:admin_api", - "volume:get_snapshot": "rule:admin_or_owner", - "volume:get_all_snapshots": "rule:admin_or_owner", - "volume:create_snapshot": "rule:admin_or_owner", - "volume:delete_snapshot": "rule:admin_or_owner", - "volume:update_snapshot": "rule:admin_or_owner", - "volume:get_snapshot_metadata": "rule:admin_or_owner", - "volume:delete_snapshot_metadata": "rule:admin_or_owner", - "volume:update_snapshot_metadata": "rule:admin_or_owner", - "volume:extend": "rule:admin_or_owner", - "volume:extend_attached_volume": "rule:admin_or_owner", - "volume:update_readonly_flag": "rule:admin_or_owner", - "volume:retype": "rule:admin_or_owner", - "volume:update": "rule:admin_or_owner", - "volume:revert_to_snapshot": "rule:admin_or_owner", - - "volume_extension:types_manage": "rule:admin_api", - "volume_extension:types_extra_specs:create": "rule:admin_api", - "volume_extension:types_extra_specs:delete": "rule:admin_api", - "volume_extension:types_extra_specs:index": "rule:admin_api", - "volume_extension:types_extra_specs:show": "rule:admin_api", - "volume_extension:types_extra_specs:update": "rule:admin_api", - "volume_extension:access_types_qos_specs_id": "rule:admin_api", - "volume_extension:access_types_extra_specs": "rule:admin_api", - "volume_extension:volume_type_access": "rule:admin_or_owner", - "volume_extension:volume_type_access:addProjectAccess": "rule:admin_api", - "volume_extension:volume_type_access:removeProjectAccess": "rule:admin_api", - "volume_extension:volume_type_encryption": "rule:admin_api", - "volume_extension:volume_encryption_metadata": "rule:admin_or_owner", - "volume_extension:extended_snapshot_attributes": "rule:admin_or_owner", - "volume_extension:volume_image_metadata": "rule:admin_or_owner", - - "volume_extension:qos_specs_manage:create": "rule:admin_api", - "volume_extension:qos_specs_manage:get": "rule:admin_api", - "volume_extension:qos_specs_manage:get_all": "rule:admin_api", - "volume_extension:qos_specs_manage:update": "rule:admin_api", - "volume_extension:qos_specs_manage:delete": "rule:admin_api", - - "volume_extension:quotas:show": "", - "volume_extension:quotas:update": "rule:admin_api", - "volume_extension:quotas:delete": "rule:admin_api", - "volume_extension:quota_classes": "rule:admin_api", - "volume_extension:quota_classes:validate_setup_for_nested_quota_use": "rule:admin_api", - - "volume_extension:volume_admin_actions:reset_status": "rule:admin_api", - "volume_extension:snapshot_admin_actions:reset_status": "rule:admin_api", - "volume_extension:backup_admin_actions:reset_status": "rule:admin_api", - "volume_extension:volume_admin_actions:force_delete": "rule:admin_api", - "volume_extension:volume_admin_actions:force_detach": "rule:admin_api", - "volume_extension:snapshot_admin_actions:force_delete": "rule:admin_api", - "volume_extension:backup_admin_actions:force_delete": "rule:admin_api", - "volume_extension:volume_admin_actions:migrate_volume": "rule:admin_api", - "volume_extension:volume_admin_actions:migrate_volume_completion": "rule:admin_api", - - "volume_extension:volume_actions:upload_public": "rule:admin_api", - "volume_extension:volume_actions:upload_image": "rule:admin_or_owner", - - "volume_extension:volume_host_attribute": "rule:admin_api", - "volume_extension:volume_tenant_attribute": "rule:admin_or_owner", - "volume_extension:volume_mig_status_attribute": "rule:admin_api", - "volume_extension:hosts": "rule:admin_api", - "volume_extension:services:index": "rule:admin_api", - "volume_extension:services:update" : "rule:admin_api", - - "volume_extension:volume_manage": "rule:admin_api", - "volume_extension:volume_unmanage": "rule:admin_api", - "volume_extension:list_manageable": "rule:admin_api", - - "volume_extension:capabilities": "rule:admin_api", - - "volume:create_transfer": "rule:admin_or_owner", - "volume:accept_transfer": "", - "volume:delete_transfer": "rule:admin_or_owner", - "volume:get_transfer": "rule:admin_or_owner", - "volume:get_all_transfers": "rule:admin_or_owner", - - "volume:failover_host": "rule:admin_api", - "volume:freeze_host": "rule:admin_api", - "volume:thaw_host": "rule:admin_api", - - "backup:create" : "", - "backup:delete": "rule:admin_or_owner", - "backup:get": "rule:admin_or_owner", - "backup:get_all": "rule:admin_or_owner", - "backup:restore": "rule:admin_or_owner", - "backup:backup-import": "rule:admin_api", - "backup:backup-export": "rule:admin_api", - "backup:update": "rule:admin_or_owner", - "backup:backup_project_attribute": "rule:admin_api", - - "volume:attachment_create": "", - "volume:attachment_update": "rule:admin_or_owner", - "volume:attachment_delete": "rule:admin_or_owner", - "volume:attachment_complete": "rule:admin_or_owner", - - "snapshot_extension:snapshot_actions:update_snapshot_status": "", - "snapshot_extension:snapshot_manage": "rule:admin_api", - "snapshot_extension:snapshot_unmanage": "rule:admin_api", - "snapshot_extension:list_manageable": "rule:admin_api", - - "consistencygroup:create" : "group:nobody", - "consistencygroup:delete": "group:nobody", - "consistencygroup:update": "group:nobody", - "consistencygroup:get": "group:nobody", - "consistencygroup:get_all": "group:nobody", - - "consistencygroup:create_cgsnapshot" : "group:nobody", - "consistencygroup:delete_cgsnapshot": "group:nobody", - "consistencygroup:get_cgsnapshot": "group:nobody", - "consistencygroup:get_all_cgsnapshots": "group:nobody", - - "group:group_types_manage": "rule:admin_api", - "group:group_types_specs": "rule:admin_api", - "group:access_group_types_specs": "rule:admin_api", - "group:group_type_access": "rule:admin_or_owner", - - "group:create" : "", - "group:delete": "rule:admin_or_owner", - "group:update": "rule:admin_or_owner", - "group:get": "rule:admin_or_owner", - "group:get_all": "rule:admin_or_owner", - - "group:create_group_snapshot": "", - "group:delete_group_snapshot": "rule:admin_or_owner", - "group:update_group_snapshot": "rule:admin_or_owner", - "group:get_group_snapshot": "rule:admin_or_owner", - "group:get_all_group_snapshots": "rule:admin_or_owner", - "group:reset_group_snapshot_status":"rule:admin_api", - "group:reset_status":"rule:admin_api", - - "group:enable_replication": "rule:admin_or_owner", - "group:disable_replication": "rule:admin_or_owner", - "group:failover_replication": "rule:admin_or_owner", - "group:list_replication_targets": "rule:admin_or_owner", - - "scheduler_extension:scheduler_stats:get_pools" : "rule:admin_api", - "message:delete": "rule:admin_or_owner", - "message:get": "rule:admin_or_owner", - "message:get_all": "rule:admin_or_owner", - - "clusters:get": "rule:admin_api", - "clusters:get_all": "rule:admin_api", - "clusters:update": "rule:admin_api", - - "workers:cleanup": "rule:admin_api" -} diff --git a/doc/source/configuration/block-storage/samples/policy.json.rst b/doc/source/configuration/block-storage/samples/policy.json.rst deleted file mode 100644 index 6796d2928be..00000000000 --- a/doc/source/configuration/block-storage/samples/policy.json.rst +++ /dev/null @@ -1,8 +0,0 @@ -=========== -policy.json -=========== - -The ``policy.json`` file defines additional access controls that apply -to the Block Storage service. - -.. literalinclude:: policy.json.inc diff --git a/doc/source/configuration/block-storage/samples/policy.yaml.rst b/doc/source/configuration/block-storage/samples/policy.yaml.rst new file mode 100644 index 00000000000..8651caf9e39 --- /dev/null +++ b/doc/source/configuration/block-storage/samples/policy.yaml.rst @@ -0,0 +1,17 @@ +=========== +policy.json +=========== + +The ``policy.json`` file defines additional access controls that apply +to the Block Storage service. + +The following provides the default policies. It is not recommended to copy this +file into ``/etc/cinder`` unless you are planning on providing a different +policy for an operation that is not the default. For instance, if you want to +change the default value of "volume:create", you only need to keep this single +rule in your policy config file. + +The sample policy file can also be viewed in `file form +<../../../_static/cinder.policy.yaml.sample>`_. + +.. literalinclude:: ../../../_static/cinder.policy.yaml.sample diff --git a/doc/source/index.rst b/doc/source/index.rst index 522af26b440..8eb721a962c 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -60,11 +60,6 @@ Configuration Reference :maxdepth: 2 configuration/index - - Sample Configuration File - - Sample Policy File - drivers CLI Reference diff --git a/doc/source/sample_config.rst b/doc/source/sample_config.rst deleted file mode 100644 index 3c366492ac2..00000000000 --- a/doc/source/sample_config.rst +++ /dev/null @@ -1,13 +0,0 @@ -============================ -Cinder Configuration Options -============================ - -The following is a sample Cinder configuration for adaptation and use. It is -auto-generated from Cinder when this documentation is built, so if you are -having issues with an option, please compare your version of Cinder with the -version of this documentation. - -The sample configuration can also be viewed in -`file form <_static/cinder.conf.sample>`_. - -.. literalinclude:: _static/cinder.conf.sample diff --git a/doc/source/sample_policy.rst b/doc/source/sample_policy.rst deleted file mode 100644 index 290a27df086..00000000000 --- a/doc/source/sample_policy.rst +++ /dev/null @@ -1,18 +0,0 @@ -==================== -Cinder Sample Policy -==================== - -The following is a sample Cinder policy file that has been auto-generated -from default policy values in code. If you're using the default policies, then -the maintenance of this file is not necessary. -It is here to help explain which policy operations protect specific Cinder API, -but it is not suggested to copy and paste into a deployment unless you're planning -on providing a different policy for an operation that is not the default. For -instance, if you want to change the default value of "volume:create", you only -need to keep this single rule in your policy config -file (**/etc/cinder/policy.json**). - -The sample policy file can also be viewed in `file form <_static/cinder.policy.yaml.sample>`_. - -.. literalinclude:: _static/cinder.policy.yaml.sample -