Merge master into telco
This commit is contained in:
commit
45e1202c85
@ -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):
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user