diff --git a/proliantutils/tests/__init__.py b/proliantutils/tests/__init__.py index c83fcab..e69de29 100644 --- a/proliantutils/tests/__init__.py +++ b/proliantutils/tests/__init__.py @@ -1,17 +0,0 @@ -# Copyright 2017 Hewlett Packard Enterprise Development LP -# 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. - -# TODO(deray): Need to remove this hack sooner -from proliantutils.tests.redfish import manager_mock # noqa diff --git a/proliantutils/tests/redfish/manager_mock.py b/proliantutils/tests/redfish/manager_mock.py deleted file mode 100644 index e884a33..0000000 --- a/proliantutils/tests/redfish/manager_mock.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 2017 Hewlett Packard Enterprise Development LP -# 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. - -# TODO(deray): Need to remove this hack sooner - -import sys - -import mock -from oslo_utils import importutils -import six - - -SUSHY_MANAGER_PACKAGE_SPEC = ('manager',) - -sushy = importutils.try_import('sushy') -if sushy: - sushy_resources_manager = mock.MagicMock( - spec_set=SUSHY_MANAGER_PACKAGE_SPEC) - sys.modules['sushy.resources.manager'] = sushy_resources_manager - sushy.resources.common = mock.MagicMock() - sushy_resources_manager.manager.Manager = type( - 'Manager', (sushy.resources.base.ResourceBase,), {}) - sushy.resources.common.ResetActionField = type( - 'ResetActionField', (sushy.resources.base.CompositeField,), - {"target_uri": sushy.resources.base.Field('target', required=True)}) - if 'proliantutils.redfish' in sys.modules: - six.moves.reload_module(sys.modules['proliantutils.redfish']) diff --git a/requirements.txt b/requirements.txt index 1ce9752..82fc5a6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,4 +9,4 @@ retrying!=1.3.0,>=1.2.3 # Apache-2.0 pysnmp>=4.2.3,<5.0.0 # BSD # Redfish communication uses the Sushy library -sushy +sushy>=1.0.0