"Fossies" - the Fresh Open Source Software Archive

Member "cinder-17.1.0/cinder/policies/group_snapshot_actions.py" (8 Mar 2021, 1221 Bytes) of package /linux/misc/openstack/cinder-17.1.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "group_snapshot_actions.py" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 17.0.1_vs_17.1.0.

    1 # Copyright (c) 2017 Huawei Technologies Co., Ltd.
    2 # All Rights Reserved.
    3 #
    4 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
    5 #    not use this file except in compliance with the License. You may obtain
    6 #    a copy of the License at
    7 #
    8 #         http://www.apache.org/licenses/LICENSE-2.0
    9 #
   10 #    Unless required by applicable law or agreed to in writing, software
   11 #    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
   12 #    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
   13 #    License for the specific language governing permissions and limitations
   14 #    under the License.
   15 
   16 from oslo_policy import policy
   17 
   18 from cinder.policies import base
   19 
   20 
   21 RESET_STATUS = 'group:reset_group_snapshot_status'
   22 
   23 
   24 group_snapshot_actions_policies = [
   25     policy.DocumentedRuleDefault(
   26         name=RESET_STATUS,
   27         check_str=base.RULE_ADMIN_API,
   28         description="Reset status of group snapshot.",
   29         operations=[
   30             {
   31                 'method': 'POST',
   32                 'path':
   33                     '/group_snapshots/{g_snapshot_id}/action (reset_status)'
   34             }
   35         ]),
   36 ]
   37 
   38 
   39 def list_rules():
   40     return group_snapshot_actions_policies