diff --git a/.coveragerc b/.coveragerc index d0c65bc..65147b8 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,7 +1,7 @@ [run] branch = True -source = bareon_dynamic_allocator -omit = bareon_dynamic_allocator/openstack/* +source = bareon_allocator +omit = bareon_allocator/openstack/* [report] ignore_errors = True diff --git a/bareon_dynamic_allocator/__init__.py b/bareon_allocator/__init__.py similarity index 92% rename from bareon_dynamic_allocator/__init__.py rename to bareon_allocator/__init__.py index 400730f..86d521f 100644 --- a/bareon_dynamic_allocator/__init__.py +++ b/bareon_allocator/__init__.py @@ -16,4 +16,4 @@ import pbr.version __version__ = pbr.version.VersionInfo( - 'bareon_dynamic_allocator').version_string() + 'bareon_allocator').version_string() diff --git a/bareon_dynamic_allocator/allocators.py b/bareon_allocator/allocators.py similarity index 98% rename from bareon_dynamic_allocator/allocators.py rename to bareon_allocator/allocators.py index e5de893..def4502 100644 --- a/bareon_dynamic_allocator/allocators.py +++ b/bareon_allocator/allocators.py @@ -22,11 +22,11 @@ import numpy as np from oslo_log import log from scipy.optimize import linprog -from bareon_dynamic_allocator import errors -from bareon_dynamic_allocator.parsers import DynamicSchemaParser -from bareon_dynamic_allocator import utils +from bareon_allocator import errors +from bareon_allocator.parsers import DynamicSchemaParser +from bareon_allocator import utils -from bareon_dynamic_allocator.sequences import CrossSumInequalitySequence +from bareon_allocator.sequences import CrossSumInequalitySequence LOG = log.getLogger(__name__) diff --git a/bareon_dynamic_allocator/cmd.py b/bareon_allocator/cmd.py similarity index 92% rename from bareon_dynamic_allocator/cmd.py rename to bareon_allocator/cmd.py index a9a833e..a3e8767 100644 --- a/bareon_dynamic_allocator/cmd.py +++ b/bareon_allocator/cmd.py @@ -17,9 +17,9 @@ import sys from oslo_config import cfg from oslo_log import log -from bareon_dynamic_allocator.allocators import DynamicAllocator -from bareon_dynamic_allocator import utils -from bareon_dynamic_allocator import viewer +from bareon_allocator.allocators import DynamicAllocator +from bareon_allocator import utils +from bareon_allocator import viewer cli_opts = [ @@ -56,7 +56,7 @@ def make_config(): def parse_args(conf, args=None): - project = 'bareon_dynamic_allocator' + project = 'bareon_allocator' version = '1.0.0' conf(args=args if args else sys.argv[1:], project=project, diff --git a/bareon_dynamic_allocator/driver.py b/bareon_allocator/driver.py similarity index 98% rename from bareon_dynamic_allocator/driver.py rename to bareon_allocator/driver.py index 16520a1..81e04f7 100644 --- a/bareon_dynamic_allocator/driver.py +++ b/bareon_allocator/driver.py @@ -17,7 +17,7 @@ from bareon.drivers.base import PartitioningDataDriverMixin from bareon import objects from bareon.openstack.common import log -from bareon_dynamic_allocator import allocators +from bareon_allocator import allocators # Logger for bareon-dynamic allocator should be configured diff --git a/bareon_dynamic_allocator/errors.py b/bareon_allocator/errors.py similarity index 100% rename from bareon_dynamic_allocator/errors.py rename to bareon_allocator/errors.py diff --git a/bareon_dynamic_allocator/objects/__init__.py b/bareon_allocator/objects/__init__.py similarity index 79% rename from bareon_dynamic_allocator/objects/__init__.py rename to bareon_allocator/objects/__init__.py index cf96a80..ff25d8c 100644 --- a/bareon_dynamic_allocator/objects/__init__.py +++ b/bareon_allocator/objects/__init__.py @@ -16,6 +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 +from bareon_allocator.objects.base import BaseObject +from bareon_allocator.objects.disk import Disk +from bareon_allocator.objects.space import Space diff --git a/bareon_dynamic_allocator/objects/base.py b/bareon_allocator/objects/base.py similarity index 97% rename from bareon_dynamic_allocator/objects/base.py rename to bareon_allocator/objects/base.py index eef17ae..c47bd43 100644 --- a/bareon_dynamic_allocator/objects/base.py +++ b/bareon_allocator/objects/base.py @@ -18,7 +18,7 @@ import abc from copy import deepcopy -from bareon_dynamic_allocator import errors +from bareon_allocator import errors import six diff --git a/bareon_dynamic_allocator/objects/disk.py b/bareon_allocator/objects/disk.py similarity index 93% rename from bareon_dynamic_allocator/objects/disk.py rename to bareon_allocator/objects/disk.py index 760083d..3a8fc4d 100644 --- a/bareon_dynamic_allocator/objects/disk.py +++ b/bareon_allocator/objects/disk.py @@ -14,7 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. -from bareon_dynamic_allocator.objects import BaseObject +from bareon_allocator.objects import BaseObject class Disk(BaseObject): diff --git a/bareon_dynamic_allocator/objects/space.py b/bareon_allocator/objects/space.py similarity index 95% rename from bareon_dynamic_allocator/objects/space.py rename to bareon_allocator/objects/space.py index 7a2d184..898890e 100644 --- a/bareon_dynamic_allocator/objects/space.py +++ b/bareon_allocator/objects/space.py @@ -14,7 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. -from bareon_dynamic_allocator.objects import BaseObject +from bareon_allocator.objects import BaseObject class Space(BaseObject): diff --git a/bareon_dynamic_allocator/parsers/__init__.py b/bareon_allocator/parsers/__init__.py similarity index 79% rename from bareon_dynamic_allocator/parsers/__init__.py rename to bareon_allocator/parsers/__init__.py index a5befd3..c725ea2 100644 --- a/bareon_dynamic_allocator/parsers/__init__.py +++ b/bareon_allocator/parsers/__init__.py @@ -14,5 +14,5 @@ # flake8: noqa -from bareon_dynamic_allocator.parsers.expressions import ExpressionsParser -from bareon_dynamic_allocator.parsers.dynamic_schema_parser import DynamicSchemaParser +from bareon_allocator.parsers.expressions import ExpressionsParser +from bareon_allocator.parsers.dynamic_schema_parser import DynamicSchemaParser diff --git a/bareon_dynamic_allocator/parsers/dynamic_schema_parser.py b/bareon_allocator/parsers/dynamic_schema_parser.py similarity index 93% rename from bareon_dynamic_allocator/parsers/dynamic_schema_parser.py rename to bareon_allocator/parsers/dynamic_schema_parser.py index 9153f34..a1819c4 100644 --- a/bareon_dynamic_allocator/parsers/dynamic_schema_parser.py +++ b/bareon_allocator/parsers/dynamic_schema_parser.py @@ -14,9 +14,9 @@ from oslo_log import log -from bareon_dynamic_allocator.objects import Disk -from bareon_dynamic_allocator.objects import Space -from bareon_dynamic_allocator.parsers import ExpressionsParser +from bareon_allocator.objects import Disk +from bareon_allocator.objects import Space +from bareon_allocator.parsers import ExpressionsParser LOG = log.getLogger(__name__) diff --git a/bareon_dynamic_allocator/parsers/expressions.py b/bareon_allocator/parsers/expressions.py similarity index 100% rename from bareon_dynamic_allocator/parsers/expressions.py rename to bareon_allocator/parsers/expressions.py diff --git a/bareon_dynamic_allocator/sequences.py b/bareon_allocator/sequences.py similarity index 100% rename from bareon_dynamic_allocator/sequences.py rename to bareon_allocator/sequences.py diff --git a/bareon_dynamic_allocator/tests/__init__.py b/bareon_allocator/tests/__init__.py similarity index 100% rename from bareon_dynamic_allocator/tests/__init__.py rename to bareon_allocator/tests/__init__.py diff --git a/bareon_dynamic_allocator/tests/base.py b/bareon_allocator/tests/base.py similarity index 100% rename from bareon_dynamic_allocator/tests/base.py rename to bareon_allocator/tests/base.py diff --git a/bareon_dynamic_allocator/tests/fixtures/single_disk_max_min.yaml b/bareon_allocator/tests/fixtures/single_disk_max_min.yaml similarity index 100% rename from bareon_dynamic_allocator/tests/fixtures/single_disk_max_min.yaml rename to bareon_allocator/tests/fixtures/single_disk_max_min.yaml diff --git a/bareon_dynamic_allocator/tests/fixtures/single_disk_max_none.yaml b/bareon_allocator/tests/fixtures/single_disk_max_none.yaml similarity index 100% rename from bareon_dynamic_allocator/tests/fixtures/single_disk_max_none.yaml rename to bareon_allocator/tests/fixtures/single_disk_max_none.yaml diff --git a/bareon_dynamic_allocator/tests/fixtures/single_disk_max_only.yaml b/bareon_allocator/tests/fixtures/single_disk_max_only.yaml similarity index 100% rename from bareon_dynamic_allocator/tests/fixtures/single_disk_max_only.yaml rename to bareon_allocator/tests/fixtures/single_disk_max_only.yaml diff --git a/bareon_dynamic_allocator/tests/fixtures/single_disk_min_max.yaml b/bareon_allocator/tests/fixtures/single_disk_min_max.yaml similarity index 100% rename from bareon_dynamic_allocator/tests/fixtures/single_disk_min_max.yaml rename to bareon_allocator/tests/fixtures/single_disk_min_max.yaml diff --git a/bareon_dynamic_allocator/tests/fixtures/single_disk_min_max_size.yaml b/bareon_allocator/tests/fixtures/single_disk_min_max_size.yaml similarity index 100% rename from bareon_dynamic_allocator/tests/fixtures/single_disk_min_max_size.yaml rename to bareon_allocator/tests/fixtures/single_disk_min_max_size.yaml diff --git a/bareon_dynamic_allocator/tests/fixtures/single_disk_min_none.yaml b/bareon_allocator/tests/fixtures/single_disk_min_none.yaml similarity index 100% rename from bareon_dynamic_allocator/tests/fixtures/single_disk_min_none.yaml rename to bareon_allocator/tests/fixtures/single_disk_min_none.yaml diff --git a/bareon_dynamic_allocator/tests/fixtures/single_disk_min_only.yaml b/bareon_allocator/tests/fixtures/single_disk_min_only.yaml similarity index 100% rename from bareon_dynamic_allocator/tests/fixtures/single_disk_min_only.yaml rename to bareon_allocator/tests/fixtures/single_disk_min_only.yaml diff --git a/bareon_dynamic_allocator/tests/fixtures/single_disk_none_max.yaml b/bareon_allocator/tests/fixtures/single_disk_none_max.yaml similarity index 100% rename from bareon_dynamic_allocator/tests/fixtures/single_disk_none_max.yaml rename to bareon_allocator/tests/fixtures/single_disk_none_max.yaml diff --git a/bareon_dynamic_allocator/tests/fixtures/single_disk_none_min.yaml b/bareon_allocator/tests/fixtures/single_disk_none_min.yaml similarity index 100% rename from bareon_dynamic_allocator/tests/fixtures/single_disk_none_min.yaml rename to bareon_allocator/tests/fixtures/single_disk_none_min.yaml diff --git a/bareon_dynamic_allocator/tests/fixtures/single_disk_size_only.yaml b/bareon_allocator/tests/fixtures/single_disk_size_only.yaml similarity index 100% rename from bareon_dynamic_allocator/tests/fixtures/single_disk_size_only.yaml rename to bareon_allocator/tests/fixtures/single_disk_size_only.yaml diff --git a/bareon_dynamic_allocator/tests/fixtures/three_disks_ceph_example.yaml b/bareon_allocator/tests/fixtures/three_disks_ceph_example.yaml similarity index 100% rename from bareon_dynamic_allocator/tests/fixtures/three_disks_ceph_example.yaml rename to bareon_allocator/tests/fixtures/three_disks_ceph_example.yaml diff --git a/bareon_dynamic_allocator/tests/fixtures/two_disks_none_none.yaml b/bareon_allocator/tests/fixtures/two_disks_none_none.yaml similarity index 100% rename from bareon_dynamic_allocator/tests/fixtures/two_disks_none_none.yaml rename to bareon_allocator/tests/fixtures/two_disks_none_none.yaml diff --git a/bareon_dynamic_allocator/tests/fixtures/two_disks_none_size.yaml b/bareon_allocator/tests/fixtures/two_disks_none_size.yaml similarity index 100% rename from bareon_dynamic_allocator/tests/fixtures/two_disks_none_size.yaml rename to bareon_allocator/tests/fixtures/two_disks_none_size.yaml diff --git a/bareon_dynamic_allocator/tests/fixtures/two_disks_size_none.yaml b/bareon_allocator/tests/fixtures/two_disks_size_none.yaml similarity index 100% rename from bareon_dynamic_allocator/tests/fixtures/two_disks_size_none.yaml rename to bareon_allocator/tests/fixtures/two_disks_size_none.yaml diff --git a/bareon_dynamic_allocator/tests/fixtures/two_disks_yaql_disk_selection.yaml b/bareon_allocator/tests/fixtures/two_disks_yaql_disk_selection.yaml similarity index 100% rename from bareon_dynamic_allocator/tests/fixtures/two_disks_yaql_disk_selection.yaml rename to bareon_allocator/tests/fixtures/two_disks_yaql_disk_selection.yaml diff --git a/bareon_dynamic_allocator/tests/fixtures/two_disks_yaql_size_none.yaml b/bareon_allocator/tests/fixtures/two_disks_yaql_size_none.yaml similarity index 100% rename from bareon_dynamic_allocator/tests/fixtures/two_disks_yaql_size_none.yaml rename to bareon_allocator/tests/fixtures/two_disks_yaql_size_none.yaml diff --git a/bareon_dynamic_allocator/tests/test_allocator_integration_test.py b/bareon_allocator/tests/test_allocator_integration_test.py similarity index 94% rename from bareon_dynamic_allocator/tests/test_allocator_integration_test.py rename to bareon_allocator/tests/test_allocator_integration_test.py index 4017873..2515921 100644 --- a/bareon_dynamic_allocator/tests/test_allocator_integration_test.py +++ b/bareon_allocator/tests/test_allocator_integration_test.py @@ -27,8 +27,8 @@ import os import six import yaml -from bareon_dynamic_allocator.allocators import DynamicAllocator -from bareon_dynamic_allocator.tests import base +from bareon_allocator.allocators import DynamicAllocator +from bareon_allocator.tests import base fixtures_path = os.path.join(os.path.dirname(__file__), 'fixtures', '*.yaml') diff --git a/bareon_dynamic_allocator/tests/test_bareon_dynamic_allocator.py b/bareon_allocator/tests/test_bareon_dynamic_allocator.py similarity index 85% rename from bareon_dynamic_allocator/tests/test_bareon_dynamic_allocator.py rename to bareon_allocator/tests/test_bareon_dynamic_allocator.py index cb27270..0e8bbb6 100644 --- a/bareon_dynamic_allocator/tests/test_bareon_dynamic_allocator.py +++ b/bareon_allocator/tests/test_bareon_dynamic_allocator.py @@ -13,13 +13,13 @@ # under the License. """ -test_bareon_dynamic_allocator +test_bareon_allocator ---------------------------------- -Tests for `bareon_dynamic_allocator` module. +Tests for `bareon_allocator` module. """ -from bareon_dynamic_allocator.tests import base +from bareon_allocator.tests import base class TestBareon_dynamic_allocator(base.TestCase): diff --git a/bareon_dynamic_allocator/utils.py b/bareon_allocator/utils.py similarity index 100% rename from bareon_dynamic_allocator/utils.py rename to bareon_allocator/utils.py diff --git a/bareon_dynamic_allocator/viewer.py b/bareon_allocator/viewer.py similarity index 100% rename from bareon_dynamic_allocator/viewer.py rename to bareon_allocator/viewer.py diff --git a/doc_generate_static.py b/doc_generate_static.py index e3bf16d..d67e9bd 100644 --- a/doc_generate_static.py +++ b/doc_generate_static.py @@ -17,9 +17,9 @@ import six from glob import glob -from bareon_dynamic_allocator.allocators import DynamicAllocator -from bareon_dynamic_allocator import utils -from bareon_dynamic_allocator import viewer +from bareon_allocator.allocators import DynamicAllocator +from bareon_allocator import utils +from bareon_allocator import viewer doc_schemas_path = os.path.join( diff --git a/etc/bareon-dynamic-allocator/common_schema.yaml b/etc/bareon-allocator/common_schema.yaml similarity index 100% rename from etc/bareon-dynamic-allocator/common_schema.yaml rename to etc/bareon-allocator/common_schema.yaml diff --git a/etc/bareon-dynamic-allocator/example_2_disks.yaml b/etc/bareon-allocator/example_2_disks.yaml similarity index 100% rename from etc/bareon-dynamic-allocator/example_2_disks.yaml rename to etc/bareon-allocator/example_2_disks.yaml diff --git a/etc/bareon-dynamic-allocator/simple_schema.yaml b/etc/bareon-allocator/simple_schema.yaml similarity index 100% rename from etc/bareon-dynamic-allocator/simple_schema.yaml rename to etc/bareon-allocator/simple_schema.yaml diff --git a/run.sh b/run.sh index dbc14eb..5e49caa 100644 --- a/run.sh +++ b/run.sh @@ -3,4 +3,4 @@ export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 -python bareon_dynamic_allocator/cmd.py --svg-file /tmp/bareon.svg --debug --schema etc/bareon-dynamic-allocator/simple_schema.yaml --file o.txt --hw-info etc/bareon-dynamic-allocator/example_2_disks.yaml +python bareon_allocator/cmd.py --svg-file /tmp/bareon.svg --debug --schema etc/bareon-allocator/simple_schema.yaml --file o.txt --hw-info etc/bareon-allocator/example_2_disks.yaml diff --git a/setup.cfg b/setup.cfg index 2e27c97..d8d891b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,14 +21,14 @@ classifier = [files] packages = - bareon_dynamic_allocator + bareon_allocator [entry_points] console_scripts = - bareon-allocator = bareon_dynamic_allocator.cmd:allocator + bareon-allocator = bareon_allocator.cmd:allocator bareon.drivers = - dynamic-schema = bareon_dynamic_allocator.driver:DynamicAllocator + dynamic-schema = bareon_allocator.driver:DynamicAllocator [build_sphinx] source-dir = doc/source @@ -39,15 +39,15 @@ all_files = 1 upload-dir = doc/build/html [compile_catalog] -directory = bareon-dynamic-allocator/locale -domain = bareon-dynamic-allocator +directory = bareon-allocator/locale +domain = bareon-allocator [update_catalog] -domain = bareon-dynamic-allocator -output_dir = bareon-dynamic-allocator/locale -input_file = bareon-dynamic-allocator/locale/bareon-dynamic-allocator.pot +domain = bareon-allocator +output_dir = bareon-allocator/locale +input_file = bareon-allocator/locale/bareon-allocator.pot [extract_messages] keywords = _ gettext ngettext l_ lazy_gettext mapping_file = babel.cfg -output_file = bareon-dynamic-allocator/locale/bareon-dynamic-allocator.pot +output_file = bareon-allocator/locale/bareon-allocator.pot