Replaced cinder with manila

This commit is contained in:
Yulia Portnova 2013-09-04 15:44:38 +03:00
parent 5748e0dd29
commit 4e2f27c11a
42 changed files with 329 additions and 329 deletions

View File

@ -30,7 +30,7 @@ sys.path.insert(0, os.path.abspath('./'))
extensions = ['sphinx.ext.autodoc', extensions = ['sphinx.ext.autodoc',
'sphinx.ext.intersphinx', 'sphinx.ext.intersphinx',
'ext.cinder_todo', 'ext.manila_todo',
'sphinx.ext.coverage', 'sphinx.ext.coverage',
'sphinx.ext.pngmath', 'sphinx.ext.pngmath',
'sphinx.ext.ifconfig', 'sphinx.ext.ifconfig',
@ -40,7 +40,7 @@ extensions = ['sphinx.ext.autodoc',
# when doing heavy text edit cycles. Execute "export SPHINX_DEBUG=1" # when doing heavy text edit cycles. Execute "export SPHINX_DEBUG=1"
# in your terminal to disable # in your terminal to disable
if not os.getenv('SPHINX_DEBUG'): if not os.getenv('SPHINX_DEBUG'):
extensions += ['ext.cinder_autodoc'] extensions += ['ext.manila_autodoc']
todo_include_todos = True todo_include_todos = True
@ -202,7 +202,7 @@ html_last_updated_fmt = os.popen(git_cmd).read()
#html_file_suffix = '' #html_file_suffix = ''
# Output file base name for HTML help builder. # Output file base name for HTML help builder.
htmlhelp_basename = 'cinderdoc' htmlhelp_basename = 'maniladoc'
# -- Options for LaTeX output ------------------------------------------------- # -- Options for LaTeX output -------------------------------------------------
@ -217,7 +217,7 @@ htmlhelp_basename = 'cinderdoc'
# (source start file, target name, title, author, documentclass # (source start file, target name, title, author, documentclass
# [howto/manual]). # [howto/manual]).
latex_documents = [ latex_documents = [
('index', 'Cinder.tex', u'Cinder Documentation', ('index', 'Manila.tex', u'Manila Documentation',
u'Anso Labs, LLC', 'manual'), u'Anso Labs, LLC', 'manual'),
] ]

View File

@ -1,36 +0,0 @@
# cinder-rootwrap command filters for share nodes
# This file should be owned by (and only-writeable by) the root user
[Filters]
# cinder/share/drivers/lvm.py: 'mkfs.ext4', '/dev/mapper/%s'
mkfs.ext4: CommandFilter, /sbin/mkfs.ext4, root
# cinder/share/drivers/lvm.py: 'exportfs', ...
exportfs: CommandFilter, /usr/sbin/exportfs, root
# cinder/share/drivers/lvm.py: 'smbd', '-s', '%s', '-D'
smbd: CommandFilter, /usr/sbin/smbd, root
# cinder/share/drivers/lvm.py: 'umount', '-f', '%s'
umount: CommandFilter, /bin/umount, root
# cinder/share/drivers/lvm.py: 'mount', '/dev/mapper/%s', '%s'
mount: CommandFilter, /bin/mount, root
# cinder/share/drivers/lvm.py: 'chmod', '777', '%s'
chmod: CommandFilter, /bin/chmod, root
# cinder/share/drivers/lvm.py: 'chown', 'nobody', '-R', '%s'
chown: CommandFilter, /bin/chown, root
# cinder/share/drivers/lvm.py: 'pkill', '-HUP', 'smbd'
pkill: CommandFilter, /usr/bin/pkill, root
# cinder/share/drivers/lvm.py: 'smbcontrol', 'all', 'close-share', '%s'
smbcontrol: CommandFilter, /usr/bin/smbcontrol, root
# cinder/share/drivers/lvm.py: 'net', 'conf', 'addshare', '%s', '%s', 'writeable=y', 'guest_ok=y
# cinder/share/drivers/lvm.py: 'net', 'conf', 'delshare', '%s'
# cinder/share/drivers/lvm.py: 'net', 'conf', 'setparm', '%s', '%s', '%s'
# cinder/share/drivers/lvm.py: 'net', 'conf', 'getparm', '%s', 'hosts allow'
net: CommandFilter, /usr/bin/net, root

View File

@ -3,50 +3,50 @@
############# #############
[composite:osapi_volume] [composite:osapi_volume]
use = call:cinder.api:root_app_factory use = call:manila.api:root_app_factory
/: apiversions /: apiversions
/v1: openstack_volume_api_v1 /v1: openstack_volume_api_v1
/v2: openstack_volume_api_v2 /v2: openstack_volume_api_v2
[composite:openstack_volume_api_v1] [composite:openstack_volume_api_v1]
use = call:cinder.api.middleware.auth:pipeline_factory use = call:manila.api.middleware.auth:pipeline_factory
noauth = faultwrap sizelimit noauth apiv1 noauth = faultwrap sizelimit noauth apiv1
keystone = faultwrap sizelimit authtoken keystonecontext apiv1 keystone = faultwrap sizelimit authtoken keystonecontext apiv1
keystone_nolimit = faultwrap sizelimit authtoken keystonecontext apiv1 keystone_nolimit = faultwrap sizelimit authtoken keystonecontext apiv1
[composite:openstack_volume_api_v2] [composite:openstack_volume_api_v2]
use = call:cinder.api.middleware.auth:pipeline_factory use = call:manila.api.middleware.auth:pipeline_factory
noauth = faultwrap sizelimit noauth apiv2 noauth = faultwrap sizelimit noauth apiv2
keystone = faultwrap sizelimit authtoken keystonecontext apiv2 keystone = faultwrap sizelimit authtoken keystonecontext apiv2
keystone_nolimit = faultwrap sizelimit authtoken keystonecontext apiv2 keystone_nolimit = faultwrap sizelimit authtoken keystonecontext apiv2
[filter:faultwrap] [filter:faultwrap]
paste.filter_factory = cinder.api.middleware.fault:FaultWrapper.factory paste.filter_factory = manila.api.middleware.fault:FaultWrapper.factory
[filter:noauth] [filter:noauth]
paste.filter_factory = cinder.api.middleware.auth:NoAuthMiddleware.factory paste.filter_factory = manila.api.middleware.auth:NoAuthMiddleware.factory
[filter:sizelimit] [filter:sizelimit]
paste.filter_factory = cinder.api.middleware.sizelimit:RequestBodySizeLimiter.factory paste.filter_factory = manila.api.middleware.sizelimit:RequestBodySizeLimiter.factory
[app:apiv1] [app:apiv1]
paste.app_factory = cinder.api.v1.router:APIRouter.factory paste.app_factory = manila.api.v1.router:APIRouter.factory
[app:apiv2] [app:apiv2]
paste.app_factory = cinder.api.v2.router:APIRouter.factory paste.app_factory = manila.api.v2.router:APIRouter.factory
[pipeline:apiversions] [pipeline:apiversions]
pipeline = faultwrap osvolumeversionapp pipeline = faultwrap osvolumeversionapp
[app:osvolumeversionapp] [app:osvolumeversionapp]
paste.app_factory = cinder.api.versions:Versions.factory paste.app_factory = manila.api.versions:Versions.factory
########## ##########
# Shared # # Shared #
########## ##########
[filter:keystonecontext] [filter:keystonecontext]
paste.filter_factory = cinder.api.middleware.auth:CinderKeystoneContext.factory paste.filter_factory = manila.api.middleware.auth:ManilaKeystoneContext.factory
[filter:authtoken] [filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
@ -59,4 +59,4 @@ auth_protocol = http
admin_tenant_name = %SERVICE_TENANT_NAME% admin_tenant_name = %SERVICE_TENANT_NAME%
admin_user = %SERVICE_USER% admin_user = %SERVICE_USER%
admin_password = %SERVICE_PASSWORD% admin_password = %SERVICE_PASSWORD%
signing_dir = /var/lib/cinder signing_dir = /var/lib/manila

View File

@ -1,20 +1,20 @@
[loggers] [loggers]
keys = root, cinder keys = root, manila
[handlers] [handlers]
keys = stderr, stdout, watchedfile, syslog, null keys = stderr, stdout, watchedfile, syslog, null
[formatters] [formatters]
keys = legacycinder, default keys = legacymanila, default
[logger_root] [logger_root]
level = WARNING level = WARNING
handlers = null handlers = null
[logger_cinder] [logger_manila]
level = INFO level = INFO
handlers = stderr handlers = stderr
qualname = cinder qualname = manila
[logger_amqplib] [logger_amqplib]
level = WARNING level = WARNING
@ -47,30 +47,30 @@ qualname = eventlet.wsgi.server
[handler_stderr] [handler_stderr]
class = StreamHandler class = StreamHandler
args = (sys.stderr,) args = (sys.stderr,)
formatter = legacycinder formatter = legacymanila
[handler_stdout] [handler_stdout]
class = StreamHandler class = StreamHandler
args = (sys.stdout,) args = (sys.stdout,)
formatter = legacycinder formatter = legacymanila
[handler_watchedfile] [handler_watchedfile]
class = handlers.WatchedFileHandler class = handlers.WatchedFileHandler
args = ('cinder.log',) args = ('manila.log',)
formatter = legacycinder formatter = legacymanila
[handler_syslog] [handler_syslog]
class = handlers.SysLogHandler class = handlers.SysLogHandler
args = ('/dev/log', handlers.SysLogHandler.LOG_USER) args = ('/dev/log', handlers.SysLogHandler.LOG_USER)
formatter = legacycinder formatter = legacymanila
[handler_null] [handler_null]
class = cinder.common.openstack.NullHandler class = manila.common.openstack.NullHandler
formatter = default formatter = default
args = () args = ()
[formatter_legacycinder] [formatter_legacymanila]
class = cinder.openstack.common.log.LegacyFormatter class = manila.openstack.common.log.LegacyFormatter
[formatter_default] [formatter_default]
format = %(message)s format = %(message)s

View File

@ -1,11 +1,11 @@
#################### ####################
# cinder.conf sample # # manila.conf sample #
#################### ####################
[DEFAULT] [DEFAULT]
# #
# Options defined in cinder.exception # Options defined in manila.exception
# #
# make exception message format errors fatal (boolean value) # make exception message format errors fatal (boolean value)
@ -13,7 +13,7 @@
# #
# Options defined in cinder.flags # Options defined in manila.flags
# #
# Virtualization api connection type : libvirt, xenapi, or # Virtualization api connection type : libvirt, xenapi, or
@ -28,18 +28,18 @@
# 100=Everything (integer value) # 100=Everything (integer value)
#sql_connection_debug=0 #sql_connection_debug=0
# File name for the paste.deploy config for cinder-api (string # File name for the paste.deploy config for manila-api (string
# value) # value)
#api_paste_config=api-paste.ini #api_paste_config=api-paste.ini
# Directory where the cinder python module is installed # Directory where the manila python module is installed
# (string value) # (string value)
#pybasedir=/usr/lib/python/site-packages #pybasedir=/usr/lib/python/site-packages
# Directory where cinder binaries are installed (string value) # Directory where manila binaries are installed (string value)
#bindir=$pybasedir/bin #bindir=$pybasedir/bin
# Top-level directory for maintaining cinder's state (string # Top-level directory for maintaining manila's state (string
# value) # value)
#state_path=$pybasedir #state_path=$pybasedir
@ -52,7 +52,7 @@
# default glance port (integer value) # default glance port (integer value)
#glance_port=9292 #glance_port=9292
# A list of the glance api servers available to cinder # A list of the glance api servers available to manila
# ([hostname|ip]:port) (list value) # ([hostname|ip]:port) (list value)
#glance_api_servers=$glance_host:$glance_port #glance_api_servers=$glance_host:$glance_port
@ -68,18 +68,18 @@
#glance_api_insecure=false #glance_api_insecure=false
# the topic scheduler nodes listen on (string value) # the topic scheduler nodes listen on (string value)
#scheduler_topic=cinder-scheduler #scheduler_topic=manila-scheduler
# the topic volume nodes listen on (string value) # the topic volume nodes listen on (string value)
#volume_topic=cinder-volume #volume_topic=manila-volume
# the topic volume backup nodes listen on (string value) # the topic volume backup nodes listen on (string value)
#backup_topic=cinder-backup #backup_topic=manila-backup
# Deploy v1 of the Cinder API. (boolean value) # Deploy v1 of the Manila API. (boolean value)
#enable_v1_api=true #enable_v1_api=true
# Deploy v2 of the Cinder API. (boolean value) # Deploy v2 of the Manila API. (boolean value)
#enable_v2_api=true #enable_v2_api=true
# whether to rate limit the api (boolean value) # whether to rate limit the api (boolean value)
@ -87,11 +87,11 @@
# Specify list of extensions to load when using # Specify list of extensions to load when using
# osapi_volume_extension option with # osapi_volume_extension option with
# cinder.api.contrib.select_extensions (list value) # manila.api.contrib.select_extensions (list value)
#osapi_volume_ext_list= #osapi_volume_ext_list=
# osapi volume extension to load (multi valued) # osapi volume extension to load (multi valued)
#osapi_volume_extension=cinder.api.contrib.standard_extensions #osapi_volume_extension=manila.api.contrib.standard_extensions
# Base URL that will be presented to users in links to the # Base URL that will be presented to users in links to the
# OpenStack Volume API (string value) # OpenStack Volume API (string value)
@ -102,7 +102,7 @@
#osapi_max_limit=1000 #osapi_max_limit=1000
# the filename to use with sqlite (string value) # the filename to use with sqlite (string value)
#sqlite_db=cinder.sqlite #sqlite_db=manila.sqlite
# If passed, use synchronous mode for sqlite (boolean value) # If passed, use synchronous mode for sqlite (boolean value)
#sqlite_synchronous=true #sqlite_synchronous=true
@ -120,19 +120,19 @@
#sql_retry_interval=10 #sql_retry_interval=10
# full class name for the Manager for volume (string value) # full class name for the Manager for volume (string value)
#volume_manager=cinder.volume.manager.VolumeManager #volume_manager=manila.volume.manager.VolumeManager
# full class name for the Manager for volume backup (string # full class name for the Manager for volume backup (string
# value) # value)
#backup_manager=cinder.backup.manager.BackupManager #backup_manager=manila.backup.manager.BackupManager
# full class name for the Manager for scheduler (string value) # full class name for the Manager for scheduler (string value)
#scheduler_manager=cinder.scheduler.manager.SchedulerManager #scheduler_manager=manila.scheduler.manager.SchedulerManager
# Name of this node. This can be an opaque identifier. It is # Name of this node. This can be an opaque identifier. It is
# not necessarily a hostname, FQDN, or IP address. (string # not necessarily a hostname, FQDN, or IP address. (string
# value) # value)
#host=cinder #host=manila
# availability zone of this node (string value) # availability zone of this node (string value)
#storage_availability_zone=nova #storage_availability_zone=nova
@ -167,11 +167,11 @@
# The full class name of the volume API class to use (string # The full class name of the volume API class to use (string
# value) # value)
#volume_api_class=cinder.volume.api.API #volume_api_class=manila.volume.api.API
# The full class name of the volume backup API class (string # The full class name of the volume backup API class (string
# value) # value)
#backup_api_class=cinder.backup.api.API #backup_api_class=manila.backup.api.API
# The strategy to use for auth. Supports noauth, keystone, and # The strategy to use for auth. Supports noauth, keystone, and
# deprecated. (string value) # deprecated. (string value)
@ -188,7 +188,7 @@
# #
# Options defined in cinder.policy # Options defined in manila.policy
# #
# JSON file representing policy (string value) # JSON file representing policy (string value)
@ -199,7 +199,7 @@
# #
# Options defined in cinder.quota # Options defined in manila.quota
# #
# number of volumes allowed per project (integer value) # number of volumes allowed per project (integer value)
@ -226,11 +226,11 @@
#max_age=0 #max_age=0
# default driver to use for quota checks (string value) # default driver to use for quota checks (string value)
#quota_driver=cinder.quota.DbQuotaDriver #quota_driver=manila.quota.DbQuotaDriver
# #
# Options defined in cinder.service # Options defined in manila.service
# #
# seconds between nodes reporting state to datastore (integer # seconds between nodes reporting state to datastore (integer
@ -253,7 +253,7 @@
# #
# Options defined in cinder.test # Options defined in manila.test
# #
# File name of clean sqlite db (string value) # File name of clean sqlite db (string value)
@ -264,7 +264,7 @@
# #
# Options defined in cinder.wsgi # Options defined in manila.wsgi
# #
# Number of backlog requests to configure the socket with # Number of backlog requests to configure the socket with
@ -289,7 +289,7 @@
# #
# Options defined in cinder.api.middleware.auth # Options defined in manila.api.middleware.auth
# #
# Treat X-Forwarded-For as the canonical remote address. Only # Treat X-Forwarded-For as the canonical remote address. Only
@ -298,7 +298,7 @@
# #
# Options defined in cinder.api.middleware.sizelimit # Options defined in manila.api.middleware.sizelimit
# #
# Max size for body of a request (integer value) # Max size for body of a request (integer value)
@ -306,15 +306,15 @@
# #
# Options defined in cinder.backup.manager # Options defined in manila.backup.manager
# #
# Service to use for backups. (string value) # Service to use for backups. (string value)
#backup_service=cinder.backup.services.swift #backup_service=manila.backup.services.swift
# #
# Options defined in cinder.backup.services.swift # Options defined in manila.backup.services.swift
# #
# The URL of the Swift endpoint (string value) # The URL of the Swift endpoint (string value)
@ -339,7 +339,7 @@
# #
# Options defined in cinder.db.api # Options defined in manila.db.api
# #
# The backend to use for db (string value) # The backend to use for db (string value)
@ -363,15 +363,15 @@
# #
# Options defined in cinder.db.base # Options defined in manila.db.base
# #
# driver to use for database access (string value) # driver to use for database access (string value)
#db_driver=cinder.db #db_driver=manila.db
# #
# Options defined in cinder.image.image_utils # Options defined in manila.image.image_utils
# #
# parent dir for tempdir used for image conversion (string # parent dir for tempdir used for image conversion (string
@ -380,7 +380,7 @@
# #
# Options defined in cinder.openstack.common.lockutils # Options defined in manila.openstack.common.lockutils
# #
# Whether to disable inter-process locks (boolean value) # Whether to disable inter-process locks (boolean value)
@ -392,7 +392,7 @@
# #
# Options defined in cinder.openstack.common.log # Options defined in manila.openstack.common.log
# #
# Print debugging output (set logging level to DEBUG instead # Print debugging output (set logging level to DEBUG instead
@ -475,7 +475,7 @@
# #
# Options defined in cinder.openstack.common.notifier.api # Options defined in manila.openstack.common.notifier.api
# #
# Driver or drivers to handle sending notifications (multi # Driver or drivers to handle sending notifications (multi
@ -491,7 +491,7 @@
# #
# Options defined in cinder.openstack.common.notifier.rpc_notifier # Options defined in manila.openstack.common.notifier.rpc_notifier
# #
# AMQP topic used for openstack notifications (list value) # AMQP topic used for openstack notifications (list value)
@ -499,7 +499,7 @@
# #
# Options defined in cinder.openstack.common.notifier.rpc_notifier2 # Options defined in manila.openstack.common.notifier.rpc_notifier2
# #
# AMQP topic(s) used for openstack notifications (list value) # AMQP topic(s) used for openstack notifications (list value)
@ -507,12 +507,12 @@
# #
# Options defined in cinder.openstack.common.rpc # Options defined in manila.openstack.common.rpc
# #
# The messaging module to use, defaults to kombu. (string # The messaging module to use, defaults to kombu. (string
# value) # value)
#rpc_backend=cinder.openstack.common.rpc.impl_kombu #rpc_backend=manila.openstack.common.rpc.impl_kombu
# Size of RPC thread pool (integer value) # Size of RPC thread pool (integer value)
#rpc_thread_pool_size=64 #rpc_thread_pool_size=64
@ -530,7 +530,7 @@
# Modules of exceptions that are permitted to be recreatedupon # Modules of exceptions that are permitted to be recreatedupon
# receiving exception data from an rpc call. (list value) # receiving exception data from an rpc call. (list value)
#allowed_rpc_exception_modules=cinder.openstack.common.exception,nova.exception,cinder.exception,exceptions #allowed_rpc_exception_modules=manila.openstack.common.exception,nova.exception,manila.exception,exceptions
# If passed, use a fake RabbitMQ provider (boolean value) # If passed, use a fake RabbitMQ provider (boolean value)
#fake_rabbit=false #fake_rabbit=false
@ -541,7 +541,7 @@
# #
# Options defined in cinder.openstack.common.rpc.amqp # Options defined in manila.openstack.common.rpc.amqp
# #
# Enable a fast single reply queue if using AMQP based RPC # Enable a fast single reply queue if using AMQP based RPC
@ -550,7 +550,7 @@
# #
# Options defined in cinder.openstack.common.rpc.impl_kombu # Options defined in manila.openstack.common.rpc.impl_kombu
# #
# SSL version to use (valid only if SSL enabled) (string # SSL version to use (valid only if SSL enabled) (string
@ -613,7 +613,7 @@
# #
# Options defined in cinder.openstack.common.rpc.impl_qpid # Options defined in manila.openstack.common.rpc.impl_qpid
# #
# Qpid broker hostname (string value) # Qpid broker hostname (string value)
@ -647,7 +647,7 @@
# #
# Options defined in cinder.openstack.common.rpc.impl_zmq # Options defined in manila.openstack.common.rpc.impl_zmq
# #
# ZeroMQ bind address. Should be a wildcard (*), an ethernet # ZeroMQ bind address. Should be a wildcard (*), an ethernet
@ -656,7 +656,7 @@
#rpc_zmq_bind_address=* #rpc_zmq_bind_address=*
# MatchMaker driver (string value) # MatchMaker driver (string value)
#rpc_zmq_matchmaker=cinder.openstack.common.rpc.matchmaker.MatchMakerLocalhost #rpc_zmq_matchmaker=manila.openstack.common.rpc.matchmaker.MatchMakerLocalhost
# ZeroMQ receiver listening port (integer value) # ZeroMQ receiver listening port (integer value)
#rpc_zmq_port=9501 #rpc_zmq_port=9501
@ -674,11 +674,11 @@
# Name of this node. Must be a valid hostname, FQDN, or IP # Name of this node. Must be a valid hostname, FQDN, or IP
# address. Must match "host" option, if running Nova. (string # address. Must match "host" option, if running Nova. (string
# value) # value)
#rpc_zmq_host=cinder #rpc_zmq_host=manila
# #
# Options defined in cinder.openstack.common.rpc.matchmaker # Options defined in manila.openstack.common.rpc.matchmaker
# #
# Matchmaker ring file (JSON) (string value) # Matchmaker ring file (JSON) (string value)
@ -692,7 +692,7 @@
# #
# Options defined in cinder.openstack.common.rpc.matchmaker_redis # Options defined in manila.openstack.common.rpc.matchmaker_redis
# #
# Host to locate redis (string value) # Host to locate redis (string value)
@ -706,11 +706,11 @@
# #
# Options defined in cinder.scheduler.driver # Options defined in manila.scheduler.driver
# #
# The scheduler host manager class to use (string value) # The scheduler host manager class to use (string value)
#scheduler_host_manager=cinder.scheduler.host_manager.HostManager #scheduler_host_manager=manila.scheduler.host_manager.HostManager
# Maximum number of attempts to schedule an volume (integer # Maximum number of attempts to schedule an volume (integer
# value) # value)
@ -718,7 +718,7 @@
# #
# Options defined in cinder.scheduler.host_manager # Options defined in manila.scheduler.host_manager
# #
# Which filter class names to use for filtering hosts when not # Which filter class names to use for filtering hosts when not
@ -731,15 +731,15 @@
# #
# Options defined in cinder.scheduler.manager # Options defined in manila.scheduler.manager
# #
# Default scheduler driver to use (string value) # Default scheduler driver to use (string value)
#scheduler_driver=cinder.scheduler.filter_scheduler.FilterScheduler #scheduler_driver=manila.scheduler.filter_scheduler.FilterScheduler
# #
# Options defined in cinder.scheduler.scheduler_options # Options defined in manila.scheduler.scheduler_options
# #
# Absolute path to scheduler configuration JSON file. (string # Absolute path to scheduler configuration JSON file. (string
@ -748,7 +748,7 @@
# #
# Options defined in cinder.scheduler.simple # Options defined in manila.scheduler.simple
# #
# maximum number of volume gigabytes to allow per host # maximum number of volume gigabytes to allow per host
@ -757,7 +757,7 @@
# #
# Options defined in cinder.scheduler.weights.capacity # Options defined in manila.scheduler.weights.capacity
# #
# Multiplier used for weighing volume capacity. Negative # Multiplier used for weighing volume capacity. Negative
@ -766,7 +766,7 @@
# #
# Options defined in cinder.volume.api # Options defined in manila.volume.api
# #
# Create volume from snapshot at the host where snapshot # Create volume from snapshot at the host where snapshot
@ -775,7 +775,7 @@
# #
# Options defined in cinder.volume.driver # Options defined in manila.volume.driver
# #
# number of times to attempt to run flakey shell commands # number of times to attempt to run flakey shell commands
@ -810,7 +810,7 @@
# #
# Options defined in cinder.volume.drivers.coraid # Options defined in manila.volume.drivers.coraid
# #
# IP address of Coraid ESM (string value) # IP address of Coraid ESM (string value)
@ -832,12 +832,12 @@
# #
# Options defined in cinder.volume.drivers.glusterfs # Options defined in manila.volume.drivers.glusterfs
# #
# File with the list of available gluster shares (string # File with the list of available gluster shares (string
# value) # value)
#glusterfs_shares_config=/etc/cinder/glusterfs_shares #glusterfs_shares_config=/etc/manila/glusterfs_shares
# Base dir where gluster expected to be mounted (string value) # Base dir where gluster expected to be mounted (string value)
#glusterfs_mount_point_base=$state_path/mnt #glusterfs_mount_point_base=$state_path/mnt
@ -852,20 +852,20 @@
# #
# Options defined in cinder.volume.drivers.huawei.huawei_iscsi # Options defined in manila.volume.drivers.huawei.huawei_iscsi
# #
# config data for cinder huawei plugin (string value) # config data for manila huawei plugin (string value)
#cinder_huawei_conf_file=/etc/cinder/cinder_huawei_conf.xml #manila_huawei_conf_file=/etc/manila/manila_huawei_conf.xml
# #
# Options defined in cinder.volume.drivers.lvm # Options defined in manila.volume.drivers.lvm
# #
# Name for the VG that will contain exported volumes (string # Name for the VG that will contain exported volumes (string
# value) # value)
#volume_group=cinder-volumes #volume_group=manila-volumes
# Method used to wipe old volumes (valid options are: none, # Method used to wipe old volumes (valid options are: none,
# zero, shred) (string value) # zero, shred) (string value)
@ -879,7 +879,7 @@
# value) # value)
#volume_dd_blocksize=1M #volume_dd_blocksize=1M
# Size of thin provisioning pool (None uses entire cinder VG) # Size of thin provisioning pool (None uses entire manila VG)
# (string value) # (string value)
#pool_size=<None> #pool_size=<None>
@ -890,7 +890,7 @@
# #
# Options defined in cinder.volume.drivers.netapp.iscsi # Options defined in manila.volume.drivers.netapp.iscsi
# #
# URL of the WSDL file for the DFM/Webservice server (string # URL of the WSDL file for the DFM/Webservice server (string
@ -936,7 +936,7 @@
# #
# Options defined in cinder.volume.drivers.netapp.nfs # Options defined in manila.volume.drivers.netapp.nfs
# #
# Does snapshot creation call returns immediately (integer # Does snapshot creation call returns immediately (integer
@ -986,7 +986,7 @@
# #
# Options defined in cinder.volume.drivers.nexenta.volume # Options defined in manila.volume.drivers.nexenta.volume
# #
# IP address of Nexenta SA (string value) # IP address of Nexenta SA (string value)
@ -1010,13 +1010,13 @@
#nexenta_iscsi_target_portal_port=3260 #nexenta_iscsi_target_portal_port=3260
# pool on SA that will hold all volumes (string value) # pool on SA that will hold all volumes (string value)
#nexenta_volume=cinder #nexenta_volume=manila
# IQN prefix for iSCSI targets (string value) # IQN prefix for iSCSI targets (string value)
#nexenta_target_prefix=iqn.1986-03.com.sun:02:cinder- #nexenta_target_prefix=iqn.1986-03.com.sun:02:manila-
# prefix for iSCSI target groups on SA (string value) # prefix for iSCSI target groups on SA (string value)
#nexenta_target_group_prefix=cinder/ #nexenta_target_group_prefix=manila/
# block size for volumes (blank=default,8KB) (string value) # block size for volumes (blank=default,8KB) (string value)
#nexenta_blocksize= #nexenta_blocksize=
@ -1026,11 +1026,11 @@
# #
# Options defined in cinder.volume.drivers.nfs # Options defined in manila.volume.drivers.nfs
# #
# File with the list of available nfs shares (string value) # File with the list of available nfs shares (string value)
#nfs_shares_config=/etc/cinder/nfs_shares #nfs_shares_config=/etc/manila/nfs_shares
# Base dir where nfs expected to be mounted (string value) # Base dir where nfs expected to be mounted (string value)
#nfs_mount_point_base=$state_path/mnt #nfs_mount_point_base=$state_path/mnt
@ -1049,7 +1049,7 @@
# #
# Options defined in cinder.volume.drivers.rbd # Options defined in manila.volume.drivers.rbd
# #
# the RADOS pool in which rbd volumes are stored (string # the RADOS pool in which rbd volumes are stored (string
@ -1070,7 +1070,7 @@
# #
# Options defined in cinder.volume.drivers.san.hp.hp_3par_common # Options defined in manila.volume.drivers.san.hp.hp_3par_common
# #
# 3PAR WSAPI Server Url like https://<3par ip>:8080/api/v1 # 3PAR WSAPI Server Url like https://<3par ip>:8080/api/v1
@ -1106,7 +1106,7 @@
# #
# Options defined in cinder.volume.drivers.san.san # Options defined in manila.volume.drivers.san.san
# #
# Use thin provisioning for SAN volumes? (boolean value) # Use thin provisioning for SAN volumes? (boolean value)
@ -1146,7 +1146,7 @@
# #
# Options defined in cinder.volume.drivers.san.solaris # Options defined in manila.volume.drivers.san.solaris
# #
# The ZFS path under which to create zvols for volumes. # The ZFS path under which to create zvols for volumes.
@ -1155,7 +1155,7 @@
# #
# Options defined in cinder.volume.drivers.scality # Options defined in manila.volume.drivers.scality
# #
# Path or URL to Scality SOFS configuration file (string # Path or URL to Scality SOFS configuration file (string
@ -1166,11 +1166,11 @@
#scality_sofs_mount_point=$state_path/scality #scality_sofs_mount_point=$state_path/scality
# Path from Scality SOFS root to volume dir (string value) # Path from Scality SOFS root to volume dir (string value)
#scality_sofs_volume_dir=cinder/volumes #scality_sofs_volume_dir=manila/volumes
# #
# Options defined in cinder.volume.drivers.solidfire # Options defined in manila.volume.drivers.solidfire
# #
# Set 512 byte emulation on volume creation; (boolean value) # Set 512 byte emulation on volume creation; (boolean value)
@ -1181,7 +1181,7 @@
# #
# Options defined in cinder.volume.drivers.storwize_svc # Options defined in manila.volume.drivers.storwize_svc
# #
# Storage system storage pool for volumes (string value) # Storage system storage pool for volumes (string value)
@ -1223,7 +1223,7 @@
# #
# Options defined in cinder.volume.drivers.windows # Options defined in manila.volume.drivers.windows
# #
# Path to store VHD backed volumes (string value) # Path to store VHD backed volumes (string value)
@ -1231,7 +1231,7 @@
# #
# Options defined in cinder.volume.drivers.xenapi.sm # Options defined in manila.volume.drivers.xenapi.sm
# #
# NFS server to be used by XenAPINFSDriver (string value) # NFS server to be used by XenAPINFSDriver (string value)
@ -1254,7 +1254,7 @@
# #
# Options defined in cinder.volume.drivers.xiv # Options defined in manila.volume.drivers.xiv
# #
# Proxy driver (string value) # Proxy driver (string value)
@ -1262,7 +1262,7 @@
# #
# Options defined in cinder.volume.drivers.zadara # Options defined in manila.volume.drivers.zadara
# #
# Management IP of Zadara VPSA (string value) # Management IP of Zadara VPSA (string value)
@ -1308,7 +1308,7 @@
# #
# Options defined in cinder.volume.iscsi # Options defined in manila.volume.iscsi
# #
# iscsi target user-land tool to use (string value) # iscsi target user-land tool to use (string value)
@ -1331,11 +1331,11 @@
# iscsi_iotype=fileio # iscsi_iotype=fileio
# #
# Options defined in cinder.volume.manager # Options defined in manila.volume.manager
# #
# Driver to use for volume creation (string value) # Driver to use for volume creation (string value)
#volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver #volume_driver=manila.volume.drivers.lvm.LVMISCSIDriver
# Total option count: 299 # Total option count: 299

View File

@ -1,10 +1,10 @@
# Configuration for cinder-rootwrap # Configuration for manila-rootwrap
# This file should be owned by (and only-writeable by) the root user # This file should be owned by (and only-writeable by) the root user
[DEFAULT] [DEFAULT]
# List of directories to load filter definitions from (separated by ','). # List of directories to load filter definitions from (separated by ',').
# These directories MUST all be only writeable by root ! # These directories MUST all be only writeable by root !
filters_path=/etc/cinder/rootwrap.d,/usr/share/cinder/rootwrap filters_path=/etc/manila/rootwrap.d,/usr/share/manila/rootwrap
# List of directories to search executables in, in case filters do not # List of directories to search executables in, in case filters do not
# explicitely specify a full path (separated by ',') # explicitely specify a full path (separated by ',')

View File

@ -0,0 +1,36 @@
# manila-rootwrap command filters for share nodes
# This file should be owned by (and only-writeable by) the root user
[Filters]
# manila/share/drivers/lvm.py: 'mkfs.ext4', '/dev/mapper/%s'
mkfs.ext4: CommandFilter, /sbin/mkfs.ext4, root
# manila/share/drivers/lvm.py: 'exportfs', ...
exportfs: CommandFilter, /usr/sbin/exportfs, root
# manila/share/drivers/lvm.py: 'smbd', '-s', '%s', '-D'
smbd: CommandFilter, /usr/sbin/smbd, root
# manila/share/drivers/lvm.py: 'umount', '-f', '%s'
umount: CommandFilter, /bin/umount, root
# manila/share/drivers/lvm.py: 'mount', '/dev/mapper/%s', '%s'
mount: CommandFilter, /bin/mount, root
# manila/share/drivers/lvm.py: 'chmod', '777', '%s'
chmod: CommandFilter, /bin/chmod, root
# manila/share/drivers/lvm.py: 'chown', 'nobody', '-R', '%s'
chown: CommandFilter, /bin/chown, root
# manila/share/drivers/lvm.py: 'pkill', '-HUP', 'smbd'
pkill: CommandFilter, /usr/bin/pkill, root
# manila/share/drivers/lvm.py: 'smbcontrol', 'all', 'close-share', '%s'
smbcontrol: CommandFilter, /usr/bin/smbcontrol, root
# manila/share/drivers/lvm.py: 'net', 'conf', 'addshare', '%s', '%s', 'writeable=y', 'guest_ok=y
# manila/share/drivers/lvm.py: 'net', 'conf', 'delshare', '%s'
# manila/share/drivers/lvm.py: 'net', 'conf', 'setparm', '%s', '%s', '%s'
# manila/share/drivers/lvm.py: 'net', 'conf', 'getparm', '%s', 'hosts allow'
net: CommandFilter, /usr/bin/net, root

View File

@ -1,50 +1,50 @@
# cinder-rootwrap command filters for volume nodes # manila-rootwrap command filters for volume nodes
# This file should be owned by (and only-writeable by) the root user # This file should be owned by (and only-writeable by) the root user
[Filters] [Filters]
# cinder/volume/iscsi.py: iscsi_helper '--op' ... # manila/volume/iscsi.py: iscsi_helper '--op' ...
ietadm: CommandFilter, ietadm, root ietadm: CommandFilter, ietadm, root
tgtadm: CommandFilter, tgtadm, root tgtadm: CommandFilter, tgtadm, root
tgt-admin: CommandFilter, tgt-admin, root tgt-admin: CommandFilter, tgt-admin, root
rtstool: CommandFilter, rtstool, root rtstool: CommandFilter, rtstool, root
# cinder/volume/driver.py: 'vgs', '--noheadings', '-o', 'name' # manila/volume/driver.py: 'vgs', '--noheadings', '-o', 'name'
vgs: CommandFilter, vgs, root vgs: CommandFilter, vgs, root
# cinder/volume/driver.py: 'lvcreate', '-L', sizestr, '-n', volume_name,.. # manila/volume/driver.py: 'lvcreate', '-L', sizestr, '-n', volume_name,..
# cinder/volume/driver.py: 'lvcreate', '-L', ... # manila/volume/driver.py: 'lvcreate', '-L', ...
lvcreate: CommandFilter, lvcreate, root lvcreate: CommandFilter, lvcreate, root
# cinder/volume/driver.py: 'dd', 'if=%s' % srcstr, 'of=%s' % deststr,... # manila/volume/driver.py: 'dd', 'if=%s' % srcstr, 'of=%s' % deststr,...
dd: CommandFilter, dd, root dd: CommandFilter, dd, root
# cinder/volume/driver.py: 'lvremove', '-f', %s/%s % ... # manila/volume/driver.py: 'lvremove', '-f', %s/%s % ...
lvremove: CommandFilter, lvremove, root lvremove: CommandFilter, lvremove, root
# cinder/volume/driver.py: 'lvdisplay', '--noheading', '-C', '-o', 'Attr',.. # manila/volume/driver.py: 'lvdisplay', '--noheading', '-C', '-o', 'Attr',..
lvdisplay: CommandFilter, lvdisplay, root lvdisplay: CommandFilter, lvdisplay, root
# cinder/volume/driver.py: 'iscsiadm', '-m', 'discovery', '-t',... # manila/volume/driver.py: 'iscsiadm', '-m', 'discovery', '-t',...
# cinder/volume/driver.py: 'iscsiadm', '-m', 'node', '-T', ... # manila/volume/driver.py: 'iscsiadm', '-m', 'node', '-T', ...
iscsiadm: CommandFilter, iscsiadm, root iscsiadm: CommandFilter, iscsiadm, root
# cinder/volume/drivers/lvm.py: 'shred', '-n3' # manila/volume/drivers/lvm.py: 'shred', '-n3'
# cinder/volume/drivers/lvm.py: 'shred', '-n0', '-z', '-s%dMiB' # manila/volume/drivers/lvm.py: 'shred', '-n0', '-z', '-s%dMiB'
shred: CommandFilter, shred, root shred: CommandFilter, shred, root
#cinder/volume/.py: utils.temporary_chown(path, 0), ... #manila/volume/.py: utils.temporary_chown(path, 0), ...
chown: CommandFilter, chown, root chown: CommandFilter, chown, root
# cinder/volume/driver.py # manila/volume/driver.py
dmsetup: CommandFilter, dmsetup, root dmsetup: CommandFilter, dmsetup, root
ln: CommandFilter, ln, root ln: CommandFilter, ln, root
qemu-img: CommandFilter, qemu-img, root qemu-img: CommandFilter, qemu-img, root
env: CommandFilter, env, root env: CommandFilter, env, root
# cinder/volume/driver.py: utils.read_file_as_root() # manila/volume/driver.py: utils.read_file_as_root()
cat: CommandFilter, cat, root cat: CommandFilter, cat, root
# cinder/volume/nfs.py # manila/volume/nfs.py
stat: CommandFilter, stat, root stat: CommandFilter, stat, root
mount: CommandFilter, mount, root mount: CommandFilter, mount, root
df: CommandFilter, df, root df: CommandFilter, df, root
@ -54,6 +54,6 @@ chmod: CommandFilter, chmod, root
rm: CommandFilter, rm, root rm: CommandFilter, rm, root
lvs: CommandFilter, lvs, root lvs: CommandFilter, lvs, root
# cinder/volume/scality.py # manila/volume/scality.py
mount: CommandFilter, mount, root mount: CommandFilter, mount, root
dd: CommandFilter, dd, root dd: CommandFilter, dd, root

View File

@ -21,13 +21,13 @@ from manila.openstack.common import log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
class CinderKeystoneContext(auth.CinderKeystoneContext): class ManilaKeystoneContext(auth.ManilaKeystoneContext):
def __init__(self, application): def __init__(self, application):
LOG.warn(_('manila.api.auth:CinderKeystoneContext is deprecated. ' LOG.warn(_('manila.api.auth:ManilaKeystoneContext is deprecated. '
'Please use ' 'Please use '
'manila.api.middleware.auth:CinderKeystoneContext ' 'manila.api.middleware.auth:ManilaKeystoneContext '
'instead.')) 'instead.'))
super(CinderKeystoneContext, self).__init__(application) super(ManilaKeystoneContext, self).__init__(application)
def pipeline_factory(loader, global_conf, **local_conf): def pipeline_factory(loader, global_conf, **local_conf):

View File

@ -38,7 +38,7 @@ def validate_schema(xml, schema_name):
base_path = 'manila/api/schemas/v1.1/' base_path = 'manila/api/schemas/v1.1/'
if schema_name in ('atom', 'atom-link'): if schema_name in ('atom', 'atom-link'):
base_path = 'manila/api/schemas/' base_path = 'manila/api/schemas/'
schema_path = os.path.join(utils.cinderdir(), schema_path = os.path.join(utils.maniladir(),
'%s%s.rng' % (base_path, schema_name)) '%s%s.rng' % (base_path, schema_name))
schema_doc = etree.parse(schema_path) schema_doc = etree.parse(schema_path)
relaxng = etree.RelaxNG(schema_doc) relaxng = etree.RelaxNG(schema_doc)

View File

@ -53,7 +53,7 @@ iscsi_helper_opt = [cfg.StrOpt('iscsi_helper',
default='fileio', default='fileio',
help=('Sets the behavior of the iSCSI target ' help=('Sets the behavior of the iSCSI target '
'to either perform blockio or fileio ' 'to either perform blockio or fileio '
'optionally, auto can be set and Cinder ' 'optionally, auto can be set and Manila '
'will autodetect type of backing device') 'will autodetect type of backing device')
) )
] ]

View File

@ -134,7 +134,7 @@ class RequestContext(object):
return context return context
# NOTE(sirp): the openstack/common version of RequestContext uses # NOTE(sirp): the openstack/common version of RequestContext uses
# tenant/user whereas the Cinder version uses project_id/user_id. We need # tenant/user whereas the Manila version uses project_id/user_id. We need
# this shim in order to use context-aware code from openstack/common, like # this shim in order to use context-aware code from openstack/common, like
# logging, until we make the switch to using openstack/common's version of # logging, until we make the switch to using openstack/common's version of
# RequestContext. # RequestContext.

View File

@ -16,9 +16,9 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
"""Cinder base exception handling. """Manila base exception handling.
Includes decorator for re-raising Cinder-type exceptions. Includes decorator for re-raising Manila-type exceptions.
SHOULD include dedicated exception logging. SHOULD include dedicated exception logging.
@ -93,8 +93,8 @@ def wrap_db_error(f):
return _wrap return _wrap
class CinderException(Exception): class ManilaException(Exception):
"""Base Cinder Exception """Base Manila Exception
To correctly use this class, inherit from it and define To correctly use this class, inherit from it and define
a 'message' property. That message will get printf'd a 'message' property. That message will get printf'd
@ -131,14 +131,14 @@ class CinderException(Exception):
# at least get the core message out if something happened # at least get the core message out if something happened
message = self.message message = self.message
super(CinderException, self).__init__(message) super(ManilaException, self).__init__(message)
class GlanceConnectionFailed(CinderException): class GlanceConnectionFailed(ManilaException):
message = _("Connection to glance failed") + ": %(reason)s" message = _("Connection to glance failed") + ": %(reason)s"
class NotAuthorized(CinderException): class NotAuthorized(ManilaException):
message = _("Not authorized.") message = _("Not authorized.")
code = 403 code = 403
@ -151,11 +151,11 @@ class PolicyNotAuthorized(NotAuthorized):
message = _("Policy doesn't allow %(action)s to be performed.") message = _("Policy doesn't allow %(action)s to be performed.")
class ImageNotAuthorized(CinderException): class ImageNotAuthorized(ManilaException):
message = _("Not authorized for image %(image_id)s.") message = _("Not authorized for image %(image_id)s.")
class Invalid(CinderException): class Invalid(ManilaException):
message = _("Unacceptable parameters.") message = _("Unacceptable parameters.")
code = 400 code = 400
@ -168,7 +168,7 @@ class VolumeAttached(Invalid):
message = _("Volume %(volume_id)s is still attached, detach volume first.") message = _("Volume %(volume_id)s is still attached, detach volume first.")
class SfJsonEncodeFailure(CinderException): class SfJsonEncodeFailure(ManilaException):
message = _("Failed to load data into json format") message = _("Failed to load data into json format")
@ -219,7 +219,7 @@ class InvalidUUID(Invalid):
message = _("Expected a uuid but received %(uuid).") message = _("Expected a uuid but received %(uuid).")
class NotFound(CinderException): class NotFound(ManilaException):
message = _("Resource could not be found.") message = _("Resource could not be found.")
code = 404 code = 404
safe = True safe = True
@ -286,11 +286,11 @@ class SnapshotNotFound(NotFound):
message = _("Snapshot %(snapshot_id)s could not be found.") message = _("Snapshot %(snapshot_id)s could not be found.")
class VolumeIsBusy(CinderException): class VolumeIsBusy(ManilaException):
message = _("deleting volume %(volume_name)s that has snapshot") message = _("deleting volume %(volume_name)s that has snapshot")
class SnapshotIsBusy(CinderException): class SnapshotIsBusy(ManilaException):
message = _("deleting snapshot %(snapshot_name)s that has " message = _("deleting snapshot %(snapshot_name)s that has "
"dependent volumes") "dependent volumes")
@ -299,15 +299,15 @@ class ISCSITargetNotFoundForVolume(NotFound):
message = _("No target id found for volume %(volume_id)s.") message = _("No target id found for volume %(volume_id)s.")
class ISCSITargetCreateFailed(CinderException): class ISCSITargetCreateFailed(ManilaException):
message = _("Failed to create iscsi target for volume %(volume_id)s.") message = _("Failed to create iscsi target for volume %(volume_id)s.")
class ISCSITargetAttachFailed(CinderException): class ISCSITargetAttachFailed(ManilaException):
message = _("Failed to attach iSCSI target for volume %(volume_id)s.") message = _("Failed to attach iSCSI target for volume %(volume_id)s.")
class ISCSITargetRemoveFailed(CinderException): class ISCSITargetRemoveFailed(ManilaException):
message = _("Failed to remove iscsi target for volume %(volume_id)s.") message = _("Failed to remove iscsi target for volume %(volume_id)s.")
@ -376,7 +376,7 @@ class ReservationNotFound(QuotaNotFound):
message = _("Quota reservation %(uuid)s could not be found.") message = _("Quota reservation %(uuid)s could not be found.")
class OverQuota(CinderException): class OverQuota(ManilaException):
message = _("Quota exceeded for resources: %(overs)s") message = _("Quota exceeded for resources: %(overs)s")
@ -397,12 +397,12 @@ class ClassNotFound(NotFound):
message = _("Class %(class_name)s could not be found: %(exception)s") message = _("Class %(class_name)s could not be found: %(exception)s")
class NotAllowed(CinderException): class NotAllowed(ManilaException):
message = _("Action not allowed.") message = _("Action not allowed.")
#TODO(bcwaldon): EOL this exception! #TODO(bcwaldon): EOL this exception!
class Duplicate(CinderException): class Duplicate(ManilaException):
pass pass
@ -414,11 +414,11 @@ class VolumeTypeExists(Duplicate):
message = _("Volume Type %(id)s already exists.") message = _("Volume Type %(id)s already exists.")
class MigrationError(CinderException): class MigrationError(ManilaException):
message = _("Migration error") + ": %(reason)s" message = _("Migration error") + ": %(reason)s"
class MalformedRequestBody(CinderException): class MalformedRequestBody(ManilaException):
message = _("Malformed message body: %(reason)s") message = _("Malformed message body: %(reason)s")
@ -430,15 +430,15 @@ class PasteAppNotFound(NotFound):
message = _("Could not load paste app '%(name)s' from %(path)s") message = _("Could not load paste app '%(name)s' from %(path)s")
class NoValidHost(CinderException): class NoValidHost(ManilaException):
message = _("No valid host was found. %(reason)s") message = _("No valid host was found. %(reason)s")
class WillNotSchedule(CinderException): class WillNotSchedule(ManilaException):
message = _("Host %(host)s is not up or doesn't exist.") message = _("Host %(host)s is not up or doesn't exist.")
class QuotaError(CinderException): class QuotaError(ManilaException):
message = _("Quota exceeded") + ": code=%(code)s" message = _("Quota exceeded") + ": code=%(code)s"
code = 413 code = 413
headers = {'Retry-After': 0} headers = {'Retry-After': 0}
@ -466,20 +466,20 @@ class DuplicateSfVolumeNames(Duplicate):
message = _("Detected more than one volume with name %(vol_name)s") message = _("Detected more than one volume with name %(vol_name)s")
class Duplicate3PARHost(CinderException): class Duplicate3PARHost(ManilaException):
message = _("3PAR Host already exists: %(err)s. %(info)s") message = _("3PAR Host already exists: %(err)s. %(info)s")
class Invalid3PARDomain(CinderException): class Invalid3PARDomain(ManilaException):
message = _("Invalid 3PAR Domain: %(err)s") message = _("Invalid 3PAR Domain: %(err)s")
class VolumeTypeCreateFailed(CinderException): class VolumeTypeCreateFailed(ManilaException):
message = _("Cannot create volume_type with " message = _("Cannot create volume_type with "
"name %(name)s and specs %(extra_specs)s") "name %(name)s and specs %(extra_specs)s")
class SolidFireAPIException(CinderException): class SolidFireAPIException(ManilaException):
message = _("Bad response from SolidFire API") message = _("Bad response from SolidFire API")
@ -495,15 +495,15 @@ class MalformedResponse(Invalid):
message = _("Malformed response to command %(cmd)s: %(reason)s") message = _("Malformed response to command %(cmd)s: %(reason)s")
class BadHTTPResponseStatus(CinderException): class BadHTTPResponseStatus(ManilaException):
message = _("Bad HTTP response status %(status)s") message = _("Bad HTTP response status %(status)s")
class FailedCmdWithDump(CinderException): class FailedCmdWithDump(ManilaException):
message = _("Operation failed with status=%(status)s. Full dump: %(data)s") message = _("Operation failed with status=%(status)s. Full dump: %(data)s")
class ZadaraServerCreateFailure(CinderException): class ZadaraServerCreateFailure(ManilaException):
message = _("Unable to create server object for initiator %(name)s") message = _("Unable to create server object for initiator %(name)s")
@ -511,7 +511,7 @@ class ZadaraServerNotFound(NotFound):
message = _("Unable to find server object for initiator %(name)s") message = _("Unable to find server object for initiator %(name)s")
class ZadaraVPSANoActiveController(CinderException): class ZadaraVPSANoActiveController(ManilaException):
message = _("Unable to find any active VPSA controller") message = _("Unable to find any active VPSA controller")
@ -527,12 +527,12 @@ class InstanceNotFound(NotFound):
message = _("Instance %(instance_id)s could not be found.") message = _("Instance %(instance_id)s could not be found.")
class VolumeBackendAPIException(CinderException): class VolumeBackendAPIException(ManilaException):
message = _("Bad or unexpected response from the storage volume " message = _("Bad or unexpected response from the storage volume "
"backend API: %(data)s") "backend API: %(data)s")
class NfsException(CinderException): class NfsException(ManilaException):
message = _("Unknown NFS exception") message = _("Unknown NFS exception")
@ -544,7 +544,7 @@ class NfsNoSuitableShareFound(NotFound):
message = _("There is no share which can host %(volume_size)sG") message = _("There is no share which can host %(volume_size)sG")
class GlusterfsException(CinderException): class GlusterfsException(ManilaException):
message = _("Unknown Gluster exception") message = _("Unknown Gluster exception")
@ -565,7 +565,7 @@ class ImageCopyFailure(Invalid):
message = _("Failed to copy image to volume") message = _("Failed to copy image to volume")
class InvalidShare(CinderException): class InvalidShare(ManilaException):
message = _("Invalid share: %(reason)s") message = _("Invalid share: %(reason)s")
@ -577,15 +577,15 @@ class ShareAccessExists(Duplicate):
message = _("Share access %(access_type)s:%(access)s exists") message = _("Share access %(access_type)s:%(access)s exists")
class InvalidShareAccess(CinderException): class InvalidShareAccess(ManilaException):
message = _("Invalid access_rule: %(reason)s") message = _("Invalid access_rule: %(reason)s")
class ShareIsBusy(CinderException): class ShareIsBusy(ManilaException):
message = _("Deleting $(share_name) share that used") message = _("Deleting $(share_name) share that used")
class ShareBackendException(CinderException): class ShareBackendException(ManilaException):
message = _("Share backend error: %(msg)s") message = _("Share backend error: %(msg)s")
@ -593,14 +593,14 @@ class ShareSnapshotNotFound(NotFound):
message = _("Snapshot %(snapshot_id)s could not be found.") message = _("Snapshot %(snapshot_id)s could not be found.")
class ShareSnapshotIsBusy(CinderException): class ShareSnapshotIsBusy(ManilaException):
message = _("Deleting snapshot %(snapshot_name)s that has " message = _("Deleting snapshot %(snapshot_name)s that has "
"dependent shares.") "dependent shares.")
class InvalidShareSnapshot(CinderException): class InvalidShareSnapshot(ManilaException):
message = _("Invalid share snapshot: %(reason)s") message = _("Invalid share snapshot: %(reason)s")
class SwiftConnectionFailed(CinderException): class SwiftConnectionFailed(ManilaException):
message = _("Connection to swift failed") + ": %(reason)s" message = _("Connection to swift failed") + ": %(reason)s"

View File

@ -139,10 +139,10 @@ global_opts = [
help='the topic share nodes listen on'), help='the topic share nodes listen on'),
cfg.BoolOpt('enable_v1_api', cfg.BoolOpt('enable_v1_api',
default=True, default=True,
help=_("Deploy v1 of the Cinder API. ")), help=_("Deploy v1 of the Manila API. ")),
cfg.BoolOpt('enable_v2_api', cfg.BoolOpt('enable_v2_api',
default=True, default=True,
help=_("Deploy v2 of the Cinder API. ")), help=_("Deploy v2 of the Manila API. ")),
cfg.BoolOpt('api_rate_limit', cfg.BoolOpt('api_rate_limit',
default=True, default=True,
help='whether to rate limit the api'), help='whether to rate limit the api'),

View File

@ -53,7 +53,7 @@ class CapabilitiesFilter(filters.BaseHostFilter):
def host_passes(self, host_state, filter_properties): def host_passes(self, host_state, filter_properties):
"""Return a list of hosts that can create instance_type.""" """Return a list of hosts that can create instance_type."""
# Note(zhiteng) Currently only Cinder and Nova are using # Note(zhiteng) Currently only Manila and Nova are using
# this filter, so the resource type is either instance or # this filter, so the resource type is either instance or
# volume. # volume.
resource_type = filter_properties.get('resource_type') resource_type = filter_properties.get('resource_type')

View File

@ -15,7 +15,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
"""Policy Engine For Cinder""" """Policy Engine For Manila"""
from oslo.config import cfg from oslo.config import cfg

View File

@ -110,7 +110,7 @@ class FilterScheduler(driver.Scheduler):
elevated = context.elevated() elevated = context.elevated()
share_properties = request_spec['share_properties'] share_properties = request_spec['share_properties']
# Since Cinder is using mixed filters from Oslo and it's own, which # Since Manila is using mixed filters from Oslo and it's own, which
# takes 'resource_XX' and 'volume_XX' as input respectively, copying # takes 'resource_XX' and 'volume_XX' as input respectively, copying
# 'volume_XX' to 'resource_XX' will make both filters happy. # 'volume_XX' to 'resource_XX' will make both filters happy.
resource_properties = share_properties.copy() resource_properties = share_properties.copy()

View File

@ -13,10 +13,10 @@
# under the License. # under the License.
""" """
:mod:`manila.share.driver` -- Cinder Share Drivers :mod:`manila.share.driver` -- Manila Share Drivers
===================================================== =====================================================
.. automodule:: manila.share.driver .. automodule:: manila.share.driver
:platform: Unix :platform: Unix
:synopsis: Module containing all the Cinder Share drivers. :synopsis: Module containing all the Manila Share drivers.
""" """

View File

@ -17,7 +17,7 @@
# under the License. # under the License.
""" """
:mod:`manila.tests` -- Cinder Unittests :mod:`manila.tests` -- Manila Unittests
===================================================== =====================================================
.. automodule:: manila.tests .. automodule:: manila.tests

View File

@ -71,7 +71,7 @@ class FakeRequest(object):
GET = {} GET = {}
class FakeRequestWithcinderZone(object): class FakeRequestWithmanilaZone(object):
environ = {'manila.context': context.get_admin_context()} environ = {'manila.context': context.get_admin_context()}
GET = {'zone': 'manila'} GET = {'zone': 'manila'}
@ -96,13 +96,13 @@ class HostTestCase(test.TestCase):
hosts = os_hosts._list_hosts(self.req) hosts = os_hosts._list_hosts(self.req)
self.assertEqual(hosts, LIST_RESPONSE) self.assertEqual(hosts, LIST_RESPONSE)
cinder_hosts = os_hosts._list_hosts(self.req, 'manila-volume') manila_hosts = os_hosts._list_hosts(self.req, 'manila-volume')
expected = [host for host in LIST_RESPONSE expected = [host for host in LIST_RESPONSE
if host['service'] == 'manila-volume'] if host['service'] == 'manila-volume']
self.assertEqual(cinder_hosts, expected) self.assertEqual(manila_hosts, expected)
def test_list_hosts_with_zone(self): def test_list_hosts_with_zone(self):
req = FakeRequestWithcinderZone() req = FakeRequestWithmanilaZone()
hosts = os_hosts._list_hosts(req) hosts = os_hosts._list_hosts(req)
self.assertEqual(hosts, LIST_RESPONSE) self.assertEqual(hosts, LIST_RESPONSE)

View File

@ -18,10 +18,10 @@ import manila.api.middleware.auth
from manila import test from manila import test
class TestCinderKeystoneContextMiddleware(test.TestCase): class TestManilaKeystoneContextMiddleware(test.TestCase):
def setUp(self): def setUp(self):
super(TestCinderKeystoneContextMiddleware, self).setUp() super(TestManilaKeystoneContextMiddleware, self).setUp()
@webob.dec.wsgify() @webob.dec.wsgify()
def fake_app(req): def fake_app(req):
@ -30,7 +30,7 @@ class TestCinderKeystoneContextMiddleware(test.TestCase):
self.context = None self.context = None
self.middleware = (manila.api.middleware.auth self.middleware = (manila.api.middleware.auth
.CinderKeystoneContext(fake_app)) .ManilaKeystoneContext(fake_app))
self.request = webob.Request.blank('/') self.request = webob.Request.blank('/')
self.request.headers['X_TENANT_ID'] = 'testtenantid' self.request.headers['X_TENANT_ID'] = 'testtenantid'
self.request.headers['X_AUTH_TOKEN'] = 'testauthtoken' self.request.headers['X_AUTH_TOKEN'] = 'testauthtoken'

View File

@ -46,8 +46,8 @@ class CapacityWeigherTestCase(test.TestCase):
self.mox.ResetAll() self.mox.ResetAll()
return host_states return host_states
@test.skip_if(not test_utils.is_cinder_installed(), @test.skip_if(not test_utils.is_manila_installed(),
'Test requires Cinder installed') 'Test requires Manila installed')
def test_default_of_spreading_first(self): def test_default_of_spreading_first(self):
hostinfo_list = self._get_all_hosts() hostinfo_list = self._get_all_hosts()
@ -61,8 +61,8 @@ class CapacityWeigherTestCase(test.TestCase):
self.assertEqual(weighed_host.weight, 921.0) self.assertEqual(weighed_host.weight, 921.0)
self.assertEqual(weighed_host.obj.host, 'host1') self.assertEqual(weighed_host.obj.host, 'host1')
@test.skip_if(not test_utils.is_cinder_installed(), @test.skip_if(not test_utils.is_manila_installed(),
'Test requires Cinder installed') 'Test requires Manila installed')
def test_capacity_weight_multiplier1(self): def test_capacity_weight_multiplier1(self):
self.flags(capacity_weight_multiplier=-1.0) self.flags(capacity_weight_multiplier=-1.0)
hostinfo_list = self._get_all_hosts() hostinfo_list = self._get_all_hosts()
@ -77,8 +77,8 @@ class CapacityWeigherTestCase(test.TestCase):
self.assertEqual(weighed_host.weight, -190.0) self.assertEqual(weighed_host.weight, -190.0)
self.assertEqual(weighed_host.obj.host, 'host4') self.assertEqual(weighed_host.obj.host, 'host4')
@test.skip_if(not test_utils.is_cinder_installed(), @test.skip_if(not test_utils.is_manila_installed(),
'Test requires Cinder installed') 'Test requires Manila installed')
def test_capacity_weight_multiplier2(self): def test_capacity_weight_multiplier2(self):
self.flags(capacity_weight_multiplier=2.0) self.flags(capacity_weight_multiplier=2.0)
hostinfo_list = self._get_all_hosts() hostinfo_list = self._get_all_hosts()

View File

@ -37,8 +37,8 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase):
driver_cls = filter_scheduler.FilterScheduler driver_cls = filter_scheduler.FilterScheduler
@test.skip_if(not test_utils.is_cinder_installed(), @test.skip_if(not test_utils.is_manila_installed(),
'Test requires Cinder installed (try setup.py develop') 'Test requires Manila installed (try setup.py develop')
def test_create_volume_no_hosts(self): def test_create_volume_no_hosts(self):
""" """
Ensure empty hosts & child_zones result in NoValidHosts exception. Ensure empty hosts & child_zones result in NoValidHosts exception.
@ -56,8 +56,8 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase):
self.assertRaises(exception.NoValidHost, sched.schedule_create_volume, self.assertRaises(exception.NoValidHost, sched.schedule_create_volume,
fake_context, request_spec, {}) fake_context, request_spec, {})
@test.skip_if(not test_utils.is_cinder_installed(), @test.skip_if(not test_utils.is_manila_installed(),
'Test requires Cinder installed (try setup.py develop') 'Test requires Manila installed (try setup.py develop')
def test_create_volume_non_admin(self): def test_create_volume_non_admin(self):
"""Test creating an instance locally using run_instance, passing """Test creating an instance locally using run_instance, passing
a non-admin context. DB actions should work.""" a non-admin context. DB actions should work."""
@ -82,8 +82,8 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase):
fake_context, request_spec, {}) fake_context, request_spec, {})
self.assertTrue(self.was_admin) self.assertTrue(self.was_admin)
@test.skip_if(not test_utils.is_cinder_installed(), @test.skip_if(not test_utils.is_manila_installed(),
'Test requires Cinder installed (try setup.py develop') 'Test requires Manila installed (try setup.py develop')
def test_schedule_happy_day(self): def test_schedule_happy_day(self):
"""Make sure there's nothing glaringly wrong with _schedule() """Make sure there's nothing glaringly wrong with _schedule()
by doing a happy day pass through.""" by doing a happy day pass through."""
@ -112,8 +112,8 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase):
weighed_host = sched._schedule(fake_context, request_spec, {}) weighed_host = sched._schedule(fake_context, request_spec, {})
self.assertTrue(weighed_host.obj is not None) self.assertTrue(weighed_host.obj is not None)
@test.skip_if(not test_utils.is_cinder_installed(), @test.skip_if(not test_utils.is_manila_installed(),
'Test requires Cinder installed (try setup.py develop') 'Test requires Manila installed (try setup.py develop')
def test_create_share_no_hosts(self): def test_create_share_no_hosts(self):
""" """
Ensure empty hosts & child_zones result in NoValidHosts exception. Ensure empty hosts & child_zones result in NoValidHosts exception.
@ -131,8 +131,8 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase):
self.assertRaises(exception.NoValidHost, sched.schedule_create_share, self.assertRaises(exception.NoValidHost, sched.schedule_create_share,
fake_context, request_spec, {}) fake_context, request_spec, {})
@test.skip_if(not test_utils.is_cinder_installed(), @test.skip_if(not test_utils.is_manila_installed(),
'Test requires Cinder installed (try setup.py develop') 'Test requires Manila installed (try setup.py develop')
def test_create_share_non_admin(self): def test_create_share_non_admin(self):
"""Test creating share passing a non-admin context. """Test creating share passing a non-admin context.
@ -160,8 +160,8 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase):
fake_context, request_spec, {}) fake_context, request_spec, {})
self.assertTrue(self.was_admin) self.assertTrue(self.was_admin)
@test.skip_if(not test_utils.is_cinder_installed(), @test.skip_if(not test_utils.is_manila_installed(),
'Test requires Cinder installed (try setup.py develop') 'Test requires Manila installed (try setup.py develop')
def test_schedule_happy_day_share(self): def test_schedule_happy_day_share(self):
"""Make sure there's nothing glaringly wrong with _schedule_share() """Make sure there's nothing glaringly wrong with _schedule_share()
by doing a happy day pass through.""" by doing a happy day pass through."""
@ -202,8 +202,8 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase):
self.assertRaises(exception.InvalidParameterValue, self.assertRaises(exception.InvalidParameterValue,
fakes.FakeFilterScheduler) fakes.FakeFilterScheduler)
@test.skip_if(not test_utils.is_cinder_installed(), @test.skip_if(not test_utils.is_manila_installed(),
'Test requires Cinder installed (try setup.py develop') 'Test requires Manila installed (try setup.py develop')
def test_retry_disabled(self): def test_retry_disabled(self):
# Retry info should not get populated when re-scheduling is off. # Retry info should not get populated when re-scheduling is off.
self.flags(scheduler_max_attempts=1) self.flags(scheduler_max_attempts=1)
@ -220,8 +220,8 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase):
# should not have retry info in the populated filter properties: # should not have retry info in the populated filter properties:
self.assertFalse("retry" in filter_properties) self.assertFalse("retry" in filter_properties)
@test.skip_if(not test_utils.is_cinder_installed(), @test.skip_if(not test_utils.is_manila_installed(),
'Test requires Cinder installed (try setup.py develop') 'Test requires Manila installed (try setup.py develop')
def test_retry_attempt_one(self): def test_retry_attempt_one(self):
# Test retry logic on initial scheduling attempt. # Test retry logic on initial scheduling attempt.
self.flags(scheduler_max_attempts=2) self.flags(scheduler_max_attempts=2)
@ -238,8 +238,8 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase):
num_attempts = filter_properties['retry']['num_attempts'] num_attempts = filter_properties['retry']['num_attempts']
self.assertEqual(1, num_attempts) self.assertEqual(1, num_attempts)
@test.skip_if(not test_utils.is_cinder_installed(), @test.skip_if(not test_utils.is_manila_installed(),
'Test requires Cinder installed (try setup.py develop') 'Test requires Manila installed (try setup.py develop')
def test_retry_attempt_two(self): def test_retry_attempt_two(self):
# Test retry logic when re-scheduling. # Test retry logic when re-scheduling.
self.flags(scheduler_max_attempts=2) self.flags(scheduler_max_attempts=2)

View File

@ -76,8 +76,8 @@ class HostFiltersTestCase(test.TestCase):
return ret_value return ret_value
self.stubs.Set(utils, 'service_is_up', fake_service_is_up) self.stubs.Set(utils, 'service_is_up', fake_service_is_up)
@test.skip_if(not test_utils.is_cinder_installed(), @test.skip_if(not test_utils.is_manila_installed(),
'Test requires Cinder installed') 'Test requires Manila installed')
def test_capacity_filter_passes(self): def test_capacity_filter_passes(self):
self._stub_service_is_up(True) self._stub_service_is_up(True)
filt_cls = self.class_map['CapacityFilter']() filt_cls = self.class_map['CapacityFilter']()
@ -89,8 +89,8 @@ class HostFiltersTestCase(test.TestCase):
'service': service}) 'service': service})
self.assertTrue(filt_cls.host_passes(host, filter_properties)) self.assertTrue(filt_cls.host_passes(host, filter_properties))
@test.skip_if(not test_utils.is_cinder_installed(), @test.skip_if(not test_utils.is_manila_installed(),
'Test requires Cinder installed') 'Test requires Manila installed')
def test_capacity_filter_fails(self): def test_capacity_filter_fails(self):
self._stub_service_is_up(True) self._stub_service_is_up(True)
filt_cls = self.class_map['CapacityFilter']() filt_cls = self.class_map['CapacityFilter']()
@ -103,8 +103,8 @@ class HostFiltersTestCase(test.TestCase):
'service': service}) 'service': service})
self.assertFalse(filt_cls.host_passes(host, filter_properties)) self.assertFalse(filt_cls.host_passes(host, filter_properties))
@test.skip_if(not test_utils.is_cinder_installed(), @test.skip_if(not test_utils.is_manila_installed(),
'Test requires Cinder installed') 'Test requires Manila installed')
def test_capacity_filter_passes_infinite(self): def test_capacity_filter_passes_infinite(self):
self._stub_service_is_up(True) self._stub_service_is_up(True)
filt_cls = self.class_map['CapacityFilter']() filt_cls = self.class_map['CapacityFilter']()
@ -116,8 +116,8 @@ class HostFiltersTestCase(test.TestCase):
'service': service}) 'service': service})
self.assertTrue(filt_cls.host_passes(host, filter_properties)) self.assertTrue(filt_cls.host_passes(host, filter_properties))
@test.skip_if(not test_utils.is_cinder_installed(), @test.skip_if(not test_utils.is_manila_installed(),
'Test requires Cinder installed') 'Test requires Manila installed')
def test_capacity_filter_passes_unknown(self): def test_capacity_filter_passes_unknown(self):
self._stub_service_is_up(True) self._stub_service_is_up(True)
filt_cls = self.class_map['CapacityFilter']() filt_cls = self.class_map['CapacityFilter']()
@ -129,8 +129,8 @@ class HostFiltersTestCase(test.TestCase):
'service': service}) 'service': service})
self.assertTrue(filt_cls.host_passes(host, filter_properties)) self.assertTrue(filt_cls.host_passes(host, filter_properties))
@test.skip_if(not test_utils.is_cinder_installed(), @test.skip_if(not test_utils.is_manila_installed(),
'Test requires Cinder installed') 'Test requires Manila installed')
def test_retry_filter_disabled(self): def test_retry_filter_disabled(self):
# Test case where retry/re-scheduling is disabled. # Test case where retry/re-scheduling is disabled.
filt_cls = self.class_map['RetryFilter']() filt_cls = self.class_map['RetryFilter']()
@ -138,8 +138,8 @@ class HostFiltersTestCase(test.TestCase):
filter_properties = {} filter_properties = {}
self.assertTrue(filt_cls.host_passes(host, filter_properties)) self.assertTrue(filt_cls.host_passes(host, filter_properties))
@test.skip_if(not test_utils.is_cinder_installed(), @test.skip_if(not test_utils.is_manila_installed(),
'Test requires Cinder installed') 'Test requires Manila installed')
def test_retry_filter_pass(self): def test_retry_filter_pass(self):
# Node not previously tried. # Node not previously tried.
filt_cls = self.class_map['RetryFilter']() filt_cls = self.class_map['RetryFilter']()
@ -148,8 +148,8 @@ class HostFiltersTestCase(test.TestCase):
filter_properties = dict(retry=retry) filter_properties = dict(retry=retry)
self.assertTrue(filt_cls.host_passes(host, filter_properties)) self.assertTrue(filt_cls.host_passes(host, filter_properties))
@test.skip_if(not test_utils.is_cinder_installed(), @test.skip_if(not test_utils.is_manila_installed(),
'Test requires Cinder installed') 'Test requires Manila installed')
def test_retry_filter_fail(self): def test_retry_filter_fail(self):
# Node was already tried. # Node was already tried.
filt_cls = self.class_map['RetryFilter']() filt_cls = self.class_map['RetryFilter']()

View File

@ -30,10 +30,10 @@ from manila.volume import configuration as conf
from manila.volume.drivers.emc.emc_smis_common import EMCSMISCommon from manila.volume.drivers.emc.emc_smis_common import EMCSMISCommon
from manila.volume.drivers.emc.emc_smis_iscsi import EMCSMISISCSIDriver from manila.volume.drivers.emc.emc_smis_iscsi import EMCSMISISCSIDriver
CINDER_EMC_CONFIG_FILE = '/etc/manila/cinder_emc_config.xml' MANILA_EMC_CONFIG_FILE = '/etc/manila/manila_emc_config.xml'
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
config_file_name = 'cinder_emc_config.xml' config_file_name = 'manila_emc_config.xml'
storage_system = 'CLARiiON+APM00123456789' storage_system = 'CLARiiON+APM00123456789'
storage_system_vmax = 'SYMMETRIX+000195900551' storage_system_vmax = 'SYMMETRIX+000195900551'
lunmaskctrl_id = 'CLARiiON+APM00123456789+00aa11bb22cc33dd44ff55gg66hh77ii88jj' lunmaskctrl_id = 'CLARiiON+APM00123456789+00aa11bb22cc33dd44ff55gg66hh77ii88jj'
@ -604,7 +604,7 @@ class EMCSMISISCSIDriverTestCase(test.TestCase):
self.create_fake_config_file() self.create_fake_config_file()
configuration = mox.MockObject(conf.Configuration) configuration = mox.MockObject(conf.Configuration)
configuration.cinder_emc_config_file = self.config_file_path configuration.manila_emc_config_file = self.config_file_path
configuration.append_config_values(mox.IgnoreArg()) configuration.append_config_values(mox.IgnoreArg())
self.stubs.Set(EMCSMISISCSIDriver, '_do_iscsi_discovery', self.stubs.Set(EMCSMISISCSIDriver, '_do_iscsi_discovery',

View File

@ -50,45 +50,45 @@ def bad_function_exception():
raise test.TestingException() raise test.TestingException()
class CinderExceptionTestCase(test.TestCase): class ManilaExceptionTestCase(test.TestCase):
def test_default_error_msg(self): def test_default_error_msg(self):
class FakeCinderException(exception.CinderException): class FakeManilaException(exception.ManilaException):
message = "default message" message = "default message"
exc = FakeCinderException() exc = FakeManilaException()
self.assertEquals(unicode(exc), 'default message') self.assertEquals(unicode(exc), 'default message')
def test_error_msg(self): def test_error_msg(self):
self.assertEquals(unicode(exception.CinderException('test')), self.assertEquals(unicode(exception.ManilaException('test')),
'test') 'test')
def test_default_error_msg_with_kwargs(self): def test_default_error_msg_with_kwargs(self):
class FakeCinderException(exception.CinderException): class FakeManilaException(exception.ManilaException):
message = "default message: %(code)s" message = "default message: %(code)s"
exc = FakeCinderException(code=500) exc = FakeManilaException(code=500)
self.assertEquals(unicode(exc), 'default message: 500') self.assertEquals(unicode(exc), 'default message: 500')
def test_error_msg_exception_with_kwargs(self): def test_error_msg_exception_with_kwargs(self):
# NOTE(dprince): disable format errors for this test # NOTE(dprince): disable format errors for this test
self.flags(fatal_exception_format_errors=False) self.flags(fatal_exception_format_errors=False)
class FakeCinderException(exception.CinderException): class FakeManilaException(exception.ManilaException):
message = "default message: %(mispelled_code)s" message = "default message: %(mispelled_code)s"
exc = FakeCinderException(code=500) exc = FakeManilaException(code=500)
self.assertEquals(unicode(exc), 'default message: %(mispelled_code)s') self.assertEquals(unicode(exc), 'default message: %(mispelled_code)s')
def test_default_error_code(self): def test_default_error_code(self):
class FakeCinderException(exception.CinderException): class FakeManilaException(exception.ManilaException):
code = 404 code = 404
exc = FakeCinderException() exc = FakeManilaException()
self.assertEquals(exc.kwargs['code'], 404) self.assertEquals(exc.kwargs['code'], 404)
def test_error_code_from_kwarg(self): def test_error_code_from_kwarg(self):
class FakeCinderException(exception.CinderException): class FakeManilaException(exception.ManilaException):
code = 500 code = 500
exc = FakeCinderException(code=404) exc = FakeManilaException(code=404)
self.assertEquals(exc.kwargs['code'], 404) self.assertEquals(exc.kwargs['code'], 404)

View File

@ -16,7 +16,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
""" """
Unit tests for OpenStack Cinder volume drivers Unit tests for OpenStack Manila volume drivers
""" """
import mox import mox
import shutil import shutil

View File

@ -168,10 +168,10 @@ class HuaweiVolumeTestCase(test.TestCase):
super(HuaweiVolumeTestCase, self).__init__(*args, **kwargs) super(HuaweiVolumeTestCase, self).__init__(*args, **kwargs)
self.tmp_dir = tempfile.mkdtemp() self.tmp_dir = tempfile.mkdtemp()
self.fake_conf_file = self.tmp_dir + '/cinder_huawei_conf.xml' self.fake_conf_file = self.tmp_dir + '/manila_huawei_conf.xml'
self._create_fake_conf_file() self._create_fake_conf_file()
configuration = mox.MockObject(conf.Configuration) configuration = mox.MockObject(conf.Configuration)
configuration.cinder_huawei_conf_file = self.fake_conf_file configuration.manila_huawei_conf_file = self.fake_conf_file
configuration.append_config_values(mox.IgnoreArg()) configuration.append_config_values(mox.IgnoreArg())
self.driver = FakeHuaweiStorage(configuration=configuration) self.driver = FakeHuaweiStorage(configuration=configuration)

View File

@ -106,9 +106,9 @@ class TestMigrations(test.TestCase):
DEFAULT_CONFIG_FILE = os.path.join(os.path.dirname(__file__), DEFAULT_CONFIG_FILE = os.path.join(os.path.dirname(__file__),
'test_migrations.conf') 'test_migrations.conf')
# Test machines can set the CINDER_TEST_MIGRATIONS_CONF variable # Test machines can set the MANILA_TEST_MIGRATIONS_CONF variable
# to override the location of the config file for migration testing # to override the location of the config file for migration testing
CONFIG_FILE_PATH = os.environ.get('CINDER_TEST_MIGRATIONS_CONF', CONFIG_FILE_PATH = os.environ.get('MANILA_TEST_MIGRATIONS_CONF',
DEFAULT_CONFIG_FILE) DEFAULT_CONFIG_FILE)
MIGRATE_FILE = manila.db.sqlalchemy.migrate_repo.__file__ MIGRATE_FILE = manila.db.sqlalchemy.migrate_repo.__file__
REPOSITORY = repository.Repository( REPOSITORY = repository.Repository(

View File

@ -99,7 +99,7 @@ class NetappNfsDriverTestCase(test.TestCase):
setattr(drv.configuration, flag, None) setattr(drv.configuration, flag, None)
# check exception raises when flags are not set # check exception raises when flags are not set
self.assertRaises(exception.CinderException, self.assertRaises(exception.ManilaException,
drv.check_for_setup_error) drv.check_for_setup_error)
# set required flags # set required flags
@ -154,7 +154,7 @@ class NetappNfsDriverTestCase(test.TestCase):
volume = FakeVolume(1) volume = FakeVolume(1)
snapshot = FakeSnapshot(2) snapshot = FakeSnapshot(2)
self.assertRaises(exception.CinderException, self.assertRaises(exception.ManilaException,
drv.create_volume_from_snapshot, drv.create_volume_from_snapshot,
volume, volume,
snapshot) snapshot)
@ -265,7 +265,7 @@ class NetappNfsDriverTestCase(test.TestCase):
clone_name = 'clone_name' clone_name = 'clone_name'
volume_id = volume_name + str(hash(volume_name)) volume_id = volume_name + str(hash(volume_name))
self.assertRaises(exception.CinderException, self.assertRaises(exception.ManilaException,
drv._clone_volume, drv._clone_volume,
volume_name, clone_name, volume_id) volume_name, clone_name, volume_id)
@ -278,7 +278,7 @@ class NetappNfsDriverTestCase(test.TestCase):
self._driver.create_cloned_volume(volume_clone_fail, self._driver.create_cloned_volume(volume_clone_fail,
volume_src) volume_src)
raise AssertionError() raise AssertionError()
except exception.CinderException: except exception.ManilaException:
pass pass
@ -310,7 +310,7 @@ class NetappCmodeNfsDriverTestCase(test.TestCase):
for flag in required_flags: for flag in required_flags:
setattr(drv.configuration, flag, None) setattr(drv.configuration, flag, None)
# check exception raises when flags are not set # check exception raises when flags are not set
self.assertRaises(exception.CinderException, self.assertRaises(exception.ManilaException,
drv.check_for_setup_error) drv.check_for_setup_error)
# set required flags # set required flags
@ -363,7 +363,7 @@ class NetappCmodeNfsDriverTestCase(test.TestCase):
volume = FakeVolume(1) volume = FakeVolume(1)
snapshot = FakeSnapshot(2) snapshot = FakeSnapshot(2)
self.assertRaises(exception.CinderException, self.assertRaises(exception.ManilaException,
drv.create_volume_from_snapshot, drv.create_volume_from_snapshot,
volume, volume,
snapshot) snapshot)
@ -469,7 +469,7 @@ class NetappCmodeNfsDriverTestCase(test.TestCase):
self._driver.create_cloned_volume(volume_clone_fail, self._driver.create_cloned_volume(volume_clone_fail,
volume_src) volume_src)
raise AssertionError() raise AssertionError()
except exception.CinderException: except exception.ManilaException:
pass pass
@ -493,7 +493,7 @@ class NetappDirectCmodeNfsDriverTestCase(NetappCmodeNfsDriverTestCase):
for flag in required_flags: for flag in required_flags:
setattr(drv.configuration, flag, None) setattr(drv.configuration, flag, None)
# check exception raises when flags are not set # check exception raises when flags are not set
self.assertRaises(exception.CinderException, self.assertRaises(exception.ManilaException,
drv.check_for_setup_error) drv.check_for_setup_error)
# set required flags # set required flags
@ -615,7 +615,7 @@ class NetappDirect7modeNfsDriverTestCase(NetappDirectCmodeNfsDriverTestCase):
for flag in required_flags: for flag in required_flags:
setattr(drv.configuration, flag, None) setattr(drv.configuration, flag, None)
# check exception raises when flags are not set # check exception raises when flags are not set
self.assertRaises(exception.CinderException, self.assertRaises(exception.ManilaException,
drv.check_for_setup_error) drv.check_for_setup_error)
# set required flags # set required flags

View File

@ -16,7 +16,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
""" """
Unit tests for OpenStack Cinder volume driver Unit tests for OpenStack Manila volume driver
""" """
import base64 import base64

View File

@ -15,7 +15,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
"""Test of Policy Engine For Cinder.""" """Test of Policy Engine For Manila."""
import os.path import os.path
import StringIO import StringIO

View File

@ -206,7 +206,7 @@ class ManagedRBDTestCase(DriverTestCase):
return True return True
def fake_clone_error(volume, image_location): def fake_clone_error(volume, image_location):
raise exception.CinderException() raise exception.ManilaException()
self.stubs.Set(self.volume.driver, '_is_cloneable', lambda x: True) self.stubs.Set(self.volume.driver, '_is_cloneable', lambda x: True)
if clone_works: if clone_works:
@ -231,7 +231,7 @@ class ManagedRBDTestCase(DriverTestCase):
volume_id, volume_id,
image_id=image_id) image_id=image_id)
else: else:
self.assertRaises(exception.CinderException, self.assertRaises(exception.ManilaException,
self.volume.create_volume, self.volume.create_volume,
self.context, self.context,
volume_id, volume_id,

View File

@ -1811,7 +1811,7 @@ class StorwizeSVCDriverTestCase(test.TestCase):
self.driver.terminate_connection(volume, conn) self.driver.terminate_connection(volume, conn)
self._set_flag('storwize_svc_multihostmap_enabled', False) self._set_flag('storwize_svc_multihostmap_enabled', False)
self.assertRaises(exception.CinderException, self.assertRaises(exception.ManilaException,
self.driver.initialize_connection, volume, conn) self.driver.initialize_connection, volume, conn)
self.driver.terminate_connection(volume, conn) self.driver.terminate_connection(volume, conn)
self._reset_flags() self._reset_flags()

View File

@ -16,7 +16,7 @@
# under the License. # under the License.
""" """
Unit tests for Windows Server 2012 OpenStack Cinder volume driver Unit tests for Windows Server 2012 OpenStack Manila volume driver
""" """
import sys import sys

View File

@ -195,7 +195,7 @@ class ExceptionTest(test.TestCase):
return fault.FaultWrapper(inner_app) return fault.FaultWrapper(inner_app)
def _do_test_exception_safety_reflected_in_faults(self, expose): def _do_test_exception_safety_reflected_in_faults(self, expose):
class ExceptionWithSafety(exception.CinderException): class ExceptionWithSafety(exception.ManilaException):
safe = expose safe = expose
@webob.dec.wsgify @webob.dec.wsgify
@ -235,14 +235,14 @@ class ExceptionTest(test.TestCase):
def test_quota_error_mapping(self): def test_quota_error_mapping(self):
self._do_test_exception_mapping(exception.QuotaError, 'too many used') self._do_test_exception_mapping(exception.QuotaError, 'too many used')
def test_non_cinder_notfound_exception_mapping(self): def test_non_manila_notfound_exception_mapping(self):
class ExceptionWithCode(Exception): class ExceptionWithCode(Exception):
code = 404 code = 404
self._do_test_exception_mapping(ExceptionWithCode, self._do_test_exception_mapping(ExceptionWithCode,
'NotFound') 'NotFound')
def test_non_cinder_exception_mapping(self): def test_non_manila_exception_mapping(self):
class ExceptionWithCode(Exception): class ExceptionWithCode(Exception):
code = 417 code = 417

View File

@ -25,7 +25,7 @@ def get_test_admin_context():
return manila.context.get_admin_context() return manila.context.get_admin_context()
def is_cinder_installed(): def is_manila_installed():
if os.path.exists('../../manila.manila.egg-info'): if os.path.exists('../../manila.manila.egg-info'):
return True return True
else: else:

View File

@ -25,7 +25,7 @@ import pickle
from manila.tests.windows import mockproxy from manila.tests.windows import mockproxy
gen_test_mocks_key = 'CINDER_GENERATE_TEST_MOCKS' gen_test_mocks_key = 'MANILA_GENERATE_TEST_MOCKS'
class BaseTestCase(manila.test.TestCase): class BaseTestCase(manila.test.TestCase):

View File

@ -314,7 +314,7 @@ class SSHPool(pools.Pool):
timeout=self.conn_timeout) timeout=self.conn_timeout)
else: else:
msg = _("Specify a password or private_key") msg = _("Specify a password or private_key")
raise exception.CinderException(msg) raise exception.ManilaException(msg)
# Paramiko by default sets the socket timeout to 0.1 seconds, # Paramiko by default sets the socket timeout to 0.1 seconds,
# ignoring what we set thru the sshclient. This doesn't help for # ignoring what we set thru the sshclient. This doesn't help for
@ -364,7 +364,7 @@ class SSHPool(pools.Pool):
self.current_size -= 1 self.current_size -= 1
def cinderdir(): def maniladir():
import manila import manila
return os.path.abspath(manila.__file__).split('manila/__init__.py')[0] return os.path.abspath(manila.__file__).split('manila/__init__.py')[0]

View File

@ -16,9 +16,9 @@
from pbr import version as pbr_version from pbr import version as pbr_version
CINDER_VENDOR = "OpenStack Foundation" MANILA_VENDOR = "OpenStack Foundation"
CINDER_PRODUCT = "OpenStack Cinder" MANILA_PRODUCT = "OpenStack Manila"
CINDER_PACKAGE = None # OS distro package version suffix MANILA_PACKAGE = None # OS distro package version suffix
loaded = False loaded = False
version_info = pbr_version.VersionInfo('manila') version_info = pbr_version.VersionInfo('manila')

View File

@ -19,7 +19,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
"""Installation script for Cinder's development virtualenv.""" """Installation script for Manila's development virtualenv."""
import optparse import optparse
import os import os
@ -31,12 +31,12 @@ import install_venv_common as install_venv
def print_help(): def print_help():
help = """ help = """
Cinder development environment setup is complete. Manila development environment setup is complete.
Cinder development uses virtualenv to track and manage Python dependencies Manila development uses virtualenv to track and manage Python dependencies
while in development and testing. while in development and testing.
To activate the Cinder virtualenv for the extent of your current shell To activate the Manila virtualenv for the extent of your current shell
session you can run: session you can run:
$ source .venv/bin/activate $ source .venv/bin/activate
@ -56,7 +56,7 @@ def main(argv):
venv = os.path.join(root, '.venv') venv = os.path.join(root, '.venv')
pip_requires = os.path.join(root, 'tools', 'pip-requires') pip_requires = os.path.join(root, 'tools', 'pip-requires')
test_requires = os.path.join(root, 'tools', 'test-requires') test_requires = os.path.join(root, 'tools', 'test-requires')
project = 'Cinder' project = 'Manila'
py_version = "python%s.%s" % (sys.version_info[0], sys.version_info[1]) py_version = "python%s.%s" % (sys.version_info[0], sys.version_info[1])
install = install_venv.InstallVenv(root, venv, pip_requires, test_requires, install = install_venv.InstallVenv(root, venv, pip_requires, test_requires,
py_version, project) py_version, project)