Simplify get Lifecycle Controller version

A Dell technical white paper [0], "Lifecycle Controller Integration --
Best Practices Guide", describes how to determine the Lifecycle
Controller version. See section 31.4, "Check Version of Lifecycle
Controller (LC)". It simply enumerates the DCIM_SystemView class. No
filter query is used to limit the items returned. And notably, that use
case does not require the LC remote service to be in a "ready" state.

That use case is implemented by the
dracclient.resource.lifecycle_controller.LifecycleControllerManagement.get_version()
method. It has used a filter query and waited for the integrated Dell
Remote Access Controller (iDRAC) to be ready. To align it with best
practices, this patch eliminates its use of a filter query and wait for
the iDRAC.

[0]
http://en.community.dell.com/techcenter/extras/m/white_papers/20442332

Change-Id: I9a499522b59f18282fc9a57227570f54e46dfd3e
Closes-Bug: #1697558
This commit is contained in:
Richard Pioso 2017-07-25 18:14:44 -04:00
parent 3207d9e1bc
commit 38d863e489
2 changed files with 2 additions and 9 deletions

View File

@ -35,10 +35,7 @@ class LifecycleControllerManagement(object):
interface
"""
filter_query = ('select LifecycleControllerVersion '
'from DCIM_SystemView')
doc = self.client.enumerate(uris.DCIM_SystemView,
filter_query=filter_query)
doc = self.client.enumerate(uris.DCIM_SystemView, wait_for_idrac=False)
lc_version_str = utils.find_xml(doc, 'LifecycleControllerVersion',
uris.DCIM_SystemView).text

View File

@ -29,11 +29,7 @@ class ClientLifecycleControllerManagementTestCase(base.BaseTest):
**test_utils.FAKE_ENDPOINT)
@requests_mock.Mocker()
@mock.patch.object(dracclient.client.WSManClient,
'wait_until_idrac_is_ready', spec_set=True,
autospec=True)
def test_get_lifecycle_controller_version(self, mock_requests,
mock_wait_until_idrac_is_ready):
def test_get_lifecycle_controller_version(self, mock_requests):
mock_requests.post(
'https://1.2.3.4:443/wsman',
text=test_utils.LifecycleControllerEnumerations[