Rename package to sushy-oem-idrac

This commit is contained in:
Ilya Etingof 2019-09-23 17:23:20 +02:00
parent cb97db0dbf
commit 55ac32fc35
21 changed files with 27 additions and 30 deletions

View File

@ -1,3 +1,3 @@
[DEFAULT] [DEFAULT]
test_path=./sushy_oem_dellemc/tests test_path=./sushy_oem_idrac/tests
top_dir=. top_dir=.

View File

@ -11,7 +11,7 @@ introduce their own features with the common Redfish framework. At the same
time, `sushy` supports extending its data model by loading extensions found time, `sushy` supports extending its data model by loading extensions found
within its "oem" namespace. within its "oem" namespace.
The `sushy-oem-dellemc` package is a sushy extension package that aims at The `sushy-oem-idrac` package is a sushy extension package that aims at
adding high-level hardware management abstractions, that are specific to adding high-level hardware management abstractions, that are specific to
Dell EMC BMC (which is known under the name of iDRAC), to the tree of sushy Dell EMC BMC (which is known under the name of iDRAC), to the tree of sushy
Redfish resources. Redfish resources.
@ -37,4 +37,4 @@ oem_manager.set_virtual_boot_device(
``` ```
See full example of virtual media boot setup in the See full example of virtual media boot setup in the
[functional test suite](https://github.com/etingof/sushy-oem-dellemc/blob/master/sushy_oem_dellemc/tests/functional/vmedia_boot.py). [functional test suite](https://github.com/etingof/sushy-oem-idrac/blob/master/sushy_oem_idrac/tests/functional/vmedia_boot.py).

View File

@ -1,6 +1,6 @@
[metadata] [metadata]
name = sushy-oem-dellemc name = sushy-oem-idrac
summary = Dell EMC OEM extension package for the sushy library summary = Dell EMC iDRAC OEM extension package for the sushy library
description-file = description-file =
README.md README.md
author = OpenStack author = OpenStack
@ -21,11 +21,11 @@ classifier =
[files] [files]
packages = packages =
sushy_oem_dellemc sushy_oem_idrac
[entry_points] [entry_points]
sushy.resources.manager.oems = sushy.resources.manager.oems =
dell = sushy_oem_dellemc.resources.manager.manager:get_extension dell = sushy_oem_idrac.resources.manager.manager:get_extension
[build_sphinx] [build_sphinx]
@ -38,18 +38,18 @@ warning-is-error = 1
upload-dir = doc/build/html upload-dir = doc/build/html
[compile_catalog] [compile_catalog]
directory = sushy_oem_dellemc/locale directory = sushy_oem_idrac/locale
domain = sushy_oem_dellemc domain = sushy_oem_idrac
[update_catalog] [update_catalog]
domain = sushy_oem_dellemc domain = sushy_oem_idrac
output_dir = sushy_oem_dellemc/locale output_dir = sushy_oem_idrac/locale
input_file = sushy_oem_dellemc/locale/sushy_oem_dellemc.pot input_file = sushy_oem_idrac/locale/sushy_oem_idrac.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 = sushy_oem_dellemc/locale/sushy_oem_dellemc.pot output_file = sushy_oem_idrac/locale/sushy_oem_idrac.pot
[build_releasenotes] [build_releasenotes]
all_files = 1 all_files = 1
@ -60,4 +60,4 @@ source-dir = releasenotes/source
autodoc_index_modules = True autodoc_index_modules = True
api_doc_dir = reference/api api_doc_dir = reference/api
autodoc_exclude_modules = autodoc_exclude_modules =
sushy_oem_dellemc.tests.* sushy_oem_idrac.tests.*

View File

@ -18,9 +18,9 @@ from sushy.resources import base
from sushy.resources import common from sushy.resources import common
from sushy.resources.oem import base as oem_base from sushy.resources.oem import base as oem_base
from sushy_oem_dellemc import asynchronous from sushy_oem_idrac import asynchronous
from sushy_oem_dellemc import constants from sushy_oem_idrac import constants
from sushy_oem_dellemc import utils from sushy_oem_idrac import utils
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
@ -108,7 +108,7 @@ VFDD\
action_data = dict(self.ACTION_DATA, ImportBuffer=idrac_media) action_data = dict(self.ACTION_DATA, ImportBuffer=idrac_media)
# TODO (etingof): figure out if on-time or persistent boot can at # TODO(etingof): figure out if on-time or persistent boot can at
# all be implemented via this OEM call # all be implemented via this OEM call
attempts = 10 attempts = 10

View File

@ -15,23 +15,19 @@ import sys
import sushy import sushy
from sushy_oem_dellemc import utils from sushy_oem_idrac import utils
USERNAME = 'root' USERNAME = 'root'
PASSWORD = 'calvin' PASSWORD = 'calvin'
SERVICE_ROOT = 'http://demo.snmplabs.com:80/redfish/v1' SERVICE_ROOT = 'http://demo.snmplabs.com:80/redfish/v1'
SERVICE_ROOT = 'https://r640-u11-drac.dev1.kni.lab.eng.bos.redhat.com:443/redfish/v1'
SYSTEM_ID = '437XR1138R2' SYSTEM_ID = '437XR1138R2'
SYSTEM_ID = 'System.Embedded.1'
BOOT_DEVICE = sushy.VIRTUAL_MEDIA_CD BOOT_DEVICE = sushy.VIRTUAL_MEDIA_CD
#BOOT_MODE = sushy.BOOT_SOURCE_MODE_UEFI
BOOT_MODE = sushy.BOOT_SOURCE_MODE_BIOS BOOT_MODE = sushy.BOOT_SOURCE_MODE_BIOS
BOOT_IMAGE = 'http://demo.snmplabs.com/mini.iso' BOOT_IMAGE = 'http://demo.snmplabs.com/mini.iso'
BOOT_IMAGE = 'http://10.40.205.36/mini.iso'
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
@ -63,7 +59,8 @@ def main():
if BOOT_DEVICE not in v_media.media_types: if BOOT_DEVICE not in v_media.media_types:
continue continue
LOG.info('device %s is present at %s', BOOT_DEVICE, manager.identity) LOG.info(
'device %s is present at %s', BOOT_DEVICE, manager.identity)
try: try:
manager_oem = manager.get_oem_extension('Dell') manager_oem = manager.get_oem_extension('Dell')

View File

@ -26,9 +26,9 @@ class ManagerTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(ManagerTestCase, self).setUp() super(ManagerTestCase, self).setUp()
self.conn = mock.Mock() self.conn = mock.Mock()
with open('sushy_oem_dellemc/tests/unit/json_samples/' with open('sushy_oem_idrac/tests/unit/json_samples/'
'manager.json') as f: 'manager.json') as f:
mock_response = self.conn.get.return_value; mock_response = self.conn.get.return_value
mock_response.json.return_value = json.load(f) mock_response.json.return_value = json.load(f)
mock_response.status_code = 200 mock_response.status_code = 200

View File

@ -33,7 +33,7 @@ class RootTestCase(BaseTestCase):
self.sess_serv.create_session.return_value = (None, None) self.sess_serv.create_session.return_value = (None, None)
mock_session_service.return_value = self.sess_serv mock_session_service.return_value = self.sess_serv
mock_connector.return_value = self.conn mock_connector.return_value = self.conn
with open('sushy_oem_dellemc/tests/unit/json_samples/root.json') as f: with open('sushy_oem_idrac/tests/unit/json_samples/root.json') as f:
self.conn.get.return_value.json.return_value = json.load(f) self.conn.get.return_value.json.return_value = json.load(f)
self.root = main.Sushy('http://foo.bar:1234', self.root = main.Sushy('http://foo.bar:1234',
verify=True, auth=mock_auth) verify=True, auth=mock_auth)

View File

@ -28,7 +28,7 @@ basepython = python3
setenv = setenv =
{[testenv]setenv} {[testenv]setenv}
PYTHON=coverage run --parallel-mode PYTHON=coverage run --parallel-mode
# After running this target, visit sushy_oem_dellemc/cover/index.html # After running this target, visit sushy_oem_idrac/cover/index.html
# in your browser, to see a nicer presentation report with annotated # in your browser, to see a nicer presentation report with annotated
# HTML listings detailing missed lines. # HTML listings detailing missed lines.
commands = coverage erase commands = coverage erase
@ -49,7 +49,7 @@ commands =
[testenv:debug] [testenv:debug]
basepython = python3 basepython = python3
commands = oslo_debug_helper -t sushy_oem_dellemc/tests {posargs} commands = oslo_debug_helper -t sushy_oem_idrac/tests {posargs}
[flake8] [flake8]
# E123, E125 skipped as they are invalid PEP-8. # E123, E125 skipped as they are invalid PEP-8.