diff --git a/dracclient/client.py b/dracclient/client.py
index cc0968e..1020b55 100644
--- a/dracclient/client.py
+++ b/dracclient/client.py
@@ -25,6 +25,7 @@ from dracclient.resources import inventory
from dracclient.resources import job
from dracclient.resources import lifecycle_controller
from dracclient.resources import raid
+from dracclient.resources import system
from dracclient.resources import uris
from dracclient import utils
from dracclient import wsman
@@ -59,6 +60,7 @@ class DRACClient(object):
self._lifecycle_cfg = lifecycle_controller.LCConfiguration(self.client)
self._idrac_cfg = idrac_card.iDRACCardConfiguration(self.client)
self._raid_mgmt = raid.RAIDManagement(self.client)
+ self._system_cfg = system.SystemConfiguration(self.client)
self._inventory_mgmt = inventory.InventoryManagement(self.client)
def get_power_state(self):
@@ -192,6 +194,19 @@ class DRACClient(object):
"""
return self._lifecycle_cfg.list_lifecycle_settings()
+ def list_system_settings(self):
+ """List the System configuration settings
+
+ :returns: a dictionary with the System settings using its instance id
+ as key. The attributes are either SystemEnumerableAttribute,
+ SystemStringAttribute or SystemIntegerAttribute objects.
+ :raises: WSManRequestFailure on request failures
+ :raises: WSManInvalidResponse when receiving invalid response
+ :raises: DRACOperationFailed on error reported back by the DRAC
+ interface
+ """
+ return self._system_cfg.list_system_settings()
+
def list_jobs(self, only_unfinished=False):
"""Returns a list of jobs from the job queue
diff --git a/dracclient/resources/system.py b/dracclient/resources/system.py
new file mode 100644
index 0000000..1069cc3
--- /dev/null
+++ b/dracclient/resources/system.py
@@ -0,0 +1,279 @@
+#
+# 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 SystemConfiguration(object):
+
+ def __init__(self, client):
+ """Creates SystemManagement object
+
+ :param client: an instance of WSManClient
+ """
+ self.client = client
+
+ def list_system_settings(self):
+ """List the System configuration settings
+
+ :returns: a dictionary with the System settings using its name as the
+ key. The attributes are either SystemEnumerableAttribute,
+ SystemStringAttribute or SystemIntegerAttribute 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_SystemEnumeration, SystemEnumerableAttribute),
+ (uris.DCIM_SystemString, SystemStringAttribute),
+ (uris.DCIM_SystemInteger, SystemIntegerAttribute)]
+ 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 is not None:
+ for item in items:
+ attribute = attr_cls.parse(item)
+ result[attribute.instance_id] = attribute
+ return result
+
+
+class SystemAttribute(object):
+ """Generic System attribute class"""
+
+ def __init__(self, name, instance_id, current_value, pending_value,
+ read_only, fqdd, group_id):
+ """Creates SystemAttribute object
+
+ :param name: name of the System attribute
+ :param instance_id: InstanceID of the System attribute
+ :param current_value: current value of the System attribute
+ :param pending_value: pending value of the System attribute, reflecting
+ an unprocessed change (eg. config job not completed)
+ :param read_only: indicates whether this System attribute can be
+ changed
+ :param fqdd: Fully Qualified Device Description of the System attribute
+ :param group_id: GroupID of System 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__
+
+ def __ne__(self, other):
+ return not self.__eq__(other)
+
+ @classmethod
+ def parse(cls, namespace, system_attr_xml):
+ """Parses XML and creates SystemAttribute object"""
+
+ name = utils.get_wsman_resource_attr(
+ system_attr_xml, namespace, 'AttributeName')
+ instance_id = utils.get_wsman_resource_attr(
+ system_attr_xml, namespace, 'InstanceID')
+ current_value = utils.get_wsman_resource_attr(
+ system_attr_xml, namespace, 'CurrentValue', nullable=True)
+ pending_value = utils.get_wsman_resource_attr(
+ system_attr_xml, namespace, 'PendingValue', nullable=True)
+ read_only = utils.get_wsman_resource_attr(
+ system_attr_xml, namespace, 'IsReadOnly')
+ fqdd = utils.get_wsman_resource_attr(
+ system_attr_xml, namespace, 'FQDD')
+ group_id = utils.get_wsman_resource_attr(
+ system_attr_xml, namespace, 'GroupID')
+
+ return cls(name, instance_id, current_value, pending_value,
+ (read_only == 'true'), fqdd, group_id)
+
+
+class SystemEnumerableAttribute(SystemAttribute):
+ """Enumerable System attribute class"""
+
+ namespace = uris.DCIM_SystemEnumeration
+
+ def __init__(self, name, instance_id, current_value, pending_value,
+ read_only, fqdd, group_id, possible_values):
+ """Creates SystemEnumerableAttribute object
+
+ :param name: name of the System attribute
+ :param instance_id: InstanceID of the System attribute
+ :param current_value: current value of the System attribute
+ :param pending_value: pending value of the System attribute, reflecting
+ an unprocessed change (eg. config job not completed)
+ :param read_only: indicates whether this System attribute can be
+ changed
+ :param fqdd: Fully Qualified Device Description of the System attribute
+ :param group_id: GroupID of System attribute
+ :param possible_values: list containing the allowed values for the
+ System attribute
+ """
+ super(SystemEnumerableAttribute, self).__init__(name, instance_id,
+ current_value,
+ pending_value,
+ read_only, fqdd,
+ group_id)
+ self.possible_values = possible_values
+
+ @classmethod
+ def parse(cls, system_attr_xml):
+ """Parses XML and creates SystemEnumerableAttribute object"""
+
+ system_attr = SystemAttribute.parse(
+ cls.namespace, system_attr_xml)
+ possible_values = [attr.text for attr
+ in utils.find_xml(system_attr_xml, 'PossibleValues',
+ cls.namespace, find_all=True)]
+
+ return cls(system_attr.name, system_attr.instance_id,
+ system_attr.current_value, system_attr.pending_value,
+ system_attr.read_only, system_attr.fqdd,
+ system_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 SystemStringAttribute(SystemAttribute):
+ """String System attribute class"""
+
+ namespace = uris.DCIM_SystemString
+
+ def __init__(self, name, instance_id, current_value, pending_value,
+ read_only, fqdd, group_id, min_length, max_length):
+ """Creates SystemStringAttribute object
+
+ :param name: name of the System attribute
+ :param instance_id: InstanceID of the System attribute
+ :param current_value: current value of the System attribute
+ :param pending_value: pending value of the System attribute, reflecting
+ an unprocessed change (eg. config job not completed)
+ :param read_only: indicates whether this System attribute can be
+ changed
+ :param fqdd: Fully Qualified Device Description of the System attribute
+ :param group_id: GroupID of System attribute
+ :param min_length: minimum length of the string
+ :param max_length: maximum length of the string
+ """
+ super(SystemStringAttribute, 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, system_attr_xml):
+ """Parses XML and creates SystemStringAttribute object"""
+
+ system_attr = SystemAttribute.parse(
+ cls.namespace, system_attr_xml)
+ min_length = int(utils.get_wsman_resource_attr(
+ system_attr_xml, cls.namespace, 'MinLength'))
+ max_length = int(utils.get_wsman_resource_attr(
+ system_attr_xml, cls.namespace, 'MaxLength'))
+
+ return cls(system_attr.name, system_attr.instance_id,
+ system_attr.current_value, system_attr.pending_value,
+ system_attr.read_only, system_attr.fqdd,
+ system_attr.group_id, min_length, max_length)
+
+
+class SystemIntegerAttribute(SystemAttribute):
+ """Integer System attribute class"""
+
+ namespace = uris.DCIM_SystemInteger
+
+ def __init__(self, name, instance_id, current_value, pending_value,
+ read_only, fqdd, group_id, lower_bound, upper_bound):
+ """Creates SystemIntegerAttribute object
+
+ :param name: name of the System attribute
+ :param instance_id: InstanceID of the System attribute
+ :param current_value: current value of the System attribute
+ :param pending_value: pending value of the System attribute, reflecting
+ an unprocessed change (eg. config job not completed)
+ :param read_only: indicates whether this System attribute can be
+ changed
+ :param fqdd: Fully Qualified Device Description of the System attribute
+ :param group_id: GroupID of System attribute
+ :param lower_bound: minimum value for the System attribute
+ :param upper_bound: maximum value for the BOIS attribute
+ """
+ super(SystemIntegerAttribute, 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, system_attr_xml):
+ """Parses XML and creates SystemIntegerAttribute object"""
+
+ system_attr = SystemAttribute.parse(cls.namespace, system_attr_xml)
+ lower_bound = utils.get_wsman_resource_attr(
+ system_attr_xml, cls.namespace, 'LowerBound', nullable=True)
+ upper_bound = utils.get_wsman_resource_attr(
+ system_attr_xml, cls.namespace, 'UpperBound', nullable=True)
+
+ if system_attr.current_value:
+ system_attr.current_value = int(system_attr.current_value)
+ if system_attr.pending_value:
+ system_attr.pending_value = int(system_attr.pending_value)
+
+ if lower_bound:
+ lower_bound = int(lower_bound)
+ if upper_bound:
+ upper_bound = int(upper_bound)
+ return cls(system_attr.name, system_attr.instance_id,
+ system_attr.current_value, system_attr.pending_value,
+ system_attr.read_only, system_attr.fqdd,
+ system_attr.group_id, lower_bound, 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
diff --git a/dracclient/resources/uris.py b/dracclient/resources/uris.py
index bad0a92..ce72087 100644
--- a/dracclient/resources/uris.py
+++ b/dracclient/resources/uris.py
@@ -82,5 +82,14 @@ DCIM_RAIDService = ('http://schemas.dell.com/wbem/wscim/1/cim-schema/2/'
DCIM_SystemView = ('http://schemas.dell.com/wbem/wscim/1/cim-schema/2/'
'DCIM_SystemView')
+DCIM_SystemEnumeration = ('http://schemas.dell.com/wbem/wscim/1/cim-schema/2/'
+ 'DCIM_SystemEnumeration')
+
+DCIM_SystemString = ('http://schemas.dell.com/wbem/wscim/1/cim-schema/2/'
+ 'DCIM_SystemString')
+
+DCIM_SystemInteger = ('http://schemas.dell.com/wbem/wscim/1/cim-schema/2/'
+ 'DCIM_SystemInteger')
+
DCIM_VirtualDiskView = ('http://schemas.dell.com/wbem/wscim/1/cim-schema/2/'
'DCIM_VirtualDiskView')
diff --git a/dracclient/tests/test_system.py b/dracclient/tests/test_system.py
new file mode 100644
index 0000000..b48a5ef
--- /dev/null
+++ b/dracclient/tests/test_system.py
@@ -0,0 +1,86 @@
+#
+# 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 system
+from dracclient.resources import uris
+from dracclient.tests import base
+from dracclient.tests import utils as test_utils
+
+
+class ClientSystemConfigurationTestCase(base.BaseTest):
+
+ def setUp(self):
+ super(ClientSystemConfigurationTestCase, self).setUp()
+ self.drac_client = dracclient.client.DRACClient(
+ **test_utils.FAKE_ENDPOINT)
+
+ @requests_mock.Mocker()
+ def test_list_system_settings(self, mock_requests):
+ expected_enum_attr = system.SystemEnumerableAttribute(
+ name='ChassisLEDState',
+ instance_id='System.Embedded.1#ChassisPwrState.1#ChassisLEDState', # noqa
+ read_only=False,
+ current_value='Off',
+ pending_value=None,
+ fqdd='System.Embedded.1',
+ group_id='ChassisPwrState.1',
+ possible_values=['Unknown', 'Blinking', 'Off'])
+ expected_string_attr = system.SystemStringAttribute(
+ name='UserDefinedString',
+ instance_id='System.Embedded.1#LCD.1#UserDefinedString',
+ read_only=False,
+ current_value=None,
+ pending_value=None,
+ fqdd='System.Embedded.1',
+ group_id='LCD.1',
+ min_length=0,
+ max_length=62)
+ expected_integer_attr = system.SystemIntegerAttribute(
+ name='PowerCapValue',
+ instance_id='System.Embedded.1#ServerPwr.1#PowerCapValue',
+ read_only=False,
+ current_value=555,
+ pending_value=None,
+ fqdd='System.Embedded.1',
+ group_id='ServerPwr.1',
+ lower_bound=302,
+ upper_bound=578)
+
+ mock_requests.post('https://1.2.3.4:443/wsman', [
+ {'text': test_utils.SystemEnumerations[
+ uris.DCIM_SystemEnumeration]['ok']},
+ {'text': test_utils.SystemEnumerations[
+ uris.DCIM_SystemString]['ok']},
+ {'text': test_utils.SystemEnumerations[
+ uris.DCIM_SystemInteger]['ok']}])
+
+ system_settings = self.drac_client.list_system_settings()
+
+ self.assertEqual(44, len(system_settings))
+ # enumerable attribute
+ self.assertIn('System.Embedded.1#ChassisPwrState.1#ChassisLEDState',
+ system_settings)
+ self.assertEqual(expected_enum_attr, system_settings[
+ 'System.Embedded.1#ChassisPwrState.1#ChassisLEDState']) # noqa
+ # string attribute
+ self.assertIn('System.Embedded.1#LCD.1#UserDefinedString',
+ system_settings)
+ self.assertEqual(expected_string_attr, system_settings[
+ 'System.Embedded.1#LCD.1#UserDefinedString'])
+ self.assertIn('System.Embedded.1#ServerPwr.1#PowerCapValue',
+ system_settings)
+ self.assertEqual(expected_integer_attr,
+ system_settings['System.Embedded.1#ServerPwr.1#PowerCapValue']) # noqa
diff --git a/dracclient/tests/utils.py b/dracclient/tests/utils.py
index e7ebad8..e82e944 100644
--- a/dracclient/tests/utils.py
+++ b/dracclient/tests/utils.py
@@ -29,7 +29,7 @@ def load_wsman_xml(name):
"""Helper function to load a WSMan XML response from a file."""
with open(os.path.join(os.path.dirname(__file__), 'wsman_mocks',
- '%s.xml' % name), 'r') as f:
+ '%s.xml' % name), 'r') as f:
xml_body = f.read()
return xml_body
@@ -203,3 +203,15 @@ RAIDInvocations = {
}
}
}
+
+SystemEnumerations = {
+ uris.DCIM_SystemEnumeration: {
+ 'ok': load_wsman_xml('system_enumeration-enum-ok'),
+ },
+ uris.DCIM_SystemString: {
+ 'ok': load_wsman_xml('system_string-enum-ok'),
+ },
+ uris.DCIM_SystemInteger: {
+ 'ok': load_wsman_xml('system_integer-enum-ok'),
+ }
+}
diff --git a/dracclient/tests/wsman_mocks/system_enumeration-enum-ok.xml b/dracclient/tests/wsman_mocks/system_enumeration-enum-ok.xml
new file mode 100644
index 0000000..a790951
--- /dev/null
+++ b/dracclient/tests/wsman_mocks/system_enumeration-enum-ok.xml
@@ -0,0 +1,294 @@
+
+
+ http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
+ http://schemas.xmlsoap.org/ws/2004/09/enumeration/EnumerateResponse
+ uuid:f150770f-b5b7-4b08-9572-b5225e7c668b
+ uuid:7c41ce96-41ee-11ee-a839-de7e4e771814
+
+
+
+
+
+ Power Cap Setting
+ PowerCapSetting
+ Disabled
+ Disabled
+
+ 1401
+ System.Embedded.1
+ Server Power
+ ServerPwr.1
+ System.Embedded.1#ServerPwr.1#PowerCapSetting
+ false
+
+ Enabled
+ Disabled
+
+
+ Power Supply Redundancy Policy
+ PSRedPolicy
+ Input Power Redundant
+ Not Redundant
+
+ 1405
+ System.Embedded.1
+ Server Power
+ ServerPwr.1
+ System.Embedded.1#ServerPwr.1#PSRedPolicy
+ false
+
+ Not Redundant
+ Input Power Redundant
+
+
+ Power Supply PFC Enable
+ PSPFCEnabled
+ Disabled
+ Disabled
+
+ 1406
+ System.Embedded.1
+ Server Power
+ ServerPwr.1
+ System.Embedded.1#ServerPwr.1#PSPFCEnabled
+ false
+
+ Enabled
+ Disabled
+
+
+ Power Supply Rapid On Enable
+ PSRapidOn
+ Disabled
+ Enabled
+
+ 1408
+ System.Embedded.1
+ Server Power
+ ServerPwr.1
+ System.Embedded.1#ServerPwr.1#PSRapidOn
+ false
+
+ Enabled
+ Disabled
+
+
+ Rapid on Primary PSU
+ RapidOnPrimaryPSU
+ PSU1
+ PSU1
+
+ 1411
+ System.Embedded.1
+ Server Power
+ ServerPwr.1
+ System.Embedded.1#ServerPwr.1#RapidOnPrimaryPSU
+ false
+
+ PSU1
+ PSU2
+
+
+ LCD Configuration
+ Configuration
+ Service Tag
+ Service Tag
+
+ 1432
+ System.Embedded.1
+ LCD
+ LCD.1
+ System.Embedded.1#LCD.1#Configuration
+ false
+
+ User Defined
+ Model Name
+ None
+ iDRAC IPv4 Address
+ iDRAC MAC Address
+ OS System Name
+ Service Tag
+ IPv6 Address
+ Ambient Temperature
+ System Watts
+ Asset Tag
+
+
+ vConsole Indication
+ vConsoleIndication
+ Disabled
+ Disabled
+
+ 1434
+ System.Embedded.1
+ LCD
+ LCD.1
+ System.Embedded.1#LCD.1#vConsoleIndication
+ false
+
+ Enabled
+ Disabled
+
+
+ System Watt Qualifier
+ QualifierWatt
+ Watts
+ Watts
+
+ 1435
+ System.Embedded.1
+ LCD
+ LCD.1
+ System.Embedded.1#LCD.1#QualifierWatt
+ false
+
+ Watts
+ BTU/hr
+
+
+ Ambient Temperature Qualifier
+ QualifierTemp
+ F
+ C
+
+ 1436
+ System.Embedded.1
+ LCD
+ LCD.1
+ System.Embedded.1#LCD.1#QualifierTemp
+ false
+
+ C
+ F
+
+
+ Fresh Air Compliant Configuration
+ FreshAirCompliantConfiguration
+ Yes
+ Yes
+
+ 1441
+ System.Embedded.1
+ Thermal Configuration
+ ThermalConfig.1
+ System.Embedded.1#ThermalConfig.1#FreshAirCompliantConfiguration
+ true
+
+ Not Applicable
+ Yes
+ No
+
+
+ Thermal Profile
+ ThermalProfile
+ Maximum Performance
+ Default Thermal Profile Settings
+
+ 1470
+ System.Embedded.1
+ Thermal Settings
+ ThermalSettings.1
+ System.Embedded.1#ThermalSettings.1#ThermalProfile
+ false
+
+ Default Thermal Profile Settings
+ Maximum Performance
+ Minimum Power
+
+
+ Fan Speed Offset
+ FanSpeedOffset
+ Off
+ Off
+
+ 1472
+ System.Embedded.1
+ Thermal Settings
+ ThermalSettings.1
+ System.Embedded.1#ThermalSettings.1#FanSpeedOffset
+ false
+
+ Off
+ Low Fan Speed
+ High Fan Speed
+ Medium Fan Speed
+ Max Fan Speed
+
+
+ Fan Speed Response for Third-Party PCI Cards
+ ThirdPartyPCIFanResponse
+ Enabled
+ Enabled
+
+ 1480
+ System.Embedded.1
+ Thermal Settings
+ ThermalSettings.1
+ System.Embedded.1#ThermalSettings.1#ThirdPartyPCIFanResponse
+ false
+
+ Disabled
+ Enabled
+
+
+ Quick Sync Presence
+ Presence
+ Not Supported
+ Not Supported
+
+ 2300
+ System.Embedded.1
+ Quick Sync
+ QuickSync.1
+ System.Embedded.1#QuickSync.1#Presence
+ true
+
+ Not Supported
+ Absent
+ Present
+
+
+ Backplane Bus Mode
+ BackplaneBusMode
+ I2C
+ Unknown
+
+ 2330
+ System.Embedded.1
+ Backplane
+ Backplane.1
+ System.Embedded.1#Backplane.1#BackplaneBusMode
+ true
+
+ Unknown
+ I2C
+ SGPIO
+
+
+ LED State
+ ChassisLEDState
+ Off
+ Unknown
+
+ 2372
+ System.Embedded.1
+ Powerstate
+ ChassisPwrState.1
+ System.Embedded.1#ChassisPwrState.1#ChassisLEDState
+ false
+
+ Unknown
+ Blinking
+ Off
+
+
+
+
+
+
+
diff --git a/dracclient/tests/wsman_mocks/system_integer-enum-ok.xml b/dracclient/tests/wsman_mocks/system_integer-enum-ok.xml
new file mode 100644
index 0000000..5d6efaa
--- /dev/null
+++ b/dracclient/tests/wsman_mocks/system_integer-enum-ok.xml
@@ -0,0 +1,277 @@
+
+
+ http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
+ http://schemas.xmlsoap.org/ws/2004/09/enumeration/EnumerateResponse
+ uuid:9ce6b8f8-cd0e-4994-8db6-758ef8da9d8c
+ uuid:7c9354bc-41ee-11ee-a83d-de7e4e771814
+
+
+
+
+
+ Power Cap Value
+ PowerCapValue
+ 555
+ 32767
+
+ 1402
+ System.Embedded.1
+ Server Power
+ ServerPwr.1
+ System.Embedded.1#ServerPwr.1#PowerCapValue
+ false
+ 302
+
+ 578
+
+
+ Power Cap Max Threshold
+ PowerCapMaxThres
+ 578
+ 0
+
+ 1403
+ System.Embedded.1
+ Server Power
+ ServerPwr.1
+ System.Embedded.1#ServerPwr.1#PowerCapMaxThres
+ true
+
+
+
+
+
+ Power Cap Min Threshold
+ PowerCapMinThres
+ 302
+ 0
+
+ 1404
+ System.Embedded.1
+ Server Power
+ ServerPwr.1
+ System.Embedded.1#ServerPwr.1#PowerCapMinThres
+ true
+
+
+
+
+
+ Active Power Cap Value
+ ActivePowerCapVal
+ 555
+ 32767
+
+ 1409
+ System.Embedded.1
+ Server Power
+ ServerPwr.1
+ System.Embedded.1#ServerPwr.1#ActivePowerCapVal
+ true
+ 302
+
+ 578
+
+
+ Rack Slot
+ RackSlot
+ 1
+ 1
+
+ 1424
+ System.Embedded.1
+ Server Topology
+ ServerTopology.1
+ System.Embedded.1#ServerTopology.1#RackSlot
+ false
+ 1
+
+ 255
+
+
+ Size of Managed System in U
+ SizeOfManagedSystemInU
+ 1
+ 0
+
+ 1425
+ System.Embedded.1
+ Server Topology
+ ServerTopology.1
+ System.Embedded.1#ServerTopology.1#SizeOfManagedSystemInU
+ true
+
+
+
+
+
+ Event Generation Interval
+ EventGenerationInterval
+ 30
+ 30
+
+ 1440
+ System.Embedded.1
+ Thermal Configuration
+ ThermalConfig.1
+ System.Embedded.1#ThermalConfig.1#EventGenerationInterval
+ false
+ 0
+
+ 365
+
+
+ Critical Event Generation Interval
+ CriticalEventGenerationInterval
+ 30
+ 30
+
+ 1440
+ System.Embedded.1
+ Thermal Configuration
+ ThermalConfig.1
+ System.Embedded.1#ThermalConfig.1#CriticalEventGenerationInterval
+ false
+ 0
+
+ 365
+
+
+ Server Powered On Time Duration
+ ServerPoweredOnTime
+ 123456
+ 0
+
+ 1453
+ System.Embedded.1
+ Server Operating System
+ ServerOS.1
+ System.Embedded.1#ServerOS.1#ServerPoweredOnTime
+ true
+
+
+
+
+
+ Minimum Fan Speed
+ MinimumFanSpeed
+ 255
+ 0
+
+ 1473
+ System.Embedded.1
+ Thermal Settings
+ ThermalSettings.1
+ System.Embedded.1#ThermalSettings.1#MinimumFanSpeed
+ false
+ 0
+
+ 65535
+
+
+ MFS Minimum Limit
+ MFSMinimumLimit
+ 9
+ 0
+
+ 1474
+ System.Embedded.1
+ Thermal Settings
+ ThermalSettings.1
+ System.Embedded.1#ThermalSettings.1#MFSMinimumLimit
+ true
+
+
+
+
+
+ MFS Maximum Limit
+ MFSMaximumLimit
+ 100
+ 0
+
+ 1475
+ System.Embedded.1
+ Thermal Settings
+ ThermalSettings.1
+ System.Embedded.1#ThermalSettings.1#MFSMaximumLimit
+ true
+
+
+
+
+
+ Fan Speed Low Offset Value
+ FanSpeedLowOffsetVal
+ 35
+ 0
+
+ 1476
+ System.Embedded.1
+ Thermal Settings
+ ThermalSettings.1
+ System.Embedded.1#ThermalSettings.1#FanSpeedLowOffsetVal
+ true
+
+
+
+
+
+ Fan Speed Medium Offset Value
+ FanSpeedMediumOffsetVal
+ 50
+ 0
+
+ 1477
+ System.Embedded.1
+ Thermal Settings
+ ThermalSettings.1
+ System.Embedded.1#ThermalSettings.1#FanSpeedMediumOffsetVal
+ true
+
+
+
+
+
+ Fan Speed High Offset Value
+ FanSpeedHighOffsetVal
+ 55
+ 0
+
+ 1478
+ System.Embedded.1
+ Thermal Settings
+ ThermalSettings.1
+ System.Embedded.1#ThermalSettings.1#FanSpeedHighOffsetVal
+ true
+
+
+
+
+
+ Fan Speed Maximum Offset Value
+ FanSpeedMaxOffsetVal
+ 100
+ 0
+
+ 1479
+ System.Embedded.1
+ Thermal Settings
+ ThermalSettings.1
+ System.Embedded.1#ThermalSettings.1#FanSpeedMaxOffsetVal
+ true
+
+
+
+
+
+
+
+
+
+
diff --git a/dracclient/tests/wsman_mocks/system_string-enum-ok.xml b/dracclient/tests/wsman_mocks/system_string-enum-ok.xml
new file mode 100644
index 0000000..8086367
--- /dev/null
+++ b/dracclient/tests/wsman_mocks/system_string-enum-ok.xml
@@ -0,0 +1,213 @@
+
+
+ http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
+ http://schemas.xmlsoap.org/ws/2004/09/enumeration/EnumerateResponse
+ uuid:2c1819b5-9c87-44ee-bde1-88e43cd73edd
+ uuid:7c734ea8-41ee-11ee-a83b-de7e4e771814
+
+
+
+
+
+ Active Power Cap Policy Name
+ ActivePolicyName
+ iDRAC
+
+
+ 1410
+ System.Embedded.1
+ Server Power
+ ServerPwr.1
+ System.Embedded.1#ServerPwr.1#ActivePolicyName
+ true
+ 128
+ 0
+
+
+
+ Data Center Name
+ DataCenterName
+
+
+
+ 1421
+ System.Embedded.1
+ Server Topology
+ ServerTopology.1
+ System.Embedded.1#ServerTopology.1#DataCenterName
+ false
+ 128
+ 0
+
+
+
+ Aisle Name
+ AisleName
+
+
+
+ 1422
+ System.Embedded.1
+ Server Topology
+ ServerTopology.1
+ System.Embedded.1#ServerTopology.1#AisleName
+ false
+ 128
+ 0
+
+
+
+ Rack Name
+ RackName
+
+
+
+ 1423
+ System.Embedded.1
+ Server Topology
+ ServerTopology.1
+ System.Embedded.1#ServerTopology.1#RackName
+ false
+ 128
+ 0
+
+
+
+ Room Name
+ RoomName
+
+
+
+ 1428
+ System.Embedded.1
+ Server Topology
+ ServerTopology.1
+ System.Embedded.1#ServerTopology.1#RoomName
+ false
+ 128
+ 0
+
+
+
+ Current LCD Display String
+ CurrentDisplay
+ ST: 1234567
+
+
+ 1431
+ System.Embedded.1
+ LCD
+ LCD.1
+ System.Embedded.1#LCD.1#CurrentDisplay
+ true
+ 62
+ 0
+
+
+
+ User Defined String for LCD
+ UserDefinedString
+
+
+
+ 1433
+ System.Embedded.1
+ LCD
+ LCD.1
+ System.Embedded.1#LCD.1#UserDefinedString
+ false
+ 62
+ 0
+
+
+
+ Host Name
+ HostName
+ test-host1-1-dc.ops.domain.net
+
+
+ 1450
+ System.Embedded.1
+ Server Operating System
+ ServerOS.1
+ System.Embedded.1#ServerOS.1#HostName
+ false
+ 62
+ 0
+
+
+
+ Operating System Name
+ OSName
+ CentOS
+
+
+ 1451
+ System.Embedded.1
+ Server Operating System
+ ServerOS.1
+ System.Embedded.1#ServerOS.1#OSName
+ false
+ 62
+ 0
+
+
+
+ Operating System Version
+ OSVersion
+ release 6.8 (Final) Kernel 2.6.32-642.3.1.el6.x86_64 (x86_64)
+
+
+ 1452
+ System.Embedded.1
+ Server Operating System
+ ServerOS.1
+ System.Embedded.1#ServerOS.1#OSVersion
+ true
+ 62
+ 0
+
+
+
+ OEM Operating System Version
+ OEMOSVersion
+ release 6.8 (Final) Kernel 2.6.32-642.3.1.el6.x86_64 (x86_64)
+
+
+ 1454
+ System.Embedded.1
+ Server Operating System
+ ServerOS.1
+ System.Embedded.1#ServerOS.1#OEMOSVersion
+ true
+ 62
+ 0
+
+
+
+ OS App Collection Time
+ OSAppCollectionTime
+ N/A
+
+
+ 2310
+ System.Embedded.1
+ Server Information
+ Diagnostics.1
+ System.Embedded.1#Diagnostics.1#OSAppCollectionTime
+ true
+ 64
+ 0
+
+
+
+
+
+
+
+