Merge master into telco

This commit is contained in:
Yuriy Taraday 2015-09-01 16:58:54 +03:00
commit 45e1202c85
2 changed files with 7 additions and 4 deletions

View File

@ -34,7 +34,7 @@ class ColorFormatter(logging.Formatter):
def set_console_formatter(**formatter_kwargs):
formatter_kwargs.setdefault(
'fmt', '%(asctime)s %(levelname)-8s %(name)-15s %(message)s')
formatter_kwargs.setdefault('datefmt', '%Y-%m-%d')
formatter_kwargs.setdefault('datefmt', '%Y-%m-%d %H:%M:%S')
root_logger = logging.getLogger('')
for handler in root_logger.handlers:
if isinstance(handler, logging.StreamHandler):

View File

@ -12,10 +12,13 @@
def preserve_partition(node, partition):
disks = node.get_attribute('disk')
disks = node.get_attribute('disks')
for disk in disks:
for vol in disk['volumes']:
if vol['name'] == partition:
vol.update({'keep_data': True})
vol.update({
'keep': True,
'keep_data': True,
})
node.upload_attribute('disk', disks)
node.upload_node_attribute('disks', disks)