]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Change logging level AUDIT to INFO
authorChristian Berendt <berendt@b1-systems.de>
Tue, 1 Jul 2014 09:34:08 +0000 (11:34 +0200)
committerChristian Berendt <berendt@b1-systems.de>
Fri, 1 Aug 2014 19:11:27 +0000 (19:11 +0000)
According to the latest revision of the logging guidelines message
of type AUDIT should be moved to INFO.

The latest revision is available at https://review.openstack.org/#/c/91446/
at the moment.

Change-Id: I2d86fa634f6424b0bb862319b9ae40d3f3b1ec7a

cinder/api/contrib/backups.py
cinder/api/contrib/hosts.py
cinder/api/contrib/volume_transfer.py
cinder/api/contrib/volume_unmanage.py
cinder/api/extensions.py
cinder/api/v1/snapshots.py
cinder/api/v1/volumes.py
cinder/api/v2/snapshots.py
cinder/api/v2/volumes.py
cinder/backup/api.py
cinder/service.py

index d04c94fd16de428d0086231871634cd1046bcf40..7547dc2c54c34b4a9d3357de7c4cdb1f642e2a78 100644 (file)
@@ -174,7 +174,7 @@ class BackupsController(wsgi.Controller):
         LOG.debug('delete called for member %s', id)
         context = req.environ['cinder.context']
 
-        LOG.audit(_('Delete backup with id: %s'), id, context=context)
+        LOG.info(_('Delete backup with id: %s'), id, context=context)
 
         try:
             self.backup_api.delete(context, id)
@@ -247,10 +247,10 @@ class BackupsController(wsgi.Controller):
         name = backup.get('name', None)
         description = backup.get('description', None)
 
-        LOG.audit(_("Creating backup of volume %(volume_id)s in container"
-                    " %(container)s"),
-                  {'volume_id': volume_id, 'container': container},
-                  context=context)
+        LOG.info(_("Creating backup of volume %(volume_id)s in container"
+                   " %(container)s"),
+                 {'volume_id': volume_id, 'container': container},
+                 context=context)
 
         try:
             new_backup = self.backup_api.create(context, name, description,
@@ -280,9 +280,9 @@ class BackupsController(wsgi.Controller):
         restore = body['restore']
         volume_id = restore.get('volume_id', None)
 
-        LOG.audit(_("Restoring backup %(backup_id)s to volume %(volume_id)s"),
-                  {'backup_id': id, 'volume_id': volume_id},
-                  context=context)
+        LOG.info(_("Restoring backup %(backup_id)s to volume %(volume_id)s"),
+                 {'backup_id': id, 'volume_id': volume_id},
+                 context=context)
 
         try:
             new_restore = self.backup_api.restore(context,
index e5c76c8591927d5137d263a6e316748814ef0f1e..824106f256e9c3e0e5669e99a0f122dc05c27fc2 100644 (file)
@@ -178,8 +178,8 @@ class HostController(wsgi.Controller):
         """Sets the specified host's ability to accept new volumes."""
         context = req.environ['cinder.context']
         state = "enabled" if enabled else "disabled"
-        LOG.audit(_("Setting host %(host)s to %(state)s."),
-                  {'host': host, 'state': state})
+        LOG.info(_("Setting host %(host)s to %(state)s."),
+                 {'host': host, 'state': state})
         result = self.api.set_host_enabled(context,
                                            host=host,
                                            enabled=enabled)
index c2aab33dabec3ee9d4f570ad9fc77ae44f71c0fd..a3e7deb8e7b1b55fd91ca452d0d0704aedd9a9c8 100644 (file)
@@ -160,9 +160,9 @@ class VolumeTransferController(wsgi.Controller):
 
         name = transfer.get('name', None)
 
-        LOG.audit(_("Creating transfer of volume %s"),
-                  volume_id,
-                  context=context)
+        LOG.info(_("Creating transfer of volume %s"),
+                 volume_id,
+                 context=context)
 
         try:
             new_transfer = self.transfer_api.create(context, volume_id, name)
@@ -194,8 +194,8 @@ class VolumeTransferController(wsgi.Controller):
             msg = _("Incorrect request body format")
             raise exc.HTTPBadRequest(explanation=msg)
 
-        LOG.audit(_("Accepting transfer %s"), transfer_id,
-                  context=context)
+        LOG.info(_("Accepting transfer %s"), transfer_id,
+                 context=context)
 
         try:
             accepted_transfer = self.transfer_api.accept(context, transfer_id,
@@ -215,7 +215,7 @@ class VolumeTransferController(wsgi.Controller):
         """Delete a transfer."""
         context = req.environ['cinder.context']
 
-        LOG.audit(_("Delete transfer with id: %s"), id, context=context)
+        LOG.info(_("Delete transfer with id: %s"), id, context=context)
 
         try:
             self.transfer_api.delete(context, transfer_id=id)
index 3b30e85bcb01cb0ebe4d88f2317fea3d0fbaba2c..6486ffa16c3bb22cf63fd0a7c551da1b14ca82f5 100755 (executable)
@@ -51,7 +51,7 @@ class VolumeUnmanageController(wsgi.Controller):
         context = req.environ['cinder.context']
         authorize(context)
 
-        LOG.audit(_("Unmanage volume with id: %s"), id, context=context)
+        LOG.info(_("Unmanage volume with id: %s"), id, context=context)
 
         try:
             vol = self.volume_api.get(context, id)
index 899fe4401eb898d9fc1e32919e6454f4db31f9ed..6209433e5571d5e1168d7e882360d735be7d16a2 100644 (file)
@@ -181,7 +181,7 @@ class ExtensionManager(object):
     """
 
     def __init__(self):
-        LOG.audit(_('Initializing extension manager.'))
+        LOG.info(_('Initializing extension manager.'))
 
         self.cls_list = CONF.osapi_volume_extension
         self.extensions = {}
@@ -196,7 +196,7 @@ class ExtensionManager(object):
             return
 
         alias = ext.alias
-        LOG.audit(_('Loaded extension: %s'), alias)
+        LOG.info(_('Loaded extension: %s'), alias)
 
         if alias in self.extensions:
             raise exception.Error("Found duplicate extension: %s" % alias)
index 4ab3c946f3929acf7c656acd23ca24989446face..8ec4954fc225c745a27b09900bd6dedc6aa63d33 100644 (file)
@@ -116,7 +116,7 @@ class SnapshotsController(wsgi.Controller):
         """Delete a snapshot."""
         context = req.environ['cinder.context']
 
-        LOG.audit(_("Delete snapshot with id: %s"), id, context=context)
+        LOG.info(_("Delete snapshot with id: %s"), id, context=context)
 
         try:
             snapshot = self.volume_api.get_snapshot(context, id)
@@ -180,7 +180,7 @@ class SnapshotsController(wsgi.Controller):
 
         force = snapshot.get('force', False)
         msg = _("Create snapshot from volume %s")
-        LOG.audit(msg, volume_id, context=context)
+        LOG.info(msg, volume_id, context=context)
 
         if not utils.is_valid_boolstr(force):
             msg = _("Invalid value '%s' for force. ") % force
index 9a07a78910c26af87d49bfee12ae19edc9d35e10..c262b5ca0ecae070eaea2694d7419ed8e685dde4 100644 (file)
@@ -112,7 +112,7 @@ def _translate_volume_summary_view(context, vol, image_id=None):
     if image_id:
         d['image_id'] = image_id
 
-    LOG.audit(_("vol=%s"), vol, context=context)
+    LOG.info(_("vol=%s"), vol, context=context)
 
     if vol.get('volume_metadata'):
         metadata = vol.get('volume_metadata')
@@ -243,7 +243,7 @@ class VolumeController(wsgi.Controller):
         """Delete a volume."""
         context = req.environ['cinder.context']
 
-        LOG.audit(_("Delete volume with id: %s"), id, context=context)
+        LOG.info(_("Delete volume with id: %s"), id, context=context)
 
         try:
             volume = self.volume_api.get(context, id)
@@ -367,7 +367,7 @@ class VolumeController(wsgi.Controller):
         elif size is None and kwargs['source_volume'] is not None:
             size = kwargs['source_volume']['size']
 
-        LOG.audit(_("Create volume of %s GB"), size, context=context)
+        LOG.info(_("Create volume of %s GB"), size, context=context)
 
         image_href = None
         image_uuid = None
index 01522de2a748034969526a60462386caa801bcbf..2af416303ecdaa49d4831bf9a7b65594b3a32953 100644 (file)
@@ -117,7 +117,7 @@ class SnapshotsController(wsgi.Controller):
         """Delete a snapshot."""
         context = req.environ['cinder.context']
 
-        LOG.audit(_("Delete snapshot with id: %s"), id, context=context)
+        LOG.info(_("Delete snapshot with id: %s"), id, context=context)
 
         try:
             snapshot = self.volume_api.get_snapshot(context, id)
@@ -191,7 +191,7 @@ class SnapshotsController(wsgi.Controller):
             raise exc.HTTPNotFound(explanation=msg)
         force = snapshot.get('force', False)
         msg = _("Create snapshot from volume %s")
-        LOG.audit(msg, volume_id, context=context)
+        LOG.info(msg, volume_id, context=context)
 
         # NOTE(thingee): v2 API allows name instead of display_name
         if 'name' in snapshot:
index dbe531dcf3b48c30ef4f7f2e523d3a0dc3895589..9945f1207731e43ef50fefe2bd947a928c03662c 100644 (file)
@@ -179,7 +179,7 @@ class VolumeController(wsgi.Controller):
         """Delete a volume."""
         context = req.environ['cinder.context']
 
-        LOG.audit(_("Delete volume with id: %s"), id, context=context)
+        LOG.info(_("Delete volume with id: %s"), id, context=context)
 
         try:
             volume = self.volume_api.get(context, id)
@@ -331,7 +331,7 @@ class VolumeController(wsgi.Controller):
         elif size is None and kwargs['source_volume'] is not None:
             size = kwargs['source_volume']['size']
 
-        LOG.audit(_("Create volume of %s GB"), size, context=context)
+        LOG.info(_("Create volume of %s GB"), size, context=context)
 
         if self.ext_mgr.is_loaded('os-image-create'):
             image_href = volume.get('imageRef')
index d84080fe1557de5c2505d0bc38b51070cc19c043..ae943e44e96d28949429c905c8e81cae240b7dd7 100644 (file)
@@ -164,10 +164,10 @@ class API(base.Base):
             name = 'restore_backup_%s' % backup_id
             description = 'auto-created_from_restore_from_backup'
 
-            LOG.audit(_("Creating volume of %(size)s GB for restore of "
-                        "backup %(backup_id)s"),
-                      {'size': size, 'backup_id': backup_id},
-                      context=context)
+            LOG.info(_("Creating volume of %(size)s GB for restore of "
+                       "backup %(backup_id)s"),
+                     {'size': size, 'backup_id': backup_id},
+                     context=context)
             volume = self.volume_api.create(context, size, name, description)
             volume_id = volume['id']
 
@@ -191,10 +191,10 @@ class API(base.Base):
                    {'volume_size': volume['size'], 'size': size})
             raise exception.InvalidVolume(reason=msg)
 
-        LOG.audit(_("Overwriting volume %(volume_id)s with restore of "
-                    "backup %(backup_id)s"),
-                  {'volume_id': volume_id, 'backup_id': backup_id},
-                  context=context)
+        LOG.info(_("Overwriting volume %(volume_id)s with restore of "
+                   "backup %(backup_id)s"),
+                 {'volume_id': volume_id, 'backup_id': backup_id},
+                 context=context)
 
         # Setting the status here rather than setting at start and unrolling
         # for each error condition, it should be a very small window
index 0dedc274ee29f2e044c7c2309c72c219e8e52341..3554f67c2a7c94d6bee3ae72fc8096b79b169745 100755 (executable)
@@ -101,8 +101,8 @@ class Service(service.Service):
 
     def start(self):
         version_string = version.version_string()
-        LOG.audit(_('Starting %(topic)s node (version %(version_string)s)'),
-                  {'topic': self.topic, 'version_string': version_string})
+        LOG.info(_('Starting %(topic)s node (version %(version_string)s)'),
+                 {'topic': self.topic, 'version_string': version_string})
         self.model_disconnected = False
         self.manager.init_host()
         ctxt = context.get_admin_context()