"Fossies" - the Fresh Open Source Software Archive

Member "magnum-8.1.0/magnum/conf/glance.py" (1 Oct 2019, 2092 Bytes) of package /linux/misc/openstack/magnum-8.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 "glance.py" see the Fossies "Dox" file reference documentation.

    1 # Licensed under the Apache License, Version 2.0 (the "License"); you may not
    2 # use this file except in compliance with the License. You may obtain a copy
    3 # of the License at
    4 #
    5 #    http://www.apache.org/licenses/LICENSE-2.0
    6 #
    7 # Unless required by applicable law or agreed to in writing, software
    8 # distributed under the License is distributed on an "AS IS" BASIS,
    9 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   10 # See the License for the specific language governing permissions and
   11 # limitations under the License.
   12 
   13 import itertools
   14 
   15 from oslo_config import cfg
   16 
   17 from magnum.i18n import _
   18 
   19 glance_group = cfg.OptGroup(name='glance_client',
   20                             title='Options for the Glance client')
   21 
   22 glance_client_opts = [
   23     cfg.StrOpt('region_name',
   24                help=_('Region in Identity service catalog to use for '
   25                       'communication with the OpenStack service.')),
   26     cfg.StrOpt('endpoint_type',
   27                default='publicURL',
   28                help=_('Type of endpoint in Identity service catalog to use '
   29                       'for communication with the OpenStack service.')),
   30     cfg.StrOpt('api_version',
   31                default='2',
   32                help=_('Version of Glance API to use in glanceclient.'))]
   33 
   34 common_security_opts = [
   35     cfg.StrOpt('ca_file',
   36                help=_('Optional CA cert file to use in SSL connections.')),
   37     cfg.StrOpt('cert_file',
   38                help=_('Optional PEM-formatted certificate chain file.')),
   39     cfg.StrOpt('key_file',
   40                help=_('Optional PEM-formatted file that contains the '
   41                       'private key.')),
   42     cfg.BoolOpt('insecure',
   43                 default=False,
   44                 help=_("If set, then the server's certificate will not "
   45                        "be verified."))]
   46 
   47 ALL_OPTS = list(itertools.chain(
   48     glance_client_opts,
   49     common_security_opts
   50 ))
   51 
   52 
   53 def register_opts(conf):
   54     conf.register_group(glance_group)
   55     conf.register_opts(ALL_OPTS, group=glance_group)
   56 
   57 
   58 def list_opts():
   59     return {
   60         glance_group: ALL_OPTS
   61     }