"Fossies" - the Fresh Open Source Software Archive

Member "cinder-14.0.2/cinder/api/schemas/volume_types.py" (4 Oct 2019, 1761 Bytes) of package /linux/misc/openstack/cinder-14.0.2.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 "volume_types.py" see the Fossies "Dox" file reference documentation.

    1 # Copyright 2017 NTT DATA
    2 # All Rights Reserved.
    3 #
    4 #    Licensed under the Apache License, Version 2.0 (the "License");
    5 #    you may not use this file except in compliance with the License.
    6 #    You may obtain 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,
   12 #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   13 #    See the License for the specific language governing permissions and
   14 #    limitations under the License.
   15 
   16 from cinder.api.validation import parameter_types
   17 
   18 
   19 create = {
   20     'type': 'object',
   21     'properties': {
   22         'type': 'object',
   23         'volume_type': {
   24             'type': 'object',
   25             'properties': {
   26                 'name': parameter_types.name,
   27                 'description': parameter_types.description,
   28                 'extra_specs': parameter_types.extra_specs_with_null,
   29                 'os-volume-type-access:is_public': parameter_types.boolean,
   30             },
   31             'required': ['name'],
   32             'additionalProperties': False,
   33         },
   34     },
   35     'required': ['volume_type'],
   36     'additionalProperties': False,
   37 }
   38 
   39 
   40 update = {
   41     'type': 'object',
   42     'properties': {
   43         'type': 'object',
   44         'volume_type': {
   45             'type': 'object',
   46             'properties': {
   47                 'name': parameter_types.name_allow_zero_min_length,
   48                 'description': parameter_types.description,
   49                 'is_public': parameter_types.boolean,
   50             },
   51             'additionalProperties': False,
   52         },
   53     },
   54     'required': ['volume_type'],
   55     'additionalProperties': False,
   56 }