Add support for idrac_card and lifecycle_controller attributes

Change-Id: I305976e639a406de19f23dcfb5207a25c6c311ba
This commit is contained in:
Anish Bhatt 2016-08-31 12:56:49 -07:00
parent 62814f1984
commit 15b1c2a32f
12 changed files with 11156 additions and 0 deletions

View File

@ -19,6 +19,7 @@ import logging
from dracclient import exceptions
from dracclient.resources import bios
from dracclient.resources import idrac_card
from dracclient.resources import inventory
from dracclient.resources import job
from dracclient.resources import lifecycle_controller
@ -52,6 +53,8 @@ class DRACClient(object):
self._power_mgmt = bios.PowerManagement(self.client)
self._boot_mgmt = bios.BootManagement(self.client)
self._bios_cfg = bios.BIOSConfiguration(self.client)
self._lifecycle_cfg = lifecycle_controller.LCConfiguration(self.client)
self._idrac_cfg = idrac_card.iDRACCardConfiguration(self.client)
self._raid_mgmt = raid.RAIDManagement(self.client)
self._inventory_mgmt = inventory.InventoryManagement(self.client)
@ -159,6 +162,33 @@ class DRACClient(object):
"""
return self._bios_cfg.set_bios_settings(settings)
def list_idrac_settings(self):
"""List the iDRAC configuration settings
:returns: a dictionary with the iDRAC settings using InstanceID as the
key. The attributes are either iDRACCArdEnumerableAttribute,
iDRACCardStringAttribute or iDRACCardIntegerAttribute
objects.
:raises: WSManRequestFailure on request failures
:raises: WSManInvalidResponse when receiving invalid response
:raises: DRACOperationFailed on error reported back by the DRAC
interface
"""
return self._idrac_cfg.list_idrac_settings()
def list_lifecycle_settings(self):
"""List the Lifecycle Controller configuration settings
:returns: a dictionary with the Lifecycle Controller settings using its
InstanceID as the key. The attributes are either
LCEnumerableAttribute or LCStringAttribute objects.
:raises: WSManRequestFailure on request failures
:raises: WSManInvalidResponse when receiving invalid response
:raises: DRACOperationFailed on error reported back by the DRAC
interface
"""
return self._lifecycle_cfg.list_lifecycle_settings()
def list_jobs(self, only_unfinished=False):
"""Returns a list of jobs from the job queue

View File

@ -0,0 +1,277 @@
#
# 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.
from dracclient.resources import uris
from dracclient import utils
from dracclient import wsman
class iDRACCardConfiguration(object):
def __init__(self, client):
"""Creates iDRACCardManagement object
:param client: an instance of WSManClient
"""
self.client = client
def list_idrac_settings(self):
"""List the iDRACCard configuration settings
:returns: a dictionary with the iDRACCard settings using its name as
the key. The attributes are either
iDRACCardEnumerableAttribute, iDRACCardStringAttribute
or iDRACCardIntegerAttribute objects.
:raises: WSManRequestFailure on request failures
:raises: WSManInvalidResponse when receiving invalid response
:raises: DRACOperationFailed on error reported back by the DRAC
interface
"""
result = {}
namespaces = [(uris.DCIM_iDRACCardEnumeration,
iDRACCardEnumerableAttribute),
(uris.DCIM_iDRACCardString, iDRACCardStringAttribute),
(uris.DCIM_iDRACCardInteger, iDRACCardIntegerAttribute)]
for (namespace, attr_cls) in namespaces:
attribs = self._get_config(namespace, attr_cls)
result.update(attribs)
return result
def _get_config(self, resource, attr_cls):
result = {}
doc = self.client.enumerate(resource)
items = doc.find('.//{%s}Items' % wsman.NS_WSMAN)
if items:
for item in items:
attribute = attr_cls.parse(item)
result[attribute.instance_id] = attribute
return result
class iDRACCardAttribute(object):
"""Generic iDRACCard attribute class"""
def __init__(self, name, instance_id, current_value, pending_value,
read_only, fqdd, group_id):
"""Creates iDRACCardAttribute object
:param name: name of the iDRACCard attribute
:param instance_id: InstanceID of the iDRACCard attribute
:param current_value: current value of the iDRACCard attribute
:param pending_value: pending value of the iDRACCard attribute,
reflecting an unprocessed change (eg. config job not completed)
:param read_only: indicates whether this iDRACCard attribute can be
changed
:param fqdd: Fully Qualified Device Description of the iDRACCard
Attribute
:param group_id: GroupID of the iDRACCard Attribute
"""
self.name = name
self.instance_id = instance_id
self.current_value = current_value
self.pending_value = pending_value
self.read_only = read_only
self.fqdd = fqdd
self.group_id = group_id
def __eq__(self, other):
return self.__dict__ == other.__dict__
@classmethod
def parse(cls, namespace, idrac_attr_xml):
"""Parses XML and creates iDRACCardAttribute object"""
name = utils.get_wsman_resource_attr(
idrac_attr_xml, namespace, 'AttributeName')
instance_id = utils.get_wsman_resource_attr(
idrac_attr_xml, namespace, 'InstanceID')
current_value = utils.get_wsman_resource_attr(
idrac_attr_xml, namespace, 'CurrentValue', nullable=True)
pending_value = utils.get_wsman_resource_attr(
idrac_attr_xml, namespace, 'PendingValue', nullable=True)
read_only = utils.get_wsman_resource_attr(
idrac_attr_xml, namespace, 'IsReadOnly').lower()
fqdd = utils.get_wsman_resource_attr(
idrac_attr_xml, namespace, 'FQDD')
group_id = utils.get_wsman_resource_attr(
idrac_attr_xml, namespace, 'GroupID')
return cls(name, instance_id, current_value, pending_value,
(read_only == 'true'), fqdd, group_id)
class iDRACCardEnumerableAttribute(iDRACCardAttribute):
"""Enumerable iDRACCard attribute class"""
namespace = uris.DCIM_iDRACCardEnumeration
def __init__(self, name, instance_id, current_value, pending_value,
read_only, fqdd, group_id, possible_values):
"""Creates iDRACCardEnumerableAttribute object
:param name: name of the iDRACCard attribute
:param instance_id: InstanceID of the iDRACCard attribute
:param current_value: current value of the iDRACCard attribute
:param pending_value: pending value of the iDRACCard attribute,
reflecting an unprocessed change (eg. config job not completed)
:param read_only: indicates whether this iDRACCard attribute can be
changed
:param fqdd: Fully Qualified Device Description of the iDRACCard
Attribute
:param group_id: GroupID of the iDRACCard Attribute
:param possible_values: list containing the allowed values for the
iDRACCard attribute
"""
super(iDRACCardEnumerableAttribute, self).__init__(name, instance_id,
current_value,
pending_value,
read_only, fqdd,
group_id)
self.possible_values = possible_values
@classmethod
def parse(cls, idrac_attr_xml):
"""Parses XML and creates iDRACCardEnumerableAttribute object"""
idrac_attr = iDRACCardAttribute.parse(cls.namespace, idrac_attr_xml)
possible_values = [attr.text for attr
in utils.find_xml(idrac_attr_xml, 'PossibleValues',
cls.namespace, find_all=True)]
return cls(idrac_attr.name, idrac_attr.instance_id,
idrac_attr.current_value, idrac_attr.pending_value,
idrac_attr.read_only, idrac_attr.fqdd, idrac_attr.group_id,
possible_values)
def validate(self, new_value):
"""Validates new value"""
if str(new_value) not in self.possible_values:
msg = ("Attribute '%(attr)s' cannot be set to value '%(val)s'."
" It must be in %(possible_values)r.") % {
'attr': self.name,
'val': new_value,
'possible_values': self.possible_values}
return msg
class iDRACCardStringAttribute(iDRACCardAttribute):
"""String iDRACCard attribute class"""
namespace = uris.DCIM_iDRACCardString
def __init__(self, name, instance_id, current_value, pending_value,
read_only, fqdd, group_id, min_length, max_length):
"""Creates iDRACCardStringAttribute object
:param name: name of the iDRACCard attribute
:param instance_id: InstanceID of the iDRACCard attribute
:param current_value: current value of the iDRACCard attribute
:param pending_value: pending value of the iDRACCard attribute,
reflecting an unprocessed change (eg. config job not completed)
:param read_only: indicates whether this iDRACCard attribute can be
changed
:param fqdd: Fully Qualified Device Description of the iDRACCard
Attribute
:param group_id: GroupID of the iDRACCard Attribute
:param min_length: minimum length of the string
:param max_length: maximum length of the string
"""
super(iDRACCardStringAttribute, self).__init__(name, instance_id,
current_value,
pending_value,
read_only, fqdd,
group_id)
self.min_length = min_length
self.max_length = max_length
@classmethod
def parse(cls, idrac_attr_xml):
"""Parses XML and creates iDRACCardStringAttribute object"""
idrac_attr = iDRACCardAttribute.parse(cls.namespace, idrac_attr_xml)
min_length = int(utils.get_wsman_resource_attr(
idrac_attr_xml, cls.namespace, 'MinLength'))
max_length = int(utils.get_wsman_resource_attr(
idrac_attr_xml, cls.namespace, 'MaxLength'))
return cls(idrac_attr.name, idrac_attr.instance_id,
idrac_attr.current_value, idrac_attr.pending_value,
idrac_attr.read_only, idrac_attr.fqdd, idrac_attr.group_id,
min_length, max_length)
class iDRACCardIntegerAttribute(iDRACCardAttribute):
"""Integer iDRACCard attribute class"""
namespace = uris.DCIM_iDRACCardInteger
def __init__(self, name, instance_id, current_value, pending_value,
read_only, fqdd, group_id, lower_bound, upper_bound):
"""Creates iDRACCardIntegerAttribute object
:param name: name of the iDRACCard attribute
:param instance_id: InstanceID of the iDRACCard attribute
:param current_value: current value of the iDRACCard attribute
:param pending_value: pending value of the iDRACCard attribute,
reflecting an unprocessed change (eg. config job not completed)
:param read_only: indicates whether this iDRACCard attribute can be
changed
:param fqdd: Fully Qualified Device Description of the iDRACCard
Attribute
:param group_id: GroupID of the iDRACCard Attribute
:param lower_bound: minimum value for the iDRACCard attribute
:param upper_bound: maximum value for the iDRACCard attribute
"""
super(iDRACCardIntegerAttribute, self).__init__(name, instance_id,
current_value,
pending_value,
read_only, fqdd,
group_id)
self.lower_bound = lower_bound
self.upper_bound = upper_bound
@classmethod
def parse(cls, idrac_attr_xml):
"""Parses XML and creates iDRACCardIntegerAttribute object"""
idrac_attr = iDRACCardAttribute.parse(cls.namespace, idrac_attr_xml)
lower_bound = utils.get_wsman_resource_attr(
idrac_attr_xml, cls.namespace, 'LowerBound')
upper_bound = utils.get_wsman_resource_attr(
idrac_attr_xml, cls.namespace, 'UpperBound')
if idrac_attr.current_value:
idrac_attr.current_value = int(idrac_attr.current_value)
if idrac_attr.pending_value:
idrac_attr.pending_value = int(idrac_attr.pending_value)
return cls(idrac_attr.name, idrac_attr.instance_id,
idrac_attr.current_value, idrac_attr.pending_value,
idrac_attr.read_only, idrac_attr.fqdd, idrac_attr.group_id,
int(lower_bound), int(upper_bound))
def validate(self, new_value):
"""Validates new value"""
val = int(new_value)
if val < self.lower_bound or val > self.upper_bound:
msg = ('Attribute %(attr)s cannot be set to value %(val)d.'
' It must be between %(lower)d and %(upper)d.') % {
'attr': self.name,
'val': new_value,
'lower': self.lower_bound,
'upper': self.upper_bound}
return msg

View File

@ -13,6 +13,7 @@
from dracclient.resources import uris
from dracclient import utils
from dracclient import wsman
class LifecycleControllerManagement(object):
@ -42,3 +43,162 @@ class LifecycleControllerManagement(object):
uris.DCIM_SystemView).text
return tuple(map(int, (lc_version_str.split('.'))))
class LCConfiguration(object):
def __init__(self, client):
"""Creates LifecycleControllerManagement object
:param client: an instance of WSManClient
"""
self.client = client
def list_lifecycle_settings(self):
"""List the LC configuration settings
:returns: a dictionary with the LC settings using InstanceID as the
key. The attributes are either LCEnumerableAttribute,
LCStringAttribute or LCIntegerAttribute objects.
:raises: WSManRequestFailure on request failures
:raises: WSManInvalidResponse when receiving invalid response
:raises: DRACOperationFailed on error reported back by the DRAC
interface
"""
result = {}
namespaces = [(uris.DCIM_LCEnumeration, LCEnumerableAttribute),
(uris.DCIM_LCString, LCStringAttribute)]
for (namespace, attr_cls) in namespaces:
attribs = self._get_config(namespace, attr_cls)
result.update(attribs)
return result
def _get_config(self, resource, attr_cls):
result = {}
doc = self.client.enumerate(resource)
items = doc.find('.//{%s}Items' % wsman.NS_WSMAN)
for item in items:
attribute = attr_cls.parse(item)
result[attribute.instance_id] = attribute
return result
class LCAttribute(object):
"""Generic LC attribute class"""
def __init__(self, name, instance_id, current_value, pending_value,
read_only):
"""Creates LCAttribute object
:param name: name of the LC attribute
:param instance_id: InstanceID of the LC attribute
:param current_value: current value of the LC attribute
:param pending_value: pending value of the LC attribute, reflecting
an unprocessed change (eg. config job not completed)
:param read_only: indicates whether this LC attribute can be changed
"""
self.name = name
self.instance_id = instance_id
self.current_value = current_value
self.pending_value = pending_value
self.read_only = read_only
def __eq__(self, other):
return self.__dict__ == other.__dict__
@classmethod
def parse(cls, namespace, lifecycle_attr_xml):
"""Parses XML and creates LCAttribute object"""
name = utils.get_wsman_resource_attr(
lifecycle_attr_xml, namespace, 'AttributeName')
instance_id = utils.get_wsman_resource_attr(
lifecycle_attr_xml, namespace, 'InstanceID')
current_value = utils.get_wsman_resource_attr(
lifecycle_attr_xml, namespace, 'CurrentValue', nullable=True)
pending_value = utils.get_wsman_resource_attr(
lifecycle_attr_xml, namespace, 'PendingValue', nullable=True)
read_only = utils.get_wsman_resource_attr(
lifecycle_attr_xml, namespace, 'IsReadOnly')
return cls(name, instance_id, current_value, pending_value,
(read_only == 'true'))
class LCEnumerableAttribute(LCAttribute):
"""Enumerable LC attribute class"""
namespace = uris.DCIM_LCEnumeration
def __init__(self, name, instance_id, current_value, pending_value,
read_only, possible_values):
"""Creates LCEnumerableAttribute object
:param name: name of the LC attribute
:param current_value: current value of the LC attribute
:param pending_value: pending value of the LC attribute, reflecting
an unprocessed change (eg. config job not completed)
:param read_only: indicates whether this LC attribute can be changed
:param possible_values: list containing the allowed values for the LC
attribute
"""
super(LCEnumerableAttribute, self).__init__(name, instance_id,
current_value,
pending_value, read_only)
self.possible_values = possible_values
@classmethod
def parse(cls, lifecycle_attr_xml):
"""Parses XML and creates LCEnumerableAttribute object"""
lifecycle_attr = LCAttribute.parse(cls.namespace, lifecycle_attr_xml)
possible_values = [attr.text for attr
in utils.find_xml(lifecycle_attr_xml,
'PossibleValues',
cls.namespace, find_all=True)]
return cls(lifecycle_attr.name, lifecycle_attr.instance_id,
lifecycle_attr.current_value, lifecycle_attr.pending_value,
lifecycle_attr.read_only, possible_values)
class LCStringAttribute(LCAttribute):
"""String LC attribute class"""
namespace = uris.DCIM_LCString
def __init__(self, name, instance_id, current_value, pending_value,
read_only, min_length, max_length):
"""Creates LCStringAttribute object
:param name: name of the LC attribute
:param instance_id: InstanceID of the LC attribute
:param current_value: current value of the LC attribute
:param pending_value: pending value of the LC attribute, reflecting
an unprocessed change (eg. config job not completed)
:param read_only: indicates whether this LC attribute can be changed
:param min_length: minimum length of the string
:param max_length: maximum length of the string
"""
super(LCStringAttribute, self).__init__(name, instance_id,
current_value, pending_value,
read_only)
self.min_length = min_length
self.max_length = max_length
@classmethod
def parse(cls, lifecycle_attr_xml):
"""Parses XML and creates LCStringAttribute object"""
lifecycle_attr = LCAttribute.parse(cls.namespace, lifecycle_attr_xml)
min_length = int(utils.get_wsman_resource_attr(
lifecycle_attr_xml, cls.namespace, 'MinLength'))
max_length = int(utils.get_wsman_resource_attr(
lifecycle_attr_xml, cls.namespace, 'MaxLength'))
return cls(lifecycle_attr.name, lifecycle_attr.instance_id,
lifecycle_attr.current_value, lifecycle_attr.pending_value,
lifecycle_attr.read_only, min_length, max_length)

View File

@ -43,6 +43,27 @@ DCIM_ControllerView = ('http://schemas.dell.com/wbem/wscim/1/cim-schema/2/'
DCIM_CPUView = ('http://schemas.dell.com/wbem/wscim/1/cim-schema/2/'
'DCIM_CPUView')
DCIM_iDRACCardEnumeration = ('http://schemas.dell.com/wbem/wscim/1/cim-schema/'
'2/DCIM_iDRACCardEnumeration')
DCIM_iDRACCardInteger = ('http://schemas.dell.com/wbem/wscim/1/cim-schema/2/'
'DCIM_iDRACCardInteger')
DCIM_iDRACCardService = ('http://schemas.dell.com/wbem/wscim/1/cim-schema/2/'
'DCIM_iDRACCardService')
DCIM_iDRACCardString = ('http://schemas.dell.com/wbem/wscim/1/cim-schema/2/'
'DCIM_iDRACCardString')
DCIM_LCEnumeration = ('http://schemas.dell.com/wbem/wscim/1/cim-schema/2/'
'DCIM_LCEnumeration')
DCIM_LCService = ('http://schemas.dell.com/wbem/wscim/1/cim-schema/2/'
'DCIM_LCService')
DCIM_LCString = ('http://schemas.dell.com/wbem/wscim/1/cim-schema/2/'
'DCIM_LCString')
DCIM_LifecycleJob = ('http://schemas.dell.com/wbem/wscim/1/cim-schema/2/'
'DCIM_LifecycleJob')

View File

@ -0,0 +1,85 @@
#
# 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 requests_mock
import dracclient.client
from dracclient.resources import idrac_card
from dracclient.resources import uris
from dracclient.tests import base
from dracclient.tests import utils as test_utils
class ClientiDRACCardConfigurationTestCase(base.BaseTest):
def setUp(self):
super(ClientiDRACCardConfigurationTestCase, self).setUp()
self.drac_client = dracclient.client.DRACClient(
**test_utils.FAKE_ENDPOINT)
@requests_mock.Mocker()
def test_list_idrac_settings(self, mock_requests):
expected_enum_attr = idrac_card.iDRACCardEnumerableAttribute(
name='Type',
instance_id='iDRAC.Embedded.1#Info.1#Type',
read_only=True,
current_value='13G Monolithic',
pending_value=None,
fqdd='iDRAC.Embedded.1',
group_id='Info.1',
possible_values=['12G/13G', '12G Monolithic', '12G Modular',
'13G Monolithic', '13G Modular', '12G DCS',
'13G DCS'])
expected_string_attr = idrac_card.iDRACCardStringAttribute(
name='Version',
instance_id='iDRAC.Embedded.1#Info.1#Version',
read_only=True,
current_value='2.40.40.40',
pending_value=None,
fqdd='iDRAC.Embedded.1',
group_id='Info.1',
min_length=0,
max_length=63)
expected_integer_attr = idrac_card.iDRACCardIntegerAttribute(
name='Port',
instance_id='iDRAC.Embedded.1#SSH.1#Port',
read_only=False,
current_value=22,
pending_value=None,
fqdd='iDRAC.Embedded.1',
group_id='SSH.1',
lower_bound=1,
upper_bound=65535)
mock_requests.post('https://1.2.3.4:443/wsman', [
{'text': test_utils.iDracCardEnumerations[
uris.DCIM_iDRACCardEnumeration]['ok']},
{'text': test_utils.iDracCardEnumerations[
uris.DCIM_iDRACCardString]['ok']},
{'text': test_utils.iDracCardEnumerations[
uris.DCIM_iDRACCardInteger]['ok']}])
idrac_settings = self.drac_client.list_idrac_settings()
self.assertEqual(630, len(idrac_settings))
# enumerable attribute
self.assertIn('iDRAC.Embedded.1#Info.1#Type', idrac_settings)
self.assertEqual(expected_enum_attr, idrac_settings[
'iDRAC.Embedded.1#Info.1#Type'])
# string attribute
self.assertIn('iDRAC.Embedded.1#Info.1#Version', idrac_settings)
self.assertEqual(expected_string_attr,
idrac_settings['iDRAC.Embedded.1#Info.1#Version'])
# integer attribute
self.assertIn('iDRAC.Embedded.1#SSH.1#Port', idrac_settings)
self.assertEqual(expected_integer_attr, idrac_settings[
'iDRAC.Embedded.1#SSH.1#Port'])

View File

@ -14,6 +14,7 @@
import requests_mock
import dracclient.client
from dracclient.resources import lifecycle_controller
from dracclient.resources import uris
from dracclient.tests import base
from dracclient.tests import utils as test_utils
@ -36,3 +37,50 @@ class ClientLifecycleControllerManagementTestCase(base.BaseTest):
version = self.drac_client.get_lifecycle_controller_version()
self.assertEqual((2, 1, 0), version)
class ClientLCConfigurationTestCase(base.BaseTest):
def setUp(self):
super(ClientLCConfigurationTestCase, self).setUp()
self.drac_client = dracclient.client.DRACClient(
**test_utils.FAKE_ENDPOINT)
@requests_mock.Mocker()
def test_list_lifecycle_settings(self, mock_requests):
expected_enum_attr = lifecycle_controller.LCEnumerableAttribute(
name='Lifecycle Controller State',
instance_id='LifecycleController.Embedded.1#LCAttributes.1#LifecycleControllerState', # noqa
read_only=False,
current_value='Enabled',
pending_value=None,
possible_values=['Disabled', 'Enabled', 'Recovery'])
expected_string_attr = lifecycle_controller.LCStringAttribute(
name='SYSID',
instance_id='LifecycleController.Embedded.1#LCAttributes.1#SystemID', # noqa
read_only=True,
current_value='639',
pending_value=None,
min_length=0,
max_length=3)
mock_requests.post('https://1.2.3.4:443/wsman', [
{'text': test_utils.LifecycleControllerEnumerations[
uris.DCIM_LCEnumeration]['ok']},
{'text': test_utils.LifecycleControllerEnumerations[
uris.DCIM_LCString]['ok']}])
lifecycle_settings = self.drac_client.list_lifecycle_settings()
self.assertEqual(14, len(lifecycle_settings))
# enumerable attribute
self.assertIn(
'LifecycleController.Embedded.1#LCAttributes.1#LifecycleControllerState', # noqa
lifecycle_settings)
self.assertEqual(expected_enum_attr, lifecycle_settings[
'LifecycleController.Embedded.1#LCAttributes.1#LifecycleControllerState']) # noqa
# string attribute
self.assertIn(
'LifecycleController.Embedded.1#LCAttributes.1#SystemID',
lifecycle_settings)
self.assertEqual(expected_string_attr,
lifecycle_settings['LifecycleController.Embedded.1#LCAttributes.1#SystemID']) # noqa

View File

@ -135,10 +135,28 @@ JobInvocations = {
}
}
iDracCardEnumerations = {
uris.DCIM_iDRACCardEnumeration: {
'ok': load_wsman_xml('idraccard_enumeration-enum-ok')
},
uris.DCIM_iDRACCardString: {
'ok': load_wsman_xml('idraccard_string-enum-ok')
},
uris.DCIM_iDRACCardInteger: {
'ok': load_wsman_xml('idraccard_integer-enum-ok')
},
}
LifecycleControllerEnumerations = {
uris.DCIM_SystemView: {
'ok': load_wsman_xml('system_view-enum-ok')
},
uris.DCIM_LCEnumeration: {
'ok': load_wsman_xml('lc_enumeration-enum-ok')
},
uris.DCIM_LCString: {
'ok': load_wsman_xml('lc_string-enum-ok')
}
}
RAIDEnumerations = {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,144 @@
<s:Envelope xmlns:n1="http://schemas.dell.com/wbem/wscim/1/cim-schema/2/DCIM_LCEnumeration"
xmlns:s="http://www.w3.org/2003/05/soap-envelope"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsen="http://schemas.xmlsoap.org/ws/2004/09/enumeration"
xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<s:Header>
<wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
<wsa:Action>http://schemas.xmlsoap.org/ws/2004/09/enumeration/EnumerateResponse</wsa:Action>
<wsa:RelatesTo>uuid:68f2fe2e-1424-4833-9ac0-756f24db2542</wsa:RelatesTo>
<wsa:MessageID>uuid:3ae5f7b2-40a9-10a9-8061-de7e4e771814</wsa:MessageID>
</s:Header>
<s:Body>
<wsen:EnumerateResponse>
<wsman:Items>
<n1:DCIM_LCEnumeration>
<n1:AttributeName>Collect System Inventory on Restart</n1:AttributeName>
<n1:CurrentValue>Enabled</n1:CurrentValue>
<n1:DefaultValue>Enabled</n1:DefaultValue>
<n1:ElementName>LC.emb.1</n1:ElementName>
<n1:InstanceID>LifecycleController.Embedded.1#LCAttributes.1#CollectSystemInventoryOnRestart</n1:InstanceID>
<n1:IsReadOnly>false</n1:IsReadOnly>
<n1:PendingValue xsi:nil="true"/>
<n1:PossibleValues>Disabled</n1:PossibleValues>
<n1:PossibleValues>Enabled</n1:PossibleValues>
</n1:DCIM_LCEnumeration>
<n1:DCIM_LCEnumeration>
<n1:AttributeName>Part Configuration Update</n1:AttributeName>
<n1:CurrentValue>Apply always</n1:CurrentValue>
<n1:DefaultValue>Apply always</n1:DefaultValue>
<n1:ElementName>LC.emb.1</n1:ElementName>
<n1:InstanceID>LifecycleController.Embedded.1#LCAttributes.1#PartConfigurationUpdate</n1:InstanceID>
<n1:IsReadOnly>false</n1:IsReadOnly>
<n1:PendingValue xsi:nil="true"/>
<n1:PossibleValues>Disabled</n1:PossibleValues>
<n1:PossibleValues>Apply always</n1:PossibleValues>
<n1:PossibleValues>Apply only if firmware match</n1:PossibleValues>
</n1:DCIM_LCEnumeration>
<n1:DCIM_LCEnumeration>
<n1:AttributeName>Part Firmware Update</n1:AttributeName>
<n1:CurrentValue>Match firmware of replaced part</n1:CurrentValue>
<n1:DefaultValue>Match firmware of replaced part</n1:DefaultValue>
<n1:ElementName>LC.emb.1</n1:ElementName>
<n1:InstanceID>LifecycleController.Embedded.1#LCAttributes.1#PartFirmwareUpdate</n1:InstanceID>
<n1:IsReadOnly>false</n1:IsReadOnly>
<n1:PendingValue xsi:nil="true"/>
<n1:PossibleValues>Disable</n1:PossibleValues>
<n1:PossibleValues>Allow version upgrade only</n1:PossibleValues>
<n1:PossibleValues>Match firmware of replaced part</n1:PossibleValues>
</n1:DCIM_LCEnumeration>
<n1:DCIM_LCEnumeration>
<n1:AttributeName>Lifecycle Controller State</n1:AttributeName>
<n1:CurrentValue>Enabled</n1:CurrentValue>
<n1:DefaultValue>Enabled</n1:DefaultValue>
<n1:ElementName>LC.emb.1</n1:ElementName>
<n1:InstanceID>LifecycleController.Embedded.1#LCAttributes.1#LifecycleControllerState</n1:InstanceID>
<n1:IsReadOnly>false</n1:IsReadOnly>
<n1:PendingValue xsi:nil="true"/>
<n1:PossibleValues>Disabled</n1:PossibleValues>
<n1:PossibleValues>Enabled</n1:PossibleValues>
<n1:PossibleValues>Recovery</n1:PossibleValues>
</n1:DCIM_LCEnumeration>
<n1:DCIM_LCEnumeration>
<n1:AttributeName>Licensed</n1:AttributeName>
<n1:CurrentValue>Yes</n1:CurrentValue>
<n1:DefaultValue>No</n1:DefaultValue>
<n1:ElementName>LC.emb.1</n1:ElementName>
<n1:InstanceID>LifecycleController.Embedded.1#LCAttributes.1#Licensed</n1:InstanceID>
<n1:IsReadOnly>true</n1:IsReadOnly>
<n1:PendingValue xsi:nil="true"/>
<n1:PossibleValues>No</n1:PossibleValues>
<n1:PossibleValues>Yes</n1:PossibleValues>
</n1:DCIM_LCEnumeration>
<n1:DCIM_LCEnumeration>
<n1:AttributeName>Auto Discovery</n1:AttributeName>
<n1:CurrentValue>Off</n1:CurrentValue>
<n1:DefaultValue>Off</n1:DefaultValue>
<n1:ElementName>LC.emb.1</n1:ElementName>
<n1:InstanceID>LifecycleController.Embedded.1#LCAttributes.1#AutoDiscovery</n1:InstanceID>
<n1:IsReadOnly>true</n1:IsReadOnly>
<n1:PendingValue xsi:nil="true"/>
<n1:PossibleValues>Off</n1:PossibleValues>
<n1:PossibleValues>On</n1:PossibleValues>
</n1:DCIM_LCEnumeration>
<n1:DCIM_LCEnumeration>
<n1:AttributeName>Discovery Factory Defaults</n1:AttributeName>
<n1:CurrentValue>Off</n1:CurrentValue>
<n1:DefaultValue>Off</n1:DefaultValue>
<n1:ElementName>LC.emb.1</n1:ElementName>
<n1:InstanceID>LifecycleController.Embedded.1#LCAttributes.1#DiscoveryFactoryDefaults</n1:InstanceID>
<n1:IsReadOnly>true</n1:IsReadOnly>
<n1:PendingValue xsi:nil="true"/>
<n1:PossibleValues>Off</n1:PossibleValues>
<n1:PossibleValues>On</n1:PossibleValues>
</n1:DCIM_LCEnumeration>
<n1:DCIM_LCEnumeration>
<n1:AttributeName>IPChangeNotifyPS</n1:AttributeName>
<n1:CurrentValue>Off</n1:CurrentValue>
<n1:DefaultValue>Off</n1:DefaultValue>
<n1:ElementName>LC.emb.1</n1:ElementName>
<n1:InstanceID>LifecycleController.Embedded.1#LCAttributes.1#IPChangeNotifyPS</n1:InstanceID>
<n1:IsReadOnly>false</n1:IsReadOnly>
<n1:PendingValue xsi:nil="true"/>
<n1:PossibleValues>Off</n1:PossibleValues>
<n1:PossibleValues>On</n1:PossibleValues>
</n1:DCIM_LCEnumeration>
<n1:DCIM_LCEnumeration>
<n1:AttributeName>BIOS Reset To Defaults Requested</n1:AttributeName>
<n1:CurrentValue>False</n1:CurrentValue>
<n1:DefaultValue>False</n1:DefaultValue>
<n1:ElementName>LC.emb.1</n1:ElementName>
<n1:InstanceID>LifecycleController.Embedded.1#LCAttributes.1#BIOSRTDRequested</n1:InstanceID>
<n1:IsReadOnly>false</n1:IsReadOnly>
<n1:PendingValue xsi:nil="true"/>
<n1:PossibleValues>False</n1:PossibleValues>
<n1:PossibleValues>True</n1:PossibleValues>
</n1:DCIM_LCEnumeration>
<n1:DCIM_LCEnumeration>
<n1:AttributeName>Automatic Update Feature</n1:AttributeName>
<n1:CurrentValue>Enabled</n1:CurrentValue>
<n1:DefaultValue>Disabled</n1:DefaultValue>
<n1:ElementName>LC.emb.1</n1:ElementName>
<n1:InstanceID>LifecycleController.Embedded.1#LCAttributes.1#AutoUpdate</n1:InstanceID>
<n1:IsReadOnly>false</n1:IsReadOnly>
<n1:PendingValue xsi:nil="true"/>
<n1:PossibleValues>Disabled</n1:PossibleValues>
<n1:PossibleValues>Enabled</n1:PossibleValues></n1:DCIM_LCEnumeration>
<n1:DCIM_LCEnumeration>
<n1:AttributeName>Automatic Backup Feature</n1:AttributeName>
<n1:CurrentValue>Disabled</n1:CurrentValue>
<n1:DefaultValue>Disabled</n1:DefaultValue>
<n1:ElementName>LC.emb.1</n1:ElementName>
<n1:InstanceID>LifecycleController.Embedded.1#LCAttributes.1#AutoBackup</n1:InstanceID>
<n1:IsReadOnly>false</n1:IsReadOnly>
<n1:PendingValue xsi:nil="true"/>
<n1:PossibleValues>Disabled</n1:PossibleValues>
<n1:PossibleValues>Enabled</n1:PossibleValues>
</n1:DCIM_LCEnumeration>
</wsman:Items>
<wsen:EnumerationContext/>
<wsman:EndOfSequence/>
</wsen:EnumerateResponse>
</s:Body>
</s:Envelope>

View File

@ -0,0 +1,55 @@
<s:Envelope xmlns:n1="http://schemas.dell.com/wbem/wscim/1/cim-schema/2/DCIM_LCString"
xmlns:s="http://www.w3.org/2003/05/soap-envelope"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsen="http://schemas.xmlsoap.org/ws/2004/09/enumeration"
xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<s:Header>
<wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
<wsa:Action>http://schemas.xmlsoap.org/ws/2004/09/enumeration/EnumerateResponse</wsa:Action>
<wsa:RelatesTo>uuid:d0ede1a5-1f68-4bf6-a4ed-b528e92419db</wsa:RelatesTo>
<wsa:MessageID>uuid:159ae3a2-40aa-10aa-8171-de7e4e771814</wsa:MessageID>
</s:Header>
<s:Body>
<wsen:EnumerateResponse>
<wsman:Items>
<n1:DCIM_LCString>
<n1:AttributeName>SYSID</n1:AttributeName>
<n1:CurrentValue>639</n1:CurrentValue>
<n1:DefaultValue xsi:nil="true"/><n1:ElementName>LC.emb.1</n1:ElementName>
<n1:InstanceID>LifecycleController.Embedded.1#LCAttributes.1#SystemID</n1:InstanceID>
<n1:IsReadOnly>true</n1:IsReadOnly>
<n1:MaxLength>3</n1:MaxLength>
<n1:MinLength>0</n1:MinLength>
<n1:PendingValue xsi:nil="true"/>
<n1:StringType>3</n1:StringType>
</n1:DCIM_LCString>
<n1:DCIM_LCString>
<n1:AttributeName>VirtualAddressManagementApplication</n1:AttributeName>
<n1:CurrentValue xsi:nil="true"/>
<n1:DefaultValue xsi:nil="true"/>
<n1:ElementName>LC.emb.1</n1:ElementName>
<n1:InstanceID>LifecycleController.Embedded.1#LCAttributes.1#VirtualAddressManagementApplication</n1:InstanceID>
<n1:IsReadOnly>false</n1:IsReadOnly>
<n1:MaxLength>32</n1:MaxLength>
<n1:MinLength>0</n1:MinLength>
<n1:PendingValue xsi:nil="true"/>
<n1:StringType>2</n1:StringType>
</n1:DCIM_LCString>
<n1:DCIM_LCString>
<n1:AttributeName>Provisioning Server</n1:AttributeName>
<n1:CurrentValue xsi:nil="true"/><n1:DefaultValue xsi:nil="true"/>
<n1:ElementName>LC.emb.1</n1:ElementName>
<n1:InstanceID>LifecycleController.Embedded.1#LCAttributes.1#ProvisioningServer</n1:InstanceID>
<n1:IsReadOnly>false</n1:IsReadOnly>
<n1:MaxLength>255</n1:MaxLength>
<n1:MinLength>0</n1:MinLength>
<n1:PendingValue xsi:nil="true"/>
<n1:StringType>2</n1:StringType>
</n1:DCIM_LCString>
</wsman:Items>
<wsen:EnumerationContext/>
<wsman:EndOfSequence/>
</wsen:EnumerateResponse>
</s:Body>
</s:Envelope>