fuel-agent/fuel_agent/objects/base.py
Artur Svechnikov 68494fb0dd Add processing of keep_data flag
In case when some partition has keep_data = True
need to elevate flag to file system level and
do not to create new partition table. Do not clean
file system when it has keep_data = True.
There should not be a problem if some raw data
will not be cleaned.

Change-Id: Ifccc9256b12944283219cffeedb8c8da8ab420f8
Implements: blueprint partition-preservation
2015-07-16 12:53:45 +03:00

31 lines
855 B
Python

# -*- coding: utf-8 -*-
# Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import abc
import six
@six.add_metaclass(abc.ABCMeta)
class Serializable(object):
@abc.abstractmethod
def to_dict(self):
pass
@classmethod
def from_dict(cls, data):
return cls(**data)