Renames project to os-windows

This commit is contained in:
Claudiu Belu 2015-08-25 13:27:56 +03:00
parent c393504b5c
commit 8dd9a41499
66 changed files with 231 additions and 220 deletions

View File

@ -1,7 +1,7 @@
[run] [run]
branch = True branch = True
source = windows source = os_windows
omit = windows/tests/*,windows/openstack/* omit = os_windows/openstack/*
[report] [report]
ignore-errors = True ignore-errors = True

1
.gitignore vendored
View File

@ -8,6 +8,7 @@
*.egg-info *.egg-info
dist dist
build build
.eggs
eggs eggs
parts parts
bin bin

View File

@ -1,4 +1,4 @@
[gerrit] [gerrit]
host=review.openstack.org host=review.openstack.org
port=29418 port=29418
project=openstack/oslo.windows.git project=openstack/os-windows.git

View File

@ -2,6 +2,6 @@
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \ 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_id_option=--load-list $IDFILE
test_list_option=--list test_list_option=--list

View File

@ -14,4 +14,4 @@ Pull requests submitted through GitHub will be ignored.
Bugs should be filed on Launchpad, not GitHub: Bugs should be filed on Launchpad, not GitHub:
https://bugs.launchpad.net/oslo.windows https://bugs.launchpad.net/os-windows

View File

@ -1,4 +1,4 @@
oslo.windows Style Commandments os-windows Style Commandments
====================================================== ===============================================
Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/ Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/

View File

@ -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 Library contains Windows / Hyper-V code commonly used in the OpenStack
projects: nova, cinder, networking-hyperv. The library can be used in any projects: nova, cinder, networking-hyperv. The library can be used in any
other OpenStack projects where it is needed. other OpenStack projects where it is needed.
* Free software: Apache license * Free software: Apache license
* Documentation: http://docs.openstack.org/developer/oslo.windows * Documentation: http://docs.openstack.org/developer/os-windows
* Source: http://git.openstack.org/cgit/openstack/oslo.windows * Source: http://git.openstack.org/cgit/openstack/os-windows
* Bugs: http://bugs.launchpad.net/oslo.windows * Bugs: http://bugs.launchpad.net/os-windows
Features
--------
* TODO

View File

@ -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).

View File

@ -37,8 +37,8 @@ source_suffix = '.rst'
master_doc = 'index' master_doc = 'index'
# General information about the project. # General information about the project.
project = u'oslo.windows' project = u'os-windows'
copyright = u'2014, OpenStack Foundation' copyright = u'2015, Cloudbase Solutions Srl'
# If true, '()' will be appended to :func: etc. cross-reference text. # If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True add_function_parentheses = True

View File

@ -1,5 +1,4 @@
============== ============
Contributing Contributing
============== ============
.. include:: ../../CONTRIBUTING.rst .. include:: ../../CONTRIBUTING.rst

View File

@ -1 +0,0 @@
.. include:: ../../ChangeLog

View File

@ -1,20 +1,20 @@
============== .. os-windows documentation master file, created by
oslo.windows 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:: .. toctree::
:maxdepth: 2 :maxdepth: 2
readme
installation installation
api
usage usage
contributing contributing
history
Indices and tables Indices and tables
================== ==================

View File

@ -1,7 +1,12 @@
============== ============
Installation Installation
============== ============
At the command line:: 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

1
doc/source/readme.rst Normal file
View File

@ -0,0 +1 @@
.. include:: ../../README.rst

View File

@ -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

View File

@ -1,8 +1,6 @@
[DEFAULT] [DEFAULT]
# The list of scripts and modules to copy from oslo-incubator
# For example: # The list of modules to copy from oslo-incubator.git
# script=tools/with_venv.sh
# module=service
# The base module to hold the copy of openstack.common # The base module to hold the copy of openstack.common
base=oslo_windows base=os_windows

21
os_windows/__init__.py Normal file
View File

@ -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()

View File

@ -19,7 +19,7 @@ import netaddr
from oslo_concurrency import processutils from oslo_concurrency import processutils
from oslo_log import log as logging from oslo_log import log as logging
from oslo_windows._i18n import _LE from os_windows._i18n import _LE
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -15,13 +15,13 @@
# under the License. # under the License.
""" """
Unit tests for the oslo_windows._utils module. Unit tests for the os_windows._utils module.
""" """
import mock import mock
from oslotest import base from oslotest import base
from oslo_windows import _utils from os_windows import _utils
class UtilsTestCase(base.BaseTestCase): class UtilsTestCase(base.BaseTestCase):

View File

@ -21,13 +21,13 @@ import mock
from oslo_config import cfg from oslo_config import cfg
from oslotest import base from oslotest import base
from oslo_windows import exceptions from os_windows import exceptions
from oslo_windows import utilsfactory from os_windows import utilsfactory
from oslo_windows.utils import hostutils from os_windows.utils import hostutils
from oslo_windows.utils import networkutils from os_windows.utils import networkutils
from oslo_windows.utils import networkutilsv2 from os_windows.utils import networkutilsv2
from oslo_windows.utils import vmutils from os_windows.utils import vmutils
from oslo_windows.utils import vmutilsv2 from os_windows.utils import vmutilsv2
CONF = cfg.CONF CONF = cfg.CONF

View File

@ -17,7 +17,7 @@
import mock import mock
from oslotest import base from oslotest import base
from oslo_windows.utils import basevolumeutils from os_windows.utils import basevolumeutils
def _exception_thrower(): def _exception_thrower():

View File

@ -15,8 +15,8 @@
import mock import mock
from oslotest import base from oslotest import base
from oslo_windows.utils import constants from os_windows.utils import constants
from oslo_windows.utils import hostutils from os_windows.utils import hostutils
class FakeCPUSpec(object): class FakeCPUSpec(object):
@ -45,7 +45,7 @@ class HostUtilsTestCase(base.BaseTestCase):
super(HostUtilsTestCase, self).setUp() 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): def test_get_host_tick_count64(self, mock_ctypes):
tick_count64 = "100" tick_count64 = "100"
mock_ctypes.windll.kernel32.GetTickCount64.return_value = tick_count64 mock_ctypes.windll.kernel32.GetTickCount64.return_value = tick_count64

View File

@ -16,7 +16,7 @@
import mock import mock
from oslotest import base from oslotest import base
from oslo_windows.utils import hostutilsv2 from os_windows.utils import hostutilsv2
class HostUtilsV2TestCase(base.BaseTestCase): class HostUtilsV2TestCase(base.BaseTestCase):

View File

@ -18,7 +18,7 @@ from oslotest import base
import os import os
from oslo_windows.utils import ioutils from os_windows.utils import ioutils
class IOThreadTestCase(base.BaseTestCase): class IOThreadTestCase(base.BaseTestCase):

View File

@ -15,9 +15,9 @@
import mock import mock
from oslotest import base from oslotest import base
from oslo_windows import exceptions from os_windows import exceptions
from oslo_windows.utils import constants from os_windows.utils import constants
from oslo_windows.utils import jobutils from os_windows.utils import jobutils
class JobUtilsTestCase(base.BaseTestCase): class JobUtilsTestCase(base.BaseTestCase):

View File

@ -16,7 +16,7 @@
import mock import mock
from oslotest import base from oslotest import base
from oslo_windows.utils import livemigrationutils from os_windows.utils import livemigrationutils
class LiveMigrationUtilsTestCase(base.BaseTestCase): class LiveMigrationUtilsTestCase(base.BaseTestCase):

View File

@ -15,9 +15,9 @@
import mock import mock
from oslotest import base from oslotest import base
from oslo_windows import exceptions from os_windows import exceptions
from oslo_windows.utils import constants from os_windows.utils import constants
from oslo_windows.utils import networkutils from os_windows.utils import networkutils
class NetworkUtilsTestCase(base.BaseTestCase): class NetworkUtilsTestCase(base.BaseTestCase):

View File

@ -15,8 +15,8 @@
import mock import mock
from oslotest import base from oslotest import base
from oslo_windows import exceptions from os_windows import exceptions
from oslo_windows.utils import networkutilsv2 from os_windows.utils import networkutilsv2
class NetworkUtilsV2TestCase(base.BaseTestCase): class NetworkUtilsV2TestCase(base.BaseTestCase):

View File

@ -17,9 +17,9 @@ import os
import mock import mock
from oslotest import base from oslotest import base
from oslo_windows import exceptions from os_windows import exceptions
from oslo_windows.utils import constants from os_windows.utils import constants
from oslo_windows.utils import pathutils from os_windows.utils import pathutils
class PathUtilsTestCase(base.BaseTestCase): class PathUtilsTestCase(base.BaseTestCase):

View File

@ -14,7 +14,7 @@
from oslotest import base from oslotest import base
from oslo_windows.utils import rdpconsoleutils from os_windows.utils import rdpconsoleutils
class RDPConsoleUtilsTestCase(base.BaseTestCase): class RDPConsoleUtilsTestCase(base.BaseTestCase):

View File

@ -15,7 +15,7 @@
import mock import mock
from oslotest import base from oslotest import base
from oslo_windows.utils import rdpconsoleutilsv2 from os_windows.utils import rdpconsoleutilsv2
class RDPConsoleUtilsV2TestCase(base.BaseTestCase): class RDPConsoleUtilsV2TestCase(base.BaseTestCase):

View File

@ -16,9 +16,9 @@ import mock
from oslo_utils import units from oslo_utils import units
from oslotest import base from oslotest import base
from oslo_windows import exceptions from os_windows import exceptions
from oslo_windows.utils import constants from os_windows.utils import constants
from oslo_windows.utils import vhdutils from os_windows.utils import vhdutils
class VHDUtilsBaseTestCase(base.BaseTestCase): class VHDUtilsBaseTestCase(base.BaseTestCase):
@ -233,7 +233,7 @@ class VHDUtilsTestCase(VHDUtilsBaseTestCase):
self.assertEqual(expected_vhd_size, real_size) self.assertEqual(expected_vhd_size, real_size)
def test_get_vhd_format_vhdx(self): 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), mock.mock_open(read_data=vhdutils.VHDX_SIGNATURE),
create=True): create=True):
@ -242,7 +242,7 @@ class VHDUtilsTestCase(VHDUtilsBaseTestCase):
self.assertEqual(constants.DISK_FORMAT_VHDX, format) self.assertEqual(constants.DISK_FORMAT_VHDX, format)
def test_get_vhd_format_vhd(self): 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(), mock.mock_open(),
create=True) as mock_open: create=True) as mock_open:
f = mock_open.return_value f = mock_open.return_value
@ -260,7 +260,7 @@ class VHDUtilsTestCase(VHDUtilsBaseTestCase):
self.assertEqual(constants.DISK_FORMAT_VHD, format) self.assertEqual(constants.DISK_FORMAT_VHD, format)
def test_get_vhd_format_invalid_format(self): 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'), mock.mock_open(read_data='invalid'),
create=True) as mock_open: create=True) as mock_open:
f = mock_open.return_value f = mock_open.return_value
@ -271,7 +271,7 @@ class VHDUtilsTestCase(VHDUtilsBaseTestCase):
self._FAKE_VHD_PATH) self._FAKE_VHD_PATH)
def test_get_vhd_format_zero_length_file(self): 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=''), mock.mock_open(read_data=''),
create=True) as mock_open: create=True) as mock_open:
f = mock_open.return_value f = mock_open.return_value

View File

@ -14,10 +14,10 @@
import mock import mock
from oslo_windows import exceptions from os_windows import exceptions
from oslo_windows.tests.utils import test_vhdutils from os_windows.tests.utils import test_vhdutils
from oslo_windows.utils import constants from os_windows.utils import constants
from oslo_windows.utils import vhdutilsv2 from os_windows.utils import vhdutilsv2
class VHDUtilsV2TestCase(test_vhdutils.VHDUtilsBaseTestCase): class VHDUtilsV2TestCase(test_vhdutils.VHDUtilsBaseTestCase):
@ -168,7 +168,7 @@ class VHDUtilsV2TestCase(test_vhdutils.VHDUtilsBaseTestCase):
else: else:
self._vhdutils.get_vhd_info.return_value = self._fake_vhd_info 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): def test_get_vhdx_internal_size(self, mock_get_vhd_format):
mock_get_vhd_format.return_value = constants.DISK_FORMAT_VHDX mock_get_vhd_format.return_value = constants.DISK_FORMAT_VHDX
self._mock_get_vhd_info() self._mock_get_vhd_info()

View File

@ -18,9 +18,9 @@ from oslotest import base
from six.moves import range from six.moves import range
from oslo_windows import exceptions from os_windows import exceptions
from oslo_windows.utils import constants from os_windows.utils import constants
from oslo_windows.utils import vmutils from os_windows.utils import vmutils
class VMUtilsTestCase(base.BaseTestCase): class VMUtilsTestCase(base.BaseTestCase):
@ -164,7 +164,7 @@ class VMUtilsTestCase(base.BaseTestCase):
self._vmutils.soft_shutdown_vm(self._FAKE_VM_NAME) self._vmutils.soft_shutdown_vm(self._FAKE_VM_NAME)
self.assertFalse(self._vmutils._jobutils.check_ret_val.called) 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): def test_get_vm_storage_paths(self, mock_get_vm_disks):
self._lookup_vm() self._lookup_vm()
mock_rasds = self._create_mock_disks() 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) path = self._vmutils.get_vm_scsi_controller(self._FAKE_VM_NAME)
self.assertEqual(self._FAKE_RES_PATH, path) 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): def test_get_free_controller_slot(self, mock_get_attached_disks):
mock_disk = mock.MagicMock() mock_disk = mock.MagicMock()
mock_disk.AddressOnParent = 3 mock_disk.AddressOnParent = 3
@ -306,8 +306,8 @@ class VMUtilsTestCase(base.BaseTestCase):
mock_rasds.ResourceSubType = mock_subtype mock_rasds.ResourceSubType = mock_subtype
return mock_rasds return mock_rasds
@mock.patch("oslo_windows.utils.vmutils.VMUtils.get_free_controller_slot") @mock.patch("os_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_vm_scsi_controller")
def test_attach_scsi_drive(self, mock_get_vm_scsi_controller, def test_attach_scsi_drive(self, mock_get_vm_scsi_controller,
mock_get_free_controller_slot): mock_get_free_controller_slot):
mock_vm = self._lookup_vm() mock_vm = self._lookup_vm()
@ -572,9 +572,9 @@ class VMUtilsTestCase(base.BaseTestCase):
self._vmutils._jobutils.check_ret_val.assert_called_once_with( self._vmutils._jobutils.check_ret_val.assert_called_once_with(
fake_ret_val, fake_job_path) fake_ret_val, fake_job_path)
@mock.patch('oslo_windows.utils.vmutils.VMUtils._get_wmi_obj') @mock.patch('os_windows.utils.vmutils.VMUtils._get_wmi_obj')
@mock.patch('oslo_windows.utils.vmutils.VMUtils._modify_virtual_system') @mock.patch('os_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_vm_setting_data')
def test_create_vm_obj(self, mock_get_vm_setting_data, def test_create_vm_obj(self, mock_get_vm_setting_data,
mock_modify_virtual_system, mock_modify_virtual_system,
mock_get_wmi_obj): mock_get_wmi_obj):

View File

@ -14,9 +14,9 @@
import mock import mock
from oslo_windows.tests.utils import test_vmutils from os_windows.tests.utils import test_vmutils
from oslo_windows.utils import constants from os_windows.utils import constants
from oslo_windows.utils import vmutilsv2 from os_windows.utils import vmutilsv2
class VMUtilsV2TestCase(test_vmutils.VMUtilsTestCase): class VMUtilsV2TestCase(test_vmutils.VMUtilsTestCase):
@ -72,7 +72,7 @@ class VMUtilsV2TestCase(test_vmutils.VMUtilsTestCase):
self._vmutils._jobutils.add_virt_resource.assert_called_once_with( self._vmutils._jobutils.add_virt_resource.assert_called_once_with(
fake_eth_port, mock_vm) 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): def test_enable_vm_metrics_collection(self, mock_get_vm_disks):
self._lookup_vm() self._lookup_vm()
mock_svc = self._vmutils._conn.Msvm_MetricService()[0] mock_svc = self._vmutils._conn.Msvm_MetricService()[0]
@ -128,7 +128,7 @@ class VMUtilsV2TestCase(test_vmutils.VMUtilsTestCase):
def _get_fake_instance_notes(self): def _get_fake_instance_notes(self):
return [self._FAKE_VM_UUID] 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, def _test_create_vm_obj(self, mock_get_wmi_obj, vm_path,
dynamic_memory_ratio=1.0): dynamic_memory_ratio=1.0):
mock_vs_man_svc = mock.MagicMock() mock_vs_man_svc = mock.MagicMock()

View File

@ -16,9 +16,9 @@
import mock import mock
from oslo_windows import exceptions from os_windows import exceptions
from oslo_windows.tests.utils import test_basevolumeutils from os_windows.tests.utils import test_basevolumeutils
from oslo_windows.utils import volumeutils from os_windows.utils import volumeutils
class VolumeUtilsTestCase(test_basevolumeutils.BaseVolumeUtilsTestCase): class VolumeUtilsTestCase(test_basevolumeutils.BaseVolumeUtilsTestCase):
@ -130,7 +130,7 @@ class VolumeUtilsTestCase(test_basevolumeutils.BaseVolumeUtilsTestCase):
else: else:
output = 'The operation completed successfully' 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) fake_execute.return_value = (output, None)
if raise_exception: if raise_exception:

View File

@ -15,8 +15,8 @@
import mock import mock
from oslotest import base from oslotest import base
from oslo_windows import exceptions from os_windows import exceptions
from oslo_windows.utils import volumeutilsv2 from os_windows.utils import volumeutilsv2
class VolumeUtilsV2TestCase(base.BaseTestCase): class VolumeUtilsV2TestCase(base.BaseTestCase):

View File

@ -30,8 +30,8 @@ if sys.platform == 'win32':
from oslo_log import log as logging from oslo_log import log as logging
from oslo_windows._i18n import _LI from os_windows._i18n import _LI
from oslo_windows import _utils from os_windows import _utils
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -20,8 +20,8 @@ import sys
if sys.platform == 'win32': if sys.platform == 'win32':
import wmi import wmi
from oslo_windows._i18n import _ from os_windows._i18n import _
from oslo_windows.utils import constants from os_windows.utils import constants
class HostUtils(object): class HostUtils(object):

View File

@ -18,7 +18,7 @@ import sys
if sys.platform == 'win32': if sys.platform == 'win32':
import wmi import wmi
from oslo_windows.utils import hostutils from os_windows.utils import hostutils
class HostUtilsV2(hostutils.HostUtils): class HostUtilsV2(hostutils.HostUtils):

View File

@ -19,7 +19,7 @@ import os
from eventlet import patcher from eventlet import patcher
from oslo_log import log as logging from oslo_log import log as logging
from oslo_windows._i18n import _LE from os_windows._i18n import _LE
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -26,9 +26,9 @@ if sys.platform == 'win32':
from oslo_log import log as logging from oslo_log import log as logging
from oslo_windows._i18n import _ from os_windows._i18n import _
from oslo_windows import exceptions from os_windows import exceptions
from oslo_windows.utils import constants from os_windows.utils import constants
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -20,10 +20,10 @@ if sys.platform == 'win32':
from oslo_log import log as logging from oslo_log import log as logging
from oslo_windows._i18n import _, _LE from os_windows._i18n import _, _LE
from oslo_windows import exceptions from os_windows import exceptions
from oslo_windows.utils import vmutilsv2 from os_windows.utils import vmutilsv2
from oslo_windows.utils import volumeutilsv2 from os_windows.utils import volumeutilsv2
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -25,10 +25,10 @@ if sys.platform == 'win32':
from oslo_log import log as logging from oslo_log import log as logging
from oslo_windows._i18n import _, _LE from os_windows._i18n import _, _LE
from oslo_windows import exceptions from os_windows import exceptions
from oslo_windows.utils import constants from os_windows.utils import constants
from oslo_windows.utils import jobutils from os_windows.utils import jobutils
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -25,10 +25,10 @@ import sys
if sys.platform == 'win32': if sys.platform == 'win32':
import wmi import wmi
from oslo_windows._i18n import _ from os_windows._i18n import _
from oslo_windows import exceptions from os_windows import exceptions
from oslo_windows.utils import networkutils from os_windows.utils import networkutils
from oslo_windows.utils import jobutils from os_windows.utils import jobutils
class NetworkUtilsV2(networkutils.NetworkUtils): class NetworkUtilsV2(networkutils.NetworkUtils):

View File

@ -24,10 +24,10 @@ if sys.platform == 'win32':
from oslo_config import cfg from oslo_config import cfg
from oslo_log import log as logging from oslo_log import log as logging
from oslo_windows._i18n import _ from os_windows._i18n import _
from oslo_windows import _utils from os_windows import _utils
from oslo_windows import exceptions from os_windows import exceptions
from oslo_windows.utils import constants from os_windows.utils import constants
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -15,7 +15,7 @@
import sys import sys
from oslo_windows.utils import rdpconsoleutils from os_windows.utils import rdpconsoleutils
if sys.platform == 'win32': if sys.platform == 'win32':
import wmi import wmi

View File

@ -31,10 +31,10 @@ if sys.platform == 'win32':
from xml.etree import ElementTree from xml.etree import ElementTree
from oslo_windows._i18n import _ from os_windows._i18n import _
from oslo_windows import exceptions from os_windows import exceptions
from oslo_windows.utils import constants from os_windows.utils import constants
from oslo_windows.utils import jobutils from os_windows.utils import jobutils
VHD_HEADER_SIZE_FIX = 512 VHD_HEADER_SIZE_FIX = 512

View File

@ -28,11 +28,11 @@ from xml.etree import ElementTree
from oslo_utils import units from oslo_utils import units
from oslo_windows._i18n import _ from os_windows._i18n import _
from oslo_windows import exceptions from os_windows import exceptions
from oslo_windows.utils import constants from os_windows.utils import constants
from oslo_windows.utils import jobutils from os_windows.utils import jobutils
from oslo_windows.utils import vhdutils from os_windows.utils import vhdutils
VHDX_BAT_ENTRY_SIZE = 8 VHDX_BAT_ENTRY_SIZE = 8

View File

@ -31,11 +31,11 @@ from oslo_utils import uuidutils
import six import six
from six.moves import range from six.moves import range
from oslo_windows._i18n import _, _LW from os_windows._i18n import _, _LW
from oslo_windows import exceptions from os_windows import exceptions
from oslo_windows.utils import constants from os_windows.utils import constants
from oslo_windows.utils import hostutils from os_windows.utils import hostutils
from oslo_windows.utils import jobutils from os_windows.utils import jobutils
CONF = cfg.CONF CONF = cfg.CONF
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -27,9 +27,9 @@ if sys.platform == 'win32':
from oslo_config import cfg from oslo_config import cfg
from oslo_log import log as logging from oslo_log import log as logging
from oslo_windows.utils import constants from os_windows.utils import constants
from oslo_windows.utils import vmutils from os_windows.utils import vmutils
from oslo_windows.utils import jobutils from os_windows.utils import jobutils
CONF = cfg.CONF CONF = cfg.CONF
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -30,10 +30,10 @@ from oslo_config import cfg
from oslo_log import log as logging from oslo_log import log as logging
from six.moves import range from six.moves import range
from oslo_windows._i18n import _ from os_windows._i18n import _
from oslo_windows import _utils from os_windows import _utils
from oslo_windows import exceptions from os_windows import exceptions
from oslo_windows.utils import basevolumeutils from os_windows.utils import basevolumeutils
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -28,10 +28,10 @@ from oslo_config import cfg
from oslo_log import log as logging from oslo_log import log as logging
from six.moves import range from six.moves import range
from oslo_windows._i18n import _ from os_windows._i18n import _
from oslo_windows import _utils from os_windows import _utils
from oslo_windows import exceptions from os_windows import exceptions
from oslo_windows.utils import basevolumeutils from os_windows.utils import basevolumeutils
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
CONF = cfg.CONF CONF = cfg.CONF

View File

@ -16,22 +16,22 @@
from oslo_config import cfg from oslo_config import cfg
from oslo_log import log as logging from oslo_log import log as logging
from oslo_windows._i18n import _, _LW # noqa from os_windows._i18n import _, _LW # noqa
from oslo_windows import exceptions from os_windows import exceptions
from oslo_windows.utils import hostutils from os_windows.utils import hostutils
from oslo_windows.utils import hostutilsv2 from os_windows.utils import hostutilsv2
from oslo_windows.utils import livemigrationutils from os_windows.utils import livemigrationutils
from oslo_windows.utils import networkutils from os_windows.utils import networkutils
from oslo_windows.utils import networkutilsv2 from os_windows.utils import networkutilsv2
from oslo_windows.utils import pathutils from os_windows.utils import pathutils
from oslo_windows.utils import rdpconsoleutils from os_windows.utils import rdpconsoleutils
from oslo_windows.utils import rdpconsoleutilsv2 from os_windows.utils import rdpconsoleutilsv2
from oslo_windows.utils import vhdutils from os_windows.utils import vhdutils
from oslo_windows.utils import vhdutilsv2 from os_windows.utils import vhdutilsv2
from oslo_windows.utils import vmutils from os_windows.utils import vmutils
from oslo_windows.utils import vmutilsv2 from os_windows.utils import vmutilsv2
from oslo_windows.utils import volumeutils from os_windows.utils import volumeutils
from oslo_windows.utils import volumeutilsv2 from os_windows.utils import volumeutilsv2
hyper_opts = [ hyper_opts = [
cfg.BoolOpt('force_hyperv_utils_v1', cfg.BoolOpt('force_hyperv_utils_v1',

View File

@ -2,6 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration # of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later. # process, which may cause wedges in the gate later.
pbr<2.0,>=1.4
Babel>=1.3 Babel>=1.3
oslo.concurrency>=2.3.0 # Apache-2.0 oslo.concurrency>=2.3.0 # Apache-2.0

View File

@ -1,11 +1,11 @@
[metadata] [metadata]
name = oslo.windows name = os-windows
summary = Oslo Windows library for OpenStack projects. summary = Windows / Hyper-V library for OpenStack projects.
description-file = description-file =
README.rst README.rst
author = OpenStack author = OpenStack
author-email = openstack-dev@lists.openstack.org author-email = openstack-dev@lists.openstack.org
home-page = http://launchpad.net/oslo home-page = http://www.openstack.org/
classifier = classifier =
Environment :: OpenStack Environment :: OpenStack
Intended Audience :: Information Technology Intended Audience :: Information Technology
@ -15,17 +15,13 @@ classifier =
Programming Language :: Python Programming Language :: Python
Programming Language :: Python :: 2 Programming Language :: Python :: 2
Programming Language :: Python :: 2.7 Programming Language :: Python :: 2.7
Programming Language :: Python :: 2.6
Programming Language :: Python :: 3 Programming Language :: Python :: 3
Programming Language :: Python :: 3.3 Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.4 Programming Language :: Python :: 3.4
[files] [files]
packages = packages =
oslo_windows os_windows
[pbr]
warnerrors = true
[build_sphinx] [build_sphinx]
source-dir = doc/source source-dir = doc/source
@ -36,18 +32,15 @@ all_files = 1
upload-dir = doc/build/html upload-dir = doc/build/html
[compile_catalog] [compile_catalog]
directory = oslo.windows/locale directory = os_windows/locale
domain = oslo.windows domain = os-windows
[update_catalog] [update_catalog]
domain = oslo.windows domain = os-windows
output_dir = oslo.windows/locale output_dir = os_windows/locale
input_file = oslo.windows/locale/oslo.windows.pot input_file = os_windows/locale/os-windows.pot
[extract_messages] [extract_messages]
keywords = _ gettext ngettext l_ lazy_gettext keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg mapping_file = babel.cfg
output_file = oslo.windows/locale/oslo.windows.pot output_file = os_windows/locale/os-windows.pot
[wheel]
universal = true

View File

@ -3,8 +3,13 @@
# process, which may cause wedges in the gate later. # process, which may cause wedges in the gate later.
hacking<0.11,>=0.10.0 hacking<0.11,>=0.10.0
oslotest>=1.5.1
# These are needed for docs generation coverage>=3.6
oslosphinx>=2.5.0 discover
python-subunit>=0.0.18
sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 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

25
tox.ini
View File

@ -1,20 +1,15 @@
[tox] [tox]
minversion = 1.6 minversion = 1.6
envlist = py34,py26,py27,pypy,pep8 envlist = py33,py34,py27,pypy,pep8
# NOTE(dhellmann): We cannot set skipdist=True skipsdist = True
# for oslo libraries because of the namespace package.
#skipsdist = True
[testenv] [testenv]
# NOTE(dhellmann): We cannot set usedevelop=True usedevelop = True
# for oslo libraries because of the namespace package.
#usedevelop = True
install_command = pip install -U {opts} {packages} install_command = pip install -U {opts} {packages}
setenv = setenv =
VIRTUAL_ENV={envdir} VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt deps = -r{toxinidir}/test-requirements.txt
-r{toxinidir}/test-requirements.txt commands = python setup.py test --slowest --testr-args='{posargs}'
commands = python setup.py testr --slowest --testr-args='{posargs}'
[testenv:pep8] [testenv:pep8]
commands = flake8 commands = flake8
@ -22,11 +17,14 @@ commands = flake8
[testenv:venv] [testenv:venv]
commands = {posargs} commands = {posargs}
[testenv:cover]
commands = python setup.py test --coverage --testr-args='{posargs}'
[testenv:docs] [testenv:docs]
commands = python setup.py build_sphinx commands = python setup.py build_sphinx
[testenv:cover] [testenv:debug]
commands = python setup.py testr --coverage --testr-args='{posargs}' commands = oslo_debug_helper {posargs}
[flake8] [flake8]
# E123, E125 skipped as they are invalid PEP-8. # E123, E125 skipped as they are invalid PEP-8.
@ -35,6 +33,3 @@ show-source = True
ignore = E123,E125 ignore = E123,E125
builtins = _ builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
[hacking]
import_exceptions =