diff --git a/bareon_dynamic_allocator/objects/__init__.py b/bareon_dynamic_allocator/objects/__init__.py index d2530e6..cf96a80 100644 --- a/bareon_dynamic_allocator/objects/__init__.py +++ b/bareon_dynamic_allocator/objects/__init__.py @@ -16,5 +16,6 @@ # flake8: noqa +from bareon_dynamic_allocator.objects.base import BaseObject from bareon_dynamic_allocator.objects.disk import Disk from bareon_dynamic_allocator.objects.space import Space diff --git a/bareon_dynamic_allocator/objects/base.py b/bareon_dynamic_allocator/objects/base.py new file mode 100644 index 0000000..2a2d50e --- /dev/null +++ b/bareon_dynamic_allocator/objects/base.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- + +# Copyright 2016 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 BaseObject(object): + """Base class for Bareon Allocator Objects.""" diff --git a/bareon_dynamic_allocator/objects/disk.py b/bareon_dynamic_allocator/objects/disk.py index 84b80a1..e6dd842 100644 --- a/bareon_dynamic_allocator/objects/disk.py +++ b/bareon_dynamic_allocator/objects/disk.py @@ -14,10 +14,12 @@ # License for the specific language governing permissions and limitations # under the License. +from bareon_dynamic_allocator.objects import BaseObject + import six -class Disk(object): +class Disk(BaseObject): def __init__(self, **kwargs): for k, v in six.iteritems(kwargs): diff --git a/bareon_dynamic_allocator/objects/space.py b/bareon_dynamic_allocator/objects/space.py index cd8f788..014255a 100644 --- a/bareon_dynamic_allocator/objects/space.py +++ b/bareon_dynamic_allocator/objects/space.py @@ -14,10 +14,12 @@ # License for the specific language governing permissions and limitations # under the License. +from bareon_dynamic_allocator.objects import BaseObject + import six -class Space(object): +class Space(BaseObject): def __init__(self, **kwargs): for k, v in six.iteritems(kwargs):