From 8dd9a41499653ea7c58e238877942ab1d4c46636 Mon Sep 17 00:00:00 2001 From: Claudiu Belu Date: Tue, 25 Aug 2015 13:27:56 +0300 Subject: [PATCH] Renames project to os-windows --- .coveragerc | 4 +-- .gitignore | 1 + .gitreview | 2 +- .testr.conf | 2 +- CONTRIBUTING.rst | 2 +- HACKING.rst | 4 +-- README.rst | 19 +++++++---- doc/source/api.rst | 12 ------- doc/source/conf.py | 4 +-- doc/source/contributing.rst | 7 ++-- doc/source/history.rst | 1 - doc/source/index.rst | 16 +++++----- doc/source/installation.rst | 13 +++++--- doc/source/readme.rst | 1 + doc/source/usage.rst | 10 +++--- openstack-common.conf | 8 ++--- os_windows/__init__.py | 21 ++++++++++++ {oslo_windows => os_windows}/_i18n.py | 0 {oslo_windows => os_windows}/_utils.py | 2 +- {oslo_windows => os_windows}/exceptions.py | 0 .../tests}/__init__.py | 0 .../tests/test_utils.py | 4 +-- .../tests/test_utilsfactory.py | 14 ++++---- .../tests/utils}/__init__.py | 0 .../tests/utils/test_basevolumeutils.py | 2 +- .../tests/utils/test_hostutils.py | 6 ++-- .../tests/utils/test_hostutilsv2.py | 2 +- .../tests/utils/test_ioutils.py | 2 +- .../tests/utils/test_jobutils.py | 6 ++-- .../tests/utils/test_livemigrationutils.py | 2 +- .../tests/utils/test_networkutils.py | 6 ++-- .../tests/utils/test_networkutilsv2.py | 4 +-- .../tests/utils/test_pathutils.py | 6 ++-- .../tests/utils/test_rdpconsoleutils.py | 2 +- .../tests/utils/test_rdpconsoleutilsv2.py | 2 +- .../tests/utils/test_vhdutils.py | 14 ++++---- .../tests/utils/test_vhdutilsv2.py | 10 +++--- .../tests/utils/test_vmutils.py | 20 ++++++------ .../tests/utils/test_vmutilsv2.py | 10 +++--- .../tests/utils/test_volumeutils.py | 8 ++--- .../tests/utils/test_volumeutilsv2.py | 4 +-- .../tests => os_windows}/utils/__init__.py | 0 .../utils/basevolumeutils.py | 4 +-- .../utils/constants.py | 0 .../utils/hostutils.py | 4 +-- .../utils/hostutilsv2.py | 2 +- {oslo_windows => os_windows}/utils/ioutils.py | 2 +- .../utils/jobutils.py | 6 ++-- .../utils/livemigrationutils.py | 8 ++--- .../utils/networkutils.py | 8 ++--- .../utils/networkutilsv2.py | 8 ++--- .../utils/pathutils.py | 8 ++--- .../utils/rdpconsoleutils.py | 0 .../utils/rdpconsoleutilsv2.py | 2 +- .../utils/vhdutils.py | 8 ++--- .../utils/vhdutilsv2.py | 10 +++--- {oslo_windows => os_windows}/utils/vmutils.py | 10 +++--- .../utils/vmutilsv2.py | 6 ++-- .../utils/volumeutils.py | 8 ++--- .../utils/volumeutilsv2.py | 8 ++--- {oslo_windows => os_windows}/utilsfactory.py | 32 +++++++++---------- oslo_windows/utils/__init__.py | 0 requirements.txt | 1 + setup.cfg | 27 ++++++---------- test-requirements.txt | 11 +++++-- tox.ini | 25 ++++++--------- 66 files changed, 231 insertions(+), 220 deletions(-) delete mode 100644 doc/source/api.rst delete mode 100644 doc/source/history.rst create mode 100644 doc/source/readme.rst create mode 100644 os_windows/__init__.py rename {oslo_windows => os_windows}/_i18n.py (100%) rename {oslo_windows => os_windows}/_utils.py (98%) rename {oslo_windows => os_windows}/exceptions.py (100%) rename {oslo_windows => os_windows/tests}/__init__.py (100%) rename {oslo_windows => os_windows}/tests/test_utils.py (96%) rename {oslo_windows => os_windows}/tests/test_utilsfactory.py (91%) rename {oslo_windows/tests => os_windows/tests/utils}/__init__.py (100%) rename {oslo_windows => os_windows}/tests/utils/test_basevolumeutils.py (99%) rename {oslo_windows => os_windows}/tests/utils/test_hostutils.py (97%) rename {oslo_windows => os_windows}/tests/utils/test_hostutilsv2.py (95%) rename {oslo_windows => os_windows}/tests/utils/test_ioutils.py (98%) rename {oslo_windows => os_windows}/tests/utils/test_jobutils.py (98%) rename {oslo_windows => os_windows}/tests/utils/test_livemigrationutils.py (99%) rename {oslo_windows => os_windows}/tests/utils/test_networkutils.py (98%) rename {oslo_windows => os_windows}/tests/utils/test_networkutilsv2.py (99%) rename {oslo_windows => os_windows}/tests/utils/test_pathutils.py (98%) rename {oslo_windows => os_windows}/tests/utils/test_rdpconsoleutils.py (95%) rename {oslo_windows => os_windows}/tests/utils/test_rdpconsoleutilsv2.py (96%) rename {oslo_windows => os_windows}/tests/utils/test_vhdutils.py (96%) rename {oslo_windows => os_windows}/tests/utils/test_vhdutilsv2.py (97%) rename {oslo_windows => os_windows}/tests/utils/test_vmutils.py (97%) rename {oslo_windows => os_windows}/tests/utils/test_vmutilsv2.py (97%) rename {oslo_windows => os_windows}/tests/utils/test_volumeutils.py (96%) rename {oslo_windows => os_windows}/tests/utils/test_volumeutilsv2.py (98%) rename {oslo_windows/tests => os_windows}/utils/__init__.py (100%) rename {oslo_windows => os_windows}/utils/basevolumeutils.py (98%) rename {oslo_windows => os_windows}/utils/constants.py (100%) rename {oslo_windows => os_windows}/utils/hostutils.py (98%) rename {oslo_windows => os_windows}/utils/hostutilsv2.py (96%) rename {oslo_windows => os_windows}/utils/ioutils.py (98%) rename {oslo_windows => os_windows}/utils/jobutils.py (98%) rename {oslo_windows => os_windows}/utils/livemigrationutils.py (98%) rename {oslo_windows => os_windows}/utils/networkutils.py (98%) rename {oslo_windows => os_windows}/utils/networkutilsv2.py (99%) rename {oslo_windows => os_windows}/utils/pathutils.py (98%) rename {oslo_windows => os_windows}/utils/rdpconsoleutils.py (100%) rename {oslo_windows => os_windows}/utils/rdpconsoleutilsv2.py (95%) rename {oslo_windows => os_windows}/utils/vhdutils.py (98%) rename {oslo_windows => os_windows}/utils/vhdutilsv2.py (98%) rename {oslo_windows => os_windows}/utils/vmutils.py (99%) rename {oslo_windows => os_windows}/utils/vmutilsv2.py (99%) rename {oslo_windows => os_windows}/utils/volumeutils.py (96%) rename {oslo_windows => os_windows}/utils/volumeutilsv2.py (97%) rename {oslo_windows => os_windows}/utilsfactory.py (83%) delete mode 100644 oslo_windows/utils/__init__.py diff --git a/.coveragerc b/.coveragerc index 7e1439c6..a6c344b9 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,7 +1,7 @@ [run] branch = True -source = windows -omit = windows/tests/*,windows/openstack/* +source = os_windows +omit = os_windows/openstack/* [report] ignore-errors = True diff --git a/.gitignore b/.gitignore index 8a3c7042..e6257802 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ *.egg-info dist build +.eggs eggs parts bin diff --git a/.gitreview b/.gitreview index 6cca2de4..b818e0d6 100644 --- a/.gitreview +++ b/.gitreview @@ -1,4 +1,4 @@ [gerrit] host=review.openstack.org port=29418 -project=openstack/oslo.windows.git +project=openstack/os-windows.git diff --git a/.testr.conf b/.testr.conf index c70deba2..6d83b3c4 100644 --- a/.testr.conf +++ b/.testr.conf @@ -2,6 +2,6 @@ test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \ - ${PYTHON:-python} -m subunit.run discover -t ./ ./oslo_windows $LISTOPT $IDOPTION + ${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION test_id_option=--load-list $IDFILE test_list_option=--list diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index c891a9d6..ac3ec95e 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -14,4 +14,4 @@ Pull requests submitted through GitHub will be ignored. Bugs should be filed on Launchpad, not GitHub: - https://bugs.launchpad.net/oslo.windows + https://bugs.launchpad.net/os-windows diff --git a/HACKING.rst b/HACKING.rst index 3a0dc135..a2b9dcfe 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -1,4 +1,4 @@ -oslo.windows Style Commandments -====================================================== +os-windows Style Commandments +=============================================== Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/ diff --git a/README.rst b/README.rst index cf78174f..2a83dc72 100644 --- a/README.rst +++ b/README.rst @@ -1,14 +1,19 @@ -============ -oslo.windows -============ +=============================== +os-windows +=============================== -Oslo Windows library for OpenStack projects. +Windows / Hyper-V library for OpenStack projects. Library contains Windows / Hyper-V code commonly used in the OpenStack projects: nova, cinder, networking-hyperv. The library can be used in any other OpenStack projects where it is needed. * Free software: Apache license -* Documentation: http://docs.openstack.org/developer/oslo.windows -* Source: http://git.openstack.org/cgit/openstack/oslo.windows -* Bugs: http://bugs.launchpad.net/oslo.windows +* Documentation: http://docs.openstack.org/developer/os-windows +* Source: http://git.openstack.org/cgit/openstack/os-windows +* Bugs: http://bugs.launchpad.net/os-windows + +Features +-------- + +* TODO diff --git a/doc/source/api.rst b/doc/source/api.rst deleted file mode 100644 index 971225e7..00000000 --- a/doc/source/api.rst +++ /dev/null @@ -1,12 +0,0 @@ -===== - API -===== - -.. Use autodoc directives to describe the *public* modules and classes - in the library. - - If the modules are completely unrelated, create an api subdirectory - and use a separate file for each (see oslo.utils). - - If there is only one submodule, a single api.rst file like this - sufficient (see oslo.i18n). diff --git a/doc/source/conf.py b/doc/source/conf.py index 58ac5c1e..88e41503 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -37,8 +37,8 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'oslo.windows' -copyright = u'2014, OpenStack Foundation' +project = u'os-windows' +copyright = u'2015, Cloudbase Solutions Srl' # If true, '()' will be appended to :func: etc. cross-reference text. add_function_parentheses = True diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst index 2ca75d1b..1728a61c 100644 --- a/doc/source/contributing.rst +++ b/doc/source/contributing.rst @@ -1,5 +1,4 @@ -============== - Contributing -============== - +============ +Contributing +============ .. include:: ../../CONTRIBUTING.rst diff --git a/doc/source/history.rst b/doc/source/history.rst deleted file mode 100644 index 69ed4fe6..00000000 --- a/doc/source/history.rst +++ /dev/null @@ -1 +0,0 @@ -.. include:: ../../ChangeLog diff --git a/doc/source/index.rst b/doc/source/index.rst index 221f0691..10d7a1f4 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -1,20 +1,20 @@ -============== - oslo.windows -============== +.. os-windows documentation master file, created by + sphinx-quickstart on Tue Jul 9 22:26:36 2015. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. -Oslo Windows library for OpenStack projects. +Welcome to os-windows documentation! +======================================================== -Contents -======== +Contents: .. toctree:: :maxdepth: 2 + readme installation - api usage contributing - history Indices and tables ================== diff --git a/doc/source/installation.rst b/doc/source/installation.rst index f85e5b94..7dd441da 100644 --- a/doc/source/installation.rst +++ b/doc/source/installation.rst @@ -1,7 +1,12 @@ -============== - Installation -============== +============ +Installation +============ At the command line:: - $ pip install oslo.windows + $ pip install os-windows + +Or, if you have virtualenvwrapper installed:: + + $ mkvirtualenv os-windows + $ pip install os-windows diff --git a/doc/source/readme.rst b/doc/source/readme.rst new file mode 100644 index 00000000..a6210d3d --- /dev/null +++ b/doc/source/readme.rst @@ -0,0 +1 @@ +.. include:: ../../README.rst diff --git a/doc/source/usage.rst b/doc/source/usage.rst index f6026796..de0a8b4a 100644 --- a/doc/source/usage.rst +++ b/doc/source/usage.rst @@ -1,7 +1,7 @@ -======= - Usage -======= +======== +Usage +======== -To use oslo.windows in a project:: +To use os-windows in a project:: - import oslo_windows + import os_windows diff --git a/openstack-common.conf b/openstack-common.conf index 7108e1d6..d85a5a0b 100644 --- a/openstack-common.conf +++ b/openstack-common.conf @@ -1,8 +1,6 @@ [DEFAULT] -# The list of scripts and modules to copy from oslo-incubator -# For example: -# script=tools/with_venv.sh -# module=service + +# The list of modules to copy from oslo-incubator.git # The base module to hold the copy of openstack.common -base=oslo_windows +base=os_windows diff --git a/os_windows/__init__.py b/os_windows/__init__.py new file mode 100644 index 00000000..7b9e63c9 --- /dev/null +++ b/os_windows/__init__.py @@ -0,0 +1,21 @@ +# Copyright 2015 Cloudbase Solutions Srl +# +# All Rights Reserved. +# +# 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 pbr.version + + +__version__ = pbr.version.VersionInfo( + 'os_windows').version_string() diff --git a/oslo_windows/_i18n.py b/os_windows/_i18n.py similarity index 100% rename from oslo_windows/_i18n.py rename to os_windows/_i18n.py diff --git a/oslo_windows/_utils.py b/os_windows/_utils.py similarity index 98% rename from oslo_windows/_utils.py rename to os_windows/_utils.py index dad6eb1a..bdbb1390 100644 --- a/oslo_windows/_utils.py +++ b/os_windows/_utils.py @@ -19,7 +19,7 @@ import netaddr from oslo_concurrency import processutils from oslo_log import log as logging -from oslo_windows._i18n import _LE +from os_windows._i18n import _LE LOG = logging.getLogger(__name__) diff --git a/oslo_windows/exceptions.py b/os_windows/exceptions.py similarity index 100% rename from oslo_windows/exceptions.py rename to os_windows/exceptions.py diff --git a/oslo_windows/__init__.py b/os_windows/tests/__init__.py similarity index 100% rename from oslo_windows/__init__.py rename to os_windows/tests/__init__.py diff --git a/oslo_windows/tests/test_utils.py b/os_windows/tests/test_utils.py similarity index 96% rename from oslo_windows/tests/test_utils.py rename to os_windows/tests/test_utils.py index 9f8f244f..a02ac48f 100644 --- a/oslo_windows/tests/test_utils.py +++ b/os_windows/tests/test_utils.py @@ -15,13 +15,13 @@ # under the License. """ -Unit tests for the oslo_windows._utils module. +Unit tests for the os_windows._utils module. """ import mock from oslotest import base -from oslo_windows import _utils +from os_windows import _utils class UtilsTestCase(base.BaseTestCase): diff --git a/oslo_windows/tests/test_utilsfactory.py b/os_windows/tests/test_utilsfactory.py similarity index 91% rename from oslo_windows/tests/test_utilsfactory.py rename to os_windows/tests/test_utilsfactory.py index 8af3ffe9..2a72628f 100644 --- a/oslo_windows/tests/test_utilsfactory.py +++ b/os_windows/tests/test_utilsfactory.py @@ -21,13 +21,13 @@ import mock from oslo_config import cfg from oslotest import base -from oslo_windows import exceptions -from oslo_windows import utilsfactory -from oslo_windows.utils import hostutils -from oslo_windows.utils import networkutils -from oslo_windows.utils import networkutilsv2 -from oslo_windows.utils import vmutils -from oslo_windows.utils import vmutilsv2 +from os_windows import exceptions +from os_windows import utilsfactory +from os_windows.utils import hostutils +from os_windows.utils import networkutils +from os_windows.utils import networkutilsv2 +from os_windows.utils import vmutils +from os_windows.utils import vmutilsv2 CONF = cfg.CONF diff --git a/oslo_windows/tests/__init__.py b/os_windows/tests/utils/__init__.py similarity index 100% rename from oslo_windows/tests/__init__.py rename to os_windows/tests/utils/__init__.py diff --git a/oslo_windows/tests/utils/test_basevolumeutils.py b/os_windows/tests/utils/test_basevolumeutils.py similarity index 99% rename from oslo_windows/tests/utils/test_basevolumeutils.py rename to os_windows/tests/utils/test_basevolumeutils.py index b4eac261..2b5d75a8 100644 --- a/oslo_windows/tests/utils/test_basevolumeutils.py +++ b/os_windows/tests/utils/test_basevolumeutils.py @@ -17,7 +17,7 @@ import mock from oslotest import base -from oslo_windows.utils import basevolumeutils +from os_windows.utils import basevolumeutils def _exception_thrower(): diff --git a/oslo_windows/tests/utils/test_hostutils.py b/os_windows/tests/utils/test_hostutils.py similarity index 97% rename from oslo_windows/tests/utils/test_hostutils.py rename to os_windows/tests/utils/test_hostutils.py index 17e09ccb..6b38c2df 100644 --- a/oslo_windows/tests/utils/test_hostutils.py +++ b/os_windows/tests/utils/test_hostutils.py @@ -15,8 +15,8 @@ import mock from oslotest import base -from oslo_windows.utils import constants -from oslo_windows.utils import hostutils +from os_windows.utils import constants +from os_windows.utils import hostutils class FakeCPUSpec(object): @@ -45,7 +45,7 @@ class HostUtilsTestCase(base.BaseTestCase): super(HostUtilsTestCase, self).setUp() - @mock.patch('oslo_windows.utils.hostutils.ctypes') + @mock.patch('os_windows.utils.hostutils.ctypes') def test_get_host_tick_count64(self, mock_ctypes): tick_count64 = "100" mock_ctypes.windll.kernel32.GetTickCount64.return_value = tick_count64 diff --git a/oslo_windows/tests/utils/test_hostutilsv2.py b/os_windows/tests/utils/test_hostutilsv2.py similarity index 95% rename from oslo_windows/tests/utils/test_hostutilsv2.py rename to os_windows/tests/utils/test_hostutilsv2.py index 3362793d..f4e06782 100644 --- a/oslo_windows/tests/utils/test_hostutilsv2.py +++ b/os_windows/tests/utils/test_hostutilsv2.py @@ -16,7 +16,7 @@ import mock from oslotest import base -from oslo_windows.utils import hostutilsv2 +from os_windows.utils import hostutilsv2 class HostUtilsV2TestCase(base.BaseTestCase): diff --git a/oslo_windows/tests/utils/test_ioutils.py b/os_windows/tests/utils/test_ioutils.py similarity index 98% rename from oslo_windows/tests/utils/test_ioutils.py rename to os_windows/tests/utils/test_ioutils.py index d10243f2..ac0fa98e 100644 --- a/oslo_windows/tests/utils/test_ioutils.py +++ b/os_windows/tests/utils/test_ioutils.py @@ -18,7 +18,7 @@ from oslotest import base import os -from oslo_windows.utils import ioutils +from os_windows.utils import ioutils class IOThreadTestCase(base.BaseTestCase): diff --git a/oslo_windows/tests/utils/test_jobutils.py b/os_windows/tests/utils/test_jobutils.py similarity index 98% rename from oslo_windows/tests/utils/test_jobutils.py rename to os_windows/tests/utils/test_jobutils.py index 71360eaa..94e2f36b 100644 --- a/oslo_windows/tests/utils/test_jobutils.py +++ b/os_windows/tests/utils/test_jobutils.py @@ -15,9 +15,9 @@ import mock from oslotest import base -from oslo_windows import exceptions -from oslo_windows.utils import constants -from oslo_windows.utils import jobutils +from os_windows import exceptions +from os_windows.utils import constants +from os_windows.utils import jobutils class JobUtilsTestCase(base.BaseTestCase): diff --git a/oslo_windows/tests/utils/test_livemigrationutils.py b/os_windows/tests/utils/test_livemigrationutils.py similarity index 99% rename from oslo_windows/tests/utils/test_livemigrationutils.py rename to os_windows/tests/utils/test_livemigrationutils.py index e00e6e1c..a9c6319d 100644 --- a/oslo_windows/tests/utils/test_livemigrationutils.py +++ b/os_windows/tests/utils/test_livemigrationutils.py @@ -16,7 +16,7 @@ import mock from oslotest import base -from oslo_windows.utils import livemigrationutils +from os_windows.utils import livemigrationutils class LiveMigrationUtilsTestCase(base.BaseTestCase): diff --git a/oslo_windows/tests/utils/test_networkutils.py b/os_windows/tests/utils/test_networkutils.py similarity index 98% rename from oslo_windows/tests/utils/test_networkutils.py rename to os_windows/tests/utils/test_networkutils.py index 30a776bd..b8bafd80 100644 --- a/oslo_windows/tests/utils/test_networkutils.py +++ b/os_windows/tests/utils/test_networkutils.py @@ -15,9 +15,9 @@ import mock from oslotest import base -from oslo_windows import exceptions -from oslo_windows.utils import constants -from oslo_windows.utils import networkutils +from os_windows import exceptions +from os_windows.utils import constants +from os_windows.utils import networkutils class NetworkUtilsTestCase(base.BaseTestCase): diff --git a/oslo_windows/tests/utils/test_networkutilsv2.py b/os_windows/tests/utils/test_networkutilsv2.py similarity index 99% rename from oslo_windows/tests/utils/test_networkutilsv2.py rename to os_windows/tests/utils/test_networkutilsv2.py index a480f604..4600de72 100644 --- a/oslo_windows/tests/utils/test_networkutilsv2.py +++ b/os_windows/tests/utils/test_networkutilsv2.py @@ -15,8 +15,8 @@ import mock from oslotest import base -from oslo_windows import exceptions -from oslo_windows.utils import networkutilsv2 +from os_windows import exceptions +from os_windows.utils import networkutilsv2 class NetworkUtilsV2TestCase(base.BaseTestCase): diff --git a/oslo_windows/tests/utils/test_pathutils.py b/os_windows/tests/utils/test_pathutils.py similarity index 98% rename from oslo_windows/tests/utils/test_pathutils.py rename to os_windows/tests/utils/test_pathutils.py index 8ac8f65f..43bdea7d 100644 --- a/oslo_windows/tests/utils/test_pathutils.py +++ b/os_windows/tests/utils/test_pathutils.py @@ -17,9 +17,9 @@ import os import mock from oslotest import base -from oslo_windows import exceptions -from oslo_windows.utils import constants -from oslo_windows.utils import pathutils +from os_windows import exceptions +from os_windows.utils import constants +from os_windows.utils import pathutils class PathUtilsTestCase(base.BaseTestCase): diff --git a/oslo_windows/tests/utils/test_rdpconsoleutils.py b/os_windows/tests/utils/test_rdpconsoleutils.py similarity index 95% rename from oslo_windows/tests/utils/test_rdpconsoleutils.py rename to os_windows/tests/utils/test_rdpconsoleutils.py index bda74f54..670dc7e9 100644 --- a/oslo_windows/tests/utils/test_rdpconsoleutils.py +++ b/os_windows/tests/utils/test_rdpconsoleutils.py @@ -14,7 +14,7 @@ from oslotest import base -from oslo_windows.utils import rdpconsoleutils +from os_windows.utils import rdpconsoleutils class RDPConsoleUtilsTestCase(base.BaseTestCase): diff --git a/oslo_windows/tests/utils/test_rdpconsoleutilsv2.py b/os_windows/tests/utils/test_rdpconsoleutilsv2.py similarity index 96% rename from oslo_windows/tests/utils/test_rdpconsoleutilsv2.py rename to os_windows/tests/utils/test_rdpconsoleutilsv2.py index 5ba49fec..6acc1b83 100644 --- a/oslo_windows/tests/utils/test_rdpconsoleutilsv2.py +++ b/os_windows/tests/utils/test_rdpconsoleutilsv2.py @@ -15,7 +15,7 @@ import mock from oslotest import base -from oslo_windows.utils import rdpconsoleutilsv2 +from os_windows.utils import rdpconsoleutilsv2 class RDPConsoleUtilsV2TestCase(base.BaseTestCase): diff --git a/oslo_windows/tests/utils/test_vhdutils.py b/os_windows/tests/utils/test_vhdutils.py similarity index 96% rename from oslo_windows/tests/utils/test_vhdutils.py rename to os_windows/tests/utils/test_vhdutils.py index 08106a81..a89c8fc8 100644 --- a/oslo_windows/tests/utils/test_vhdutils.py +++ b/os_windows/tests/utils/test_vhdutils.py @@ -16,9 +16,9 @@ import mock from oslo_utils import units from oslotest import base -from oslo_windows import exceptions -from oslo_windows.utils import constants -from oslo_windows.utils import vhdutils +from os_windows import exceptions +from os_windows.utils import constants +from os_windows.utils import vhdutils class VHDUtilsBaseTestCase(base.BaseTestCase): @@ -233,7 +233,7 @@ class VHDUtilsTestCase(VHDUtilsBaseTestCase): self.assertEqual(expected_vhd_size, real_size) def test_get_vhd_format_vhdx(self): - with mock.patch('oslo_windows.utils.vhdutils.open', + with mock.patch('os_windows.utils.vhdutils.open', mock.mock_open(read_data=vhdutils.VHDX_SIGNATURE), create=True): @@ -242,7 +242,7 @@ class VHDUtilsTestCase(VHDUtilsBaseTestCase): self.assertEqual(constants.DISK_FORMAT_VHDX, format) def test_get_vhd_format_vhd(self): - with mock.patch('oslo_windows.utils.vhdutils.open', + with mock.patch('os_windows.utils.vhdutils.open', mock.mock_open(), create=True) as mock_open: f = mock_open.return_value @@ -260,7 +260,7 @@ class VHDUtilsTestCase(VHDUtilsBaseTestCase): self.assertEqual(constants.DISK_FORMAT_VHD, format) def test_get_vhd_format_invalid_format(self): - with mock.patch('oslo_windows.utils.vhdutils.open', + with mock.patch('os_windows.utils.vhdutils.open', mock.mock_open(read_data='invalid'), create=True) as mock_open: f = mock_open.return_value @@ -271,7 +271,7 @@ class VHDUtilsTestCase(VHDUtilsBaseTestCase): self._FAKE_VHD_PATH) def test_get_vhd_format_zero_length_file(self): - with mock.patch('oslo_windows.utils.vhdutils.open', + with mock.patch('os_windows.utils.vhdutils.open', mock.mock_open(read_data=''), create=True) as mock_open: f = mock_open.return_value diff --git a/oslo_windows/tests/utils/test_vhdutilsv2.py b/os_windows/tests/utils/test_vhdutilsv2.py similarity index 97% rename from oslo_windows/tests/utils/test_vhdutilsv2.py rename to os_windows/tests/utils/test_vhdutilsv2.py index 5eca46f2..07dbf0c1 100644 --- a/oslo_windows/tests/utils/test_vhdutilsv2.py +++ b/os_windows/tests/utils/test_vhdutilsv2.py @@ -14,10 +14,10 @@ import mock -from oslo_windows import exceptions -from oslo_windows.tests.utils import test_vhdutils -from oslo_windows.utils import constants -from oslo_windows.utils import vhdutilsv2 +from os_windows import exceptions +from os_windows.tests.utils import test_vhdutils +from os_windows.utils import constants +from os_windows.utils import vhdutilsv2 class VHDUtilsV2TestCase(test_vhdutils.VHDUtilsBaseTestCase): @@ -168,7 +168,7 @@ class VHDUtilsV2TestCase(test_vhdutils.VHDUtilsBaseTestCase): else: self._vhdutils.get_vhd_info.return_value = self._fake_vhd_info - @mock.patch('oslo_windows.utils.vhdutils.VHDUtils.get_vhd_format') + @mock.patch('os_windows.utils.vhdutils.VHDUtils.get_vhd_format') def test_get_vhdx_internal_size(self, mock_get_vhd_format): mock_get_vhd_format.return_value = constants.DISK_FORMAT_VHDX self._mock_get_vhd_info() diff --git a/oslo_windows/tests/utils/test_vmutils.py b/os_windows/tests/utils/test_vmutils.py similarity index 97% rename from oslo_windows/tests/utils/test_vmutils.py rename to os_windows/tests/utils/test_vmutils.py index f5de766d..41a58fef 100644 --- a/oslo_windows/tests/utils/test_vmutils.py +++ b/os_windows/tests/utils/test_vmutils.py @@ -18,9 +18,9 @@ from oslotest import base from six.moves import range -from oslo_windows import exceptions -from oslo_windows.utils import constants -from oslo_windows.utils import vmutils +from os_windows import exceptions +from os_windows.utils import constants +from os_windows.utils import vmutils class VMUtilsTestCase(base.BaseTestCase): @@ -164,7 +164,7 @@ class VMUtilsTestCase(base.BaseTestCase): self._vmutils.soft_shutdown_vm(self._FAKE_VM_NAME) self.assertFalse(self._vmutils._jobutils.check_ret_val.called) - @mock.patch('oslo_windows.utils.vmutils.VMUtils._get_vm_disks') + @mock.patch('os_windows.utils.vmutils.VMUtils._get_vm_disks') def test_get_vm_storage_paths(self, mock_get_vm_disks): self._lookup_vm() mock_rasds = self._create_mock_disks() @@ -251,7 +251,7 @@ class VMUtilsTestCase(base.BaseTestCase): path = self._vmutils.get_vm_scsi_controller(self._FAKE_VM_NAME) self.assertEqual(self._FAKE_RES_PATH, path) - @mock.patch("oslo_windows.utils.vmutils.VMUtils.get_attached_disks") + @mock.patch("os_windows.utils.vmutils.VMUtils.get_attached_disks") def test_get_free_controller_slot(self, mock_get_attached_disks): mock_disk = mock.MagicMock() mock_disk.AddressOnParent = 3 @@ -306,8 +306,8 @@ class VMUtilsTestCase(base.BaseTestCase): mock_rasds.ResourceSubType = mock_subtype return mock_rasds - @mock.patch("oslo_windows.utils.vmutils.VMUtils.get_free_controller_slot") - @mock.patch("oslo_windows.utils.vmutils.VMUtils._get_vm_scsi_controller") + @mock.patch("os_windows.utils.vmutils.VMUtils.get_free_controller_slot") + @mock.patch("os_windows.utils.vmutils.VMUtils._get_vm_scsi_controller") def test_attach_scsi_drive(self, mock_get_vm_scsi_controller, mock_get_free_controller_slot): mock_vm = self._lookup_vm() @@ -572,9 +572,9 @@ class VMUtilsTestCase(base.BaseTestCase): self._vmutils._jobutils.check_ret_val.assert_called_once_with( fake_ret_val, fake_job_path) - @mock.patch('oslo_windows.utils.vmutils.VMUtils._get_wmi_obj') - @mock.patch('oslo_windows.utils.vmutils.VMUtils._modify_virtual_system') - @mock.patch('oslo_windows.utils.vmutils.VMUtils._get_vm_setting_data') + @mock.patch('os_windows.utils.vmutils.VMUtils._get_wmi_obj') + @mock.patch('os_windows.utils.vmutils.VMUtils._modify_virtual_system') + @mock.patch('os_windows.utils.vmutils.VMUtils._get_vm_setting_data') def test_create_vm_obj(self, mock_get_vm_setting_data, mock_modify_virtual_system, mock_get_wmi_obj): diff --git a/oslo_windows/tests/utils/test_vmutilsv2.py b/os_windows/tests/utils/test_vmutilsv2.py similarity index 97% rename from oslo_windows/tests/utils/test_vmutilsv2.py rename to os_windows/tests/utils/test_vmutilsv2.py index 0d17c9ad..c0f5e1bb 100644 --- a/oslo_windows/tests/utils/test_vmutilsv2.py +++ b/os_windows/tests/utils/test_vmutilsv2.py @@ -14,9 +14,9 @@ import mock -from oslo_windows.tests.utils import test_vmutils -from oslo_windows.utils import constants -from oslo_windows.utils import vmutilsv2 +from os_windows.tests.utils import test_vmutils +from os_windows.utils import constants +from os_windows.utils import vmutilsv2 class VMUtilsV2TestCase(test_vmutils.VMUtilsTestCase): @@ -72,7 +72,7 @@ class VMUtilsV2TestCase(test_vmutils.VMUtilsTestCase): self._vmutils._jobutils.add_virt_resource.assert_called_once_with( fake_eth_port, mock_vm) - @mock.patch('oslo_windows.utils.vmutils.VMUtils._get_vm_disks') + @mock.patch('os_windows.utils.vmutils.VMUtils._get_vm_disks') def test_enable_vm_metrics_collection(self, mock_get_vm_disks): self._lookup_vm() mock_svc = self._vmutils._conn.Msvm_MetricService()[0] @@ -128,7 +128,7 @@ class VMUtilsV2TestCase(test_vmutils.VMUtilsTestCase): def _get_fake_instance_notes(self): return [self._FAKE_VM_UUID] - @mock.patch('oslo_windows.utils.vmutilsv2.VMUtilsV2._get_wmi_obj') + @mock.patch('os_windows.utils.vmutilsv2.VMUtilsV2._get_wmi_obj') def _test_create_vm_obj(self, mock_get_wmi_obj, vm_path, dynamic_memory_ratio=1.0): mock_vs_man_svc = mock.MagicMock() diff --git a/oslo_windows/tests/utils/test_volumeutils.py b/os_windows/tests/utils/test_volumeutils.py similarity index 96% rename from oslo_windows/tests/utils/test_volumeutils.py rename to os_windows/tests/utils/test_volumeutils.py index 6ef13519..077ea64d 100644 --- a/oslo_windows/tests/utils/test_volumeutils.py +++ b/os_windows/tests/utils/test_volumeutils.py @@ -16,9 +16,9 @@ import mock -from oslo_windows import exceptions -from oslo_windows.tests.utils import test_basevolumeutils -from oslo_windows.utils import volumeutils +from os_windows import exceptions +from os_windows.tests.utils import test_basevolumeutils +from os_windows.utils import volumeutils class VolumeUtilsTestCase(test_basevolumeutils.BaseVolumeUtilsTestCase): @@ -130,7 +130,7 @@ class VolumeUtilsTestCase(test_basevolumeutils.BaseVolumeUtilsTestCase): else: output = 'The operation completed successfully' - with mock.patch('oslo_windows._utils.execute') as fake_execute: + with mock.patch('os_windows._utils.execute') as fake_execute: fake_execute.return_value = (output, None) if raise_exception: diff --git a/oslo_windows/tests/utils/test_volumeutilsv2.py b/os_windows/tests/utils/test_volumeutilsv2.py similarity index 98% rename from oslo_windows/tests/utils/test_volumeutilsv2.py rename to os_windows/tests/utils/test_volumeutilsv2.py index 0514456f..12a9fc42 100644 --- a/oslo_windows/tests/utils/test_volumeutilsv2.py +++ b/os_windows/tests/utils/test_volumeutilsv2.py @@ -15,8 +15,8 @@ import mock from oslotest import base -from oslo_windows import exceptions -from oslo_windows.utils import volumeutilsv2 +from os_windows import exceptions +from os_windows.utils import volumeutilsv2 class VolumeUtilsV2TestCase(base.BaseTestCase): diff --git a/oslo_windows/tests/utils/__init__.py b/os_windows/utils/__init__.py similarity index 100% rename from oslo_windows/tests/utils/__init__.py rename to os_windows/utils/__init__.py diff --git a/oslo_windows/utils/basevolumeutils.py b/os_windows/utils/basevolumeutils.py similarity index 98% rename from oslo_windows/utils/basevolumeutils.py rename to os_windows/utils/basevolumeutils.py index fb68f0a1..325c2928 100644 --- a/oslo_windows/utils/basevolumeutils.py +++ b/os_windows/utils/basevolumeutils.py @@ -30,8 +30,8 @@ if sys.platform == 'win32': from oslo_log import log as logging -from oslo_windows._i18n import _LI -from oslo_windows import _utils +from os_windows._i18n import _LI +from os_windows import _utils LOG = logging.getLogger(__name__) diff --git a/oslo_windows/utils/constants.py b/os_windows/utils/constants.py similarity index 100% rename from oslo_windows/utils/constants.py rename to os_windows/utils/constants.py diff --git a/oslo_windows/utils/hostutils.py b/os_windows/utils/hostutils.py similarity index 98% rename from oslo_windows/utils/hostutils.py rename to os_windows/utils/hostutils.py index 38e01177..6253b067 100644 --- a/oslo_windows/utils/hostutils.py +++ b/os_windows/utils/hostutils.py @@ -20,8 +20,8 @@ import sys if sys.platform == 'win32': import wmi -from oslo_windows._i18n import _ -from oslo_windows.utils import constants +from os_windows._i18n import _ +from os_windows.utils import constants class HostUtils(object): diff --git a/oslo_windows/utils/hostutilsv2.py b/os_windows/utils/hostutilsv2.py similarity index 96% rename from oslo_windows/utils/hostutilsv2.py rename to os_windows/utils/hostutilsv2.py index b8988bc9..ddc16a22 100644 --- a/oslo_windows/utils/hostutilsv2.py +++ b/os_windows/utils/hostutilsv2.py @@ -18,7 +18,7 @@ import sys if sys.platform == 'win32': import wmi -from oslo_windows.utils import hostutils +from os_windows.utils import hostutils class HostUtilsV2(hostutils.HostUtils): diff --git a/oslo_windows/utils/ioutils.py b/os_windows/utils/ioutils.py similarity index 98% rename from oslo_windows/utils/ioutils.py rename to os_windows/utils/ioutils.py index be4d9776..58ac510f 100644 --- a/oslo_windows/utils/ioutils.py +++ b/os_windows/utils/ioutils.py @@ -19,7 +19,7 @@ import os from eventlet import patcher from oslo_log import log as logging -from oslo_windows._i18n import _LE +from os_windows._i18n import _LE LOG = logging.getLogger(__name__) diff --git a/oslo_windows/utils/jobutils.py b/os_windows/utils/jobutils.py similarity index 98% rename from oslo_windows/utils/jobutils.py rename to os_windows/utils/jobutils.py index 853a3975..3406ea46 100644 --- a/oslo_windows/utils/jobutils.py +++ b/os_windows/utils/jobutils.py @@ -26,9 +26,9 @@ if sys.platform == 'win32': from oslo_log import log as logging -from oslo_windows._i18n import _ -from oslo_windows import exceptions -from oslo_windows.utils import constants +from os_windows._i18n import _ +from os_windows import exceptions +from os_windows.utils import constants LOG = logging.getLogger(__name__) diff --git a/oslo_windows/utils/livemigrationutils.py b/os_windows/utils/livemigrationutils.py similarity index 98% rename from oslo_windows/utils/livemigrationutils.py rename to os_windows/utils/livemigrationutils.py index fbd1e80b..a095ebba 100644 --- a/oslo_windows/utils/livemigrationutils.py +++ b/os_windows/utils/livemigrationutils.py @@ -20,10 +20,10 @@ if sys.platform == 'win32': from oslo_log import log as logging -from oslo_windows._i18n import _, _LE -from oslo_windows import exceptions -from oslo_windows.utils import vmutilsv2 -from oslo_windows.utils import volumeutilsv2 +from os_windows._i18n import _, _LE +from os_windows import exceptions +from os_windows.utils import vmutilsv2 +from os_windows.utils import volumeutilsv2 LOG = logging.getLogger(__name__) diff --git a/oslo_windows/utils/networkutils.py b/os_windows/utils/networkutils.py similarity index 98% rename from oslo_windows/utils/networkutils.py rename to os_windows/utils/networkutils.py index 882abc70..a9851f34 100644 --- a/oslo_windows/utils/networkutils.py +++ b/os_windows/utils/networkutils.py @@ -25,10 +25,10 @@ if sys.platform == 'win32': from oslo_log import log as logging -from oslo_windows._i18n import _, _LE -from oslo_windows import exceptions -from oslo_windows.utils import constants -from oslo_windows.utils import jobutils +from os_windows._i18n import _, _LE +from os_windows import exceptions +from os_windows.utils import constants +from os_windows.utils import jobutils LOG = logging.getLogger(__name__) diff --git a/oslo_windows/utils/networkutilsv2.py b/os_windows/utils/networkutilsv2.py similarity index 99% rename from oslo_windows/utils/networkutilsv2.py rename to os_windows/utils/networkutilsv2.py index 91caf382..1b10b4ab 100644 --- a/oslo_windows/utils/networkutilsv2.py +++ b/os_windows/utils/networkutilsv2.py @@ -25,10 +25,10 @@ import sys if sys.platform == 'win32': import wmi -from oslo_windows._i18n import _ -from oslo_windows import exceptions -from oslo_windows.utils import networkutils -from oslo_windows.utils import jobutils +from os_windows._i18n import _ +from os_windows import exceptions +from os_windows.utils import networkutils +from os_windows.utils import jobutils class NetworkUtilsV2(networkutils.NetworkUtils): diff --git a/oslo_windows/utils/pathutils.py b/os_windows/utils/pathutils.py similarity index 98% rename from oslo_windows/utils/pathutils.py rename to os_windows/utils/pathutils.py index 24acd2cf..691fdfe5 100644 --- a/oslo_windows/utils/pathutils.py +++ b/os_windows/utils/pathutils.py @@ -24,10 +24,10 @@ if sys.platform == 'win32': from oslo_config import cfg from oslo_log import log as logging -from oslo_windows._i18n import _ -from oslo_windows import _utils -from oslo_windows import exceptions -from oslo_windows.utils import constants +from os_windows._i18n import _ +from os_windows import _utils +from os_windows import exceptions +from os_windows.utils import constants LOG = logging.getLogger(__name__) diff --git a/oslo_windows/utils/rdpconsoleutils.py b/os_windows/utils/rdpconsoleutils.py similarity index 100% rename from oslo_windows/utils/rdpconsoleutils.py rename to os_windows/utils/rdpconsoleutils.py diff --git a/oslo_windows/utils/rdpconsoleutilsv2.py b/os_windows/utils/rdpconsoleutilsv2.py similarity index 95% rename from oslo_windows/utils/rdpconsoleutilsv2.py rename to os_windows/utils/rdpconsoleutilsv2.py index 4c730588..fb64550f 100644 --- a/oslo_windows/utils/rdpconsoleutilsv2.py +++ b/os_windows/utils/rdpconsoleutilsv2.py @@ -15,7 +15,7 @@ import sys -from oslo_windows.utils import rdpconsoleutils +from os_windows.utils import rdpconsoleutils if sys.platform == 'win32': import wmi diff --git a/oslo_windows/utils/vhdutils.py b/os_windows/utils/vhdutils.py similarity index 98% rename from oslo_windows/utils/vhdutils.py rename to os_windows/utils/vhdutils.py index 75e9f402..11f48357 100644 --- a/oslo_windows/utils/vhdutils.py +++ b/os_windows/utils/vhdutils.py @@ -31,10 +31,10 @@ if sys.platform == 'win32': from xml.etree import ElementTree -from oslo_windows._i18n import _ -from oslo_windows import exceptions -from oslo_windows.utils import constants -from oslo_windows.utils import jobutils +from os_windows._i18n import _ +from os_windows import exceptions +from os_windows.utils import constants +from os_windows.utils import jobutils VHD_HEADER_SIZE_FIX = 512 diff --git a/oslo_windows/utils/vhdutilsv2.py b/os_windows/utils/vhdutilsv2.py similarity index 98% rename from oslo_windows/utils/vhdutilsv2.py rename to os_windows/utils/vhdutilsv2.py index 3b143924..220f646a 100644 --- a/oslo_windows/utils/vhdutilsv2.py +++ b/os_windows/utils/vhdutilsv2.py @@ -28,11 +28,11 @@ from xml.etree import ElementTree from oslo_utils import units -from oslo_windows._i18n import _ -from oslo_windows import exceptions -from oslo_windows.utils import constants -from oslo_windows.utils import jobutils -from oslo_windows.utils import vhdutils +from os_windows._i18n import _ +from os_windows import exceptions +from os_windows.utils import constants +from os_windows.utils import jobutils +from os_windows.utils import vhdutils VHDX_BAT_ENTRY_SIZE = 8 diff --git a/oslo_windows/utils/vmutils.py b/os_windows/utils/vmutils.py similarity index 99% rename from oslo_windows/utils/vmutils.py rename to os_windows/utils/vmutils.py index f11e3178..0e076927 100644 --- a/oslo_windows/utils/vmutils.py +++ b/os_windows/utils/vmutils.py @@ -31,11 +31,11 @@ from oslo_utils import uuidutils import six from six.moves import range -from oslo_windows._i18n import _, _LW -from oslo_windows import exceptions -from oslo_windows.utils import constants -from oslo_windows.utils import hostutils -from oslo_windows.utils import jobutils +from os_windows._i18n import _, _LW +from os_windows import exceptions +from os_windows.utils import constants +from os_windows.utils import hostutils +from os_windows.utils import jobutils CONF = cfg.CONF LOG = logging.getLogger(__name__) diff --git a/oslo_windows/utils/vmutilsv2.py b/os_windows/utils/vmutilsv2.py similarity index 99% rename from oslo_windows/utils/vmutilsv2.py rename to os_windows/utils/vmutilsv2.py index beb38774..1bb1f9eb 100644 --- a/oslo_windows/utils/vmutilsv2.py +++ b/os_windows/utils/vmutilsv2.py @@ -27,9 +27,9 @@ if sys.platform == 'win32': from oslo_config import cfg from oslo_log import log as logging -from oslo_windows.utils import constants -from oslo_windows.utils import vmutils -from oslo_windows.utils import jobutils +from os_windows.utils import constants +from os_windows.utils import vmutils +from os_windows.utils import jobutils CONF = cfg.CONF LOG = logging.getLogger(__name__) diff --git a/oslo_windows/utils/volumeutils.py b/os_windows/utils/volumeutils.py similarity index 96% rename from oslo_windows/utils/volumeutils.py rename to os_windows/utils/volumeutils.py index c0bd54d2..dedc61cd 100644 --- a/oslo_windows/utils/volumeutils.py +++ b/os_windows/utils/volumeutils.py @@ -30,10 +30,10 @@ from oslo_config import cfg from oslo_log import log as logging from six.moves import range -from oslo_windows._i18n import _ -from oslo_windows import _utils -from oslo_windows import exceptions -from oslo_windows.utils import basevolumeutils +from os_windows._i18n import _ +from os_windows import _utils +from os_windows import exceptions +from os_windows.utils import basevolumeutils LOG = logging.getLogger(__name__) diff --git a/oslo_windows/utils/volumeutilsv2.py b/os_windows/utils/volumeutilsv2.py similarity index 97% rename from oslo_windows/utils/volumeutilsv2.py rename to os_windows/utils/volumeutilsv2.py index 7b2f279b..7eb6ae63 100644 --- a/oslo_windows/utils/volumeutilsv2.py +++ b/os_windows/utils/volumeutilsv2.py @@ -28,10 +28,10 @@ from oslo_config import cfg from oslo_log import log as logging from six.moves import range -from oslo_windows._i18n import _ -from oslo_windows import _utils -from oslo_windows import exceptions -from oslo_windows.utils import basevolumeutils +from os_windows._i18n import _ +from os_windows import _utils +from os_windows import exceptions +from os_windows.utils import basevolumeutils LOG = logging.getLogger(__name__) CONF = cfg.CONF diff --git a/oslo_windows/utilsfactory.py b/os_windows/utilsfactory.py similarity index 83% rename from oslo_windows/utilsfactory.py rename to os_windows/utilsfactory.py index e1a999a0..fe5a6180 100644 --- a/oslo_windows/utilsfactory.py +++ b/os_windows/utilsfactory.py @@ -16,22 +16,22 @@ from oslo_config import cfg from oslo_log import log as logging -from oslo_windows._i18n import _, _LW # noqa -from oslo_windows import exceptions -from oslo_windows.utils import hostutils -from oslo_windows.utils import hostutilsv2 -from oslo_windows.utils import livemigrationutils -from oslo_windows.utils import networkutils -from oslo_windows.utils import networkutilsv2 -from oslo_windows.utils import pathutils -from oslo_windows.utils import rdpconsoleutils -from oslo_windows.utils import rdpconsoleutilsv2 -from oslo_windows.utils import vhdutils -from oslo_windows.utils import vhdutilsv2 -from oslo_windows.utils import vmutils -from oslo_windows.utils import vmutilsv2 -from oslo_windows.utils import volumeutils -from oslo_windows.utils import volumeutilsv2 +from os_windows._i18n import _, _LW # noqa +from os_windows import exceptions +from os_windows.utils import hostutils +from os_windows.utils import hostutilsv2 +from os_windows.utils import livemigrationutils +from os_windows.utils import networkutils +from os_windows.utils import networkutilsv2 +from os_windows.utils import pathutils +from os_windows.utils import rdpconsoleutils +from os_windows.utils import rdpconsoleutilsv2 +from os_windows.utils import vhdutils +from os_windows.utils import vhdutilsv2 +from os_windows.utils import vmutils +from os_windows.utils import vmutilsv2 +from os_windows.utils import volumeutils +from os_windows.utils import volumeutilsv2 hyper_opts = [ cfg.BoolOpt('force_hyperv_utils_v1', diff --git a/oslo_windows/utils/__init__.py b/oslo_windows/utils/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/requirements.txt b/requirements.txt index e30f9229..9ccc27bc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,6 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. +pbr<2.0,>=1.4 Babel>=1.3 oslo.concurrency>=2.3.0 # Apache-2.0 diff --git a/setup.cfg b/setup.cfg index 9ee914b3..ea954708 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,11 +1,11 @@ [metadata] -name = oslo.windows -summary = Oslo Windows library for OpenStack projects. +name = os-windows +summary = Windows / Hyper-V library for OpenStack projects. description-file = README.rst author = OpenStack author-email = openstack-dev@lists.openstack.org -home-page = http://launchpad.net/oslo +home-page = http://www.openstack.org/ classifier = Environment :: OpenStack Intended Audience :: Information Technology @@ -15,17 +15,13 @@ classifier = Programming Language :: Python Programming Language :: Python :: 2 Programming Language :: Python :: 2.7 - Programming Language :: Python :: 2.6 Programming Language :: Python :: 3 Programming Language :: Python :: 3.3 Programming Language :: Python :: 3.4 [files] packages = - oslo_windows - -[pbr] -warnerrors = true + os_windows [build_sphinx] source-dir = doc/source @@ -36,18 +32,15 @@ all_files = 1 upload-dir = doc/build/html [compile_catalog] -directory = oslo.windows/locale -domain = oslo.windows +directory = os_windows/locale +domain = os-windows [update_catalog] -domain = oslo.windows -output_dir = oslo.windows/locale -input_file = oslo.windows/locale/oslo.windows.pot +domain = os-windows +output_dir = os_windows/locale +input_file = os_windows/locale/os-windows.pot [extract_messages] keywords = _ gettext ngettext l_ lazy_gettext mapping_file = babel.cfg -output_file = oslo.windows/locale/oslo.windows.pot - -[wheel] -universal = true +output_file = os_windows/locale/os-windows.pot diff --git a/test-requirements.txt b/test-requirements.txt index 15f08a07..0c885d39 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,8 +3,13 @@ # process, which may cause wedges in the gate later. hacking<0.11,>=0.10.0 -oslotest>=1.5.1 -# These are needed for docs generation -oslosphinx>=2.5.0 +coverage>=3.6 +discover +python-subunit>=0.0.18 sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 +oslosphinx>=2.5.0 # Apache-2.0 +oslotest>=1.10.0 # Apache-2.0 +testrepository>=0.0.18 +testscenarios>=0.4 +testtools>=1.4.0 diff --git a/tox.ini b/tox.ini index 2c110c3d..e292c471 100644 --- a/tox.ini +++ b/tox.ini @@ -1,20 +1,15 @@ [tox] minversion = 1.6 -envlist = py34,py26,py27,pypy,pep8 -# NOTE(dhellmann): We cannot set skipdist=True -# for oslo libraries because of the namespace package. -#skipsdist = True +envlist = py33,py34,py27,pypy,pep8 +skipsdist = True [testenv] -# NOTE(dhellmann): We cannot set usedevelop=True -# for oslo libraries because of the namespace package. -#usedevelop = True +usedevelop = True install_command = pip install -U {opts} {packages} setenv = VIRTUAL_ENV={envdir} -deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt -commands = python setup.py testr --slowest --testr-args='{posargs}' +deps = -r{toxinidir}/test-requirements.txt +commands = python setup.py test --slowest --testr-args='{posargs}' [testenv:pep8] commands = flake8 @@ -22,11 +17,14 @@ commands = flake8 [testenv:venv] commands = {posargs} +[testenv:cover] +commands = python setup.py test --coverage --testr-args='{posargs}' + [testenv:docs] commands = python setup.py build_sphinx -[testenv:cover] -commands = python setup.py testr --coverage --testr-args='{posargs}' +[testenv:debug] +commands = oslo_debug_helper {posargs} [flake8] # E123, E125 skipped as they are invalid PEP-8. @@ -35,6 +33,3 @@ show-source = True ignore = E123,E125 builtins = _ exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build - -[hacking] -import_exceptions =