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:
parent
3207d9e1bc
commit
38d863e489
@ -35,10 +35,7 @@ class LifecycleControllerManagement(object):
|
|||||||
interface
|
interface
|
||||||
"""
|
"""
|
||||||
|
|
||||||
filter_query = ('select LifecycleControllerVersion '
|
doc = self.client.enumerate(uris.DCIM_SystemView, wait_for_idrac=False)
|
||||||
'from DCIM_SystemView')
|
|
||||||
doc = self.client.enumerate(uris.DCIM_SystemView,
|
|
||||||
filter_query=filter_query)
|
|
||||||
lc_version_str = utils.find_xml(doc, 'LifecycleControllerVersion',
|
lc_version_str = utils.find_xml(doc, 'LifecycleControllerVersion',
|
||||||
uris.DCIM_SystemView).text
|
uris.DCIM_SystemView).text
|
||||||
|
|
||||||
|
@ -29,11 +29,7 @@ class ClientLifecycleControllerManagementTestCase(base.BaseTest):
|
|||||||
**test_utils.FAKE_ENDPOINT)
|
**test_utils.FAKE_ENDPOINT)
|
||||||
|
|
||||||
@requests_mock.Mocker()
|
@requests_mock.Mocker()
|
||||||
@mock.patch.object(dracclient.client.WSManClient,
|
def test_get_lifecycle_controller_version(self, mock_requests):
|
||||||
'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):
|
|
||||||
mock_requests.post(
|
mock_requests.post(
|
||||||
'https://1.2.3.4:443/wsman',
|
'https://1.2.3.4:443/wsman',
|
||||||
text=test_utils.LifecycleControllerEnumerations[
|
text=test_utils.LifecycleControllerEnumerations[
|
||||||
|
Loading…
Reference in New Issue
Block a user