Renamed cinder to manila.

Fixed setup.py, fixed bin scripts.
This commit is contained in:
Yulia Portnova 2013-09-02 09:59:07 +03:00
parent f99ef92c90
commit dc4ce932ed
473 changed files with 5209 additions and 2846 deletions

1
.idea/.name generated Normal file
View File

@ -0,0 +1 @@
manila

5
.idea/encodings.xml generated Normal file
View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
</project>

9
.idea/manila.iml generated Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

30
.idea/misc.xml generated Normal file
View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 2.7.3 (/usr/bin/python2.7)" project-jdk-type="Python SDK" />
<component name="PyConsoleOptionsProvider">
<option name="myPythonConsoleState">
<PyConsoleSettings />
</option>
<option name="myDjangoConsoleState">
<PyConsoleSettings />
</option>
</component>
<component name="SvnConfiguration" maxAnnotateRevisions="500" myUseAcceleration="nothing" myAutoUpdateAfterCommit="false" cleanupOnStartRun="false" SSL_PROTOCOLS="all">
<option name="USER" value="" />
<option name="PASSWORD" value="" />
<option name="mySSHConnectionTimeout" value="30000" />
<option name="mySSHReadTimeout" value="30000" />
<option name="LAST_MERGED_REVISION" />
<option name="MERGE_DRY_RUN" value="false" />
<option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
<option name="UPDATE_LOCK_ON_DEMAND" value="false" />
<option name="IGNORE_SPACES_IN_MERGE" value="false" />
<option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
<option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
<option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
<option name="FORCE_UPDATE" value="false" />
<option name="IGNORE_EXTERNALS" value="false" />
<myIsUseDefaultProxy>false</myIsUseDefaultProxy>
</component>
</project>

9
.idea/modules.xml generated Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/manila.iml" filepath="$PROJECT_DIR$/.idea/manila.iml" />
</modules>
</component>
</project>

7
.idea/other.xml generated Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PyDocumentationSettings">
<option name="myDocStringFormat" value="reStructuredText" />
</component>
</project>

5
.idea/scopes/scope_settings.xml generated Normal file
View File

@ -0,0 +1,5 @@
<component name="DependencyValidationManager">
<state>
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
</state>
</component>

8
.idea/testrunner.xml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="TestRunnerService">
<option name="projectConfiguration" value="Nosetests" />
<option name="PROJECT_TEST_RUNNER" value="Nosetests" />
</component>
</project>

7
.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

1287
.idea/workspace.xml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -18,9 +18,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""Starter script for All cinder services.
"""Starter script for All manila services.
This script attempts to start all the cinder services in one process. Each
This script attempts to start all the manila services in one process. Each
service is started in its own greenthread. Please note that exceptions and
sys.exit() on the starting of a service are logged and the script will
continue attempting to launch the rest of the services.
@ -36,32 +36,32 @@ import sys
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(
sys.argv[0]), os.pardir, os.pardir))
if os.path.exists(os.path.join(possible_topdir, "cinder", "__init__.py")):
if os.path.exists(os.path.join(possible_topdir, "manila", "__init__.py")):
sys.path.insert(0, possible_topdir)
from cinder.openstack.common import gettextutils
gettextutils.install('cinder')
from manila.openstack.common import gettextutils
gettextutils.install('manila')
from cinder import flags
from cinder.openstack.common import log as logging
from cinder import service
from cinder import utils
from manila import flags
from manila.openstack.common import log as logging
from manila import service
from manila import utils
if __name__ == '__main__':
flags.parse_args(sys.argv)
logging.setup("cinder")
LOG = logging.getLogger('cinder.all')
logging.setup("manila")
LOG = logging.getLogger('manila.all')
utils.monkey_patch()
servers = []
# cinder-api
# manila-api
try:
servers.append(service.WSGIService('osapi_volume'))
except (Exception, SystemExit):
LOG.exception(_('Failed to load osapi_volume'))
for binary in ['cinder-volume', 'cinder-scheduler']:
for binary in ['manila-volume', 'manila-scheduler']:
try:
servers.append(service.Service.create(binary=binary))
except (Exception, SystemExit):

View File

@ -17,7 +17,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""Starter script for Cinder OS API."""
"""Starter script for manila OS API."""
# NOTE(jdg): If we port over multi worker code from Nova
# we'll need to set monkey_patch(os=False), unless
@ -32,20 +32,20 @@ import sys
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(
sys.argv[0]), os.pardir, os.pardir))
if os.path.exists(os.path.join(possible_topdir, "cinder", "__init__.py")):
if os.path.exists(os.path.join(possible_topdir, "manila", "__init__.py")):
sys.path.insert(0, possible_topdir)
from cinder.openstack.common import gettextutils
gettextutils.install('cinder')
from manila.openstack.common import gettextutils
gettextutils.install('manila')
from cinder import flags
from cinder.openstack.common import log as logging
from cinder import service
from cinder import utils
from manila import flags
from manila.openstack.common import log as logging
from manila import service
from manila import utils
if __name__ == '__main__':
flags.parse_args(sys.argv)
logging.setup("cinder")
logging.setup("manila")
utils.monkey_patch()
server = service.WSGIService('osapi_volume')
service.serve(server)

View File

@ -15,7 +15,7 @@
# License for the specific language governing permissions and limitations
# under the License.
"""Starter script for Cinder Volume Backup."""
"""Starter script for manila Volume Backup."""
import os
import sys
@ -24,27 +24,27 @@ import eventlet
eventlet.monkey_patch()
# If ../cinder/__init__.py exists, add ../ to Python search path, so that
# If ../manila/__init__.py exists, add ../ to Python search path, so that
# it will override what happens to be installed in /usr/(local/)lib/python...
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
os.pardir,
os.pardir))
if os.path.exists(os.path.join(possible_topdir, 'cinder', '__init__.py')):
if os.path.exists(os.path.join(possible_topdir, 'manila', '__init__.py')):
sys.path.insert(0, possible_topdir)
from cinder.openstack.common import gettextutils
gettextutils.install('cinder')
from manila.openstack.common import gettextutils
gettextutils.install('manila')
from cinder import flags
from cinder.openstack.common import log as logging
from cinder import service
from cinder import utils
from manila import flags
from manila.openstack.common import log as logging
from manila import service
from manila import utils
if __name__ == '__main__':
flags.parse_args(sys.argv)
logging.setup("cinder")
logging.setup("manila")
utils.monkey_patch()
launcher = service.ProcessLauncher()
server = service.Service.create(binary='cinder-backup')
server = service.Service.create(binary='manila-backup')
launcher.launch_server(server)
launcher.wait()

View File

@ -16,7 +16,7 @@
# License for the specific language governing permissions and limitations
# under the License.
"""Admin/debug script to wipe rabbitMQ (AMQP) queues cinder uses.
"""Admin/debug script to wipe rabbitMQ (AMQP) queues manila uses.
This can be used if you need to change durable options on queues,
or to wipe all messages in the queue system if things are in a
serious bad way.
@ -28,29 +28,29 @@ import os
import sys
import time
# If ../cinder/__init__.py exists, add ../ to Python search path, so that
# If ../manila/__init__.py exists, add ../ to Python search path, so that
# it will override what happens to be installed in /usr/(local/)lib/python...
POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
os.pardir,
os.pardir))
if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'cinder', '__init__.py')):
if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'manila', '__init__.py')):
sys.path.insert(0, POSSIBLE_TOPDIR)
from cinder.openstack.common import gettextutils
gettextutils.install('cinder')
from manila.openstack.common import gettextutils
gettextutils.install('manila')
from oslo.config import cfg
from cinder import context
from cinder import exception
from cinder import flags
from cinder.openstack.common import log as logging
from cinder.openstack.common import rpc
from manila import context
from manila import exception
from manila import flags
from manila.openstack.common import log as logging
from manila.openstack.common import rpc
delete_exchange_opt = \
cfg.BoolOpt('delete_exchange',
default=False,
help='delete cinder exchange too.')
help='delete manila exchange too.')
FLAGS = flags.FLAGS
FLAGS.register_cli_opt(delete_exchange_opt)
@ -70,7 +70,7 @@ def delete_queues(queues):
if __name__ == '__main__':
args = flags.parse_args(sys.argv)
logging.setup("cinder")
logging.setup("manila")
delete_queues(args[1:])
if FLAGS.delete_exchange:
delete_exchange(FLAGS.control_exchange)

View File

@ -51,7 +51,7 @@
"""
CLI interface for cinder management.
CLI interface for manila management.
"""
import os
@ -63,29 +63,29 @@ from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
# If ../cinder/__init__.py exists, add ../ to Python search path, so that
# If ../manila/__init__.py exists, add ../ to Python search path, so that
# it will override what happens to be installed in /usr/(local/)lib/python...
POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
os.pardir,
os.pardir))
if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'cinder', '__init__.py')):
if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'manila', '__init__.py')):
sys.path.insert(0, POSSIBLE_TOPDIR)
from cinder.openstack.common import gettextutils
gettextutils.install('cinder')
from manila.openstack.common import gettextutils
gettextutils.install('manila')
from oslo.config import cfg
from cinder import context
from cinder import db
from cinder.db import migration
from cinder import exception
from cinder import flags
from cinder.openstack.common import log as logging
from cinder.openstack.common import rpc
from cinder.openstack.common import uuidutils
from cinder import utils
from cinder import version
from manila import context
from manila import db
from manila.db import migration
from manila import exception
from manila import flags
from manila.openstack.common import log as logging
from manila.openstack.common import rpc
from manila.openstack.common import uuidutils
from manila import utils
from manila import version
FLAGS = flags.FLAGS
@ -179,7 +179,7 @@ def _db_error(caught_exception):
print caught_exception
print _("The above error may show that the database has not "
"been created.\nPlease create a database using "
"'cinder-manage db sync' before running this command.")
"'manila-manage db sync' before running this command.")
exit(1)
@ -237,15 +237,15 @@ class VersionCommands(object):
class ImportCommands(object):
"""Methods for importing Nova volumes to Cinder.
"""Methods for importing Nova volumes to manila.
EXPECTATIONS:
These methods will do two things:
1. Import relevant Nova DB info in to Cinder
2. Import persistent tgt files from Nova to Cinder (see copy_tgt_files)
1. Import relevant Nova DB info in to manila
2. Import persistent tgt files from Nova to manila (see copy_tgt_files)
If you're using VG's (local storage) for your backend YOU MUST install
Cinder on the same node that you're migrating from.
manila on the same node that you're migrating from.
"""
def __init__(self):
pass
@ -264,12 +264,12 @@ class ImportCommands(object):
session = sessionmaker(bind=engine)
return (session(), engine)
def _backup_cinder_db(self):
def _backup_manila_db(self):
#First, dump the dest_db as a backup incase this goes wrong
cinder_dump = utils.execute('mysqldump', 'cinder')
if 'Dump completed on' in cinder_dump[0]:
with open('./cinder_db_bkup.sql', 'w+') as fo:
for line in cinder_dump:
manila_dump = utils.execute('mysqldump', 'manila')
if 'Dump completed on' in manila_dump[0]:
with open('./manila_db_bkup.sql', 'w+') as fo:
for line in manila_dump:
fo.write(line)
else:
raise exception.InvalidResults()
@ -296,7 +296,7 @@ class ImportCommands(object):
print (_('Sorry, only mysql backups are supported!'))
raise exception.InvalidRequest()
else:
self._backup_cinder_db()
self._backup_manila_db()
(src, src_engine) = self._open_session(src_db)
src_meta = MetaData(bind=src_engine)
@ -307,7 +307,7 @@ class ImportCommands(object):
if src.query(table).first().version < 132:
print (_('ERROR: Specified Nova DB is not at a compatible '
'migration version!\nNova must be at Folsom or newer '
'to import into Cinder database.'))
'to import into manila database.'))
sys.exit(2)
for table_name in table_list:
@ -336,34 +336,34 @@ class ImportCommands(object):
@args('src', metavar='<Nova DB>',
help='db-engine://db_user[:passwd]@db_host[:port]\t\t'
'example: mysql://root:secrete@192.168.137.1')
@args('dest', metavar='<Cinder DB>',
@args('dest', metavar='<manila DB>',
help='db-engine://db_user[:passwd]@db_host[:port]\t\t'
'example: mysql://root:secrete@192.168.137.1')
@args('--backup', metavar='<0|1>', choices=[0, 1], default=1,
help='Perform mysqldump of cinder db before writing to it'
help='Perform mysqldump of manila db before writing to it'
' (default: %(default)d)')
def import_db(self, src_db, dest_db, backup_db=1):
"""Import relevant volume DB entries from Nova into Cinder.
"""Import relevant volume DB entries from Nova into manila.
NOTE:
Your Cinder DB should be clean WRT volume entries.
Your manila DB should be clean WRT volume entries.
NOTE:
We take an sqldump of the cinder DB before mods
We take an sqldump of the manila DB before mods
If you're not using mysql, set backup_db=0
and create your own backup.
"""
src_db = '%s/nova' % src_db
dest_db = '%s/cinder' % dest_db
dest_db = '%s/manila' % dest_db
self._import_db(src_db, dest_db, backup_db)
@args('src',
help='e.g. (login@src_host:]/opt/stack/nova/volumes/)')
@args('dest', nargs='?', default=None,
help='e.g. (login@src_host:/opt/stack/cinder/volumes/) '
help='e.g. (login@src_host:/opt/stack/manila/volumes/) '
'optional, if emitted, \'volume_dir\' in config will be used')
def copy_ptgt_files(self, src_tgts, dest_tgts=None):
"""Copy persistent scsi tgt files from nova to cinder.
"""Copy persistent scsi tgt files from nova to manila.
Default destination is FLAGS.volume_dir or state_path/volumes/
@ -620,7 +620,7 @@ class GetLogCommands(object):
@args('num_entries', nargs='?', type=int, default=10,
help='Number of entries to list (default: %(default)d)')
def syslog(self, num_entries=10):
"""Get <num_entries> of the cinder syslog events."""
"""Get <num_entries> of the manila syslog events."""
entries = int(num_entries)
count = 0
log_file = ''
@ -633,16 +633,16 @@ class GetLogCommands(object):
sys.exit(1)
lines = [line.strip() for line in open(log_file, "r")]
lines.reverse()
print "Last %s cinder syslog entries:-" % (entries)
print "Last %s manila syslog entries:-" % (entries)
for line in lines:
if line.find("cinder") > 0:
if line.find("manila") > 0:
count += 1
print "%s" % (line)
if count == entries:
break
if count == 0:
print "No cinder entries in syslog!"
print "No manila entries in syslog!"
class BackupCommands(object):
@ -684,7 +684,7 @@ class BackupCommands(object):
class ServiceCommands(object):
"""Methods for managing services."""
def list(self):
"""Show a list of all cinder services."""
"""Show a list of all manila services."""
ctxt = context.get_admin_context()
services = db.service_get_all(ctxt)
print_format = "%-16s %-36s %-16s %-10s %-5s %-10s"
@ -787,7 +787,7 @@ def main():
FLAGS.register_cli_opt(category_opt)
script_name = sys.argv[0]
if len(sys.argv) < 2:
print(_("\nOpenStack Cinder version: %(version)s\n") %
print(_("\nOpenStack manila version: %(version)s\n") %
{'version': version.version_string()})
print script_name + " category action [<args>]"
print _("Available categories:")
@ -797,7 +797,7 @@ def main():
try:
flags.parse_args(sys.argv)
logging.setup("cinder")
logging.setup("manila")
except cfg.ConfigFilesNotFoundError:
cfgfile = FLAGS.config_file[-1] if FLAGS.config_file else None
if cfgfile and not os.access(cfgfile, os.R_OK):
@ -808,7 +808,7 @@ def main():
except Exception:
print _('sudo failed, continuing as if nothing happened')
print _('Please re-run cinder-manage as root.')
print _('Please re-run manila-manage as root.')
sys.exit(2)
fn = FLAGS.category.action_fn

View File

@ -20,14 +20,14 @@
Filters which commands a service is allowed to run as another user.
To use this with cinder, you should set the following in
cinder.conf:
rootwrap_config=/etc/cinder/rootwrap.conf
To use this with manila, you should set the following in
manila.conf:
rootwrap_config=/etc/manila/rootwrap.conf
You also need to let the cinder user run cinder-rootwrap
You also need to let the manila user run manila-rootwrap
as root in sudoers:
cinder ALL = (root) NOPASSWD: /usr/bin/cinder-rootwrap
/etc/cinder/rootwrap.conf *
manila ALL = (root) NOPASSWD: /usr/bin/manila-rootwrap
/etc/manila/rootwrap.conf *
Service packaging should deploy .filters files only on nodes where
they are needed, to avoid allowing more than is necessary.
@ -73,10 +73,10 @@ if __name__ == '__main__':
# Add ../ to sys.path to allow running from branch
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(execname),
os.pardir, os.pardir))
if os.path.exists(os.path.join(possible_topdir, "cinder", "__init__.py")):
if os.path.exists(os.path.join(possible_topdir, "manila", "__init__.py")):
sys.path.insert(0, possible_topdir)
from cinder.openstack.common.rootwrap import wrapper
from manila.openstack.common.rootwrap import wrapper
# Load configuration
try:

View File

@ -22,19 +22,19 @@ import contextlib
import os
import sys
# If ../cinder/__init__.py exists, add ../ to Python search path, so that
# If ../manila/__init__.py exists, add ../ to Python search path, so that
# it will override what happens to be installed in /usr/(local/)lib/python...
POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
os.pardir,
os.pardir))
if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'cinder', '__init__.py')):
if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'manila', '__init__.py')):
sys.path.insert(0, POSSIBLE_TOPDIR)
from oslo.config import cfg
from cinder.openstack.common import log as logging
from cinder.openstack.common import rpc
from cinder.openstack.common.rpc import impl_zmq
from manila.openstack.common import log as logging
from manila.openstack.common import rpc
from manila.openstack.common.rpc import impl_zmq
CONF = cfg.CONF
CONF.register_opts(rpc.rpc_opts)
@ -42,8 +42,8 @@ CONF.register_opts(impl_zmq.zmq_opts)
def main():
CONF(sys.argv[1:], project='cinder')
logging.setup("cinder")
CONF(sys.argv[1:], project='manila')
logging.setup("manila")
with contextlib.closing(impl_zmq.ZmqProxy(CONF)) as reactor:
reactor.consume_in_thread()

View File

@ -17,7 +17,7 @@
# License for the specific language governing permissions and limitations
# under the License.
"""Starter script for Cinder Scheduler."""
"""Starter script for manila Scheduler."""
import eventlet
eventlet.monkey_patch()
@ -25,26 +25,26 @@ eventlet.monkey_patch()
import os
import sys
# If ../cinder/__init__.py exists, add ../ to Python search path, so that
# If ../manila/__init__.py exists, add ../ to Python search path, so that
# it will override what happens to be installed in /usr/(local/)lib/python...
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
os.pardir,
os.pardir))
if os.path.exists(os.path.join(possible_topdir, 'cinder', '__init__.py')):
if os.path.exists(os.path.join(possible_topdir, 'manila', '__init__.py')):
sys.path.insert(0, possible_topdir)
from cinder.openstack.common import gettextutils
gettextutils.install('cinder')
from manila.openstack.common import gettextutils
gettextutils.install('manila')
from cinder import flags
from cinder.openstack.common import log as logging
from cinder import service
from cinder import utils
from manila import flags
from manila.openstack.common import log as logging
from manila import service
from manila import utils
if __name__ == '__main__':
flags.parse_args(sys.argv)
logging.setup("cinder")
logging.setup("manila")
utils.monkey_patch()
server = service.Service.create(binary='cinder-scheduler')
server = service.Service.create(binary='manila-scheduler')
service.serve(server)
service.wait()

View File

@ -16,7 +16,7 @@
# License for the specific language governing permissions and limitations
# under the License.
"""Starter script for Cinder Share."""
"""Starter script for manila Share."""
import eventlet
eventlet.monkey_patch()
@ -24,27 +24,27 @@ eventlet.monkey_patch()
import os
import sys
# If ../cinder/__init__.py exists, add ../ to Python search path, so that
# If ../manila/__init__.py exists, add ../ to Python search path, so that
# it will override what happens to be installed in /usr/(local/)lib/python...
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
os.pardir,
os.pardir))
if os.path.exists(os.path.join(possible_topdir, 'cinder', '__init__.py')):
if os.path.exists(os.path.join(possible_topdir, 'manila', '__init__.py')):
sys.path.insert(0, possible_topdir)
from cinder.openstack.common import gettextutils
gettextutils.install('cinder')
from manila.openstack.common import gettextutils
gettextutils.install('manila')
from cinder import flags
from cinder.openstack.common import log as logging
from cinder import service
from cinder import utils
from manila import flags
from manila.openstack.common import log as logging
from manila import service
from manila import utils
FLAGS = flags.FLAGS
if __name__ == '__main__':
flags.parse_args(sys.argv)
logging.setup("cinder")
logging.setup("manila")
utils.monkey_patch()
launcher = service.ProcessLauncher()
if FLAGS.enabled_share_backends:
@ -55,6 +55,6 @@ if __name__ == '__main__':
service_name=backend)
launcher.launch_server(server)
else:
server = service.Service.create(binary='cinder-share')
server = service.Service.create(binary='manila-share')
launcher.launch_server(server)
launcher.wait()

View File

@ -17,7 +17,7 @@
# License for the specific language governing permissions and limitations
# under the License.
"""Starter script for Cinder Volume."""
"""Starter script for manila Volume."""
import eventlet
eventlet.monkey_patch()
@ -25,27 +25,27 @@ eventlet.monkey_patch()
import os
import sys
# If ../cinder/__init__.py exists, add ../ to Python search path, so that
# If ../manila/__init__.py exists, add ../ to Python search path, so that
# it will override what happens to be installed in /usr/(local/)lib/python...
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
os.pardir,
os.pardir))
if os.path.exists(os.path.join(possible_topdir, 'cinder', '__init__.py')):
if os.path.exists(os.path.join(possible_topdir, 'manila', '__init__.py')):
sys.path.insert(0, possible_topdir)
from cinder.openstack.common import gettextutils
gettextutils.install('cinder')
from manila.openstack.common import gettextutils
gettextutils.install('manila')
from cinder import flags
from cinder.openstack.common import log as logging
from cinder import service
from cinder import utils
from manila import flags
from manila.openstack.common import log as logging
from manila import service
from manila import utils
FLAGS = flags.FLAGS
if __name__ == '__main__':
flags.parse_args(sys.argv)
logging.setup("cinder")
logging.setup("manila")
utils.monkey_patch()
launcher = service.ProcessLauncher()
if FLAGS.enabled_backends:
@ -56,6 +56,6 @@ if __name__ == '__main__':
service_name=backend)
launcher.launch_server(server)
else:
server = service.Service.create(binary='cinder-volume')
server = service.Service.create(binary='manila-volume')
launcher.launch_server(server)
launcher.wait()

View File

@ -38,24 +38,24 @@ import os
import sys
import traceback
# If ../cinder/__init__.py exists, add ../ to Python search path, so that
# If ../manila/__init__.py exists, add ../ to Python search path, so that
# it will override what happens to be installed in /usr/(local/)lib/python...
POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
os.pardir,
os.pardir))
if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'cinder', '__init__.py')):
if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'manila', '__init__.py')):
sys.path.insert(0, POSSIBLE_TOPDIR)
from cinder.openstack.common import gettextutils
gettextutils.install('cinder')
from manila.openstack.common import gettextutils
gettextutils.install('manila')
from cinder import context
from cinder import db
from cinder import flags
from cinder.openstack.common import log as logging
from cinder.openstack.common import rpc
from cinder import utils
import cinder.volume.utils
from manila import context
from manila import db
from manila import flags
from manila.openstack.common import log as logging
from manila.openstack.common import rpc
from manila import utils
import manila.volume.utils
FLAGS = flags.FLAGS
@ -63,7 +63,7 @@ FLAGS = flags.FLAGS
if __name__ == '__main__':
admin_context = context.get_admin_context()
flags.parse_args(sys.argv)
logging.setup("cinder")
logging.setup("manila")
begin, end = utils.last_completed_audit_period()
print _("Starting volume usage audit")
msg = _("Creating usages for %(begin_period)s until %(end_period)s")
@ -80,7 +80,7 @@ if __name__ == '__main__':
print _("Found %d volumes") % len(volumes)
for volume_ref in volumes:
try:
cinder.volume.utils.notify_usage_exists(
manila.volume.utils.notify_usage_exists(
admin_context, volume_ref)
except Exception, e:
print traceback.format_exc(e)
@ -91,7 +91,7 @@ if __name__ == '__main__':
print _("Found %d snapshots") % len(snapshots)
for snapshot_ref in snapshots:
try:
cinder.volume.utils.notify_about_snapshot_usage(admin_context,
manila.volume.utils.notify_about_snapshot_usage(admin_context,
snapshot_ref,
'exists',
extra_info)

View File

@ -1,9 +1,9 @@
import gettext
import os
gettext.install('cinder')
gettext.install('manila')
from cinder import utils
from manila import utils
def setup(app):

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# cinder documentation build configuration file, created by
# manila documentation build configuration file, created by
# sphinx-quickstart on Sat May 1 15:17:47 2010.
#
# This file is execfile()d with the current directory set
@ -64,14 +64,14 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'cinder'
project = u'manila'
copyright = u'2010-present, OpenStack, LLC'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
from cinder.version import version_info
from manila.version import version_info
# The full version, including alpha/beta/rc tags.
release = version_info.release_string()
# The short X.Y version.
@ -116,7 +116,7 @@ show_authors = False
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
modindex_common_prefix = ['cinder.']
modindex_common_prefix = ['manila.']
# -- Options for man page output ----------------------------------------------
@ -124,7 +124,7 @@ modindex_common_prefix = ['cinder.']
# List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual'
man_pages = [
('man/cinder-manage', 'cinder-manage', u'Cloud controller fabric',
('man/manila-manage', 'manila-manage', u'Cloud controller fabric',
[u'OpenStack'], 1)
]

41
manila.egg-info/PKG-INFO Normal file
View File

@ -0,0 +1,41 @@
Metadata-Version: 1.1
Name: manila
Version: 2013.2.a2.gf99ef92
Summary: OpenStack Share Storage
Home-page: http://www.openstack.org/
Author: OpenStack
Author-email: openstack-dev@lists.openstack.org
License: UNKNOWN
Description: The Choose Your Own Adventure README for Cinder
===============================================
You have come across a storage service for an open cloud computing service.
It has identified itself as "Cinder." It was abstracted from the Nova project.
To monitor it from a distance: follow `@openstack <http://twitter.com/openstack>`_ on twitter.
To tame it for use in your own cloud: read http://docs.openstack.org
To study its anatomy: read http://cinder.openstack.org
To dissect it in detail: visit http://github.com/openstack/cinder
To taunt it with its weaknesses: use http://bugs.launchpad.net/cinder
To watch it: http://jenkins.openstack.org
To hack at it: read HACKING
To cry over its pylint problems: http://jenkins.openstack.org/job/cinder-pylint/violations
Platform: UNKNOWN
Classifier: Environment :: OpenStack
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 2.6

917
manila.egg-info/SOURCES.txt Normal file
View File

@ -0,0 +1,917 @@
CONTRIBUTING.md
HACKING.rst
LICENSE
MANIFEST.in
README.md
README.rst
babel.cfg
openstack-common.conf
pylintrc
run_tests.sh
setup.cfg
setup.py
tox.ini
bin/cinder-all
bin/cinder-api
bin/cinder-backup
bin/cinder-clear-rabbit-queues
bin/cinder-manage
bin/cinder-rootwrap
bin/cinder-rpc-zmq-receiver
bin/cinder-scheduler
bin/cinder-share
bin/cinder-volume
bin/cinder-volume-usage-audit
cinder/__init__.py
cinder/context.py
cinder/exception.py
cinder/flags.py
cinder/manager.py
cinder/policy.py
cinder/quota.py
cinder/service.py
cinder/test.py
cinder/utils.py
cinder/version.py
cinder/wsgi.py
cinder/api/__init__.py
cinder/api/auth.py
cinder/api/common.py
cinder/api/extensions.py
cinder/api/sizelimit.py
cinder/api/urlmap.py
cinder/api/versions.py
cinder/api/xmlutil.py
cinder/api/contrib/__init__.py
cinder/api/contrib/admin_actions.py
cinder/api/contrib/backups.py
cinder/api/contrib/extended_snapshot_attributes.py
cinder/api/contrib/hosts.py
cinder/api/contrib/image_create.py
cinder/api/contrib/quota_classes.py
cinder/api/contrib/quotas.py
cinder/api/contrib/services.py
cinder/api/contrib/share_actions.py
cinder/api/contrib/share_snapshots.py
cinder/api/contrib/shares.py
cinder/api/contrib/types_extra_specs.py
cinder/api/contrib/types_manage.py
cinder/api/contrib/volume_actions.py
cinder/api/contrib/volume_host_attribute.py
cinder/api/contrib/volume_image_metadata.py
cinder/api/contrib/volume_tenant_attribute.py
cinder/api/middleware/__init__.py
cinder/api/middleware/auth.py
cinder/api/middleware/fault.py
cinder/api/middleware/sizelimit.py
cinder/api/openstack/__init__.py
cinder/api/openstack/urlmap.py
cinder/api/openstack/wsgi.py
cinder/api/openstack/volume/__init__.py
cinder/api/openstack/volume/versions.py
cinder/api/schemas/atom-link.rng
cinder/api/schemas/v1.1/extension.rng
cinder/api/schemas/v1.1/extensions.rng
cinder/api/schemas/v1.1/limits.rng
cinder/api/schemas/v1.1/metadata.rng
cinder/api/v1/__init__.py
cinder/api/v1/limits.py
cinder/api/v1/router.py
cinder/api/v1/snapshot_metadata.py
cinder/api/v1/snapshots.py
cinder/api/v1/types.py
cinder/api/v1/volume_metadata.py
cinder/api/v1/volumes.py
cinder/api/v2/__init__.py
cinder/api/v2/limits.py
cinder/api/v2/router.py
cinder/api/v2/snapshot_metadata.py
cinder/api/v2/snapshots.py
cinder/api/v2/types.py
cinder/api/v2/volumes.py
cinder/api/v2/views/__init__.py
cinder/api/v2/views/volumes.py
cinder/api/views/__init__.py
cinder/api/views/backups.py
cinder/api/views/limits.py
cinder/api/views/share_snapshots.py
cinder/api/views/shares.py
cinder/api/views/types.py
cinder/api/views/versions.py
cinder/backup/__init__.py
cinder/backup/api.py
cinder/backup/manager.py
cinder/backup/rpcapi.py
cinder/backup/services/__init__.py
cinder/backup/services/swift.py
cinder/brick/__init__.py
cinder/brick/iscsi/__init__.py
cinder/brick/iscsi/iscsi.py
cinder/brick/local_dev/__init__.py
cinder/brick/local_dev/lvm.py
cinder/common/__init__.py
cinder/common/sqlalchemyutils.py
cinder/compute/__init__.py
cinder/compute/aggregate_states.py
cinder/db/__init__.py
cinder/db/api.py
cinder/db/base.py
cinder/db/migration.py
cinder/db/sqlalchemy/__init__.py
cinder/db/sqlalchemy/api.py
cinder/db/sqlalchemy/migration.py
cinder/db/sqlalchemy/models.py
cinder/db/sqlalchemy/session.py
cinder/db/sqlalchemy/migrate_repo/README
cinder/db/sqlalchemy/migrate_repo/__init__.py
cinder/db/sqlalchemy/migrate_repo/manage.py
cinder/db/sqlalchemy/migrate_repo/migrate.cfg
cinder/db/sqlalchemy/migrate_repo/versions/001_cinder_init.py
cinder/db/sqlalchemy/migrate_repo/versions/002_quota_class.py
cinder/db/sqlalchemy/migrate_repo/versions/003_glance_metadata.py
cinder/db/sqlalchemy/migrate_repo/versions/004_volume_type_to_uuid.py
cinder/db/sqlalchemy/migrate_repo/versions/005_add_source_volume_column.py
cinder/db/sqlalchemy/migrate_repo/versions/005_sqlite_downgrade.sql
cinder/db/sqlalchemy/migrate_repo/versions/006_snapshots_add_provider_location.py
cinder/db/sqlalchemy/migrate_repo/versions/007_add_volume_snapshot_fk.py
cinder/db/sqlalchemy/migrate_repo/versions/007_sqlite_downgrade.sql
cinder/db/sqlalchemy/migrate_repo/versions/008_add_backup.py
cinder/db/sqlalchemy/migrate_repo/versions/009_add_snapshot_metadata_table.py
cinder/db/sqlalchemy/migrate_repo/versions/010_add_share_tables.py
cinder/db/sqlalchemy/migrate_repo/versions/011_add_share_snapshot_table.py
cinder/db/sqlalchemy/migrate_repo/versions/__init__.py
cinder/image/__init__.py
cinder/image/glance.py
cinder/image/image_utils.py
cinder/locale/cinder.pot
cinder/locale/bg_BG/LC_MESSAGES/cinder.po
cinder/locale/bs/LC_MESSAGES/cinder.po
cinder/locale/cs/LC_MESSAGES/cinder.po
cinder/locale/da/LC_MESSAGES/cinder.po
cinder/locale/de/LC_MESSAGES/cinder.po
cinder/locale/en_AU/LC_MESSAGES/cinder.po
cinder/locale/en_GB/LC_MESSAGES/cinder.po
cinder/locale/en_US/LC_MESSAGES/cinder.po
cinder/locale/es/LC_MESSAGES/cinder.po
cinder/locale/fi_FI/LC_MESSAGES/cinder.po
cinder/locale/fr/LC_MESSAGES/cinder.po
cinder/locale/it/LC_MESSAGES/cinder.po
cinder/locale/ja/LC_MESSAGES/cinder.po
cinder/locale/ko/LC_MESSAGES/cinder.po
cinder/locale/ko_KR/LC_MESSAGES/cinder.po
cinder/locale/pt_BR/LC_MESSAGES/cinder.po
cinder/locale/ru/LC_MESSAGES/cinder.po
cinder/locale/tl/LC_MESSAGES/cinder.po
cinder/locale/tr/LC_MESSAGES/cinder.po
cinder/locale/uk/LC_MESSAGES/cinder.po
cinder/locale/vi_VN/LC_MESSAGES/cinder.po
cinder/locale/zh_CN/LC_MESSAGES/cinder.po
cinder/locale/zh_TW/LC_MESSAGES/cinder.po
cinder/openstack/__init__.py
cinder/openstack/common/README
cinder/openstack/common/__init__.py
cinder/openstack/common/context.py
cinder/openstack/common/eventlet_backdoor.py
cinder/openstack/common/exception.py
cinder/openstack/common/excutils.py
cinder/openstack/common/fileutils.py
cinder/openstack/common/gettextutils.py
cinder/openstack/common/importutils.py
cinder/openstack/common/jsonutils.py
cinder/openstack/common/local.py
cinder/openstack/common/lockutils.py
cinder/openstack/common/log.py
cinder/openstack/common/loopingcall.py
cinder/openstack/common/network_utils.py
cinder/openstack/common/policy.py
cinder/openstack/common/processutils.py
cinder/openstack/common/service.py
cinder/openstack/common/strutils.py
cinder/openstack/common/threadgroup.py
cinder/openstack/common/timeutils.py
cinder/openstack/common/uuidutils.py
cinder/openstack/common/notifier/__init__.py
cinder/openstack/common/notifier/api.py
cinder/openstack/common/notifier/log_notifier.py
cinder/openstack/common/notifier/no_op_notifier.py
cinder/openstack/common/notifier/rabbit_notifier.py
cinder/openstack/common/notifier/rpc_notifier.py
cinder/openstack/common/notifier/rpc_notifier2.py
cinder/openstack/common/notifier/test_notifier.py
cinder/openstack/common/rootwrap/__init__.py
cinder/openstack/common/rootwrap/cmd.py
cinder/openstack/common/rootwrap/filters.py
cinder/openstack/common/rootwrap/wrapper.py
cinder/openstack/common/rpc/__init__.py
cinder/openstack/common/rpc/amqp.py
cinder/openstack/common/rpc/common.py
cinder/openstack/common/rpc/dispatcher.py
cinder/openstack/common/rpc/impl_fake.py
cinder/openstack/common/rpc/impl_kombu.py
cinder/openstack/common/rpc/impl_qpid.py
cinder/openstack/common/rpc/impl_zmq.py
cinder/openstack/common/rpc/matchmaker.py
cinder/openstack/common/rpc/matchmaker_redis.py
cinder/openstack/common/rpc/proxy.py
cinder/openstack/common/rpc/service.py
cinder/openstack/common/rpc/zmq_receiver.py
cinder/openstack/common/scheduler/__init__.py
cinder/openstack/common/scheduler/filter.py
cinder/openstack/common/scheduler/weight.py
cinder/openstack/common/scheduler/filters/__init__.py
cinder/openstack/common/scheduler/filters/availability_zone_filter.py
cinder/openstack/common/scheduler/filters/capabilities_filter.py
cinder/openstack/common/scheduler/filters/extra_specs_ops.py
cinder/openstack/common/scheduler/filters/json_filter.py
cinder/openstack/common/scheduler/weights/__init__.py
cinder/scheduler/__init__.py
cinder/scheduler/chance.py
cinder/scheduler/driver.py
cinder/scheduler/filter_scheduler.py
cinder/scheduler/host_manager.py
cinder/scheduler/manager.py
cinder/scheduler/rpcapi.py
cinder/scheduler/scheduler_options.py
cinder/scheduler/simple.py
cinder/scheduler/filters/__init__.py
cinder/scheduler/filters/capacity_filter.py
cinder/scheduler/filters/retry_filter.py
cinder/scheduler/weights/__init__.py
cinder/scheduler/weights/capacity.py
cinder/share/__init__.py
cinder/share/api.py
cinder/share/configuration.py
cinder/share/driver.py
cinder/share/manager.py
cinder/share/rpcapi.py
cinder/share/drivers/__init__.py
cinder/share/drivers/lvm.py
cinder/share/drivers/netapp.py
cinder/testing/README.rst
cinder/tests/__init__.py
cinder/tests/declare_flags.py
cinder/tests/fake_driver.py
cinder/tests/fake_flags.py
cinder/tests/fake_utils.py
cinder/tests/policy.json
cinder/tests/runtime_flags.py
cinder/tests/test_HpSanISCSIDriver.py
cinder/tests/test_api.py
cinder/tests/test_backup.py
cinder/tests/test_backup_swift.py
cinder/tests/test_context.py
cinder/tests/test_coraid.py
cinder/tests/test_drivers_compatibility.py
cinder/tests/test_emc.py
cinder/tests/test_exception.py
cinder/tests/test_flags.py
cinder/tests/test_glusterfs.py
cinder/tests/test_hp3par.py
cinder/tests/test_huawei.py
cinder/tests/test_iscsi.py
cinder/tests/test_migrations.conf
cinder/tests/test_migrations.py
cinder/tests/test_misc.py
cinder/tests/test_netapp.py
cinder/tests/test_netapp_nfs.py
cinder/tests/test_nexenta.py
cinder/tests/test_nfs.py
cinder/tests/test_policy.py
cinder/tests/test_quota.py
cinder/tests/test_rbd.py
cinder/tests/test_scality.py
cinder/tests/test_service.py
cinder/tests/test_share.py
cinder/tests/test_share_api.py
cinder/tests/test_share_driver.py
cinder/tests/test_share_lvm.py
cinder/tests/test_share_netapp.py
cinder/tests/test_share_rpcapi.py
cinder/tests/test_sheepdog.py
cinder/tests/test_skip_examples.py
cinder/tests/test_solidfire.py
cinder/tests/test_storwize_svc.py
cinder/tests/test_test.py
cinder/tests/test_test_utils.py
cinder/tests/test_utils.py
cinder/tests/test_volume.py
cinder/tests/test_volume_configuration.py
cinder/tests/test_volume_glance_metadata.py
cinder/tests/test_volume_rpcapi.py
cinder/tests/test_volume_types.py
cinder/tests/test_volume_types_extra_specs.py
cinder/tests/test_volume_utils.py
cinder/tests/test_windows.py
cinder/tests/test_wsgi.py
cinder/tests/test_xenapi_sm.py
cinder/tests/test_xiv.py
cinder/tests/test_zadara.py
cinder/tests/utils.py
cinder/tests/api/__init__.py
cinder/tests/api/common.py
cinder/tests/api/fakes.py
cinder/tests/api/test_common.py
cinder/tests/api/test_extensions.py
cinder/tests/api/test_router.py
cinder/tests/api/test_wsgi.py
cinder/tests/api/test_xmlutil.py
cinder/tests/api/contrib/__init__.py
cinder/tests/api/contrib/stubs.py
cinder/tests/api/contrib/test_admin_actions.py
cinder/tests/api/contrib/test_backups.py
cinder/tests/api/contrib/test_extended_snapshot_attributes.py
cinder/tests/api/contrib/test_hosts.py
cinder/tests/api/contrib/test_services.py
cinder/tests/api/contrib/test_share_actions.py
cinder/tests/api/contrib/test_share_snapshots.py
cinder/tests/api/contrib/test_shares.py
cinder/tests/api/contrib/test_types_extra_specs.py
cinder/tests/api/contrib/test_types_manage.py
cinder/tests/api/contrib/test_volume_actions.py
cinder/tests/api/contrib/test_volume_host_attribute.py
cinder/tests/api/contrib/test_volume_image_metadata.py
cinder/tests/api/contrib/test_volume_tenant_attribute.py
cinder/tests/api/extensions/__init__.py
cinder/tests/api/extensions/foxinsocks.py
cinder/tests/api/middleware/__init__.py
cinder/tests/api/middleware/test_auth.py
cinder/tests/api/middleware/test_faults.py
cinder/tests/api/middleware/test_sizelimit.py
cinder/tests/api/openstack/__init__.py
cinder/tests/api/openstack/test_wsgi.py
cinder/tests/api/v1/__init__.py
cinder/tests/api/v1/stubs.py
cinder/tests/api/v1/test_limits.py
cinder/tests/api/v1/test_snapshot_metadata.py
cinder/tests/api/v1/test_snapshots.py
cinder/tests/api/v1/test_types.py
cinder/tests/api/v1/test_volume_metadata.py
cinder/tests/api/v1/test_volumes.py
cinder/tests/api/v2/__init__.py
cinder/tests/api/v2/stubs.py
cinder/tests/api/v2/test_limits.py
cinder/tests/api/v2/test_snapshot_metadata.py
cinder/tests/api/v2/test_snapshots.py
cinder/tests/api/v2/test_types.py
cinder/tests/api/v2/test_volumes.py
cinder/tests/backup/__init__.py
cinder/tests/backup/fake_service.py
cinder/tests/backup/fake_swift_client.py
cinder/tests/brick/__init__.py
cinder/tests/brick/test_brick_lvm.py
cinder/tests/db/__init__.py
cinder/tests/db/fakes.py
cinder/tests/glance/__init__.py
cinder/tests/glance/stubs.py
cinder/tests/image/__init__.py
cinder/tests/image/fake.py
cinder/tests/image/test_glance.py
cinder/tests/integrated/__init__.py
cinder/tests/integrated/integrated_helpers.py
cinder/tests/integrated/test_extensions.py
cinder/tests/integrated/test_login.py
cinder/tests/integrated/test_volumes.py
cinder/tests/integrated/test_xml.py
cinder/tests/integrated/api/__init__.py
cinder/tests/integrated/api/client.py
cinder/tests/monkey_patch_example/__init__.py
cinder/tests/monkey_patch_example/example_a.py
cinder/tests/monkey_patch_example/example_b.py
cinder/tests/scheduler/__init__.py
cinder/tests/scheduler/fakes.py
cinder/tests/scheduler/test_capacity_weigher.py
cinder/tests/scheduler/test_filter_scheduler.py
cinder/tests/scheduler/test_host_filters.py
cinder/tests/scheduler/test_host_manager.py
cinder/tests/scheduler/test_rpcapi.py
cinder/tests/scheduler/test_scheduler.py
cinder/tests/scheduler/test_scheduler_options.py
cinder/tests/var/ca.crt
cinder/tests/var/certificate.crt
cinder/tests/var/privatekey.key
cinder/tests/windows/__init__.py
cinder/tests/windows/basetestcase.py
cinder/tests/windows/db_fakes.py
cinder/tests/windows/mockproxy.py
cinder/tests/windows/windowsutils.py
cinder/tests/windows/stubs/README.rst
cinder/tests/windows/stubs/test_windows.TestWindowsDriver.test_check_for_setup_errors_wmi.p.gz
cinder/tests/windows/stubs/test_windows.TestWindowsDriver.test_create_export_os.p.gz
cinder/tests/windows/stubs/test_windows.TestWindowsDriver.test_create_export_wmi.p.gz
cinder/tests/windows/stubs/test_windows.TestWindowsDriver.test_create_snapshot_os.p.gz
cinder/tests/windows/stubs/test_windows.TestWindowsDriver.test_create_snapshot_wmi.p.gz
cinder/tests/windows/stubs/test_windows.TestWindowsDriver.test_create_volume_from_snapshot_os.p.gz
cinder/tests/windows/stubs/test_windows.TestWindowsDriver.test_create_volume_from_snapshot_wmi.p.gz
cinder/tests/windows/stubs/test_windows.TestWindowsDriver.test_create_volume_os.p.gz
cinder/tests/windows/stubs/test_windows.TestWindowsDriver.test_create_volume_wmi.p.gz
cinder/tests/windows/stubs/test_windows.TestWindowsDriver.test_delete_snapshot_os.p.gz
cinder/tests/windows/stubs/test_windows.TestWindowsDriver.test_delete_snapshot_wmi.p.gz
cinder/tests/windows/stubs/test_windows.TestWindowsDriver.test_delete_volume_os.p.gz
cinder/tests/windows/stubs/test_windows.TestWindowsDriver.test_delete_volume_wmi.p.gz
cinder/tests/windows/stubs/test_windows.TestWindowsDriver.test_ensure_export_os.p.gz
cinder/tests/windows/stubs/test_windows.TestWindowsDriver.test_ensure_export_wmi.p.gz
cinder/tests/windows/stubs/test_windows.TestWindowsDriver.test_initialize_connection_os.p.gz
cinder/tests/windows/stubs/test_windows.TestWindowsDriver.test_initialize_connection_wmi.p.gz
cinder/tests/windows/stubs/test_windows.TestWindowsDriver.test_remove_export_os.p.gz
cinder/tests/windows/stubs/test_windows.TestWindowsDriver.test_remove_export_wmi.p.gz
cinder/tests/xenapi/__init__.py
cinder/volume/__init__.py
cinder/volume/api.py
cinder/volume/configuration.py
cinder/volume/driver.py
cinder/volume/manager.py
cinder/volume/rpcapi.py
cinder/volume/utils.py
cinder/volume/volume_types.py
cinder/volume/drivers/__init__.py
cinder/volume/drivers/coraid.py
cinder/volume/drivers/glusterfs.py
cinder/volume/drivers/lvm.py
cinder/volume/drivers/nfs.py
cinder/volume/drivers/rbd.py
cinder/volume/drivers/scality.py
cinder/volume/drivers/sheepdog.py
cinder/volume/drivers/solidfire.py
cinder/volume/drivers/storwize_svc.py
cinder/volume/drivers/windows.py
cinder/volume/drivers/xiv.py
cinder/volume/drivers/zadara.py
cinder/volume/drivers/emc/__init__.py
cinder/volume/drivers/emc/cinder_emc_config.xml.sample
cinder/volume/drivers/emc/emc_smis_common.py
cinder/volume/drivers/emc/emc_smis_iscsi.py
cinder/volume/drivers/huawei/__init__.py
cinder/volume/drivers/huawei/cinder_huawei_conf.xml.sample
cinder/volume/drivers/huawei/huawei_iscsi.py
cinder/volume/drivers/netapp/__init__.py
cinder/volume/drivers/netapp/api.py
cinder/volume/drivers/netapp/iscsi.py
cinder/volume/drivers/netapp/nfs.py
cinder/volume/drivers/nexenta/__init__.py
cinder/volume/drivers/nexenta/jsonrpc.py
cinder/volume/drivers/nexenta/volume.py
cinder/volume/drivers/san/__init__.py
cinder/volume/drivers/san/hp_lefthand.py
cinder/volume/drivers/san/san.py
cinder/volume/drivers/san/solaris.py
cinder/volume/drivers/san/hp/__init__.py
cinder/volume/drivers/san/hp/hp_3par_common.py
cinder/volume/drivers/san/hp/hp_3par_fc.py
cinder/volume/drivers/san/hp/hp_3par_iscsi.py
cinder/volume/drivers/xenapi/__init__.py
cinder/volume/drivers/xenapi/lib.py
cinder/volume/drivers/xenapi/sm.py
cinder/volume/drivers/xenapi/tools.py
contrib/redhat-eventlet.patch
doc/.gitignore
doc/Makefile
doc/README.rst
doc/find_autodoc_modules.sh
doc/generate_autodoc_index.sh
doc/ext/__init__.py
doc/ext/cinder_autodoc.py
doc/ext/cinder_todo.py
doc/source/conf.py
doc/source/index.rst
doc/source/_ga/layout.html
doc/source/_static/.gitignore
doc/source/_static/.placeholder
doc/source/_static/basic.css
doc/source/_static/default.css
doc/source/_static/jquery.tweet.js
doc/source/_static/tweaks.css
doc/source/_templates/.gitignore
doc/source/_templates/.placeholder
doc/source/_theme/layout.html
doc/source/_theme/theme.conf
doc/source/devref/addmethod.openstackapi.rst
doc/source/devref/api.rst
doc/source/devref/architecture.rst
doc/source/devref/auth.rst
doc/source/devref/cinder.rst
doc/source/devref/database.rst
doc/source/devref/development.environment.rst
doc/source/devref/fakes.rst
doc/source/devref/gerrit.rst
doc/source/devref/il8n.rst
doc/source/devref/index.rst
doc/source/devref/jenkins.rst
doc/source/devref/launchpad.rst
doc/source/devref/rpc.rst
doc/source/devref/scheduler.rst
doc/source/devref/services.rst
doc/source/devref/threading.rst
doc/source/devref/unit_tests.rst
doc/source/devref/volume.rst
doc/source/images/rpc/arch.png
doc/source/images/rpc/arch.svg
doc/source/images/rpc/flow1.png
doc/source/images/rpc/flow1.svg
doc/source/images/rpc/flow2.png
doc/source/images/rpc/flow2.svg
doc/source/images/rpc/rabt.png
doc/source/images/rpc/rabt.svg
doc/source/images/rpc/state.png
doc/source/man/cinder-manage.rst
etc/cinder/api-paste.ini
etc/cinder/cinder.conf.sample
etc/cinder/logging_sample.conf
etc/cinder/policy.json
etc/cinder/rootwrap.conf
etc/cinder/rootwrap.d/share.filters
etc/cinder/rootwrap.d/volume.filters
manila/__init__.py
manila/context.py
manila/exception.py
manila/flags.py
manila/manager.py
manila/policy.py
manila/quota.py
manila/service.py
manila/test.py
manila/utils.py
manila/version.py
manila/wsgi.py
manila.egg-info/PKG-INFO
manila.egg-info/SOURCES.txt
manila.egg-info/dependency_links.txt
manila.egg-info/entry_points.txt
manila.egg-info/requires.txt
manila.egg-info/top_level.txt
manila/api/__init__.py
manila/api/auth.py
manila/api/common.py
manila/api/extensions.py
manila/api/sizelimit.py
manila/api/urlmap.py
manila/api/versions.py
manila/api/xmlutil.py
manila/api/contrib/__init__.py
manila/api/contrib/admin_actions.py
manila/api/contrib/backups.py
manila/api/contrib/extended_snapshot_attributes.py
manila/api/contrib/hosts.py
manila/api/contrib/image_create.py
manila/api/contrib/quota_classes.py
manila/api/contrib/quotas.py
manila/api/contrib/services.py
manila/api/contrib/share_actions.py
manila/api/contrib/share_snapshots.py
manila/api/contrib/shares.py
manila/api/contrib/types_extra_specs.py
manila/api/contrib/types_manage.py
manila/api/contrib/volume_actions.py
manila/api/contrib/volume_host_attribute.py
manila/api/contrib/volume_image_metadata.py
manila/api/contrib/volume_tenant_attribute.py
manila/api/middleware/__init__.py
manila/api/middleware/auth.py
manila/api/middleware/fault.py
manila/api/middleware/sizelimit.py
manila/api/openstack/__init__.py
manila/api/openstack/urlmap.py
manila/api/openstack/wsgi.py
manila/api/openstack/volume/__init__.py
manila/api/openstack/volume/versions.py
manila/api/v1/__init__.py
manila/api/v1/limits.py
manila/api/v1/router.py
manila/api/v1/snapshot_metadata.py
manila/api/v1/snapshots.py
manila/api/v1/types.py
manila/api/v1/volume_metadata.py
manila/api/v1/volumes.py
manila/api/v2/__init__.py
manila/api/v2/limits.py
manila/api/v2/router.py
manila/api/v2/snapshot_metadata.py
manila/api/v2/snapshots.py
manila/api/v2/types.py
manila/api/v2/volumes.py
manila/api/v2/views/__init__.py
manila/api/v2/views/volumes.py
manila/api/views/__init__.py
manila/api/views/backups.py
manila/api/views/limits.py
manila/api/views/share_snapshots.py
manila/api/views/shares.py
manila/api/views/types.py
manila/api/views/versions.py
manila/backup/__init__.py
manila/backup/api.py
manila/backup/manager.py
manila/backup/rpcapi.py
manila/backup/services/__init__.py
manila/backup/services/swift.py
manila/brick/__init__.py
manila/brick/iscsi/__init__.py
manila/brick/iscsi/iscsi.py
manila/brick/local_dev/__init__.py
manila/brick/local_dev/lvm.py
manila/common/__init__.py
manila/common/sqlalchemyutils.py
manila/compute/__init__.py
manila/compute/aggregate_states.py
manila/db/__init__.py
manila/db/api.py
manila/db/base.py
manila/db/migration.py
manila/db/sqlalchemy/__init__.py
manila/db/sqlalchemy/api.py
manila/db/sqlalchemy/migration.py
manila/db/sqlalchemy/models.py
manila/db/sqlalchemy/session.py
manila/db/sqlalchemy/migrate_repo/__init__.py
manila/db/sqlalchemy/migrate_repo/manage.py
manila/db/sqlalchemy/migrate_repo/versions/001_cinder_init.py
manila/db/sqlalchemy/migrate_repo/versions/002_quota_class.py
manila/db/sqlalchemy/migrate_repo/versions/003_glance_metadata.py
manila/db/sqlalchemy/migrate_repo/versions/004_volume_type_to_uuid.py
manila/db/sqlalchemy/migrate_repo/versions/005_add_source_volume_column.py
manila/db/sqlalchemy/migrate_repo/versions/006_snapshots_add_provider_location.py
manila/db/sqlalchemy/migrate_repo/versions/007_add_volume_snapshot_fk.py
manila/db/sqlalchemy/migrate_repo/versions/008_add_backup.py
manila/db/sqlalchemy/migrate_repo/versions/009_add_snapshot_metadata_table.py
manila/db/sqlalchemy/migrate_repo/versions/010_add_share_tables.py
manila/db/sqlalchemy/migrate_repo/versions/011_add_share_snapshot_table.py
manila/db/sqlalchemy/migrate_repo/versions/__init__.py
manila/image/__init__.py
manila/image/glance.py
manila/image/image_utils.py
manila/openstack/__init__.py
manila/openstack/common/__init__.py
manila/openstack/common/context.py
manila/openstack/common/eventlet_backdoor.py
manila/openstack/common/exception.py
manila/openstack/common/excutils.py
manila/openstack/common/fileutils.py
manila/openstack/common/gettextutils.py
manila/openstack/common/importutils.py
manila/openstack/common/jsonutils.py
manila/openstack/common/local.py
manila/openstack/common/lockutils.py
manila/openstack/common/log.py
manila/openstack/common/loopingcall.py
manila/openstack/common/network_utils.py
manila/openstack/common/policy.py
manila/openstack/common/processutils.py
manila/openstack/common/service.py
manila/openstack/common/strutils.py
manila/openstack/common/threadgroup.py
manila/openstack/common/timeutils.py
manila/openstack/common/uuidutils.py
manila/openstack/common/notifier/__init__.py
manila/openstack/common/notifier/api.py
manila/openstack/common/notifier/log_notifier.py
manila/openstack/common/notifier/no_op_notifier.py
manila/openstack/common/notifier/rabbit_notifier.py
manila/openstack/common/notifier/rpc_notifier.py
manila/openstack/common/notifier/rpc_notifier2.py
manila/openstack/common/notifier/test_notifier.py
manila/openstack/common/rootwrap/__init__.py
manila/openstack/common/rootwrap/cmd.py
manila/openstack/common/rootwrap/filters.py
manila/openstack/common/rootwrap/wrapper.py
manila/openstack/common/rpc/__init__.py
manila/openstack/common/rpc/amqp.py
manila/openstack/common/rpc/common.py
manila/openstack/common/rpc/dispatcher.py
manila/openstack/common/rpc/impl_fake.py
manila/openstack/common/rpc/impl_kombu.py
manila/openstack/common/rpc/impl_qpid.py
manila/openstack/common/rpc/impl_zmq.py
manila/openstack/common/rpc/matchmaker.py
manila/openstack/common/rpc/matchmaker_redis.py
manila/openstack/common/rpc/proxy.py
manila/openstack/common/rpc/service.py
manila/openstack/common/rpc/zmq_receiver.py
manila/openstack/common/scheduler/__init__.py
manila/openstack/common/scheduler/filter.py
manila/openstack/common/scheduler/weight.py
manila/openstack/common/scheduler/filters/__init__.py
manila/openstack/common/scheduler/filters/availability_zone_filter.py
manila/openstack/common/scheduler/filters/capabilities_filter.py
manila/openstack/common/scheduler/filters/extra_specs_ops.py
manila/openstack/common/scheduler/filters/json_filter.py
manila/openstack/common/scheduler/weights/__init__.py
manila/scheduler/__init__.py
manila/scheduler/chance.py
manila/scheduler/driver.py
manila/scheduler/filter_scheduler.py
manila/scheduler/host_manager.py
manila/scheduler/manager.py
manila/scheduler/rpcapi.py
manila/scheduler/scheduler_options.py
manila/scheduler/simple.py
manila/scheduler/filters/__init__.py
manila/scheduler/filters/capacity_filter.py
manila/scheduler/filters/retry_filter.py
manila/scheduler/weights/__init__.py
manila/scheduler/weights/capacity.py
manila/share/__init__.py
manila/share/api.py
manila/share/configuration.py
manila/share/driver.py
manila/share/manager.py
manila/share/rpcapi.py
manila/share/drivers/__init__.py
manila/share/drivers/lvm.py
manila/share/drivers/netapp.py
manila/tests/__init__.py
manila/tests/declare_flags.py
manila/tests/fake_driver.py
manila/tests/fake_flags.py
manila/tests/fake_utils.py
manila/tests/runtime_flags.py
manila/tests/test_HpSanISCSIDriver.py
manila/tests/test_api.py
manila/tests/test_backup.py
manila/tests/test_backup_swift.py
manila/tests/test_context.py
manila/tests/test_coraid.py
manila/tests/test_drivers_compatibility.py
manila/tests/test_emc.py
manila/tests/test_exception.py
manila/tests/test_flags.py
manila/tests/test_glusterfs.py
manila/tests/test_hp3par.py
manila/tests/test_huawei.py
manila/tests/test_iscsi.py
manila/tests/test_migrations.py
manila/tests/test_misc.py
manila/tests/test_netapp.py
manila/tests/test_netapp_nfs.py
manila/tests/test_nexenta.py
manila/tests/test_nfs.py
manila/tests/test_policy.py
manila/tests/test_quota.py
manila/tests/test_rbd.py
manila/tests/test_scality.py
manila/tests/test_service.py
manila/tests/test_share.py
manila/tests/test_share_api.py
manila/tests/test_share_driver.py
manila/tests/test_share_lvm.py
manila/tests/test_share_netapp.py
manila/tests/test_share_rpcapi.py
manila/tests/test_sheepdog.py
manila/tests/test_skip_examples.py
manila/tests/test_solidfire.py
manila/tests/test_storwize_svc.py
manila/tests/test_test.py
manila/tests/test_test_utils.py
manila/tests/test_utils.py
manila/tests/test_volume.py
manila/tests/test_volume_configuration.py
manila/tests/test_volume_glance_metadata.py
manila/tests/test_volume_rpcapi.py
manila/tests/test_volume_types.py
manila/tests/test_volume_types_extra_specs.py
manila/tests/test_volume_utils.py
manila/tests/test_windows.py
manila/tests/test_wsgi.py
manila/tests/test_xenapi_sm.py
manila/tests/test_xiv.py
manila/tests/test_zadara.py
manila/tests/utils.py
manila/tests/api/__init__.py
manila/tests/api/common.py
manila/tests/api/fakes.py
manila/tests/api/test_common.py
manila/tests/api/test_extensions.py
manila/tests/api/test_router.py
manila/tests/api/test_wsgi.py
manila/tests/api/test_xmlutil.py
manila/tests/api/contrib/__init__.py
manila/tests/api/contrib/stubs.py
manila/tests/api/contrib/test_admin_actions.py
manila/tests/api/contrib/test_backups.py
manila/tests/api/contrib/test_extended_snapshot_attributes.py
manila/tests/api/contrib/test_hosts.py
manila/tests/api/contrib/test_services.py
manila/tests/api/contrib/test_share_actions.py
manila/tests/api/contrib/test_share_snapshots.py
manila/tests/api/contrib/test_shares.py
manila/tests/api/contrib/test_types_extra_specs.py
manila/tests/api/contrib/test_types_manage.py
manila/tests/api/contrib/test_volume_actions.py
manila/tests/api/contrib/test_volume_host_attribute.py
manila/tests/api/contrib/test_volume_image_metadata.py
manila/tests/api/contrib/test_volume_tenant_attribute.py
manila/tests/api/extensions/__init__.py
manila/tests/api/extensions/foxinsocks.py
manila/tests/api/middleware/__init__.py
manila/tests/api/middleware/test_auth.py
manila/tests/api/middleware/test_faults.py
manila/tests/api/middleware/test_sizelimit.py
manila/tests/api/openstack/__init__.py
manila/tests/api/openstack/test_wsgi.py
manila/tests/api/v1/__init__.py
manila/tests/api/v1/stubs.py
manila/tests/api/v1/test_limits.py
manila/tests/api/v1/test_snapshot_metadata.py
manila/tests/api/v1/test_snapshots.py
manila/tests/api/v1/test_types.py
manila/tests/api/v1/test_volume_metadata.py
manila/tests/api/v1/test_volumes.py
manila/tests/api/v2/__init__.py
manila/tests/api/v2/stubs.py
manila/tests/api/v2/test_limits.py
manila/tests/api/v2/test_snapshot_metadata.py
manila/tests/api/v2/test_snapshots.py
manila/tests/api/v2/test_types.py
manila/tests/api/v2/test_volumes.py
manila/tests/backup/__init__.py
manila/tests/backup/fake_service.py
manila/tests/backup/fake_swift_client.py
manila/tests/brick/__init__.py
manila/tests/brick/test_brick_lvm.py
manila/tests/db/__init__.py
manila/tests/db/fakes.py
manila/tests/glance/__init__.py
manila/tests/glance/stubs.py
manila/tests/image/__init__.py
manila/tests/image/fake.py
manila/tests/image/test_glance.py
manila/tests/integrated/__init__.py
manila/tests/integrated/integrated_helpers.py
manila/tests/integrated/test_extensions.py
manila/tests/integrated/test_login.py
manila/tests/integrated/test_volumes.py
manila/tests/integrated/test_xml.py
manila/tests/integrated/api/__init__.py
manila/tests/integrated/api/client.py
manila/tests/monkey_patch_example/__init__.py
manila/tests/monkey_patch_example/example_a.py
manila/tests/monkey_patch_example/example_b.py
manila/tests/scheduler/__init__.py
manila/tests/scheduler/fakes.py
manila/tests/scheduler/test_capacity_weigher.py
manila/tests/scheduler/test_filter_scheduler.py
manila/tests/scheduler/test_host_filters.py
manila/tests/scheduler/test_host_manager.py
manila/tests/scheduler/test_rpcapi.py
manila/tests/scheduler/test_scheduler.py
manila/tests/scheduler/test_scheduler_options.py
manila/tests/windows/__init__.py
manila/tests/windows/basetestcase.py
manila/tests/windows/db_fakes.py
manila/tests/windows/mockproxy.py
manila/tests/windows/windowsutils.py
manila/tests/xenapi/__init__.py
manila/volume/__init__.py
manila/volume/api.py
manila/volume/configuration.py
manila/volume/driver.py
manila/volume/manager.py
manila/volume/rpcapi.py
manila/volume/utils.py
manila/volume/volume_types.py
manila/volume/drivers/__init__.py
manila/volume/drivers/coraid.py
manila/volume/drivers/glusterfs.py
manila/volume/drivers/lvm.py
manila/volume/drivers/nfs.py
manila/volume/drivers/rbd.py
manila/volume/drivers/scality.py
manila/volume/drivers/sheepdog.py
manila/volume/drivers/solidfire.py
manila/volume/drivers/storwize_svc.py
manila/volume/drivers/windows.py
manila/volume/drivers/xiv.py
manila/volume/drivers/zadara.py
manila/volume/drivers/emc/__init__.py
manila/volume/drivers/emc/emc_smis_common.py
manila/volume/drivers/emc/emc_smis_iscsi.py
manila/volume/drivers/huawei/__init__.py
manila/volume/drivers/huawei/huawei_iscsi.py
manila/volume/drivers/netapp/__init__.py
manila/volume/drivers/netapp/api.py
manila/volume/drivers/netapp/iscsi.py
manila/volume/drivers/netapp/nfs.py
manila/volume/drivers/nexenta/__init__.py
manila/volume/drivers/nexenta/jsonrpc.py
manila/volume/drivers/nexenta/volume.py
manila/volume/drivers/san/__init__.py
manila/volume/drivers/san/hp_lefthand.py
manila/volume/drivers/san/san.py
manila/volume/drivers/san/solaris.py
manila/volume/drivers/san/hp/__init__.py
manila/volume/drivers/san/hp/hp_3par_common.py
manila/volume/drivers/san/hp/hp_3par_fc.py
manila/volume/drivers/san/hp/hp_3par_iscsi.py
manila/volume/drivers/xenapi/__init__.py
manila/volume/drivers/xenapi/lib.py
manila/volume/drivers/xenapi/sm.py
manila/volume/drivers/xenapi/tools.py
tools/enable-pre-commit-hook.sh
tools/install_venv.py
tools/install_venv_common.py
tools/lintstack.py
tools/lintstack.sh
tools/patch_tox_venv.py
tools/pip-requires
tools/test-requires
tools/with_venv.sh
tools/conf/extract_opts.py
tools/conf/generate_sample.sh

View File

@ -0,0 +1 @@

View File

@ -0,0 +1,10 @@
[cinder.scheduler.filters]
CapabilitiesFilter = cinder.openstack.common.scheduler.filters.capabilities_filter:CapabilitiesFilter
RetryFilter = cinder.scheduler.filters.retry_filter:RetryFilter
CapacityFilter = cinder.scheduler.filters.capacity_filter:CapacityFilter
JsonFilter = cinder.openstack.common.scheduler.filters.json_filter:JsonFilter
AvailabilityZoneFilter = cinder.openstack.common.scheduler.filters.availability_zone_filter:AvailabilityZoneFilter
[cinder.scheduler.weights]
CapacityWeigher = cinder.scheduler.weights.capacity:CapacityWeigher

View File

@ -0,0 +1,25 @@
d2to1>=0.2.10,<0.3
pbr>=0.5,<0.6
amqplib>=0.6.1
anyjson>=0.2.4
babel>=0.9.6
eventlet>=0.9.12
greenlet>=0.3.1
iso8601>=0.1.4
kombu>=1.0.4
lockfile>=0.8
lxml>=2.3
oslo.config>=1.1.0
paramiko>=1.8.0
paste
pastedeploy>=1.5.0
python-glanceclient>=0.5.0,<2
python-keystoneclient>=0.2,<0.3
python-swiftclient>=1.2,<2
routes>=1.12.3
sqlalchemy>=0.7,<=0.7.99
sqlalchemy-migrate>=0.7
stevedore>=0.7
suds>=0.4
webob>=1.0.8
wsgiref>=0.1.2

View File

@ -0,0 +1 @@
manila

View File

@ -17,10 +17,10 @@
# under the License.
"""
:mod:`cinder` -- Cloud IaaS Platform
:mod:`manila` -- Cloud IaaS Platform
===================================
.. automodule:: cinder
.. automodule:: manila
:platform: Unix
:synopsis: Infrastructure-as-a-Service Cloud platform.
.. moduleauthor:: Jesse Andrews <jesse@ansolabs.com>

View File

@ -18,7 +18,7 @@
import paste.urlmap
from cinder import flags
from manila import flags
FLAGS = flags.FLAGS

View File

@ -14,8 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from cinder.api.middleware import auth
from cinder.openstack.common import log as logging
from manila.api.middleware import auth
from manila.openstack.common import log as logging
LOG = logging.getLogger(__name__)
@ -23,14 +23,14 @@ LOG = logging.getLogger(__name__)
class CinderKeystoneContext(auth.CinderKeystoneContext):
def __init__(self, application):
LOG.warn(_('cinder.api.auth:CinderKeystoneContext is deprecated. '
LOG.warn(_('manila.api.auth:CinderKeystoneContext is deprecated. '
'Please use '
'cinder.api.middleware.auth:CinderKeystoneContext '
'manila.api.middleware.auth:CinderKeystoneContext '
'instead.'))
super(CinderKeystoneContext, self).__init__(application)
def pipeline_factory(loader, global_conf, **local_conf):
LOG.warn(_('cinder.api.auth:pipeline_factory is deprecated. Please use '
'cinder.api.middleware.auth:pipeline_factory instead.'))
LOG.warn(_('manila.api.auth:pipeline_factory is deprecated. Please use '
'manila.api.middleware.auth:pipeline_factory instead.'))
auth.pipeline_factory(loader, global_conf, **local_conf)

View File

@ -21,11 +21,11 @@ import urlparse
import webob
from cinder.api.openstack import wsgi
from cinder.api import xmlutil
from cinder import flags
from cinder.openstack.common import log as logging
from cinder import utils
from manila.api.openstack import wsgi
from manila.api import xmlutil
from manila import flags
from manila.openstack.common import log as logging
from manila import utils
LOG = logging.getLogger(__name__)
@ -139,11 +139,11 @@ def limited_by_marker(items, request, max_limit=FLAGS.osapi_max_limit):
def remove_version_from_href(href):
"""Removes the first api version from the href.
Given: 'http://www.cinder.com/v1.1/123'
Returns: 'http://www.cinder.com/123'
Given: 'http://www.manila.com/v1.1/123'
Returns: 'http://www.manila.com/123'
Given: 'http://www.cinder.com/v1.1'
Returns: 'http://www.cinder.com'
Given: 'http://www.manila.com/v1.1'
Returns: 'http://www.manila.com'
"""
parsed_url = urlparse.urlsplit(href)
@ -194,7 +194,7 @@ class ViewBuilder(object):
prefix = self._update_link_prefix(request.application_url,
FLAGS.osapi_volume_base_URL)
url = os.path.join(prefix,
request.environ["cinder.context"].project_id,
request.environ["manila.context"].project_id,
self._collection_name)
return "%s?%s" % (url, dict_to_query_str(params))
@ -203,7 +203,7 @@ class ViewBuilder(object):
prefix = self._update_link_prefix(request.application_url,
FLAGS.osapi_volume_base_URL)
return os.path.join(prefix,
request.environ["cinder.context"].project_id,
request.environ["manila.context"].project_id,
self._collection_name,
str(identifier))
@ -213,7 +213,7 @@ class ViewBuilder(object):
base_url = self._update_link_prefix(base_url,
FLAGS.osapi_volume_base_URL)
return os.path.join(base_url,
request.environ["cinder.context"].project_id,
request.environ["manila.context"].project_id,
self._collection_name,
str(identifier))

View File

@ -15,15 +15,15 @@
# License for the specific language governing permissions and limitations
# under the License.
"""Contrib contains extensions that are shipped with cinder.
"""Contrib contains extensions that are shipped with manila.
It can't be called 'extensions' because that causes namespacing problems.
"""
from cinder.api import extensions
from cinder import flags
from cinder.openstack.common import log as logging
from manila.api import extensions
from manila import flags
from manila.openstack.common import log as logging
FLAGS = flags.FLAGS

View File

@ -15,12 +15,12 @@
import webob
from webob import exc
from cinder.api import extensions
from cinder.api.openstack import wsgi
from cinder import db
from cinder import exception
from cinder.openstack.common import log as logging
from cinder import volume
from manila.api import extensions
from manila.api.openstack import wsgi
from manila import db
from manila import exception
from manila.openstack.common import log as logging
from manila import volume
LOG = logging.getLogger(__name__)
@ -74,7 +74,7 @@ class AdminController(wsgi.Controller):
@wsgi.action('os-reset_status')
def _reset_status(self, req, id, body):
"""Reset status on the resource."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
self.authorize(context, 'reset_status')
update = self.validate_update(body['os-reset_status'])
msg = _("Updating %(resource)s '%(id)s' with '%(update)r'")
@ -89,7 +89,7 @@ class AdminController(wsgi.Controller):
@wsgi.action('os-force_delete')
def _force_delete(self, req, id, body):
"""Delete a resource, bypassing the check that it must be available."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
self.authorize(context, 'force_delete')
try:
resource = self._get(context, id)
@ -129,7 +129,7 @@ class VolumeAdminController(AdminController):
Roll back a bad detach after the volume been disconnected from
the hypervisor.
"""
context = req.environ['cinder.context']
context = req.environ['manila.context']
self.authorize(context, 'force_detach')
try:
volume = self._get(context, id)

View File

@ -19,15 +19,15 @@ import webob
from webob import exc
from xml.dom import minidom
from cinder.api import common
from cinder.api import extensions
from cinder.api.openstack import wsgi
from cinder.api.views import backups as backup_views
from cinder.api import xmlutil
from cinder import backup as backupAPI
from cinder import exception
from cinder import flags
from cinder.openstack.common import log as logging
from manila.api import common
from manila.api import extensions
from manila.api.openstack import wsgi
from manila.api.views import backups as backup_views
from manila.api import xmlutil
from manila import backup as backupAPI
from manila import exception
from manila import flags
from manila.openstack.common import log as logging
FLAGS = flags.FLAGS
LOG = logging.getLogger(__name__)
@ -126,7 +126,7 @@ class BackupsController(wsgi.Controller):
def show(self, req, id):
"""Return data about the given backup."""
LOG.debug(_('show called for member %s'), id)
context = req.environ['cinder.context']
context = req.environ['manila.context']
try:
backup = self.backup_api.get(context, backup_id=id)
@ -138,7 +138,7 @@ class BackupsController(wsgi.Controller):
def delete(self, req, id):
"""Delete a backup."""
LOG.debug(_('delete called for member %s'), id)
context = req.environ['cinder.context']
context = req.environ['manila.context']
LOG.audit(_('Delete backup with id: %s'), id, context=context)
@ -163,7 +163,7 @@ class BackupsController(wsgi.Controller):
def _get_backups(self, req, is_detail):
"""Returns a list of backups, transformed through view builder."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
backups = self.backup_api.get_all(context)
limited_list = common.limited(backups, req)
@ -186,7 +186,7 @@ class BackupsController(wsgi.Controller):
if not self.is_valid_body(body, 'backup'):
raise exc.HTTPBadRequest()
context = req.environ['cinder.context']
context = req.environ['manila.context']
try:
backup = body['backup']
@ -222,7 +222,7 @@ class BackupsController(wsgi.Controller):
if not self.is_valid_body(body, 'restore'):
raise exc.HTTPBadRequest()
context = req.environ['cinder.context']
context = req.environ['manila.context']
try:
restore = body['restore']

View File

@ -16,13 +16,13 @@
from webob import exc
from cinder.api import extensions
from cinder.api.openstack import wsgi
from cinder.api import xmlutil
from cinder import exception
from cinder import flags
from cinder.openstack.common import log as logging
from cinder import volume
from manila.api import extensions
from manila.api.openstack import wsgi
from manila.api import xmlutil
from manila import exception
from manila import flags
from manila.openstack.common import log as logging
from manila import volume
FLAGS = flags.FLAGS
@ -50,7 +50,7 @@ class ExtendedSnapshotAttributesController(wsgi.Controller):
@wsgi.extends
def show(self, req, resp_obj, id):
context = req.environ['cinder.context']
context = req.environ['manila.context']
if authorize(context):
# Attach our slave template to the response object
resp_obj.attach(xml=ExtendedSnapshotAttributeTemplate())
@ -65,7 +65,7 @@ class ExtendedSnapshotAttributesController(wsgi.Controller):
@wsgi.extends
def detail(self, req, resp_obj):
context = req.environ['cinder.context']
context = req.environ['manila.context']
if authorize(context):
# Attach our slave template to the response object
resp_obj.attach(xml=ExtendedSnapshotAttributesTemplate())

View File

@ -18,16 +18,16 @@
import webob.exc
from xml.parsers import expat
from cinder.api import extensions
from cinder.api.openstack import wsgi
from cinder.api import xmlutil
from cinder import db
from cinder import exception
from cinder import flags
from cinder.openstack.common import log as logging
from cinder.openstack.common import timeutils
from cinder import utils
from cinder.volume import api as volume_api
from manila.api import extensions
from manila.api.openstack import wsgi
from manila.api import xmlutil
from manila import db
from manila import exception
from manila import flags
from manila.openstack.common import log as logging
from manila.openstack.common import timeutils
from manila import utils
from manila.volume import api as volume_api
FLAGS = flags.FLAGS
LOG = logging.getLogger(__name__)
@ -93,7 +93,7 @@ class HostDeserializer(wsgi.XMLDeserializer):
def _list_hosts(req, service=None):
"""Returns a summary list of hosts."""
curr_time = timeutils.utcnow()
context = req.environ['cinder.context']
context = req.environ['manila.context']
services = db.service_get_all(context, False)
zone = ''
if 'zone' in req.GET:
@ -143,14 +143,14 @@ class HostController(object):
@wsgi.serializers(xml=HostIndexTemplate)
def index(self, req):
authorize(req.environ['cinder.context'])
authorize(req.environ['manila.context'])
return {'hosts': _list_hosts(req)}
@wsgi.serializers(xml=HostUpdateTemplate)
@wsgi.deserializers(xml=HostDeserializer)
@check_host
def update(self, req, id, body):
authorize(req.environ['cinder.context'])
authorize(req.environ['manila.context'])
update_values = {}
for raw_key, raw_val in body.iteritems():
key = raw_key.lower().strip()
@ -172,7 +172,7 @@ class HostController(object):
def _set_enabled_status(self, req, host, enabled):
"""Sets the specified host's ability to accept new volumes."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
state = "enabled" if enabled else "disabled"
LOG.audit(_("Setting host %(host)s to %(state)s.") % locals())
result = self.api.set_host_enabled(context,
@ -197,7 +197,7 @@ class HostController(object):
'volume_count': 1, 'total_volume_gb': 2048}
"""
host = id
context = req.environ['cinder.context']
context = req.environ['manila.context']
if not context.is_admin:
msg = _("Describe-resource is admin only functionality")
raise webob.exc.HTTPForbidden(explanation=msg)

View File

@ -19,7 +19,7 @@
"""The Create Volume from Image extension."""
from cinder.api import extensions
from manila.api import extensions
class Image_create(extensions.ExtensionDescriptor):

View File

@ -15,12 +15,12 @@
import webob
from cinder.api import extensions
from cinder.api.openstack import wsgi
from cinder.api import xmlutil
from cinder import db
from cinder import exception
from cinder import quota
from manila.api import extensions
from manila.api.openstack import wsgi
from manila.api import xmlutil
from manila import db
from manila import exception
from manila import quota
QUOTAS = quota.QUOTAS
@ -56,7 +56,7 @@ class QuotaClassSetsController(object):
@wsgi.serializers(xml=QuotaClassTemplate)
def show(self, req, id):
context = req.environ['cinder.context']
context = req.environ['manila.context']
authorize(context)
try:
db.sqlalchemy.api.authorize_quota_class_context(context, id)
@ -68,7 +68,7 @@ class QuotaClassSetsController(object):
@wsgi.serializers(xml=QuotaClassTemplate)
def update(self, req, id, body):
context = req.environ['cinder.context']
context = req.environ['manila.context']
authorize(context)
quota_class = id
for key in body['quota_class_set'].keys():

View File

@ -17,13 +17,13 @@
import webob
from cinder.api import extensions
from cinder.api.openstack import wsgi
from cinder.api import xmlutil
from cinder import db
from cinder.db.sqlalchemy import api as sqlalchemy_api
from cinder import exception
from cinder import quota
from manila.api import extensions
from manila.api.openstack import wsgi
from manila.api import xmlutil
from manila import db
from manila.db.sqlalchemy import api as sqlalchemy_api
from manila import exception
from manila import quota
QUOTAS = quota.QUOTAS
@ -73,7 +73,7 @@ class QuotaSetsController(object):
@wsgi.serializers(xml=QuotaTemplate)
def show(self, req, id):
context = req.environ['cinder.context']
context = req.environ['manila.context']
authorize_show(context)
try:
sqlalchemy_api.authorize_project_context(context, id)
@ -84,7 +84,7 @@ class QuotaSetsController(object):
@wsgi.serializers(xml=QuotaTemplate)
def update(self, req, id, body):
context = req.environ['cinder.context']
context = req.environ['manila.context']
authorize_update(context)
project_id = id
for key in body['quota_set'].keys():
@ -101,7 +101,7 @@ class QuotaSetsController(object):
@wsgi.serializers(xml=QuotaTemplate)
def defaults(self, req, id):
context = req.environ['cinder.context']
context = req.environ['manila.context']
authorize_show(context)
return self._format_quota_set(id, QUOTAS.get_defaults(context))

View File

@ -18,14 +18,14 @@
import webob.exc
from cinder.api import extensions
from cinder.api.openstack import wsgi
from cinder.api import xmlutil
from cinder import db
from cinder import exception
from cinder.openstack.common import log as logging
from cinder.openstack.common import timeutils
from cinder import utils
from manila.api import extensions
from manila.api.openstack import wsgi
from manila.api import xmlutil
from manila import db
from manila import exception
from manila.openstack.common import log as logging
from manila.openstack.common import timeutils
from manila import utils
LOG = logging.getLogger(__name__)
@ -62,7 +62,7 @@ class ServiceController(object):
"""
Return a list of all running services. Filter by host & service name.
"""
context = req.environ['cinder.context']
context = req.environ['manila.context']
authorize(context)
now = timeutils.utcnow()
services = db.service_get_all(context)
@ -95,7 +95,7 @@ class ServiceController(object):
@wsgi.serializers(xml=ServicesUpdateTemplate)
def update(self, req, id, body):
"""Enable/Disable scheduling for a service"""
context = req.environ['cinder.context']
context = req.environ['manila.context']
authorize(context)
if id == "enable":

View File

@ -14,10 +14,10 @@
import webob
from cinder.api import extensions
from cinder.api.openstack import wsgi
from cinder import exception
from cinder import share
from manila.api import extensions
from manila.api.openstack import wsgi
from manila import exception
from manila import share
class ShareActionsController(wsgi.Controller):
@ -28,7 +28,7 @@ class ShareActionsController(wsgi.Controller):
@wsgi.action('os-allow_access')
def _allow_access(self, req, id, body):
"""Add share access rule."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
share = self.share_api.get(context, id)
@ -41,7 +41,7 @@ class ShareActionsController(wsgi.Controller):
@wsgi.action('os-deny_access')
def _deny_access(self, req, id, body):
"""Remove access rule."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
access_id = body['os-deny_access']['access_id']
@ -58,7 +58,7 @@ class ShareActionsController(wsgi.Controller):
@wsgi.action('os-access_list')
def _access_list(self, req, id, body):
"""list access rules."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
share = self.share_api.get(context, id)
access_list = self.share_api.access_get_all(context, share)

View File

@ -18,15 +18,15 @@
import webob
from webob import exc
from cinder.api import common
from cinder.api.contrib import shares
from cinder.api import extensions
from cinder.api.openstack import wsgi
from cinder.api.views import share_snapshots as snapshot_views
from cinder.api import xmlutil
from cinder import exception
from cinder.openstack.common import log as logging
from cinder import share
from manila.api import common
from manila.api.contrib import shares
from manila.api import extensions
from manila.api.openstack import wsgi
from manila.api.views import share_snapshots as snapshot_views
from manila.api import xmlutil
from manila import exception
from manila.openstack.common import log as logging
from manila import share
LOG = logging.getLogger(__name__)
@ -71,7 +71,7 @@ class ShareSnapshotsController(wsgi.Controller):
@wsgi.serializers(xml=SnapshotTemplate)
def show(self, req, id):
"""Return data about the given snapshot."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
try:
snapshot = self.share_api.get_snapshot(context, id)
@ -82,7 +82,7 @@ class ShareSnapshotsController(wsgi.Controller):
def delete(self, req, id):
"""Delete a snapshot."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
LOG.audit(_("Delete snapshot with id: %s"), id, context=context)
@ -105,7 +105,7 @@ class ShareSnapshotsController(wsgi.Controller):
def _get_snapshots(self, req, is_detail):
"""Returns a list of snapshots."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
search_opts = {}
search_opts.update(req.GET)
@ -135,7 +135,7 @@ class ShareSnapshotsController(wsgi.Controller):
@wsgi.serializers(xml=SnapshotTemplate)
def create(self, req, body):
"""Creates a new snapshot."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
if not self.is_valid_body(body, 'share-snapshot'):
raise exc.HTTPUnprocessableEntity()

View File

@ -18,14 +18,14 @@
import webob
from webob import exc
from cinder.api import common
from cinder.api import extensions
from cinder.api.openstack import wsgi
from cinder.api.views import shares as share_views
from cinder.api import xmlutil
from cinder import exception
from cinder.openstack.common import log as logging
from cinder import share
from manila.api import common
from manila.api import extensions
from manila.api.openstack import wsgi
from manila.api.views import shares as share_views
from manila.api import xmlutil
from manila import exception
from manila.openstack.common import log as logging
from manila import share
LOG = logging.getLogger(__name__)
@ -84,7 +84,7 @@ class ShareController(wsgi.Controller):
@wsgi.serializers(xml=ShareTemplate)
def show(self, req, id):
"""Return data about the given share."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
try:
share = self.share_api.get(context, id)
@ -95,7 +95,7 @@ class ShareController(wsgi.Controller):
def delete(self, req, id):
"""Delete a share."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
LOG.audit(_("Delete share with id: %s"), id, context=context)
@ -120,7 +120,7 @@ class ShareController(wsgi.Controller):
"""Returns a list of shares, transformed through view
builder.
"""
context = req.environ['cinder.context']
context = req.environ['manila.context']
search_opts = {}
search_opts.update(req.GET)
@ -150,7 +150,7 @@ class ShareController(wsgi.Controller):
@wsgi.serializers(xml=ShareTemplate)
def create(self, req, body):
"""Creates a new share."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
if not self.is_valid_body(body, 'share'):
raise exc.HTTPUnprocessableEntity()

View File

@ -19,13 +19,13 @@
import webob
from cinder.api import extensions
from cinder.api.openstack import wsgi
from cinder.api import xmlutil
from cinder import db
from cinder import exception
from cinder.openstack.common.notifier import api as notifier_api
from cinder.volume import volume_types
from manila.api import extensions
from manila.api.openstack import wsgi
from manila.api import xmlutil
from manila import db
from manila import exception
from manila.openstack.common.notifier import api as notifier_api
from manila.volume import volume_types
authorize = extensions.extension_authorizer('volume', 'types_extra_specs')
@ -69,14 +69,14 @@ class VolumeTypeExtraSpecsController(wsgi.Controller):
@wsgi.serializers(xml=VolumeTypeExtraSpecsTemplate)
def index(self, req, type_id):
""" Returns the list of extra specs for a given volume type """
context = req.environ['cinder.context']
context = req.environ['manila.context']
authorize(context)
self._check_type(context, type_id)
return self._get_extra_specs(context, type_id)
@wsgi.serializers(xml=VolumeTypeExtraSpecsTemplate)
def create(self, req, type_id, body=None):
context = req.environ['cinder.context']
context = req.environ['manila.context']
authorize(context)
if not self.is_valid_body(body, 'extra_specs'):
@ -96,7 +96,7 @@ class VolumeTypeExtraSpecsController(wsgi.Controller):
@wsgi.serializers(xml=VolumeTypeExtraSpecTemplate)
def update(self, req, type_id, id, body=None):
context = req.environ['cinder.context']
context = req.environ['manila.context']
authorize(context)
if not body:
expl = _('Request body empty')
@ -120,7 +120,7 @@ class VolumeTypeExtraSpecsController(wsgi.Controller):
@wsgi.serializers(xml=VolumeTypeExtraSpecTemplate)
def show(self, req, type_id, id):
"""Return a single extra spec item."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
authorize(context)
self._check_type(context, type_id)
specs = self._get_extra_specs(context, type_id)
@ -131,7 +131,7 @@ class VolumeTypeExtraSpecsController(wsgi.Controller):
def delete(self, req, type_id, id):
""" Deletes an existing extra spec """
context = req.environ['cinder.context']
context = req.environ['manila.context']
self._check_type(context, type_id)
authorize(context)
db.volume_type_extra_specs_delete(context, type_id, id)

View File

@ -19,13 +19,13 @@
import webob
from cinder.api import extensions
from cinder.api.openstack import wsgi
from cinder.api.v1 import types
from cinder.api.views import types as views_types
from cinder import exception
from cinder.openstack.common.notifier import api as notifier_api
from cinder.volume import volume_types
from manila.api import extensions
from manila.api.openstack import wsgi
from manila.api.v1 import types
from manila.api.views import types as views_types
from manila import exception
from manila.openstack.common.notifier import api as notifier_api
from manila.volume import volume_types
authorize = extensions.extension_authorizer('volume', 'types_manage')
@ -47,7 +47,7 @@ class VolumeTypesManageController(wsgi.Controller):
@wsgi.serializers(xml=types.VolumeTypeTemplate)
def _create(self, req, body):
"""Creates a new volume type."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
authorize(context)
if not self.is_valid_body(body, 'volume_type'):
@ -87,7 +87,7 @@ class VolumeTypesManageController(wsgi.Controller):
@wsgi.action("delete")
def _delete(self, req, id):
"""Deletes an existing volume type."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
authorize(context)
try:

View File

@ -14,15 +14,15 @@
import webob
from cinder.api import extensions
from cinder.api.openstack import wsgi
from cinder.api import xmlutil
from cinder import exception
from cinder import flags
from cinder.openstack.common import log as logging
from cinder.openstack.common.rpc import common as rpc_common
from cinder import utils
from cinder import volume
from manila.api import extensions
from manila.api.openstack import wsgi
from manila.api import xmlutil
from manila import exception
from manila import flags
from manila.openstack.common import log as logging
from manila.openstack.common.rpc import common as rpc_common
from manila import utils
from manila import volume
FLAGS = flags.FLAGS
@ -76,7 +76,7 @@ class VolumeActionsController(wsgi.Controller):
@wsgi.action('os-attach')
def _attach(self, req, id, body):
"""Add attachment metadata."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
volume = self.volume_api.get(context, id)
instance_uuid = body['os-attach']['instance_uuid']
@ -89,7 +89,7 @@ class VolumeActionsController(wsgi.Controller):
@wsgi.action('os-detach')
def _detach(self, req, id, body):
"""Clear attachment metadata."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
volume = self.volume_api.get(context, id)
self.volume_api.detach(context, volume)
return webob.Response(status_int=202)
@ -97,7 +97,7 @@ class VolumeActionsController(wsgi.Controller):
@wsgi.action('os-reserve')
def _reserve(self, req, id, body):
"""Mark volume as reserved."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
volume = self.volume_api.get(context, id)
self.volume_api.reserve_volume(context, volume)
return webob.Response(status_int=202)
@ -105,7 +105,7 @@ class VolumeActionsController(wsgi.Controller):
@wsgi.action('os-unreserve')
def _unreserve(self, req, id, body):
"""Unmark volume as reserved."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
volume = self.volume_api.get(context, id)
self.volume_api.unreserve_volume(context, volume)
return webob.Response(status_int=202)
@ -113,7 +113,7 @@ class VolumeActionsController(wsgi.Controller):
@wsgi.action('os-begin_detaching')
def _begin_detaching(self, req, id, body):
"""Update volume status to 'detaching'."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
volume = self.volume_api.get(context, id)
self.volume_api.begin_detaching(context, volume)
return webob.Response(status_int=202)
@ -121,7 +121,7 @@ class VolumeActionsController(wsgi.Controller):
@wsgi.action('os-roll_detaching')
def _roll_detaching(self, req, id, body):
"""Roll back volume status to 'in-use'."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
volume = self.volume_api.get(context, id)
self.volume_api.roll_detaching(context, volume)
return webob.Response(status_int=202)
@ -129,7 +129,7 @@ class VolumeActionsController(wsgi.Controller):
@wsgi.action('os-initialize_connection')
def _initialize_connection(self, req, id, body):
"""Initialize volume attachment."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
volume = self.volume_api.get(context, id)
connector = body['os-initialize_connection']['connector']
info = self.volume_api.initialize_connection(context,
@ -140,7 +140,7 @@ class VolumeActionsController(wsgi.Controller):
@wsgi.action('os-terminate_connection')
def _terminate_connection(self, req, id, body):
"""Terminate volume attachment."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
volume = self.volume_api.get(context, id)
connector = body['os-terminate_connection']['connector']
self.volume_api.terminate_connection(context, volume, connector)
@ -152,7 +152,7 @@ class VolumeActionsController(wsgi.Controller):
@wsgi.deserializers(xml=VolumeToImageDeserializer)
def _volume_upload_image(self, req, id, body):
"""Uploads the specified volume to image service."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
try:
params = body['os-volume_upload_image']
except (TypeError, KeyError):

View File

@ -12,11 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from cinder.api import extensions
from cinder.api.openstack import wsgi
from cinder.api import xmlutil
from cinder.openstack.common import log as logging
from cinder import volume
from manila.api import extensions
from manila.api.openstack import wsgi
from manila.api import xmlutil
from manila.openstack.common import log as logging
from manila import volume
LOG = logging.getLogger(__name__)
@ -40,14 +40,14 @@ class VolumeHostAttributeController(wsgi.Controller):
@wsgi.extends
def show(self, req, resp_obj, id):
context = req.environ['cinder.context']
context = req.environ['manila.context']
if authorize(context):
resp_obj.attach(xml=VolumeHostAttributeTemplate())
self._add_volume_host_attribute(context, resp_obj.obj['volume'])
@wsgi.extends
def detail(self, req, resp_obj):
context = req.environ['cinder.context']
context = req.environ['manila.context']
if authorize(context):
resp_obj.attach(xml=VolumeListHostAttributeTemplate())
for volume in list(resp_obj.obj['volumes']):

View File

@ -14,10 +14,10 @@
"""The Volume Image Metadata API extension."""
from cinder.api import extensions
from cinder.api.openstack import wsgi
from cinder.api import xmlutil
from cinder import volume
from manila.api import extensions
from manila.api.openstack import wsgi
from manila.api import xmlutil
from manila import volume
authorize = extensions.soft_extension_authorizer('volume',
@ -42,14 +42,14 @@ class VolumeImageMetadataController(wsgi.Controller):
@wsgi.extends
def show(self, req, resp_obj, id):
context = req.environ['cinder.context']
context = req.environ['manila.context']
if authorize(context):
resp_obj.attach(xml=VolumeImageMetadataTemplate())
self._add_image_metadata(context, resp_obj.obj['volume'])
@wsgi.extends
def detail(self, req, resp_obj):
context = req.environ['cinder.context']
context = req.environ['manila.context']
if authorize(context):
resp_obj.attach(xml=VolumesImageMetadataTemplate())
for volume in list(resp_obj.obj.get('volumes', [])):

View File

@ -12,10 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from cinder.api import extensions
from cinder.api.openstack import wsgi
from cinder.api import xmlutil
from cinder import volume
from manila.api import extensions
from manila.api.openstack import wsgi
from manila.api import xmlutil
from manila import volume
authorize = extensions.soft_extension_authorizer('volume',
@ -38,14 +38,14 @@ class VolumeTenantAttributeController(wsgi.Controller):
@wsgi.extends
def show(self, req, resp_obj, id):
context = req.environ['cinder.context']
context = req.environ['manila.context']
if authorize(context):
resp_obj.attach(xml=VolumeTenantAttributeTemplate())
self._add_volume_tenant_attribute(context, resp_obj.obj['volume'])
@wsgi.extends
def detail(self, req, resp_obj):
context = req.environ['cinder.context']
context = req.environ['manila.context']
if authorize(context):
resp_obj.attach(xml=VolumeListTenantAttributeTemplate())
for volume in list(resp_obj.obj['volumes']):

View File

@ -21,15 +21,15 @@ import os
import webob.dec
import webob.exc
import cinder.api.openstack
from cinder.api.openstack import wsgi
from cinder.api import xmlutil
from cinder import exception
from cinder import flags
from cinder.openstack.common import exception as common_exception
from cinder.openstack.common import importutils
from cinder.openstack.common import log as logging
import cinder.policy
import manila.api.openstack
from manila.api.openstack import wsgi
from manila.api import xmlutil
from manila import exception
from manila import flags
from manila.openstack.common import exception as common_exception
from manila.openstack.common import importutils
from manila.openstack.common import log as logging
import manila.policy
LOG = logging.getLogger(__name__)
@ -175,7 +175,7 @@ class ExtensionsResource(wsgi.Resource):
class ExtensionManager(object):
"""Load extensions from the configured extension path.
See cinder/tests/api/extensions/foxinsocks/extension.py for an
See manila/tests/api/extensions/foxinsocks/extension.py for an
example extension implementation.
"""
@ -271,13 +271,13 @@ class ExtensionManager(object):
# NOTE(thingee): Backwards compat for the old extension loader path.
# We can drop this post-grizzly in the H release.
old_contrib_path = ('cinder.api.openstack.volume.contrib.'
old_contrib_path = ('manila.api.openstack.volume.contrib.'
'standard_extensions')
new_contrib_path = 'cinder.api.contrib.standard_extensions'
new_contrib_path = 'manila.api.contrib.standard_extensions'
if old_contrib_path in extensions:
LOG.warn(_('osapi_volume_extension is set to deprecated path: %s'),
old_contrib_path)
LOG.warn(_('Please set your flag or cinder.conf settings for '
LOG.warn(_('Please set your flag or manila.conf settings for '
'osapi_volume_extension to: %s'), new_contrib_path)
extensions = [e.replace(old_contrib_path, new_contrib_path)
for e in extensions]
@ -291,9 +291,9 @@ class ExtensionManager(object):
class ControllerExtension(object):
"""Extend core controllers of cinder OpenStack API.
"""Extend core controllers of manila OpenStack API.
Provide a way to extend existing cinder OpenStack API core
Provide a way to extend existing manila OpenStack API core
controllers.
"""
@ -304,7 +304,7 @@ class ControllerExtension(object):
class ResourceExtension(object):
"""Add top level resources to the OpenStack API in cinder."""
"""Add top level resources to the OpenStack API in manila."""
def __init__(self, collection, controller, parent=None,
collection_actions=None, member_actions=None,
@ -391,7 +391,7 @@ def extension_authorizer(api_name, extension_name):
target = {'project_id': context.project_id,
'user_id': context.user_id}
action = '%s_extension:%s' % (api_name, extension_name)
cinder.policy.enforce(context, action, target)
manila.policy.enforce(context, action, target)
return authorize

View File

@ -24,11 +24,11 @@ from oslo.config import cfg
import webob.dec
import webob.exc
from cinder.api.openstack import wsgi
from cinder import context
from cinder import flags
from cinder.openstack.common import log as logging
from cinder import wsgi as base_wsgi
from manila.api.openstack import wsgi
from manila import context
from manila import flags
from manila.openstack.common import log as logging
from manila import wsgi as base_wsgi
use_forwarded_for_opt = cfg.BoolOpt(
'use_forwarded_for',
@ -57,7 +57,7 @@ def pipeline_factory(loader, global_conf, **local_conf):
class InjectContext(base_wsgi.Middleware):
"""Add a 'cinder.context' to WSGI environ."""
"""Add a 'manila.context' to WSGI environ."""
def __init__(self, context, *args, **kwargs):
self.context = context
@ -65,7 +65,7 @@ class InjectContext(base_wsgi.Middleware):
@webob.dec.wsgify(RequestClass=base_wsgi.Request)
def __call__(self, req):
req.environ['cinder.context'] = self.context
req.environ['manila.context'] = self.context
return self.application
@ -102,7 +102,7 @@ class CinderKeystoneContext(base_wsgi.Middleware):
auth_token=auth_token,
remote_address=remote_address)
req.environ['cinder.context'] = ctx
req.environ['manila.context'] = ctx
return self.application
@ -136,5 +136,5 @@ class NoAuthMiddleware(base_wsgi.Middleware):
is_admin=True,
remote_address=remote_address)
req.environ['cinder.context'] = ctx
req.environ['manila.context'] = ctx
return self.application

View File

@ -19,10 +19,10 @@
import webob.dec
import webob.exc
from cinder.api.openstack import wsgi
from cinder.openstack.common import log as logging
from cinder import utils
from cinder import wsgi as base_wsgi
from manila.api.openstack import wsgi
from manila.openstack.common import log as logging
from manila import utils
from manila import wsgi as base_wsgi
LOG = logging.getLogger(__name__)

View File

@ -22,9 +22,9 @@ from oslo.config import cfg
import webob.dec
import webob.exc
from cinder import flags
from cinder.openstack.common import log as logging
from cinder import wsgi
from manila import flags
from manila.openstack.common import log as logging
from manila import wsgi
#default request size is 112k
max_request_body_size_opt = cfg.IntOpt('osapi_max_request_body_size',
@ -66,7 +66,7 @@ class LimitingReader(object):
class RequestBodySizeLimiter(wsgi.Middleware):
"""Add a 'cinder.context' to WSGI environ."""
"""Add a 'manila.context' to WSGI environ."""
def __init__(self, *args, **kwargs):
super(RequestBodySizeLimiter, self).__init__(*args, **kwargs)

View File

@ -20,11 +20,11 @@ WSGI middleware for OpenStack API controllers.
import routes
from cinder.api.middleware import fault
from cinder.api.openstack import wsgi
from cinder.openstack.common import log as logging
from cinder import utils
from cinder import wsgi as base_wsgi
from manila.api.middleware import fault
from manila.api.openstack import wsgi
from manila.openstack.common import log as logging
from manila import utils
from manila import wsgi as base_wsgi
LOG = logging.getLogger(__name__)
@ -63,7 +63,7 @@ class APIRouter(base_wsgi.Router):
@classmethod
def factory(cls, global_config, **local_config):
"""Simple paste factory, :class:`cinder.wsgi.Router` doesn't have"""
"""Simple paste factory, :class:`manila.wsgi.Router` doesn't have"""
return cls()
def __init__(self, ext_mgr=None):
@ -125,6 +125,6 @@ class APIRouter(base_wsgi.Router):
class FaultWrapper(fault.FaultWrapper):
def __init__(self, application):
LOG.warn(_('cinder.api.openstack:FaultWrapper is deprecated. Please '
'use cinder.api.middleware.fault:FaultWrapper instead.'))
LOG.warn(_('manila.api.openstack:FaultWrapper is deprecated. Please '
'use manila.api.middleware.fault:FaultWrapper instead.'))
super(FaultWrapper, self).__init__(application)

View File

@ -14,14 +14,14 @@
# License for the specific language governing permissions and limitations
# under the License.
from cinder.api import urlmap
from cinder.openstack.common import log as logging
from manila.api import urlmap
from manila.openstack.common import log as logging
LOG = logging.getLogger(__name__)
def urlmap_factory(loader, global_conf, **local_conf):
LOG.warn(_('cinder.api.openstack.urlmap:urlmap_factory is deprecated. '
'Please use cinder.api.urlmap:urlmap_factory instead.'))
LOG.warn(_('manila.api.openstack.urlmap:urlmap_factory is deprecated. '
'Please use manila.api.urlmap:urlmap_factory instead.'))
urlmap.urlmap_factory(loader, global_conf, **local_conf)

View File

@ -14,14 +14,14 @@
# License for the specific language governing permissions and limitations
# under the License.
from cinder.api.v1.router import APIRouter as v1_router
from cinder.openstack.common import log as logging
from manila.api.v1.router import APIRouter as v1_router
from manila.openstack.common import log as logging
LOG = logging.getLogger(__name__)
class APIRouter(v1_router):
def __init__(self, ext_mgr=None):
LOG.warn(_('cinder.api.openstack.volume:APIRouter is deprecated. '
'Please use cinder.api.v1.router:APIRouter instead.'))
LOG.warn(_('manila.api.openstack.volume:APIRouter is deprecated. '
'Please use manila.api.v1.router:APIRouter instead.'))
super(APIRouter, self).__init__(ext_mgr)

View File

@ -14,8 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from cinder.api import versions
from cinder.openstack.common import log as logging
from manila.api import versions
from manila.openstack.common import log as logging
LOG = logging.getLogger(__name__)
@ -23,7 +23,7 @@ LOG = logging.getLogger(__name__)
class Versions(versions.Versions):
def __init__(self):
LOG.warn(_('cinder.api.openstack.volume.versions.Versions is '
'deprecated. Please use cinder.api.versions.Versions '
LOG.warn(_('manila.api.openstack.volume.versions.Versions is '
'deprecated. Please use manila.api.versions.Versions '
'instead.'))
super(Versions, self).__init__()

View File

@ -20,11 +20,11 @@ import math
import time
import webob
from cinder import exception
from cinder.openstack.common import jsonutils
from cinder.openstack.common import log as logging
from cinder import utils
from cinder import wsgi
from manila import exception
from manila.openstack.common import jsonutils
from manila.openstack.common import log as logging
from manila import utils
from manila import wsgi
from lxml import etree
from xml.dom import minidom
@ -65,7 +65,7 @@ class Request(webob.Request):
def best_match_content_type(self):
"""Determine the requested response content-type."""
if 'cinder.best_content_type' not in self.environ:
if 'manila.best_content_type' not in self.environ:
# Calculate the best MIME type
content_type = None
@ -79,10 +79,10 @@ class Request(webob.Request):
if not content_type:
content_type = self.accept.best_match(SUPPORTED_CONTENT_TYPES)
self.environ['cinder.best_content_type'] = (content_type or
self.environ['manila.best_content_type'] = (content_type or
'application/json')
return self.environ['cinder.best_content_type']
return self.environ['manila.best_content_type']
def get_content_type(self):
"""Determine content type of the request body.
@ -836,7 +836,7 @@ class Resource(wsgi.Application):
action_args.update(contents)
project_id = action_args.pop("project_id", None)
context = request.environ.get('cinder.context')
context = request.environ.get('manila.context')
if (context and project_id and (project_id != context.project_id)):
msg = _("Malformed request url")
return Fault(webob.exc.HTTPBadRequest(explanation=msg))
@ -1092,7 +1092,7 @@ class Fault(webob.exc.HTTPException):
def _set_request_id_header(req, headers):
context = req.environ.get('cinder.context')
context = req.environ.get('manila.context')
if context:
headers['x-compute-request-id'] = context.request_id

View File

@ -14,15 +14,15 @@
# License for the specific language governing permissions and limitations
# under the License.
from cinder.api.middleware import sizelimit
from cinder.openstack.common import log as logging
from manila.api.middleware import sizelimit
from manila.openstack.common import log as logging
LOG = logging.getLogger(__name__)
class RequestBodySizeLimiter(sizelimit.RequestBodySizeLimiter):
def __init__(self, *args, **kwargs):
LOG.warn(_('cinder.api.sizelimit:RequestBodySizeLimiter is '
'deprecated. Please use cinder.api.middleware.sizelimit:'
LOG.warn(_('manila.api.sizelimit:RequestBodySizeLimiter is '
'deprecated. Please use manila.api.middleware.sizelimit:'
'RequestBodySizeLimiter instead'))
super(RequestBodySizeLimiter, self).__init__(*args, **kwargs)

View File

@ -19,8 +19,8 @@ import paste.urlmap
import re
import urllib2
from cinder.api.openstack import wsgi
from cinder.openstack.common import log as logging
from manila.api.openstack import wsgi
from manila.openstack.common import log as logging
_quoted_string_re = r'"[^"\\]*(?:\\.[^"\\]*)*"'
@ -290,7 +290,7 @@ class URLMap(paste.urlmap.URLMap):
app = self._munge_path(app, path_info, app_url)
if app:
environ['cinder.best_content_type'] = mime_type
environ['manila.best_content_type'] = mime_type
return app(environ, start_response)
environ['paste.urlmap_object'] = self

View File

@ -27,13 +27,13 @@ import time
import webob.dec
import webob.exc
from cinder.api.openstack import wsgi
from cinder.api.views import limits as limits_views
from cinder.api import xmlutil
from cinder.openstack.common import importutils
from cinder.openstack.common import jsonutils
from cinder import quota
from cinder import wsgi as base_wsgi
from manila.api.openstack import wsgi
from manila.api.views import limits as limits_views
from manila.api import xmlutil
from manila.openstack.common import importutils
from manila.openstack.common import jsonutils
from manila import quota
from manila import wsgi as base_wsgi
QUOTAS = quota.QUOTAS
@ -83,11 +83,11 @@ class LimitsController(object):
"""
Return all global and rate limit information.
"""
context = req.environ['cinder.context']
context = req.environ['manila.context']
quotas = QUOTAS.get_project_quotas(context, context.project_id,
usages=False)
abs_limits = dict((k, v['limit']) for k, v in quotas.items())
rate_limits = req.environ.get("cinder.limits", [])
rate_limits = req.environ.get("manila.limits", [])
builder = self._get_view_builder(req)
return builder.build(rate_limits, abs_limits)
@ -257,7 +257,7 @@ class RateLimitingMiddleware(base_wsgi.Middleware):
"""
verb = req.method
url = req.url
context = req.environ.get("cinder.context")
context = req.environ.get("manila.context")
if context:
username = context.user_id
@ -271,7 +271,7 @@ class RateLimitingMiddleware(base_wsgi.Middleware):
retry = time.time() + delay
return wsgi.OverLimitFault(msg, error, retry)
req.environ["cinder.limits"] = self._limiter.get_limits(username)
req.environ["manila.limits"] = self._limiter.get_limits(username)
return self.application

View File

@ -21,22 +21,22 @@
WSGI middleware for OpenStack Volume API.
"""
from cinder.api import extensions
import cinder.api.openstack
from cinder.api.v1 import limits
from cinder.api.v1 import snapshot_metadata
from cinder.api.v1 import snapshots
from cinder.api.v1 import types
from cinder.api.v1 import volume_metadata
from cinder.api.v1 import volumes
from cinder.api import versions
from cinder.openstack.common import log as logging
from manila.api import extensions
import manila.api.openstack
from manila.api.v1 import limits
from manila.api.v1 import snapshot_metadata
from manila.api.v1 import snapshots
from manila.api.v1 import types
from manila.api.v1 import volume_metadata
from manila.api.v1 import volumes
from manila.api import versions
from manila.openstack.common import log as logging
LOG = logging.getLogger(__name__)
class APIRouter(cinder.api.openstack.APIRouter):
class APIRouter(manila.api.openstack.APIRouter):
"""
Routes requests on the OpenStack API to the appropriate controller
and method.

View File

@ -17,10 +17,10 @@
import webob
from cinder.api import common
from cinder.api.openstack import wsgi
from cinder import exception
from cinder import volume
from manila.api import common
from manila.api.openstack import wsgi
from manila import exception
from manila import volume
from webob import exc
@ -43,7 +43,7 @@ class Controller(object):
@wsgi.serializers(xml=common.MetadataTemplate)
def index(self, req, snapshot_id):
""" Returns the list of metadata for a given snapshot"""
context = req.environ['cinder.context']
context = req.environ['manila.context']
return {'metadata': self._get_metadata(context, snapshot_id)}
@wsgi.serializers(xml=common.MetadataTemplate)
@ -55,7 +55,7 @@ class Controller(object):
msg = _("Malformed request body")
raise exc.HTTPBadRequest(explanation=msg)
context = req.environ['cinder.context']
context = req.environ['manila.context']
new_metadata = self._update_snapshot_metadata(context,
snapshot_id,
@ -81,7 +81,7 @@ class Controller(object):
expl = _('Request body contains too many items')
raise exc.HTTPBadRequest(explanation=expl)
context = req.environ['cinder.context']
context = req.environ['manila.context']
self._update_snapshot_metadata(context,
snapshot_id,
meta_item,
@ -98,7 +98,7 @@ class Controller(object):
expl = _('Malformed request body')
raise exc.HTTPBadRequest(explanation=expl)
context = req.environ['cinder.context']
context = req.environ['manila.context']
new_metadata = self._update_snapshot_metadata(context,
snapshot_id,
metadata,
@ -132,7 +132,7 @@ class Controller(object):
@wsgi.serializers(xml=common.MetaItemTemplate)
def show(self, req, snapshot_id, id):
""" Return a single metadata item """
context = req.environ['cinder.context']
context = req.environ['manila.context']
data = self._get_metadata(context, snapshot_id)
try:
@ -143,7 +143,7 @@ class Controller(object):
def delete(self, req, snapshot_id, id):
""" Deletes an existing metadata """
context = req.environ['cinder.context']
context = req.environ['manila.context']
metadata = self._get_metadata(context, snapshot_id)

View File

@ -18,16 +18,16 @@
import webob
from webob import exc
from cinder.api import common
from cinder.api.openstack import wsgi
from cinder.api.v1 import volumes
from cinder.api import xmlutil
from cinder import exception
from cinder import flags
from cinder.openstack.common import log as logging
from cinder.openstack.common import strutils
from cinder import utils
from cinder import volume
from manila.api import common
from manila.api.openstack import wsgi
from manila.api.v1 import volumes
from manila.api import xmlutil
from manila import exception
from manila import flags
from manila.openstack.common import log as logging
from manila.openstack.common import strutils
from manila import utils
from manila import volume
LOG = logging.getLogger(__name__)
@ -107,7 +107,7 @@ class SnapshotsController(wsgi.Controller):
@wsgi.serializers(xml=SnapshotTemplate)
def show(self, req, id):
"""Return data about the given snapshot."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
try:
vol = self.volume_api.get_snapshot(context, id)
@ -118,7 +118,7 @@ class SnapshotsController(wsgi.Controller):
def delete(self, req, id):
"""Delete a snapshot."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
LOG.audit(_("Delete snapshot with id: %s"), id, context=context)
@ -141,7 +141,7 @@ class SnapshotsController(wsgi.Controller):
def _items(self, req, entity_maker):
"""Returns a list of snapshots, transformed through entity_maker."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
search_opts = {}
search_opts.update(req.GET)
@ -159,7 +159,7 @@ class SnapshotsController(wsgi.Controller):
def create(self, req, body):
"""Creates a new snapshot."""
kwargs = {}
context = req.environ['cinder.context']
context = req.environ['manila.context']
if not self.is_valid_body(body, 'snapshot'):
raise exc.HTTPUnprocessableEntity()
@ -199,7 +199,7 @@ class SnapshotsController(wsgi.Controller):
@wsgi.serializers(xml=SnapshotTemplate)
def update(self, req, id, body):
"""Update a snapshot."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
if not body:
raise exc.HTTPUnprocessableEntity()

View File

@ -19,11 +19,11 @@
from webob import exc
from cinder.api.openstack import wsgi
from cinder.api.views import types as views_types
from cinder.api import xmlutil
from cinder import exception
from cinder.volume import volume_types
from manila.api.openstack import wsgi
from manila.api.views import types as views_types
from manila.api import xmlutil
from manila import exception
from manila.volume import volume_types
def make_voltype(elem):
@ -57,14 +57,14 @@ class VolumeTypesController(wsgi.Controller):
@wsgi.serializers(xml=VolumeTypesTemplate)
def index(self, req):
"""Returns the list of volume types."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
vol_types = volume_types.get_all_types(context).values()
return self._view_builder.index(req, vol_types)
@wsgi.serializers(xml=VolumeTypeTemplate)
def show(self, req, id):
"""Return a single volume type item."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
try:
vol_type = volume_types.get_volume_type(context, id)

View File

@ -17,10 +17,10 @@
import webob
from cinder.api import common
from cinder.api.openstack import wsgi
from cinder import exception
from cinder import volume
from manila.api import common
from manila.api.openstack import wsgi
from manila import exception
from manila import volume
from webob import exc
@ -43,7 +43,7 @@ class Controller(object):
@wsgi.serializers(xml=common.MetadataTemplate)
def index(self, req, volume_id):
""" Returns the list of metadata for a given volume"""
context = req.environ['cinder.context']
context = req.environ['manila.context']
return {'metadata': self._get_metadata(context, volume_id)}
@wsgi.serializers(xml=common.MetadataTemplate)
@ -55,7 +55,7 @@ class Controller(object):
msg = _("Malformed request body")
raise exc.HTTPBadRequest(explanation=msg)
context = req.environ['cinder.context']
context = req.environ['manila.context']
new_metadata = self._update_volume_metadata(context,
volume_id,
@ -81,7 +81,7 @@ class Controller(object):
expl = _('Request body contains too many items')
raise exc.HTTPBadRequest(explanation=expl)
context = req.environ['cinder.context']
context = req.environ['manila.context']
self._update_volume_metadata(context,
volume_id,
meta_item,
@ -98,7 +98,7 @@ class Controller(object):
expl = _('Malformed request body')
raise exc.HTTPBadRequest(explanation=expl)
context = req.environ['cinder.context']
context = req.environ['manila.context']
new_metadata = self._update_volume_metadata(context,
volume_id,
metadata,
@ -132,7 +132,7 @@ class Controller(object):
@wsgi.serializers(xml=common.MetaItemTemplate)
def show(self, req, volume_id, id):
""" Return a single metadata item """
context = req.environ['cinder.context']
context = req.environ['manila.context']
data = self._get_metadata(context, volume_id)
try:
@ -143,7 +143,7 @@ class Controller(object):
def delete(self, req, volume_id, id):
""" Deletes an existing metadata """
context = req.environ['cinder.context']
context = req.environ['manila.context']
metadata = self._get_metadata(context, volume_id)

View File

@ -18,16 +18,16 @@
import webob
from webob import exc
from cinder.api import common
from cinder.api.openstack import wsgi
from cinder.api import xmlutil
from cinder import exception
from cinder import flags
from cinder.openstack.common import log as logging
from cinder.openstack.common import uuidutils
from cinder import utils
from cinder import volume
from cinder.volume import volume_types
from manila.api import common
from manila.api.openstack import wsgi
from manila.api import xmlutil
from manila import exception
from manila import flags
from manila.openstack.common import log as logging
from manila.openstack.common import uuidutils
from manila import utils
from manila import volume
from manila.volume import volume_types
LOG = logging.getLogger(__name__)
@ -220,7 +220,7 @@ class VolumeController(wsgi.Controller):
@wsgi.serializers(xml=VolumeTemplate)
def show(self, req, id):
"""Return data about the given volume."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
try:
vol = self.volume_api.get(context, id)
@ -231,7 +231,7 @@ class VolumeController(wsgi.Controller):
def delete(self, req, id):
"""Delete a volume."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
LOG.audit(_("Delete volume with id: %s"), id, context=context)
@ -258,7 +258,7 @@ class VolumeController(wsgi.Controller):
search_opts = {}
search_opts.update(req.GET)
context = req.environ['cinder.context']
context = req.environ['manila.context']
remove_invalid_options(context,
search_opts, self._get_volume_search_options())
@ -291,7 +291,7 @@ class VolumeController(wsgi.Controller):
if not self.is_valid_body(body, 'volume'):
raise exc.HTTPUnprocessableEntity()
context = req.environ['cinder.context']
context = req.environ['manila.context']
volume = body['volume']
kwargs = {}
@ -370,7 +370,7 @@ class VolumeController(wsgi.Controller):
@wsgi.serializers(xml=VolumeTemplate)
def update(self, req, id, body):
"""Update a volume."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
if not body:
raise exc.HTTPUnprocessableEntity()

View File

@ -27,13 +27,13 @@ import time
import webob.dec
import webob.exc
from cinder.api.openstack import wsgi
from cinder.api.views import limits as limits_views
from cinder.api import xmlutil
from cinder.openstack.common import importutils
from cinder.openstack.common import jsonutils
from cinder import quota
from cinder import wsgi as base_wsgi
from manila.api.openstack import wsgi
from manila.api.views import limits as limits_views
from manila.api import xmlutil
from manila.openstack.common import importutils
from manila.openstack.common import jsonutils
from manila import quota
from manila import wsgi as base_wsgi
QUOTAS = quota.QUOTAS
@ -83,11 +83,11 @@ class LimitsController(object):
"""
Return all global and rate limit information.
"""
context = req.environ['cinder.context']
context = req.environ['manila.context']
quotas = QUOTAS.get_project_quotas(context, context.project_id,
usages=False)
abs_limits = dict((k, v['limit']) for k, v in quotas.items())
rate_limits = req.environ.get("cinder.limits", [])
rate_limits = req.environ.get("manila.limits", [])
builder = self._get_view_builder(req)
return builder.build(rate_limits, abs_limits)
@ -257,7 +257,7 @@ class RateLimitingMiddleware(base_wsgi.Middleware):
"""
verb = req.method
url = req.url
context = req.environ.get("cinder.context")
context = req.environ.get("manila.context")
if context:
username = context.user_id
@ -271,7 +271,7 @@ class RateLimitingMiddleware(base_wsgi.Middleware):
retry = time.time() + delay
return wsgi.OverLimitFault(msg, error, retry)
req.environ["cinder.limits"] = self._limiter.get_limits(username)
req.environ["manila.limits"] = self._limiter.get_limits(username)
return self.application

View File

@ -21,20 +21,20 @@
WSGI middleware for OpenStack Volume API.
"""
from cinder.api import extensions
import cinder.api.openstack
from cinder.api.v2 import limits
from cinder.api.v2 import snapshots
from cinder.api.v2 import types
from cinder.api.v2 import volumes
from cinder.api import versions
from cinder.openstack.common import log as logging
from manila.api import extensions
import manila.api.openstack
from manila.api.v2 import limits
from manila.api.v2 import snapshots
from manila.api.v2 import types
from manila.api.v2 import volumes
from manila.api import versions
from manila.openstack.common import log as logging
LOG = logging.getLogger(__name__)
class APIRouter(cinder.api.openstack.APIRouter):
class APIRouter(manila.api.openstack.APIRouter):
"""
Routes requests on the OpenStack API to the appropriate controller
and method.

View File

@ -17,10 +17,10 @@
import webob
from cinder.api import common
from cinder.api.openstack import wsgi
from cinder import exception
from cinder import volume
from manila.api import common
from manila.api.openstack import wsgi
from manila import exception
from manila import volume
from webob import exc
@ -43,7 +43,7 @@ class Controller(object):
@wsgi.serializers(xml=common.MetadataTemplate)
def index(self, req, snapshot_id):
""" Returns the list of metadata for a given snapshot"""
context = req.environ['cinder.context']
context = req.environ['manila.context']
return {'metadata': self._get_metadata(context, snapshot_id)}
@wsgi.serializers(xml=common.MetadataTemplate)
@ -55,7 +55,7 @@ class Controller(object):
msg = _("Malformed request body")
raise exc.HTTPBadRequest(explanation=msg)
context = req.environ['cinder.context']
context = req.environ['manila.context']
new_metadata = self._update_snapshot_metadata(context,
snapshot_id,
@ -81,7 +81,7 @@ class Controller(object):
expl = _('Request body contains too many items')
raise exc.HTTPBadRequest(explanation=expl)
context = req.environ['cinder.context']
context = req.environ['manila.context']
self._update_snapshot_metadata(context,
snapshot_id,
meta_item,
@ -98,7 +98,7 @@ class Controller(object):
expl = _('Malformed request body')
raise exc.HTTPBadRequest(explanation=expl)
context = req.environ['cinder.context']
context = req.environ['manila.context']
new_metadata = self._update_snapshot_metadata(context,
snapshot_id,
metadata,
@ -132,7 +132,7 @@ class Controller(object):
@wsgi.serializers(xml=common.MetaItemTemplate)
def show(self, req, snapshot_id, id):
""" Return a single metadata item """
context = req.environ['cinder.context']
context = req.environ['manila.context']
data = self._get_metadata(context, snapshot_id)
try:
@ -143,7 +143,7 @@ class Controller(object):
def delete(self, req, snapshot_id, id):
""" Deletes an existing metadata """
context = req.environ['cinder.context']
context = req.environ['manila.context']
metadata = self._get_metadata(context, snapshot_id)

View File

@ -18,16 +18,16 @@
import webob
from webob import exc
from cinder.api import common
from cinder.api.openstack import wsgi
from cinder.api.v2 import volumes
from cinder.api import xmlutil
from cinder import exception
from cinder import flags
from cinder.openstack.common import log as logging
from cinder.openstack.common import strutils
from cinder import utils
from cinder import volume
from manila.api import common
from manila.api.openstack import wsgi
from manila.api.v2 import volumes
from manila.api import xmlutil
from manila import exception
from manila import flags
from manila.openstack.common import log as logging
from manila.openstack.common import strutils
from manila import utils
from manila import volume
LOG = logging.getLogger(__name__)
@ -107,7 +107,7 @@ class SnapshotsController(wsgi.Controller):
@wsgi.serializers(xml=SnapshotTemplate)
def show(self, req, id):
"""Return data about the given snapshot."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
try:
vol = self.volume_api.get_snapshot(context, id)
@ -118,7 +118,7 @@ class SnapshotsController(wsgi.Controller):
def delete(self, req, id):
"""Delete a snapshot."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
LOG.audit(_("Delete snapshot with id: %s"), id, context=context)
@ -141,7 +141,7 @@ class SnapshotsController(wsgi.Controller):
def _items(self, req, entity_maker):
"""Returns a list of snapshots, transformed through entity_maker."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
search_opts = {}
search_opts.update(req.GET)
@ -165,7 +165,7 @@ class SnapshotsController(wsgi.Controller):
def create(self, req, body):
"""Creates a new snapshot."""
kwargs = {}
context = req.environ['cinder.context']
context = req.environ['manila.context']
if not self.is_valid_body(body, 'snapshot'):
raise exc.HTTPBadRequest()
@ -210,7 +210,7 @@ class SnapshotsController(wsgi.Controller):
@wsgi.serializers(xml=SnapshotTemplate)
def update(self, req, id, body):
"""Update a snapshot."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
if not body:
raise exc.HTTPBadRequest()

View File

@ -19,11 +19,11 @@
from webob import exc
from cinder.api.openstack import wsgi
from cinder.api.views import types as views_types
from cinder.api import xmlutil
from cinder import exception
from cinder.volume import volume_types
from manila.api.openstack import wsgi
from manila.api.views import types as views_types
from manila.api import xmlutil
from manila import exception
from manila.volume import volume_types
def make_voltype(elem):
@ -57,14 +57,14 @@ class VolumeTypesController(wsgi.Controller):
@wsgi.serializers(xml=VolumeTypesTemplate)
def index(self, req):
"""Returns the list of volume types."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
vol_types = volume_types.get_all_types(context).values()
return self._view_builder.index(req, vol_types)
@wsgi.serializers(xml=VolumeTypeTemplate)
def show(self, req, id):
"""Return a single volume type item."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
try:
vol_type = volume_types.get_volume_type(context, id)

View File

@ -15,8 +15,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from cinder.api import common
from cinder.openstack.common import log as logging
from manila.api import common
from manila.openstack.common import log as logging
LOG = logging.getLogger(__name__)

View File

@ -18,17 +18,17 @@
import webob
from webob import exc
from cinder.api import common
from cinder.api.openstack import wsgi
from cinder.api.v2.views import volumes as volume_views
from cinder.api import xmlutil
from cinder import exception
from cinder import flags
from cinder.openstack.common import log as logging
from cinder.openstack.common import uuidutils
from cinder import utils
from cinder import volume
from cinder.volume import volume_types
from manila.api import common
from manila.api.openstack import wsgi
from manila.api.v2.views import volumes as volume_views
from manila.api import xmlutil
from manila import exception
from manila import flags
from manila.openstack.common import log as logging
from manila.openstack.common import uuidutils
from manila import utils
from manila import volume
from manila.volume import volume_types
LOG = logging.getLogger(__name__)
@ -137,7 +137,7 @@ class VolumeController(wsgi.Controller):
@wsgi.serializers(xml=VolumeTemplate)
def show(self, req, id):
"""Return data about the given volume."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
try:
vol = self.volume_api.get(context, id)
@ -148,7 +148,7 @@ class VolumeController(wsgi.Controller):
def delete(self, req, id):
"""Delete a volume."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
LOG.audit(_("Delete volume with id: %s"), id, context=context)
@ -172,7 +172,7 @@ class VolumeController(wsgi.Controller):
def _get_volumes(self, req, is_detail):
"""Returns a list of volumes, transformed through view builder."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
params = req.params.copy()
marker = params.pop('marker', None)
@ -223,7 +223,7 @@ class VolumeController(wsgi.Controller):
if not self.is_valid_body(body, 'volume'):
raise exc.HTTPBadRequest()
context = req.environ['cinder.context']
context = req.environ['manila.context']
volume = body['volume']
kwargs = {}
@ -301,7 +301,7 @@ class VolumeController(wsgi.Controller):
@wsgi.serializers(xml=VolumeTemplate)
def update(self, req, id, body):
"""Update a volume."""
context = req.environ['cinder.context']
context = req.environ['manila.context']
if not body:
raise exc.HTTPBadRequest()

View File

@ -18,10 +18,10 @@
import datetime
from lxml import etree
from cinder.api.openstack import wsgi
from cinder.api.views import versions as views_versions
from cinder.api import xmlutil
from cinder import flags
from manila.api.openstack import wsgi
from manila.api.views import versions as views_versions
from manila.api import xmlutil
from manila import flags
FLAGS = flags.FLAGS

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from cinder.api import common
from cinder.openstack.common import log as logging
from manila.api import common
from manila.openstack.common import log as logging
LOG = logging.getLogger(__name__)

View File

@ -17,7 +17,7 @@
import datetime
from cinder.openstack.common import timeutils
from manila.openstack.common import timeutils
class ViewBuilder(object):

View File

@ -15,8 +15,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from cinder.api import common
from cinder.openstack.common import log as logging
from manila.api import common
from manila.openstack.common import log as logging
class ViewBuilder(common.ViewBuilder):

View File

@ -15,8 +15,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from cinder.api import common
from cinder.openstack.common import log as logging
from manila.api import common
from manila.openstack.common import log as logging
class ViewBuilder(common.ViewBuilder):

View File

@ -15,7 +15,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from cinder.api import common
from manila.api import common
class ViewBuilder(common.ViewBuilder):

View File

@ -19,7 +19,7 @@ import os.path
from lxml import etree
from cinder import utils
from manila import utils
XMLNS_V10 = 'http://docs.rackspacecloud.com/servers/api/v1.0'
@ -35,9 +35,9 @@ XMLNS_SHARE_V1 = ''
def validate_schema(xml, schema_name):
if isinstance(xml, str):
xml = etree.fromstring(xml)
base_path = 'cinder/api/schemas/v1.1/'
base_path = 'manila/api/schemas/v1.1/'
if schema_name in ('atom', 'atom-link'):
base_path = 'cinder/api/schemas/'
base_path = 'manila/api/schemas/'
schema_path = os.path.join(utils.cinderdir(),
'%s%s.rng' % (base_path, schema_name))
schema_doc = etree.parse(schema_path)

View File

@ -14,10 +14,10 @@
# under the License.
# Importing full names to not pollute the namespace and cause possible
# collisions with use of 'from cinder.backup import <foo>' elsewhere.
# collisions with use of 'from manila.backup import <foo>' elsewhere.
import cinder.flags
import cinder.openstack.common.importutils
import manila.flags
import manila.openstack.common.importutils
API = cinder.openstack.common.importutils.import_class(
cinder.flags.FLAGS.backup_api_class)
API = manila.openstack.common.importutils.import_class(
manila.flags.FLAGS.backup_api_class)

View File

@ -19,12 +19,12 @@ Handles all requests relating to the volume backups service.
from eventlet import greenthread
from cinder.backup import rpcapi as backup_rpcapi
from cinder.db import base
from cinder import exception
from cinder import flags
from cinder.openstack.common import log as logging
import cinder.volume
from manila.backup import rpcapi as backup_rpcapi
from manila.db import base
from manila import exception
from manila import flags
from manila.openstack.common import log as logging
import manila.volume
FLAGS = flags.FLAGS
@ -37,7 +37,7 @@ class API(base.Base):
def __init__(self, db_driver=None):
self.backup_rpcapi = backup_rpcapi.BackupAPI()
self.volume_api = cinder.volume.API()
self.volume_api = manila.volume.API()
super(API, self).__init__(db_driver)
def get(self, context, backup_id):

View File

@ -25,28 +25,28 @@ Volume backups can be created, restored, deleted and listed.
**Related Flags**
:backup_topic: What :mod:`rpc` topic to listen to (default:
`cinder-backup`).
`manila-backup`).
:backup_manager: The module name of a class derived from
:class:`manager.Manager` (default:
:class:`cinder.backup.manager.Manager`).
:class:`manila.backup.manager.Manager`).
"""
from oslo.config import cfg
from cinder import context
from cinder import exception
from cinder import flags
from cinder import manager
from cinder.openstack.common import excutils
from cinder.openstack.common import importutils
from cinder.openstack.common import log as logging
from manila import context
from manila import exception
from manila import flags
from manila import manager
from manila.openstack.common import excutils
from manila.openstack.common import importutils
from manila.openstack.common import log as logging
LOG = logging.getLogger(__name__)
backup_manager_opts = [
cfg.StrOpt('backup_service',
default='cinder.backup.services.swift',
default='manila.backup.services.swift',
help='Service to use for backups.'),
]

View File

@ -19,10 +19,10 @@
Client side of the volume backup RPC API.
"""
from cinder import flags
from cinder.openstack.common import log as logging
from cinder.openstack.common import rpc
import cinder.openstack.common.rpc.proxy
from manila import flags
from manila.openstack.common import log as logging
from manila.openstack.common import rpc
import manila.openstack.common.rpc.proxy
LOG = logging.getLogger(__name__)
@ -30,7 +30,7 @@ LOG = logging.getLogger(__name__)
FLAGS = flags.FLAGS
class BackupAPI(cinder.openstack.common.rpc.proxy.RpcProxy):
class BackupAPI(manila.openstack.common.rpc.proxy.RpcProxy):
'''Client side of the volume rpc API.
API version history:

View File

@ -40,11 +40,11 @@ import StringIO
import eventlet
from oslo.config import cfg
from cinder.db import base
from cinder import exception
from cinder import flags
from cinder.openstack.common import log as logging
from cinder.openstack.common import timeutils
from manila.db import base
from manila import exception
from manila import flags
from manila.openstack.common import log as logging
from manila.openstack.common import timeutils
from swiftclient import client as swift
LOG = logging.getLogger(__name__)

Some files were not shown because too many files have changed in this diff Show More