From 4e2f27c11ab1d201e6dab05a73977c1ba5eea4e9 Mon Sep 17 00:00:00 2001 From: Yulia Portnova Date: Wed, 4 Sep 2013 15:44:38 +0300 Subject: [PATCH] Replaced cinder with manila --- doc/source/conf.py | 8 +- etc/cinder/rootwrap.d/share.filters | 36 ---- etc/{cinder => manila}/api-paste.ini | 22 +- etc/{cinder => manila}/logging_sample.conf | 24 +-- .../manila.conf.sample} | 190 +++++++++--------- etc/{cinder => manila}/policy.json | 0 etc/{cinder => manila}/rootwrap.conf | 4 +- etc/manila/rootwrap.d/share.filters | 36 ++++ .../rootwrap.d/volume.filters | 34 ++-- manila/api/auth.py | 8 +- manila/api/xmlutil.py | 2 +- manila/brick/iscsi/iscsi.py | 2 +- manila/context.py | 2 +- manila/exception.py | 84 ++++---- manila/flags.py | 4 +- .../scheduler/filters/capabilities_filter.py | 2 +- manila/policy.py | 2 +- manila/scheduler/filter_scheduler.py | 2 +- manila/share/drivers/__init__.py | 4 +- manila/tests/__init__.py | 2 +- manila/tests/api/contrib/test_hosts.py | 8 +- manila/tests/api/middleware/test_auth.py | 6 +- .../tests/scheduler/test_capacity_weigher.py | 12 +- .../tests/scheduler/test_filter_scheduler.py | 36 ++-- manila/tests/scheduler/test_host_filters.py | 28 +-- manila/tests/test_emc.py | 6 +- manila/tests/test_exception.py | 24 +-- manila/tests/test_hp3par.py | 2 +- manila/tests/test_huawei.py | 4 +- manila/tests/test_migrations.py | 4 +- manila/tests/test_netapp_nfs.py | 18 +- manila/tests/test_nexenta.py | 2 +- manila/tests/test_policy.py | 2 +- manila/tests/test_rbd.py | 4 +- manila/tests/test_storwize_svc.py | 2 +- manila/tests/test_windows.py | 2 +- manila/tests/test_wsgi.py | 6 +- manila/tests/utils.py | 2 +- manila/tests/windows/basetestcase.py | 2 +- manila/utils.py | 4 +- manila/version.py | 6 +- tools/install_venv.py | 10 +- 42 files changed, 329 insertions(+), 329 deletions(-) delete mode 100644 etc/cinder/rootwrap.d/share.filters rename etc/{cinder => manila}/api-paste.ini (66%) rename etc/{cinder => manila}/logging_sample.conf (76%) rename etc/{cinder/cinder.conf.sample => manila/manila.conf.sample} (85%) rename etc/{cinder => manila}/policy.json (100%) rename etc/{cinder => manila}/rootwrap.conf (89%) create mode 100644 etc/manila/rootwrap.d/share.filters rename etc/{cinder => manila}/rootwrap.d/volume.filters (57%) diff --git a/doc/source/conf.py b/doc/source/conf.py index 570ce1498e..4d702c7faf 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -30,7 +30,7 @@ sys.path.insert(0, os.path.abspath('./')) extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', - 'ext.cinder_todo', + 'ext.manila_todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath', 'sphinx.ext.ifconfig', @@ -40,7 +40,7 @@ extensions = ['sphinx.ext.autodoc', # when doing heavy text edit cycles. Execute "export SPHINX_DEBUG=1" # in your terminal to disable if not os.getenv('SPHINX_DEBUG'): - extensions += ['ext.cinder_autodoc'] + extensions += ['ext.manila_autodoc'] todo_include_todos = True @@ -202,7 +202,7 @@ html_last_updated_fmt = os.popen(git_cmd).read() #html_file_suffix = '' # Output file base name for HTML help builder. -htmlhelp_basename = 'cinderdoc' +htmlhelp_basename = 'maniladoc' # -- Options for LaTeX output ------------------------------------------------- @@ -217,7 +217,7 @@ htmlhelp_basename = 'cinderdoc' # (source start file, target name, title, author, documentclass # [howto/manual]). latex_documents = [ - ('index', 'Cinder.tex', u'Cinder Documentation', + ('index', 'Manila.tex', u'Manila Documentation', u'Anso Labs, LLC', 'manual'), ] diff --git a/etc/cinder/rootwrap.d/share.filters b/etc/cinder/rootwrap.d/share.filters deleted file mode 100644 index 89c27a7d61..0000000000 --- a/etc/cinder/rootwrap.d/share.filters +++ /dev/null @@ -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 diff --git a/etc/cinder/api-paste.ini b/etc/manila/api-paste.ini similarity index 66% rename from etc/cinder/api-paste.ini rename to etc/manila/api-paste.ini index f4c433f258..a681f50af1 100644 --- a/etc/cinder/api-paste.ini +++ b/etc/manila/api-paste.ini @@ -3,50 +3,50 @@ ############# [composite:osapi_volume] -use = call:cinder.api:root_app_factory +use = call:manila.api:root_app_factory /: apiversions /v1: openstack_volume_api_v1 /v2: openstack_volume_api_v2 [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 keystone = faultwrap sizelimit authtoken keystonecontext apiv1 keystone_nolimit = faultwrap sizelimit authtoken keystonecontext apiv1 [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 keystone = faultwrap sizelimit authtoken keystonecontext apiv2 keystone_nolimit = faultwrap sizelimit authtoken keystonecontext apiv2 [filter:faultwrap] -paste.filter_factory = cinder.api.middleware.fault:FaultWrapper.factory +paste.filter_factory = manila.api.middleware.fault:FaultWrapper.factory [filter:noauth] -paste.filter_factory = cinder.api.middleware.auth:NoAuthMiddleware.factory +paste.filter_factory = manila.api.middleware.auth:NoAuthMiddleware.factory [filter:sizelimit] -paste.filter_factory = cinder.api.middleware.sizelimit:RequestBodySizeLimiter.factory +paste.filter_factory = manila.api.middleware.sizelimit:RequestBodySizeLimiter.factory [app:apiv1] -paste.app_factory = cinder.api.v1.router:APIRouter.factory +paste.app_factory = manila.api.v1.router:APIRouter.factory [app:apiv2] -paste.app_factory = cinder.api.v2.router:APIRouter.factory +paste.app_factory = manila.api.v2.router:APIRouter.factory [pipeline:apiversions] pipeline = faultwrap osvolumeversionapp [app:osvolumeversionapp] -paste.app_factory = cinder.api.versions:Versions.factory +paste.app_factory = manila.api.versions:Versions.factory ########## # Shared # ########## [filter:keystonecontext] -paste.filter_factory = cinder.api.middleware.auth:CinderKeystoneContext.factory +paste.filter_factory = manila.api.middleware.auth:ManilaKeystoneContext.factory [filter:authtoken] paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory @@ -59,4 +59,4 @@ auth_protocol = http admin_tenant_name = %SERVICE_TENANT_NAME% admin_user = %SERVICE_USER% admin_password = %SERVICE_PASSWORD% -signing_dir = /var/lib/cinder +signing_dir = /var/lib/manila diff --git a/etc/cinder/logging_sample.conf b/etc/manila/logging_sample.conf similarity index 76% rename from etc/cinder/logging_sample.conf rename to etc/manila/logging_sample.conf index 2c0b754e35..bddb9249ca 100644 --- a/etc/cinder/logging_sample.conf +++ b/etc/manila/logging_sample.conf @@ -1,20 +1,20 @@ [loggers] -keys = root, cinder +keys = root, manila [handlers] keys = stderr, stdout, watchedfile, syslog, null [formatters] -keys = legacycinder, default +keys = legacymanila, default [logger_root] level = WARNING handlers = null -[logger_cinder] +[logger_manila] level = INFO handlers = stderr -qualname = cinder +qualname = manila [logger_amqplib] level = WARNING @@ -47,30 +47,30 @@ qualname = eventlet.wsgi.server [handler_stderr] class = StreamHandler args = (sys.stderr,) -formatter = legacycinder +formatter = legacymanila [handler_stdout] class = StreamHandler args = (sys.stdout,) -formatter = legacycinder +formatter = legacymanila [handler_watchedfile] class = handlers.WatchedFileHandler -args = ('cinder.log',) -formatter = legacycinder +args = ('manila.log',) +formatter = legacymanila [handler_syslog] class = handlers.SysLogHandler args = ('/dev/log', handlers.SysLogHandler.LOG_USER) -formatter = legacycinder +formatter = legacymanila [handler_null] -class = cinder.common.openstack.NullHandler +class = manila.common.openstack.NullHandler formatter = default args = () -[formatter_legacycinder] -class = cinder.openstack.common.log.LegacyFormatter +[formatter_legacymanila] +class = manila.openstack.common.log.LegacyFormatter [formatter_default] format = %(message)s diff --git a/etc/cinder/cinder.conf.sample b/etc/manila/manila.conf.sample similarity index 85% rename from etc/cinder/cinder.conf.sample rename to etc/manila/manila.conf.sample index b3a8afc94a..a560f7b94b 100644 --- a/etc/cinder/cinder.conf.sample +++ b/etc/manila/manila.conf.sample @@ -1,11 +1,11 @@ #################### -# cinder.conf sample # +# manila.conf sample # #################### [DEFAULT] # -# Options defined in cinder.exception +# Options defined in manila.exception # # 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 @@ -28,18 +28,18 @@ # 100=Everything (integer value) #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) #api_paste_config=api-paste.ini -# Directory where the cinder python module is installed +# Directory where the manila python module is installed # (string value) #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 -# Top-level directory for maintaining cinder's state (string +# Top-level directory for maintaining manila's state (string # value) #state_path=$pybasedir @@ -52,7 +52,7 @@ # default glance port (integer value) #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) #glance_api_servers=$glance_host:$glance_port @@ -68,18 +68,18 @@ #glance_api_insecure=false # the topic scheduler nodes listen on (string value) -#scheduler_topic=cinder-scheduler +#scheduler_topic=manila-scheduler # 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) -#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 -# Deploy v2 of the Cinder API. (boolean value) +# Deploy v2 of the Manila API. (boolean value) #enable_v2_api=true # whether to rate limit the api (boolean value) @@ -87,11 +87,11 @@ # Specify list of extensions to load when using # 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 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 # OpenStack Volume API (string value) @@ -102,7 +102,7 @@ #osapi_max_limit=1000 # 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) #sqlite_synchronous=true @@ -120,19 +120,19 @@ #sql_retry_interval=10 # 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 # value) -#backup_manager=cinder.backup.manager.BackupManager +#backup_manager=manila.backup.manager.BackupManager # 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 # not necessarily a hostname, FQDN, or IP address. (string # value) -#host=cinder +#host=manila # availability zone of this node (string value) #storage_availability_zone=nova @@ -167,11 +167,11 @@ # The full class name of the volume API class to use (string # 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 # 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 # deprecated. (string value) @@ -188,7 +188,7 @@ # -# Options defined in cinder.policy +# Options defined in manila.policy # # 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) @@ -226,11 +226,11 @@ #max_age=0 # 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 @@ -253,7 +253,7 @@ # -# Options defined in cinder.test +# Options defined in manila.test # # 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 @@ -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 @@ -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) @@ -306,15 +306,15 @@ # -# Options defined in cinder.backup.manager +# Options defined in manila.backup.manager # # 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) @@ -339,7 +339,7 @@ # -# Options defined in cinder.db.api +# Options defined in manila.db.api # # 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) -#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 @@ -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) @@ -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 @@ -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 @@ -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) @@ -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) @@ -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 # value) -#rpc_backend=cinder.openstack.common.rpc.impl_kombu +#rpc_backend=manila.openstack.common.rpc.impl_kombu # Size of RPC thread pool (integer value) #rpc_thread_pool_size=64 @@ -530,7 +530,7 @@ # Modules of exceptions that are permitted to be recreatedupon # 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) #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 @@ -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 @@ -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) @@ -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 @@ -656,7 +656,7 @@ #rpc_zmq_bind_address=* # 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) #rpc_zmq_port=9501 @@ -674,11 +674,11 @@ # Name of this node. Must be a valid hostname, FQDN, or IP # address. Must match "host" option, if running Nova. (string # 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) @@ -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) @@ -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) -#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 # 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 @@ -731,15 +731,15 @@ # -# Options defined in cinder.scheduler.manager +# Options defined in manila.scheduler.manager # # 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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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) @@ -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 # 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) #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) -#cinder_huawei_conf_file=/etc/cinder/cinder_huawei_conf.xml +# config data for manila huawei plugin (string value) +#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 # value) -#volume_group=cinder-volumes +#volume_group=manila-volumes # Method used to wipe old volumes (valid options are: none, # zero, shred) (string value) @@ -879,7 +879,7 @@ # value) #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) #pool_size= @@ -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 @@ -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 @@ -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) @@ -1010,13 +1010,13 @@ #nexenta_iscsi_target_portal_port=3260 # pool on SA that will hold all volumes (string value) -#nexenta_volume=cinder +#nexenta_volume=manila # 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) -#nexenta_target_group_prefix=cinder/ +#nexenta_target_group_prefix=manila/ # block size for volumes (blank=default,8KB) (string value) #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) -#nfs_shares_config=/etc/cinder/nfs_shares +#nfs_shares_config=/etc/manila/nfs_shares # Base dir where nfs expected to be mounted (string value) #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 @@ -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 @@ -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) @@ -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. @@ -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 @@ -1166,11 +1166,11 @@ #scality_sofs_mount_point=$state_path/scality # 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) @@ -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) @@ -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) @@ -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) @@ -1254,7 +1254,7 @@ # -# Options defined in cinder.volume.drivers.xiv +# Options defined in manila.volume.drivers.xiv # # 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) @@ -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) @@ -1331,11 +1331,11 @@ # iscsi_iotype=fileio # -# Options defined in cinder.volume.manager +# Options defined in manila.volume.manager # # 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 diff --git a/etc/cinder/policy.json b/etc/manila/policy.json similarity index 100% rename from etc/cinder/policy.json rename to etc/manila/policy.json diff --git a/etc/cinder/rootwrap.conf b/etc/manila/rootwrap.conf similarity index 89% rename from etc/cinder/rootwrap.conf rename to etc/manila/rootwrap.conf index dfa8a99ccd..f66fa1c9a5 100644 --- a/etc/cinder/rootwrap.conf +++ b/etc/manila/rootwrap.conf @@ -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 [DEFAULT] # List of directories to load filter definitions from (separated by ','). # 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 # explicitely specify a full path (separated by ',') diff --git a/etc/manila/rootwrap.d/share.filters b/etc/manila/rootwrap.d/share.filters new file mode 100644 index 0000000000..af71c6ad84 --- /dev/null +++ b/etc/manila/rootwrap.d/share.filters @@ -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 diff --git a/etc/cinder/rootwrap.d/volume.filters b/etc/manila/rootwrap.d/volume.filters similarity index 57% rename from etc/cinder/rootwrap.d/volume.filters rename to etc/manila/rootwrap.d/volume.filters index 9aca2742bf..1d5b31bff0 100644 --- a/etc/cinder/rootwrap.d/volume.filters +++ b/etc/manila/rootwrap.d/volume.filters @@ -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 [Filters] -# cinder/volume/iscsi.py: iscsi_helper '--op' ... +# manila/volume/iscsi.py: iscsi_helper '--op' ... ietadm: CommandFilter, ietadm, root tgtadm: CommandFilter, tgtadm, root tgt-admin: CommandFilter, tgt-admin, 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 -# cinder/volume/driver.py: 'lvcreate', '-L', sizestr, '-n', volume_name,.. -# cinder/volume/driver.py: 'lvcreate', '-L', ... +# manila/volume/driver.py: 'lvcreate', '-L', sizestr, '-n', volume_name,.. +# manila/volume/driver.py: 'lvcreate', '-L', ... 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 -# cinder/volume/driver.py: 'lvremove', '-f', %s/%s % ... +# manila/volume/driver.py: 'lvremove', '-f', %s/%s % ... 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 -# cinder/volume/driver.py: 'iscsiadm', '-m', 'discovery', '-t',... -# cinder/volume/driver.py: 'iscsiadm', '-m', 'node', '-T', ... +# manila/volume/driver.py: 'iscsiadm', '-m', 'discovery', '-t',... +# manila/volume/driver.py: 'iscsiadm', '-m', 'node', '-T', ... iscsiadm: CommandFilter, iscsiadm, root -# cinder/volume/drivers/lvm.py: 'shred', '-n3' -# cinder/volume/drivers/lvm.py: 'shred', '-n0', '-z', '-s%dMiB' +# manila/volume/drivers/lvm.py: 'shred', '-n3' +# manila/volume/drivers/lvm.py: 'shred', '-n0', '-z', '-s%dMiB' shred: CommandFilter, shred, root -#cinder/volume/.py: utils.temporary_chown(path, 0), ... +#manila/volume/.py: utils.temporary_chown(path, 0), ... chown: CommandFilter, chown, root -# cinder/volume/driver.py +# manila/volume/driver.py dmsetup: CommandFilter, dmsetup, root ln: CommandFilter, ln, root qemu-img: CommandFilter, qemu-img, 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 -# cinder/volume/nfs.py +# manila/volume/nfs.py stat: CommandFilter, stat, root mount: CommandFilter, mount, root df: CommandFilter, df, root @@ -54,6 +54,6 @@ chmod: CommandFilter, chmod, root rm: CommandFilter, rm, root lvs: CommandFilter, lvs, root -# cinder/volume/scality.py +# manila/volume/scality.py mount: CommandFilter, mount, root dd: CommandFilter, dd, root diff --git a/manila/api/auth.py b/manila/api/auth.py index 8e9e57c631..b91139832c 100644 --- a/manila/api/auth.py +++ b/manila/api/auth.py @@ -21,13 +21,13 @@ from manila.openstack.common import log as logging LOG = logging.getLogger(__name__) -class CinderKeystoneContext(auth.CinderKeystoneContext): +class ManilaKeystoneContext(auth.ManilaKeystoneContext): def __init__(self, application): - LOG.warn(_('manila.api.auth:CinderKeystoneContext is deprecated. ' + LOG.warn(_('manila.api.auth:ManilaKeystoneContext is deprecated. ' 'Please use ' - 'manila.api.middleware.auth:CinderKeystoneContext ' + 'manila.api.middleware.auth:ManilaKeystoneContext ' 'instead.')) - super(CinderKeystoneContext, self).__init__(application) + super(ManilaKeystoneContext, self).__init__(application) def pipeline_factory(loader, global_conf, **local_conf): diff --git a/manila/api/xmlutil.py b/manila/api/xmlutil.py index 753c1d372a..8485afd5ee 100644 --- a/manila/api/xmlutil.py +++ b/manila/api/xmlutil.py @@ -38,7 +38,7 @@ def validate_schema(xml, schema_name): base_path = 'manila/api/schemas/v1.1/' if schema_name in ('atom', 'atom-link'): 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)) schema_doc = etree.parse(schema_path) relaxng = etree.RelaxNG(schema_doc) diff --git a/manila/brick/iscsi/iscsi.py b/manila/brick/iscsi/iscsi.py index 01e489c07d..a62937c88d 100644 --- a/manila/brick/iscsi/iscsi.py +++ b/manila/brick/iscsi/iscsi.py @@ -53,7 +53,7 @@ iscsi_helper_opt = [cfg.StrOpt('iscsi_helper', default='fileio', help=('Sets the behavior of the iSCSI target ' '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') ) ] diff --git a/manila/context.py b/manila/context.py index 1d002fc2a7..1bc4e0fcc4 100644 --- a/manila/context.py +++ b/manila/context.py @@ -134,7 +134,7 @@ class RequestContext(object): return context # 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 # logging, until we make the switch to using openstack/common's version of # RequestContext. diff --git a/manila/exception.py b/manila/exception.py index d0334d8613..d5b15af842 100644 --- a/manila/exception.py +++ b/manila/exception.py @@ -16,9 +16,9 @@ # License for the specific language governing permissions and limitations # 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. @@ -93,8 +93,8 @@ def wrap_db_error(f): return _wrap -class CinderException(Exception): - """Base Cinder Exception +class ManilaException(Exception): + """Base Manila Exception To correctly use this class, inherit from it and define 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 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" -class NotAuthorized(CinderException): +class NotAuthorized(ManilaException): message = _("Not authorized.") code = 403 @@ -151,11 +151,11 @@ class PolicyNotAuthorized(NotAuthorized): message = _("Policy doesn't allow %(action)s to be performed.") -class ImageNotAuthorized(CinderException): +class ImageNotAuthorized(ManilaException): message = _("Not authorized for image %(image_id)s.") -class Invalid(CinderException): +class Invalid(ManilaException): message = _("Unacceptable parameters.") code = 400 @@ -168,7 +168,7 @@ class VolumeAttached(Invalid): 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") @@ -219,7 +219,7 @@ class InvalidUUID(Invalid): message = _("Expected a uuid but received %(uuid).") -class NotFound(CinderException): +class NotFound(ManilaException): message = _("Resource could not be found.") code = 404 safe = True @@ -286,11 +286,11 @@ class SnapshotNotFound(NotFound): message = _("Snapshot %(snapshot_id)s could not be found.") -class VolumeIsBusy(CinderException): +class VolumeIsBusy(ManilaException): message = _("deleting volume %(volume_name)s that has snapshot") -class SnapshotIsBusy(CinderException): +class SnapshotIsBusy(ManilaException): message = _("deleting snapshot %(snapshot_name)s that has " "dependent volumes") @@ -299,15 +299,15 @@ class ISCSITargetNotFoundForVolume(NotFound): 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.") -class ISCSITargetAttachFailed(CinderException): +class ISCSITargetAttachFailed(ManilaException): 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.") @@ -376,7 +376,7 @@ class ReservationNotFound(QuotaNotFound): message = _("Quota reservation %(uuid)s could not be found.") -class OverQuota(CinderException): +class OverQuota(ManilaException): 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") -class NotAllowed(CinderException): +class NotAllowed(ManilaException): message = _("Action not allowed.") #TODO(bcwaldon): EOL this exception! -class Duplicate(CinderException): +class Duplicate(ManilaException): pass @@ -414,11 +414,11 @@ class VolumeTypeExists(Duplicate): message = _("Volume Type %(id)s already exists.") -class MigrationError(CinderException): +class MigrationError(ManilaException): message = _("Migration error") + ": %(reason)s" -class MalformedRequestBody(CinderException): +class MalformedRequestBody(ManilaException): message = _("Malformed message body: %(reason)s") @@ -430,15 +430,15 @@ class PasteAppNotFound(NotFound): 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") -class WillNotSchedule(CinderException): +class WillNotSchedule(ManilaException): message = _("Host %(host)s is not up or doesn't exist.") -class QuotaError(CinderException): +class QuotaError(ManilaException): message = _("Quota exceeded") + ": code=%(code)s" code = 413 headers = {'Retry-After': 0} @@ -466,20 +466,20 @@ class DuplicateSfVolumeNames(Duplicate): 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") -class Invalid3PARDomain(CinderException): +class Invalid3PARDomain(ManilaException): message = _("Invalid 3PAR Domain: %(err)s") -class VolumeTypeCreateFailed(CinderException): +class VolumeTypeCreateFailed(ManilaException): message = _("Cannot create volume_type with " "name %(name)s and specs %(extra_specs)s") -class SolidFireAPIException(CinderException): +class SolidFireAPIException(ManilaException): message = _("Bad response from SolidFire API") @@ -495,15 +495,15 @@ class MalformedResponse(Invalid): message = _("Malformed response to command %(cmd)s: %(reason)s") -class BadHTTPResponseStatus(CinderException): +class BadHTTPResponseStatus(ManilaException): message = _("Bad HTTP response status %(status)s") -class FailedCmdWithDump(CinderException): +class FailedCmdWithDump(ManilaException): 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") @@ -511,7 +511,7 @@ class ZadaraServerNotFound(NotFound): message = _("Unable to find server object for initiator %(name)s") -class ZadaraVPSANoActiveController(CinderException): +class ZadaraVPSANoActiveController(ManilaException): message = _("Unable to find any active VPSA controller") @@ -527,12 +527,12 @@ class InstanceNotFound(NotFound): message = _("Instance %(instance_id)s could not be found.") -class VolumeBackendAPIException(CinderException): +class VolumeBackendAPIException(ManilaException): message = _("Bad or unexpected response from the storage volume " "backend API: %(data)s") -class NfsException(CinderException): +class NfsException(ManilaException): message = _("Unknown NFS exception") @@ -544,7 +544,7 @@ class NfsNoSuitableShareFound(NotFound): message = _("There is no share which can host %(volume_size)sG") -class GlusterfsException(CinderException): +class GlusterfsException(ManilaException): message = _("Unknown Gluster exception") @@ -565,7 +565,7 @@ class ImageCopyFailure(Invalid): message = _("Failed to copy image to volume") -class InvalidShare(CinderException): +class InvalidShare(ManilaException): message = _("Invalid share: %(reason)s") @@ -577,15 +577,15 @@ class ShareAccessExists(Duplicate): message = _("Share access %(access_type)s:%(access)s exists") -class InvalidShareAccess(CinderException): +class InvalidShareAccess(ManilaException): message = _("Invalid access_rule: %(reason)s") -class ShareIsBusy(CinderException): +class ShareIsBusy(ManilaException): message = _("Deleting $(share_name) share that used") -class ShareBackendException(CinderException): +class ShareBackendException(ManilaException): message = _("Share backend error: %(msg)s") @@ -593,14 +593,14 @@ class ShareSnapshotNotFound(NotFound): message = _("Snapshot %(snapshot_id)s could not be found.") -class ShareSnapshotIsBusy(CinderException): +class ShareSnapshotIsBusy(ManilaException): message = _("Deleting snapshot %(snapshot_name)s that has " "dependent shares.") -class InvalidShareSnapshot(CinderException): +class InvalidShareSnapshot(ManilaException): message = _("Invalid share snapshot: %(reason)s") -class SwiftConnectionFailed(CinderException): +class SwiftConnectionFailed(ManilaException): message = _("Connection to swift failed") + ": %(reason)s" diff --git a/manila/flags.py b/manila/flags.py index 63eed2697e..1680a9602e 100644 --- a/manila/flags.py +++ b/manila/flags.py @@ -139,10 +139,10 @@ global_opts = [ help='the topic share nodes listen on'), cfg.BoolOpt('enable_v1_api', default=True, - help=_("Deploy v1 of the Cinder API. ")), + help=_("Deploy v1 of the Manila API. ")), cfg.BoolOpt('enable_v2_api', default=True, - help=_("Deploy v2 of the Cinder API. ")), + help=_("Deploy v2 of the Manila API. ")), cfg.BoolOpt('api_rate_limit', default=True, help='whether to rate limit the api'), diff --git a/manila/openstack/common/scheduler/filters/capabilities_filter.py b/manila/openstack/common/scheduler/filters/capabilities_filter.py index 9ad72fd676..6109411dc4 100644 --- a/manila/openstack/common/scheduler/filters/capabilities_filter.py +++ b/manila/openstack/common/scheduler/filters/capabilities_filter.py @@ -53,7 +53,7 @@ class CapabilitiesFilter(filters.BaseHostFilter): def host_passes(self, host_state, filter_properties): """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 # volume. resource_type = filter_properties.get('resource_type') diff --git a/manila/policy.py b/manila/policy.py index 7f7175b3ee..254afbea84 100644 --- a/manila/policy.py +++ b/manila/policy.py @@ -15,7 +15,7 @@ # License for the specific language governing permissions and limitations # under the License. -"""Policy Engine For Cinder""" +"""Policy Engine For Manila""" from oslo.config import cfg diff --git a/manila/scheduler/filter_scheduler.py b/manila/scheduler/filter_scheduler.py index 1cc34db0d7..d0002e8d66 100644 --- a/manila/scheduler/filter_scheduler.py +++ b/manila/scheduler/filter_scheduler.py @@ -110,7 +110,7 @@ class FilterScheduler(driver.Scheduler): elevated = context.elevated() 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 # 'volume_XX' to 'resource_XX' will make both filters happy. resource_properties = share_properties.copy() diff --git a/manila/share/drivers/__init__.py b/manila/share/drivers/__init__.py index 14f17f59a0..fa8ec8fe6e 100644 --- a/manila/share/drivers/__init__.py +++ b/manila/share/drivers/__init__.py @@ -13,10 +13,10 @@ # under the License. """ -:mod:`manila.share.driver` -- Cinder Share Drivers +:mod:`manila.share.driver` -- Manila Share Drivers ===================================================== .. automodule:: manila.share.driver :platform: Unix - :synopsis: Module containing all the Cinder Share drivers. + :synopsis: Module containing all the Manila Share drivers. """ diff --git a/manila/tests/__init__.py b/manila/tests/__init__.py index 390d5632ed..8a24821452 100644 --- a/manila/tests/__init__.py +++ b/manila/tests/__init__.py @@ -17,7 +17,7 @@ # under the License. """ -:mod:`manila.tests` -- Cinder Unittests +:mod:`manila.tests` -- Manila Unittests ===================================================== .. automodule:: manila.tests diff --git a/manila/tests/api/contrib/test_hosts.py b/manila/tests/api/contrib/test_hosts.py index c146ccc76a..30c5bfccf4 100644 --- a/manila/tests/api/contrib/test_hosts.py +++ b/manila/tests/api/contrib/test_hosts.py @@ -71,7 +71,7 @@ class FakeRequest(object): GET = {} -class FakeRequestWithcinderZone(object): +class FakeRequestWithmanilaZone(object): environ = {'manila.context': context.get_admin_context()} GET = {'zone': 'manila'} @@ -96,13 +96,13 @@ class HostTestCase(test.TestCase): hosts = os_hosts._list_hosts(self.req) 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 if host['service'] == 'manila-volume'] - self.assertEqual(cinder_hosts, expected) + self.assertEqual(manila_hosts, expected) def test_list_hosts_with_zone(self): - req = FakeRequestWithcinderZone() + req = FakeRequestWithmanilaZone() hosts = os_hosts._list_hosts(req) self.assertEqual(hosts, LIST_RESPONSE) diff --git a/manila/tests/api/middleware/test_auth.py b/manila/tests/api/middleware/test_auth.py index 1cc0e207d3..bc8e8a57c5 100644 --- a/manila/tests/api/middleware/test_auth.py +++ b/manila/tests/api/middleware/test_auth.py @@ -18,10 +18,10 @@ import manila.api.middleware.auth from manila import test -class TestCinderKeystoneContextMiddleware(test.TestCase): +class TestManilaKeystoneContextMiddleware(test.TestCase): def setUp(self): - super(TestCinderKeystoneContextMiddleware, self).setUp() + super(TestManilaKeystoneContextMiddleware, self).setUp() @webob.dec.wsgify() def fake_app(req): @@ -30,7 +30,7 @@ class TestCinderKeystoneContextMiddleware(test.TestCase): self.context = None self.middleware = (manila.api.middleware.auth - .CinderKeystoneContext(fake_app)) + .ManilaKeystoneContext(fake_app)) self.request = webob.Request.blank('/') self.request.headers['X_TENANT_ID'] = 'testtenantid' self.request.headers['X_AUTH_TOKEN'] = 'testauthtoken' diff --git a/manila/tests/scheduler/test_capacity_weigher.py b/manila/tests/scheduler/test_capacity_weigher.py index 7ee6a09c18..b40f4b2eba 100644 --- a/manila/tests/scheduler/test_capacity_weigher.py +++ b/manila/tests/scheduler/test_capacity_weigher.py @@ -46,8 +46,8 @@ class CapacityWeigherTestCase(test.TestCase): self.mox.ResetAll() return host_states - @test.skip_if(not test_utils.is_cinder_installed(), - 'Test requires Cinder installed') + @test.skip_if(not test_utils.is_manila_installed(), + 'Test requires Manila installed') def test_default_of_spreading_first(self): 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.obj.host, 'host1') - @test.skip_if(not test_utils.is_cinder_installed(), - 'Test requires Cinder installed') + @test.skip_if(not test_utils.is_manila_installed(), + 'Test requires Manila installed') def test_capacity_weight_multiplier1(self): self.flags(capacity_weight_multiplier=-1.0) 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.obj.host, 'host4') - @test.skip_if(not test_utils.is_cinder_installed(), - 'Test requires Cinder installed') + @test.skip_if(not test_utils.is_manila_installed(), + 'Test requires Manila installed') def test_capacity_weight_multiplier2(self): self.flags(capacity_weight_multiplier=2.0) hostinfo_list = self._get_all_hosts() diff --git a/manila/tests/scheduler/test_filter_scheduler.py b/manila/tests/scheduler/test_filter_scheduler.py index da96c7f726..67a1ad8ad6 100644 --- a/manila/tests/scheduler/test_filter_scheduler.py +++ b/manila/tests/scheduler/test_filter_scheduler.py @@ -37,8 +37,8 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase): driver_cls = filter_scheduler.FilterScheduler - @test.skip_if(not test_utils.is_cinder_installed(), - 'Test requires Cinder installed (try setup.py develop') + @test.skip_if(not test_utils.is_manila_installed(), + 'Test requires Manila installed (try setup.py develop') def test_create_volume_no_hosts(self): """ 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, fake_context, request_spec, {}) - @test.skip_if(not test_utils.is_cinder_installed(), - 'Test requires Cinder installed (try setup.py develop') + @test.skip_if(not test_utils.is_manila_installed(), + 'Test requires Manila installed (try setup.py develop') def test_create_volume_non_admin(self): """Test creating an instance locally using run_instance, passing a non-admin context. DB actions should work.""" @@ -82,8 +82,8 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase): fake_context, request_spec, {}) self.assertTrue(self.was_admin) - @test.skip_if(not test_utils.is_cinder_installed(), - 'Test requires Cinder installed (try setup.py develop') + @test.skip_if(not test_utils.is_manila_installed(), + 'Test requires Manila installed (try setup.py develop') def test_schedule_happy_day(self): """Make sure there's nothing glaringly wrong with _schedule() by doing a happy day pass through.""" @@ -112,8 +112,8 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase): weighed_host = sched._schedule(fake_context, request_spec, {}) self.assertTrue(weighed_host.obj is not None) - @test.skip_if(not test_utils.is_cinder_installed(), - 'Test requires Cinder installed (try setup.py develop') + @test.skip_if(not test_utils.is_manila_installed(), + 'Test requires Manila installed (try setup.py develop') def test_create_share_no_hosts(self): """ 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, fake_context, request_spec, {}) - @test.skip_if(not test_utils.is_cinder_installed(), - 'Test requires Cinder installed (try setup.py develop') + @test.skip_if(not test_utils.is_manila_installed(), + 'Test requires Manila installed (try setup.py develop') def test_create_share_non_admin(self): """Test creating share passing a non-admin context. @@ -160,8 +160,8 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase): fake_context, request_spec, {}) self.assertTrue(self.was_admin) - @test.skip_if(not test_utils.is_cinder_installed(), - 'Test requires Cinder installed (try setup.py develop') + @test.skip_if(not test_utils.is_manila_installed(), + 'Test requires Manila installed (try setup.py develop') def test_schedule_happy_day_share(self): """Make sure there's nothing glaringly wrong with _schedule_share() by doing a happy day pass through.""" @@ -202,8 +202,8 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase): self.assertRaises(exception.InvalidParameterValue, fakes.FakeFilterScheduler) - @test.skip_if(not test_utils.is_cinder_installed(), - 'Test requires Cinder installed (try setup.py develop') + @test.skip_if(not test_utils.is_manila_installed(), + 'Test requires Manila installed (try setup.py develop') def test_retry_disabled(self): # Retry info should not get populated when re-scheduling is off. 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: self.assertFalse("retry" in filter_properties) - @test.skip_if(not test_utils.is_cinder_installed(), - 'Test requires Cinder installed (try setup.py develop') + @test.skip_if(not test_utils.is_manila_installed(), + 'Test requires Manila installed (try setup.py develop') def test_retry_attempt_one(self): # Test retry logic on initial scheduling attempt. self.flags(scheduler_max_attempts=2) @@ -238,8 +238,8 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase): num_attempts = filter_properties['retry']['num_attempts'] self.assertEqual(1, num_attempts) - @test.skip_if(not test_utils.is_cinder_installed(), - 'Test requires Cinder installed (try setup.py develop') + @test.skip_if(not test_utils.is_manila_installed(), + 'Test requires Manila installed (try setup.py develop') def test_retry_attempt_two(self): # Test retry logic when re-scheduling. self.flags(scheduler_max_attempts=2) diff --git a/manila/tests/scheduler/test_host_filters.py b/manila/tests/scheduler/test_host_filters.py index c67b26e3fa..cdfbd3b206 100644 --- a/manila/tests/scheduler/test_host_filters.py +++ b/manila/tests/scheduler/test_host_filters.py @@ -76,8 +76,8 @@ class HostFiltersTestCase(test.TestCase): return ret_value self.stubs.Set(utils, 'service_is_up', fake_service_is_up) - @test.skip_if(not test_utils.is_cinder_installed(), - 'Test requires Cinder installed') + @test.skip_if(not test_utils.is_manila_installed(), + 'Test requires Manila installed') def test_capacity_filter_passes(self): self._stub_service_is_up(True) filt_cls = self.class_map['CapacityFilter']() @@ -89,8 +89,8 @@ class HostFiltersTestCase(test.TestCase): 'service': service}) self.assertTrue(filt_cls.host_passes(host, filter_properties)) - @test.skip_if(not test_utils.is_cinder_installed(), - 'Test requires Cinder installed') + @test.skip_if(not test_utils.is_manila_installed(), + 'Test requires Manila installed') def test_capacity_filter_fails(self): self._stub_service_is_up(True) filt_cls = self.class_map['CapacityFilter']() @@ -103,8 +103,8 @@ class HostFiltersTestCase(test.TestCase): 'service': service}) self.assertFalse(filt_cls.host_passes(host, filter_properties)) - @test.skip_if(not test_utils.is_cinder_installed(), - 'Test requires Cinder installed') + @test.skip_if(not test_utils.is_manila_installed(), + 'Test requires Manila installed') def test_capacity_filter_passes_infinite(self): self._stub_service_is_up(True) filt_cls = self.class_map['CapacityFilter']() @@ -116,8 +116,8 @@ class HostFiltersTestCase(test.TestCase): 'service': service}) self.assertTrue(filt_cls.host_passes(host, filter_properties)) - @test.skip_if(not test_utils.is_cinder_installed(), - 'Test requires Cinder installed') + @test.skip_if(not test_utils.is_manila_installed(), + 'Test requires Manila installed') def test_capacity_filter_passes_unknown(self): self._stub_service_is_up(True) filt_cls = self.class_map['CapacityFilter']() @@ -129,8 +129,8 @@ class HostFiltersTestCase(test.TestCase): 'service': service}) self.assertTrue(filt_cls.host_passes(host, filter_properties)) - @test.skip_if(not test_utils.is_cinder_installed(), - 'Test requires Cinder installed') + @test.skip_if(not test_utils.is_manila_installed(), + 'Test requires Manila installed') def test_retry_filter_disabled(self): # Test case where retry/re-scheduling is disabled. filt_cls = self.class_map['RetryFilter']() @@ -138,8 +138,8 @@ class HostFiltersTestCase(test.TestCase): filter_properties = {} self.assertTrue(filt_cls.host_passes(host, filter_properties)) - @test.skip_if(not test_utils.is_cinder_installed(), - 'Test requires Cinder installed') + @test.skip_if(not test_utils.is_manila_installed(), + 'Test requires Manila installed') def test_retry_filter_pass(self): # Node not previously tried. filt_cls = self.class_map['RetryFilter']() @@ -148,8 +148,8 @@ class HostFiltersTestCase(test.TestCase): filter_properties = dict(retry=retry) self.assertTrue(filt_cls.host_passes(host, filter_properties)) - @test.skip_if(not test_utils.is_cinder_installed(), - 'Test requires Cinder installed') + @test.skip_if(not test_utils.is_manila_installed(), + 'Test requires Manila installed') def test_retry_filter_fail(self): # Node was already tried. filt_cls = self.class_map['RetryFilter']() diff --git a/manila/tests/test_emc.py b/manila/tests/test_emc.py index 90d8d3802a..5f613ed685 100644 --- a/manila/tests/test_emc.py +++ b/manila/tests/test_emc.py @@ -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_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__) -config_file_name = 'cinder_emc_config.xml' +config_file_name = 'manila_emc_config.xml' storage_system = 'CLARiiON+APM00123456789' storage_system_vmax = 'SYMMETRIX+000195900551' lunmaskctrl_id = 'CLARiiON+APM00123456789+00aa11bb22cc33dd44ff55gg66hh77ii88jj' @@ -604,7 +604,7 @@ class EMCSMISISCSIDriverTestCase(test.TestCase): self.create_fake_config_file() 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()) self.stubs.Set(EMCSMISISCSIDriver, '_do_iscsi_discovery', diff --git a/manila/tests/test_exception.py b/manila/tests/test_exception.py index 08879ab4eb..4bda251546 100644 --- a/manila/tests/test_exception.py +++ b/manila/tests/test_exception.py @@ -50,45 +50,45 @@ def bad_function_exception(): raise test.TestingException() -class CinderExceptionTestCase(test.TestCase): +class ManilaExceptionTestCase(test.TestCase): def test_default_error_msg(self): - class FakeCinderException(exception.CinderException): + class FakeManilaException(exception.ManilaException): message = "default message" - exc = FakeCinderException() + exc = FakeManilaException() self.assertEquals(unicode(exc), 'default message') def test_error_msg(self): - self.assertEquals(unicode(exception.CinderException('test')), + self.assertEquals(unicode(exception.ManilaException('test')), 'test') def test_default_error_msg_with_kwargs(self): - class FakeCinderException(exception.CinderException): + class FakeManilaException(exception.ManilaException): message = "default message: %(code)s" - exc = FakeCinderException(code=500) + exc = FakeManilaException(code=500) self.assertEquals(unicode(exc), 'default message: 500') def test_error_msg_exception_with_kwargs(self): # NOTE(dprince): disable format errors for this test self.flags(fatal_exception_format_errors=False) - class FakeCinderException(exception.CinderException): + class FakeManilaException(exception.ManilaException): message = "default message: %(mispelled_code)s" - exc = FakeCinderException(code=500) + exc = FakeManilaException(code=500) self.assertEquals(unicode(exc), 'default message: %(mispelled_code)s') def test_default_error_code(self): - class FakeCinderException(exception.CinderException): + class FakeManilaException(exception.ManilaException): code = 404 - exc = FakeCinderException() + exc = FakeManilaException() self.assertEquals(exc.kwargs['code'], 404) def test_error_code_from_kwarg(self): - class FakeCinderException(exception.CinderException): + class FakeManilaException(exception.ManilaException): code = 500 - exc = FakeCinderException(code=404) + exc = FakeManilaException(code=404) self.assertEquals(exc.kwargs['code'], 404) diff --git a/manila/tests/test_hp3par.py b/manila/tests/test_hp3par.py index 50067754dc..fc6aac5004 100644 --- a/manila/tests/test_hp3par.py +++ b/manila/tests/test_hp3par.py @@ -16,7 +16,7 @@ # License for the specific language governing permissions and limitations # under the License. """ -Unit tests for OpenStack Cinder volume drivers +Unit tests for OpenStack Manila volume drivers """ import mox import shutil diff --git a/manila/tests/test_huawei.py b/manila/tests/test_huawei.py index 7c874de215..1b46b4f504 100644 --- a/manila/tests/test_huawei.py +++ b/manila/tests/test_huawei.py @@ -168,10 +168,10 @@ class HuaweiVolumeTestCase(test.TestCase): super(HuaweiVolumeTestCase, self).__init__(*args, **kwargs) 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() 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()) self.driver = FakeHuaweiStorage(configuration=configuration) diff --git a/manila/tests/test_migrations.py b/manila/tests/test_migrations.py index f2606c7832..8e91615c34 100644 --- a/manila/tests/test_migrations.py +++ b/manila/tests/test_migrations.py @@ -106,9 +106,9 @@ class TestMigrations(test.TestCase): DEFAULT_CONFIG_FILE = os.path.join(os.path.dirname(__file__), '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 - CONFIG_FILE_PATH = os.environ.get('CINDER_TEST_MIGRATIONS_CONF', + CONFIG_FILE_PATH = os.environ.get('MANILA_TEST_MIGRATIONS_CONF', DEFAULT_CONFIG_FILE) MIGRATE_FILE = manila.db.sqlalchemy.migrate_repo.__file__ REPOSITORY = repository.Repository( diff --git a/manila/tests/test_netapp_nfs.py b/manila/tests/test_netapp_nfs.py index 8f778c0586..8bfaa5e80c 100644 --- a/manila/tests/test_netapp_nfs.py +++ b/manila/tests/test_netapp_nfs.py @@ -99,7 +99,7 @@ class NetappNfsDriverTestCase(test.TestCase): setattr(drv.configuration, flag, None) # check exception raises when flags are not set - self.assertRaises(exception.CinderException, + self.assertRaises(exception.ManilaException, drv.check_for_setup_error) # set required flags @@ -154,7 +154,7 @@ class NetappNfsDriverTestCase(test.TestCase): volume = FakeVolume(1) snapshot = FakeSnapshot(2) - self.assertRaises(exception.CinderException, + self.assertRaises(exception.ManilaException, drv.create_volume_from_snapshot, volume, snapshot) @@ -265,7 +265,7 @@ class NetappNfsDriverTestCase(test.TestCase): clone_name = 'clone_name' volume_id = volume_name + str(hash(volume_name)) - self.assertRaises(exception.CinderException, + self.assertRaises(exception.ManilaException, drv._clone_volume, volume_name, clone_name, volume_id) @@ -278,7 +278,7 @@ class NetappNfsDriverTestCase(test.TestCase): self._driver.create_cloned_volume(volume_clone_fail, volume_src) raise AssertionError() - except exception.CinderException: + except exception.ManilaException: pass @@ -310,7 +310,7 @@ class NetappCmodeNfsDriverTestCase(test.TestCase): for flag in required_flags: setattr(drv.configuration, flag, None) # check exception raises when flags are not set - self.assertRaises(exception.CinderException, + self.assertRaises(exception.ManilaException, drv.check_for_setup_error) # set required flags @@ -363,7 +363,7 @@ class NetappCmodeNfsDriverTestCase(test.TestCase): volume = FakeVolume(1) snapshot = FakeSnapshot(2) - self.assertRaises(exception.CinderException, + self.assertRaises(exception.ManilaException, drv.create_volume_from_snapshot, volume, snapshot) @@ -469,7 +469,7 @@ class NetappCmodeNfsDriverTestCase(test.TestCase): self._driver.create_cloned_volume(volume_clone_fail, volume_src) raise AssertionError() - except exception.CinderException: + except exception.ManilaException: pass @@ -493,7 +493,7 @@ class NetappDirectCmodeNfsDriverTestCase(NetappCmodeNfsDriverTestCase): for flag in required_flags: setattr(drv.configuration, flag, None) # check exception raises when flags are not set - self.assertRaises(exception.CinderException, + self.assertRaises(exception.ManilaException, drv.check_for_setup_error) # set required flags @@ -615,7 +615,7 @@ class NetappDirect7modeNfsDriverTestCase(NetappDirectCmodeNfsDriverTestCase): for flag in required_flags: setattr(drv.configuration, flag, None) # check exception raises when flags are not set - self.assertRaises(exception.CinderException, + self.assertRaises(exception.ManilaException, drv.check_for_setup_error) # set required flags diff --git a/manila/tests/test_nexenta.py b/manila/tests/test_nexenta.py index 94325a840d..301dcce31b 100644 --- a/manila/tests/test_nexenta.py +++ b/manila/tests/test_nexenta.py @@ -16,7 +16,7 @@ # License for the specific language governing permissions and limitations # under the License. """ -Unit tests for OpenStack Cinder volume driver +Unit tests for OpenStack Manila volume driver """ import base64 diff --git a/manila/tests/test_policy.py b/manila/tests/test_policy.py index d8af1b93e3..8749f614b9 100644 --- a/manila/tests/test_policy.py +++ b/manila/tests/test_policy.py @@ -15,7 +15,7 @@ # License for the specific language governing permissions and limitations # under the License. -"""Test of Policy Engine For Cinder.""" +"""Test of Policy Engine For Manila.""" import os.path import StringIO diff --git a/manila/tests/test_rbd.py b/manila/tests/test_rbd.py index 86daafaaf8..ccd0ed3fd5 100644 --- a/manila/tests/test_rbd.py +++ b/manila/tests/test_rbd.py @@ -206,7 +206,7 @@ class ManagedRBDTestCase(DriverTestCase): return True def fake_clone_error(volume, image_location): - raise exception.CinderException() + raise exception.ManilaException() self.stubs.Set(self.volume.driver, '_is_cloneable', lambda x: True) if clone_works: @@ -231,7 +231,7 @@ class ManagedRBDTestCase(DriverTestCase): volume_id, image_id=image_id) else: - self.assertRaises(exception.CinderException, + self.assertRaises(exception.ManilaException, self.volume.create_volume, self.context, volume_id, diff --git a/manila/tests/test_storwize_svc.py b/manila/tests/test_storwize_svc.py index 732f45eaa5..6b1956ad12 100755 --- a/manila/tests/test_storwize_svc.py +++ b/manila/tests/test_storwize_svc.py @@ -1811,7 +1811,7 @@ class StorwizeSVCDriverTestCase(test.TestCase): self.driver.terminate_connection(volume, conn) self._set_flag('storwize_svc_multihostmap_enabled', False) - self.assertRaises(exception.CinderException, + self.assertRaises(exception.ManilaException, self.driver.initialize_connection, volume, conn) self.driver.terminate_connection(volume, conn) self._reset_flags() diff --git a/manila/tests/test_windows.py b/manila/tests/test_windows.py index 234598d788..1b0307744c 100644 --- a/manila/tests/test_windows.py +++ b/manila/tests/test_windows.py @@ -16,7 +16,7 @@ # 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 diff --git a/manila/tests/test_wsgi.py b/manila/tests/test_wsgi.py index 8ac0e20dad..c1ed6791ac 100644 --- a/manila/tests/test_wsgi.py +++ b/manila/tests/test_wsgi.py @@ -195,7 +195,7 @@ class ExceptionTest(test.TestCase): return fault.FaultWrapper(inner_app) def _do_test_exception_safety_reflected_in_faults(self, expose): - class ExceptionWithSafety(exception.CinderException): + class ExceptionWithSafety(exception.ManilaException): safe = expose @webob.dec.wsgify @@ -235,14 +235,14 @@ class ExceptionTest(test.TestCase): def test_quota_error_mapping(self): 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): code = 404 self._do_test_exception_mapping(ExceptionWithCode, 'NotFound') - def test_non_cinder_exception_mapping(self): + def test_non_manila_exception_mapping(self): class ExceptionWithCode(Exception): code = 417 diff --git a/manila/tests/utils.py b/manila/tests/utils.py index 3faf70bb6b..8c0f04447e 100644 --- a/manila/tests/utils.py +++ b/manila/tests/utils.py @@ -25,7 +25,7 @@ def get_test_admin_context(): return manila.context.get_admin_context() -def is_cinder_installed(): +def is_manila_installed(): if os.path.exists('../../manila.manila.egg-info'): return True else: diff --git a/manila/tests/windows/basetestcase.py b/manila/tests/windows/basetestcase.py index cfc0e2795d..4157e325f1 100644 --- a/manila/tests/windows/basetestcase.py +++ b/manila/tests/windows/basetestcase.py @@ -25,7 +25,7 @@ import pickle 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): diff --git a/manila/utils.py b/manila/utils.py index 7017013792..9ab42365c9 100644 --- a/manila/utils.py +++ b/manila/utils.py @@ -314,7 +314,7 @@ class SSHPool(pools.Pool): timeout=self.conn_timeout) else: 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, # ignoring what we set thru the sshclient. This doesn't help for @@ -364,7 +364,7 @@ class SSHPool(pools.Pool): self.current_size -= 1 -def cinderdir(): +def maniladir(): import manila return os.path.abspath(manila.__file__).split('manila/__init__.py')[0] diff --git a/manila/version.py b/manila/version.py index 05988266d9..75aecef193 100644 --- a/manila/version.py +++ b/manila/version.py @@ -16,9 +16,9 @@ from pbr import version as pbr_version -CINDER_VENDOR = "OpenStack Foundation" -CINDER_PRODUCT = "OpenStack Cinder" -CINDER_PACKAGE = None # OS distro package version suffix +MANILA_VENDOR = "OpenStack Foundation" +MANILA_PRODUCT = "OpenStack Manila" +MANILA_PACKAGE = None # OS distro package version suffix loaded = False version_info = pbr_version.VersionInfo('manila') diff --git a/tools/install_venv.py b/tools/install_venv.py index e967323a0f..31daf63f81 100644 --- a/tools/install_venv.py +++ b/tools/install_venv.py @@ -19,7 +19,7 @@ # License for the specific language governing permissions and limitations # under the License. -"""Installation script for Cinder's development virtualenv.""" +"""Installation script for Manila's development virtualenv.""" import optparse import os @@ -31,12 +31,12 @@ import install_venv_common as install_venv def print_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. - 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: $ source .venv/bin/activate @@ -56,7 +56,7 @@ def main(argv): venv = os.path.join(root, '.venv') pip_requires = os.path.join(root, 'tools', 'pip-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]) install = install_venv.InstallVenv(root, venv, pip_requires, test_requires, py_version, project)