"Fossies" - the Fresh Open Source Software Archive

Member "manila-8.1.4/manila/share/drivers/netapp/options.py" (19 Nov 2020, 8290 Bytes) of package /linux/misc/openstack/manila-8.1.4.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 "options.py" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 8.1.3_vs_8.1.4.

    1 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
    2 #    not use this file except in compliance with the License. You may obtain
    3 #    a copy 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, WITHOUT
    9 #    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
   10 #    License for the specific language governing permissions and limitations
   11 #    under the License.
   12 
   13 """Contains configuration options for NetApp drivers.
   14 
   15 Common place to hold configuration options for all NetApp drivers.
   16 Options need to be grouped into granular units to be able to be reused
   17 by different modules and classes. This does not restrict declaring options in
   18 individual modules. If options are not re usable then can be declared in
   19 individual modules. It is recommended to Keep options at a single
   20 place to ensure re usability and better management of configuration options.
   21 """
   22 
   23 from oslo_config import cfg
   24 
   25 netapp_proxy_opts = [
   26     cfg.StrOpt('netapp_storage_family',
   27                default='ontap_cluster',
   28                help=('The storage family type used on the storage system; '
   29                      'valid values include ontap_cluster for using '
   30                      'clustered Data ONTAP.')), ]
   31 
   32 netapp_connection_opts = [
   33     cfg.HostAddressOpt('netapp_server_hostname',
   34                        deprecated_name='netapp_nas_server_hostname',
   35                        help='The hostname (or IP address) for the storage '
   36                             'system.'),
   37     cfg.PortOpt('netapp_server_port',
   38                 help=('The TCP port to use for communication with the storage '
   39                       'system or proxy server. If not specified, Data ONTAP '
   40                       'drivers will use 80 for HTTP and 443 for HTTPS.')), ]
   41 
   42 netapp_transport_opts = [
   43     cfg.StrOpt('netapp_transport_type',
   44                deprecated_name='netapp_nas_transport_type',
   45                default='http',
   46                help=('The transport protocol used when communicating with '
   47                      'the storage system or proxy server. Valid values are '
   48                      'http or https.')), ]
   49 
   50 netapp_basicauth_opts = [
   51     cfg.StrOpt('netapp_login',
   52                deprecated_name='netapp_nas_login',
   53                help=('Administrative user account name used to access the '
   54                      'storage system.')),
   55     cfg.StrOpt('netapp_password',
   56                deprecated_name='netapp_nas_password',
   57                help=('Password for the administrative user account '
   58                      'specified in the netapp_login option.'),
   59                secret=True), ]
   60 
   61 netapp_provisioning_opts = [
   62     cfg.ListOpt('netapp_enabled_share_protocols',
   63                 default=['nfs3', 'nfs4.0'],
   64                 help='The NFS protocol versions that will be enabled. '
   65                      'Supported values include nfs3, nfs4.0, nfs4.1. This '
   66                      'option only applies when the option '
   67                      'driver_handles_share_servers is set to True. '),
   68     cfg.StrOpt('netapp_volume_name_template',
   69                deprecated_name='netapp_nas_volume_name_template',
   70                help='NetApp volume name template.',
   71                default='share_%(share_id)s'),
   72     cfg.StrOpt('netapp_vserver_name_template',
   73                default='os_%s',
   74                help='Name template to use for new Vserver. '
   75                     'When using CIFS protocol make sure to not '
   76                     'configure characters illegal in DNS hostnames.'),
   77     cfg.StrOpt('netapp_qos_policy_group_name_template',
   78                help='NetApp QoS policy group name template.',
   79                default='qos_share_%(share_id)s'),
   80     cfg.StrOpt('netapp_port_name_search_pattern',
   81                default='(.*)',
   82                help='Pattern for overriding the selection of network ports '
   83                     'on which to create Vserver LIFs.'),
   84     cfg.StrOpt('netapp_lif_name_template',
   85                default='os_%(net_allocation_id)s',
   86                help='Logical interface (LIF) name template'),
   87     cfg.StrOpt('netapp_aggregate_name_search_pattern',
   88                default='(.*)',
   89                help='Pattern for searching available aggregates '
   90                     'for provisioning.'),
   91     cfg.StrOpt('netapp_root_volume_aggregate',
   92                help='Name of aggregate to create Vserver root volumes on. '
   93                     'This option only applies when the option '
   94                     'driver_handles_share_servers is set to True.'),
   95     cfg.StrOpt('netapp_root_volume',
   96                deprecated_name='netapp_root_volume_name',
   97                default='root',
   98                help='Root volume name.'),
   99     cfg.IntOpt('netapp_volume_snapshot_reserve_percent',
  100                min=0,
  101                max=90,
  102                default=5,
  103                help='The percentage of share space set aside as reserve for '
  104                     'snapshot usage; valid values range from 0 to 90.'),
  105     cfg.StrOpt('netapp_reset_snapdir_visibility',
  106                choices=['visible', 'hidden', 'default'],
  107                default="default",
  108                help="This option forces all existing shares to have their "
  109                     "snapshot directory visibility set to either 'visible' or "
  110                     "'hidden' during driver startup. If set to 'default', "
  111                     "nothing will be changed during startup. This will not "
  112                     "affect new shares, which will have their snapshot "
  113                     "directory always visible, unless toggled by the share "
  114                     "type extra spec 'netapp:hide_snapdir'."), ]
  115 
  116 netapp_cluster_opts = [
  117     cfg.StrOpt('netapp_vserver',
  118                help=('This option specifies the Storage Virtual Machine '
  119                      '(i.e. Vserver) name on the storage cluster on which '
  120                      'provisioning of file storage shares should occur. This '
  121                      'option should only be specified when the option '
  122                      'driver_handles_share_servers is set to False (i.e. the '
  123                      'driver is managing shares on a single pre-configured '
  124                      'Vserver).')), ]
  125 
  126 netapp_support_opts = [
  127     cfg.StrOpt('netapp_trace_flags',
  128                help=('Comma-separated list of options that control which '
  129                      'trace info is written to the debug logs.  Values '
  130                      'include method and api. API logging can further be '
  131                      'filtered with the '
  132                      '``netapp_api_trace_pattern option``.')),
  133     cfg.StrOpt('netapp_api_trace_pattern',
  134                default='(.*)',
  135                help=('A regular expression to limit the API tracing. This '
  136                      'option is honored only if enabling ``api`` tracing '
  137                      'with the ``netapp_trace_flags`` option. By default, '
  138                      'all APIs will be traced.')),
  139 ]
  140 
  141 netapp_data_motion_opts = [
  142     cfg.IntOpt('netapp_snapmirror_quiesce_timeout',
  143                min=0,
  144                default=3600,  # One Hour
  145                help='The maximum time in seconds to wait for existing '
  146                     'snapmirror transfers to complete before aborting when '
  147                     'promoting a replica.'),
  148     cfg.IntOpt('netapp_volume_move_cutover_timeout',
  149                min=0,
  150                default=3600,  # One Hour,
  151                help='The maximum time in seconds to wait for the completion '
  152                     'of a volume move operation after the cutover '
  153                     'was triggered.'),
  154     cfg.IntOpt('netapp_migration_cancel_timeout',
  155                min=0,
  156                default=3600,  # One Hour,
  157                help='The maximum time in seconds that migration cancel '
  158                     'waits for all migration operations be completely '
  159                     'aborted.'), ]
  160 
  161 CONF = cfg.CONF
  162 CONF.register_opts(netapp_proxy_opts)
  163 CONF.register_opts(netapp_connection_opts)
  164 CONF.register_opts(netapp_transport_opts)
  165 CONF.register_opts(netapp_basicauth_opts)
  166 CONF.register_opts(netapp_provisioning_opts)
  167 CONF.register_opts(netapp_support_opts)
  168 CONF.register_opts(netapp_data_motion_opts)