Coverage for manila/opts.py: 0%

87 statements  

« prev     ^ index     » next       coverage.py v7.11.0, created at 2026-02-18 22:19 +0000

1# Copyright (c) 2014 SUSE Linux Products GmbH. 

2# 

3# Licensed under the Apache License, Version 2.0 (the "License"); you may 

4# not use this file except in compliance with the License. You may obtain 

5# a copy of the License at 

6# 

7# http://www.apache.org/licenses/LICENSE-2.0 

8# 

9# Unless required by applicable law or agreed to in writing, software 

10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 

11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 

12# License for the specific language governing permissions and limitations 

13# under the License. 

14 

15__all__ = [ 

16 'list_opts' 

17] 

18 

19import copy 

20import itertools 

21 

22import manila.api.common 

23import manila.api.middleware.auth 

24import manila.common.config 

25import manila.compute 

26import manila.compute.nova 

27import manila.coordination 

28import manila.data.drivers.nfs 

29import manila.data.helper 

30import manila.data.manager 

31import manila.db.api 

32import manila.db.base 

33import manila.exception 

34import manila.image 

35import manila.image.glance 

36import manila.keymgr.barbican 

37import manila.message.api 

38import manila.network 

39import manila.network.linux.interface 

40import manila.network.neutron.api 

41import manila.network.neutron.neutron_network_plugin 

42import manila.network.standalone_network_plugin 

43import manila.quota 

44import manila.scheduler.drivers.base 

45import manila.scheduler.drivers.simple 

46import manila.scheduler.host_manager 

47import manila.scheduler.manager 

48import manila.scheduler.scheduler_options 

49import manila.scheduler.weighers.capacity 

50import manila.scheduler.weighers.pool 

51import manila.service 

52import manila.share.api 

53import manila.share.driver 

54import manila.share.drivers.cephfs.driver 

55import manila.share.drivers.container.driver 

56import manila.share.drivers.container.storage_helper 

57import manila.share.drivers.dell_emc.driver 

58import manila.share.drivers.dell_emc.plugins.powermax.connection 

59import manila.share.drivers.dell_emc.plugins.powerscale.powerscale 

60import manila.share.drivers.generic 

61import manila.share.drivers.glusterfs 

62import manila.share.drivers.glusterfs.common 

63import manila.share.drivers.glusterfs.layout 

64import manila.share.drivers.glusterfs.layout_directory 

65import manila.share.drivers.glusterfs.layout_volume 

66import manila.share.drivers.hdfs.hdfs_native 

67import manila.share.drivers.hitachi.hnas.driver 

68import manila.share.drivers.hitachi.hsp.driver 

69import manila.share.drivers.hpe.hpe_3par_driver 

70import manila.share.drivers.huawei.huawei_nas 

71import manila.share.drivers.ibm.gpfs 

72import manila.share.drivers.infinidat.infinibox 

73import manila.share.drivers.infortrend.driver 

74import manila.share.drivers.inspur.as13000.as13000_nas 

75import manila.share.drivers.inspur.instorage.instorage 

76import manila.share.drivers.lvm 

77import manila.share.drivers.macrosan.macrosan_nas 

78import manila.share.drivers.maprfs.maprfs_native 

79import manila.share.drivers.netapp.options 

80import manila.share.drivers.nexenta.options 

81import manila.share.drivers.purestorage.flashblade 

82import manila.share.drivers.qnap.qnap 

83import manila.share.drivers.quobyte.quobyte 

84import manila.share.drivers.service_instance 

85import manila.share.drivers.tegile.tegile 

86import manila.share.drivers.vastdata.driver 

87import manila.share.drivers.windows.service_instance 

88import manila.share.drivers.windows.winrm_helper 

89import manila.share.drivers.zfsonlinux.driver 

90import manila.share.drivers.zfssa.zfssashare 

91import manila.share.drivers_private_data 

92import manila.share.hook 

93import manila.share.manager 

94import manila.volume 

95import manila.volume.cinder 

96import manila.wsgi.eventlet_server 

97 

98# List of *all* options in [DEFAULT] namespace of manila. 

99# Any new option list or option needs to be registered here. 

100_global_opt_lists = [ 

101 # Keep list alphabetically sorted 

102 manila.api.common.api_common_opts, 

103 [manila.api.middleware.auth.use_forwarded_for_opt], 

104 manila.common.config.core_opts, 

105 manila.common.config.debug_opts, 

106 manila.common.config.global_opts, 

107 manila.compute._compute_opts, 

108 manila.coordination.coordination_opts, 

109 manila.data.drivers.nfs.nfsbackup_service_opts, 

110 manila.data.helper.data_helper_opts, 

111 manila.data.manager.backup_opts, 

112 manila.data.manager.data_opts, 

113 manila.db.api.db_opts, 

114 [manila.db.base.db_driver_opt], 

115 manila.exception.exc_log_opts, 

116 manila.image._glance_opts, 

117 manila.message.api.messages_opts, 

118 manila.network.linux.interface.OPTS, 

119 manila.network.network_opts, 

120 manila.network.network_base_opts, 

121 manila.network.neutron.neutron_network_plugin. 

122 neutron_network_plugin_opts, 

123 manila.network.neutron.neutron_network_plugin. 

124 neutron_single_network_plugin_opts, 

125 manila.network.neutron.neutron_network_plugin. 

126 neutron_bind_network_plugin_opts, 

127 manila.network.neutron.neutron_network_plugin. 

128 neutron_binding_profile, 

129 manila.network.neutron.neutron_network_plugin. 

130 neutron_binding_profile_opts, 

131 manila.network.standalone_network_plugin.standalone_network_plugin_opts, 

132 manila.scheduler.drivers.base.scheduler_driver_opts, 

133 manila.scheduler.host_manager.host_manager_opts, 

134 [manila.scheduler.manager.scheduler_driver_opt], 

135 [manila.scheduler.scheduler_options.scheduler_json_config_location_opt], 

136 manila.scheduler.drivers.simple.simple_scheduler_opts, 

137 manila.scheduler.weighers.capacity.capacity_weight_opts, 

138 manila.scheduler.weighers.pool.pool_weight_opts, 

139 manila.service.service_opts, 

140 manila.share.api.share_api_opts, 

141 manila.share.driver.ganesha_opts, 

142 manila.share.driver.share_opts, 

143 manila.share.driver.ssh_opts, 

144 manila.share.drivers_private_data.private_data_opts, 

145 manila.share.drivers.cephfs.driver.cephfs_opts, 

146 manila.share.drivers.container.driver.container_opts, 

147 manila.share.drivers.container.storage_helper.lv_opts, 

148 manila.share.drivers.dell_emc.driver.EMC_NAS_OPTS, 

149 manila.share.drivers.dell_emc.plugins.powermax.connection.POWERMAX_OPTS, 

150 manila.share.drivers.generic.share_opts, 

151 manila.share.drivers.glusterfs.common.glusterfs_common_opts, 

152 manila.share.drivers.glusterfs.GlusterfsManilaShare_opts, 

153 manila.share.drivers.glusterfs.layout.glusterfs_share_layout_opts, 

154 manila.share.drivers.glusterfs.layout_directory. 

155 glusterfs_directory_mapped_opts, 

156 manila.share.drivers.glusterfs.layout_volume.glusterfs_volume_mapped_opts, 

157 manila.share.drivers.hdfs.hdfs_native.hdfs_native_share_opts, 

158 manila.share.drivers.hitachi.hnas.driver.hitachi_hnas_opts, 

159 manila.share.drivers.hitachi.hsp.driver.hitachi_hsp_opts, 

160 manila.share.drivers.hpe.hpe_3par_driver.HPE3PAR_OPTS, 

161 manila.share.drivers.huawei.huawei_nas.huawei_opts, 

162 manila.share.drivers.ibm.gpfs.gpfs_share_opts, 

163 manila.share.drivers.infinidat.infinibox.infinidat_auth_opts, 

164 manila.share.drivers.infinidat.infinibox.infinidat_connection_opts, 

165 manila.share.drivers.infinidat.infinibox.infinidat_general_opts, 

166 manila.share.drivers.infortrend.driver.infortrend_nas_opts, 

167 manila.share.drivers.inspur.as13000.as13000_nas.inspur_as13000_opts, 

168 manila.share.drivers.inspur.instorage.instorage.instorage_opts, 

169 manila.share.drivers.macrosan.macrosan_nas.macrosan_opts, 

170 manila.share.drivers.maprfs.maprfs_native.maprfs_native_share_opts, 

171 manila.share.drivers.lvm.share_opts, 

172 manila.share.drivers.netapp.options.netapp_proxy_opts, 

173 manila.share.drivers.netapp.options.netapp_connection_opts, 

174 manila.share.drivers.netapp.options.netapp_transport_opts, 

175 manila.share.drivers.netapp.options.netapp_basicauth_opts, 

176 manila.share.drivers.netapp.options.netapp_certificateauth_opts, 

177 manila.share.drivers.netapp.options.netapp_provisioning_opts, 

178 manila.share.drivers.netapp.options.netapp_data_motion_opts, 

179 manila.share.drivers.netapp.options.netapp_backup_opts, 

180 manila.share.drivers.nexenta.options.nexenta_connection_opts, 

181 manila.share.drivers.nexenta.options.nexenta_dataset_opts, 

182 manila.share.drivers.nexenta.options.nexenta_nfs_opts, 

183 manila.share.drivers.purestorage.flashblade.flashblade_auth_opts, 

184 manila.share.drivers.purestorage.flashblade.flashblade_extra_opts, 

185 manila.share.drivers.purestorage.flashblade.flashblade_connection_opts, 

186 manila.share.drivers.qnap.qnap.qnap_manila_opts, 

187 manila.share.drivers.quobyte.quobyte.quobyte_manila_share_opts, 

188 manila.share.drivers.service_instance.common_opts, 

189 manila.share.drivers.service_instance.no_share_servers_handling_mode_opts, 

190 manila.share.drivers.service_instance.share_servers_handling_mode_opts, 

191 manila.share.drivers.tegile.tegile.tegile_opts, 

192 manila.share.drivers.windows.service_instance.windows_share_server_opts, 

193 manila.share.drivers.windows.winrm_helper.winrm_opts, 

194 manila.share.drivers.zfsonlinux.driver.zfsonlinux_opts, 

195 manila.share.drivers.zfssa.zfssashare.ZFSSA_OPTS, 

196 manila.share.hook.hook_options, 

197 manila.share.manager.share_manager_opts, 

198 manila.volume._volume_opts, 

199 manila.wsgi.eventlet_server.socket_opts, 

200 manila.share.drivers.vastdata.driver.OPTS, 

201] 

202 

203_opts = [ 

204 (None, list(itertools.chain(*_global_opt_lists))), 

205 (manila.volume.cinder.CINDER_GROUP, 

206 list(itertools.chain(manila.volume.cinder.cinder_opts))), 

207 (manila.compute.nova.NOVA_GROUP, 

208 list(itertools.chain(manila.compute.nova.nova_opts))), 

209 (manila.network.neutron.api.NEUTRON_GROUP, 

210 list(itertools.chain(manila.network.neutron.api.neutron_opts))), 

211 (manila.image.glance.GLANCE_GROUP, 

212 list(itertools.chain(manila.image.glance.glance_opts))), 

213 (manila.quota.QUOTA_GROUP, 

214 list(itertools.chain(manila.quota.quota_opts))), 

215] 

216 

217_opts.extend(manila.network.neutron.api.list_opts()) 

218_opts.extend(manila.compute.nova.list_opts()) 

219_opts.extend(manila.image.glance.list_opts()) 

220_opts.extend(manila.keymgr.barbican.list_opts()) 

221_opts.extend(manila.volume.cinder.list_opts()) 

222 

223 

224def list_opts(): 

225 """Return a list of oslo.config options available in Manila.""" 

226 return [(m, copy.deepcopy(o)) for m, o in _opts]