From 8836c0dedf5d3083297cae681b42c9aff609ab9f Mon Sep 17 00:00:00 2001 From: Mark Beierl Date: Fri, 27 Jul 2018 15:48:07 -0400 Subject: [PATCH] Add support for NIC configuration Adds APIs that support listing and setting NIC attributes by name. Change-Id: Ie836a3603b6bb49e3f296c10147d58ae745c3f6b Co-Authored-By: Richard G. Pioso --- dracclient/client.py | 71 +- dracclient/resources/inventory.py | 7 +- dracclient/resources/nic.py | 378 ++++++ dracclient/resources/uris.py | 12 + dracclient/tests/test_nic.py | 491 +++++++ dracclient/tests/utils.py | 26 + .../wsman_mocks/nic_enumeration-enum-ok.xml | 767 +++++++++++ .../tests/wsman_mocks/nic_integer-enum-ok.xml | 298 +++++ ...ic_service-invoke-set_attributes-error.xml | 22 + .../nic_service-invoke-set_attributes-ok.xml | 23 + .../wsman_mocks/nic_string-enum-colliding.xml | 1185 +++++++++++++++++ .../tests/wsman_mocks/nic_string-enum-ok.xml | 1185 +++++++++++++++++ 12 files changed, 4461 insertions(+), 4 deletions(-) create mode 100644 dracclient/resources/nic.py create mode 100644 dracclient/tests/test_nic.py create mode 100644 dracclient/tests/wsman_mocks/nic_enumeration-enum-ok.xml create mode 100644 dracclient/tests/wsman_mocks/nic_integer-enum-ok.xml create mode 100644 dracclient/tests/wsman_mocks/nic_service-invoke-set_attributes-error.xml create mode 100644 dracclient/tests/wsman_mocks/nic_service-invoke-set_attributes-ok.xml create mode 100644 dracclient/tests/wsman_mocks/nic_string-enum-colliding.xml create mode 100644 dracclient/tests/wsman_mocks/nic_string-enum-ok.xml diff --git a/dracclient/client.py b/dracclient/client.py index f3ff34f..3120920 100644 --- a/dracclient/client.py +++ b/dracclient/client.py @@ -25,6 +25,7 @@ from dracclient.resources import idrac_card from dracclient.resources import inventory from dracclient.resources import job from dracclient.resources import lifecycle_controller +from dracclient.resources import nic from dracclient.resources import raid from dracclient.resources import system from dracclient.resources import uris @@ -78,6 +79,7 @@ class DRACClient(object): self._raid_mgmt = raid.RAIDManagement(self.client) self._system_cfg = system.SystemConfiguration(self.client) self._inventory_mgmt = inventory.InventoryManagement(self.client) + self._nic_cfg = nic.NICConfiguration(self.client) def get_power_state(self): """Returns the current power state of the node @@ -389,6 +391,33 @@ class DRACClient(object): reboot=reboot, start_time=start_time) + def create_nic_config_job( + self, + nic_id, + reboot=False, + start_time='TIME_NOW'): + """Creates config job for applying pending changes to a NIC. + + :param nic_id: id of the network interface controller (NIC) + :param reboot: indication of whether to also create a reboot job + :param start_time: start time for job execution in format + yyyymmddhhmmss; the string 'TIME_NOW' means + immediately and None means unspecified + :returns: id of the created configuration job + :raises: WSManRequestFailure on request failures + :raises: WSManInvalidResponse when receiving invalid response + :raises: DRACOperationFailed on error reported back by the iDRAC + interface + :raises: DRACUnexpectedReturnValue on return value mismatch + """ + return self._job_mgmt.create_config_job( + resource_uri=uris.DCIM_NICService, + cim_creation_class_name='DCIM_NICService', + cim_name='DCIM:NICService', + target=nic_id, + reboot=reboot, + start_time=start_time) + def create_reboot_job(self, reboot_type='graceful_reboot_with_forced_shutdown'): """Creates a reboot job. @@ -704,9 +733,10 @@ class DRACClient(object): return self._inventory_mgmt.list_memory() - def list_nics(self): + def list_nics(self, sort=False): """Returns a list of NICs + :param sort: indicates if the list should be sorted or not. :returns: a list of NIC objects :raises: WSManRequestFailure on request failures :raises: WSManInvalidResponse when receiving invalid response @@ -714,7 +744,44 @@ class DRACClient(object): interface """ - return self._inventory_mgmt.list_nics() + return self._inventory_mgmt.list_nics(sort=sort) + + def list_nic_settings(self, nic_id): + """Return the list of attribute settings of a NIC. + + :param nic_id: id of the network interface controller (NIC) + :returns: dictionary containing the NIC settings. The keys are + attribute names. Each value is a + NICEnumerationAttribute, NICIntegerAttribute, or + NICStringAttribute object. + :raises: WSManRequestFailure on request failures + :raises: WSManInvalidResponse when receiving invalid response + :raises: DRACOperationFailed on error reported back by the iDRAC + interface + """ + return self._nic_cfg.list_nic_settings(nic_id) + + def set_nic_settings(self, nic_id, settings): + """Modify one or more settings of a NIC. + + If successful, the pending values of the attributes are set. For + the new values to be applied, a configuration job must be + created and the node must be rebooted. + + :param nic_id: id of the network interface controller (NIC) + :param settings: dictionary containing the proposed values, with + each key being the name of an attribute and the + value being the proposed value + :returns: dictionary containing a 'commit_required' key with a + boolean value indicating whether a configuration job + must be created for the new settings to be applied + :raises: WSManRequestFailure on request failures + :raises: WSManInvalidResponse when receiving invalid response + :raises: DRACOperationFailed on error reported back by the iDRAC + interface + :raises: InvalidParameterValue on invalid NIC attribute + """ + return self._nic_cfg.set_nic_settings(nic_id, settings) def is_idrac_ready(self): """Indicates if the iDRAC is ready to accept commands diff --git a/dracclient/resources/inventory.py b/dracclient/resources/inventory.py index 4ce4eae..ad223df 100644 --- a/dracclient/resources/inventory.py +++ b/dracclient/resources/inventory.py @@ -138,7 +138,7 @@ class InventoryManagement(object): return utils.get_wsman_resource_attr(memory, uris.DCIM_MemoryView, attr_name) - def list_nics(self): + def list_nics(self, sort=False): """Returns the list of NICs :returns: a list of NIC objects @@ -151,8 +151,11 @@ class InventoryManagement(object): doc = self.client.enumerate(uris.DCIM_NICView) drac_nics = utils.find_xml(doc, 'DCIM_NICView', uris.DCIM_NICView, find_all=True) + nics = [self._parse_drac_nic(nic) for nic in drac_nics] + if sort: + nics.sort(key=lambda nic: nic.id) - return [self._parse_drac_nic(nic) for nic in drac_nics] + return nics def _parse_drac_nic(self, drac_nic): fqdd = self._get_nic_attr(drac_nic, 'FQDD') diff --git a/dracclient/resources/nic.py b/dracclient/resources/nic.py new file mode 100644 index 0000000..bf8f292 --- /dev/null +++ b/dracclient/resources/nic.py @@ -0,0 +1,378 @@ +# Copyright (c) 2016-2018 Dell Inc. or its subsidiaries. +# +# 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 logging +import re + +import dracclient.utils as utils + +from dracclient.resources import uris + +LOG = logging.getLogger(__name__) + + +class NICAttribute(object): + """Generic NIC attribute class""" + + def __init__(self, name, instance_id, current_value, pending_value, + read_only, fqdd): + """Construct a NICAttribute object. + + :param name: name of the NIC attribute + :param instance_id: opaque and unique identifier of the BIOS attribute + :param current_value: current value of the NIC attribute + :param pending_value: pending value of the NIC attribute, reflecting + an unprocessed change (eg. config job not completed) + :param read_only: indicates whether this NIC attribute can be changed + :param fqdd: Fully Qualified Device Description of the NICCard + 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 + + def __eq__(self, other): + return self.__dict__ == other.__dict__ + + @classmethod + def parse(cls, namespace, nic_attr_xml): + """Parses XML and creates a NICAttribute object.""" + + name = utils.get_wsman_resource_attr(nic_attr_xml, + namespace, + 'AttributeName') + instance_id = utils.get_wsman_resource_attr(nic_attr_xml, + namespace, + 'InstanceID') + current_value = utils.get_wsman_resource_attr(nic_attr_xml, + namespace, + 'CurrentValue', + nullable=True) + pending_value = utils.get_wsman_resource_attr(nic_attr_xml, + namespace, + 'PendingValue', + nullable=True) + read_only = utils.get_wsman_resource_attr(nic_attr_xml, + namespace, + 'IsReadOnly') + + fqdd = utils.get_wsman_resource_attr(nic_attr_xml, + namespace, + 'FQDD') + + return cls(name, instance_id, current_value, pending_value, + (read_only == 'true'), fqdd) + + +class NICEnumerationAttribute(NICAttribute): + """Enumeration NIC attribute class""" + + namespace = uris.DCIM_NICEnumeration + + def __init__(self, + name, + instance_id, + current_value, + pending_value, + read_only, + fqdd, + possible_values): + """Construct a NICEnumerationAttribute object. + + :param name: name of the NIC attribute + :param instance_id: opaque and unique identifier of the BIOS attribute + :param current_value: current value of the NIC attribute + :param pending_value: pending value of the NIC attribute, reflecting + an unprocessed change (eg. config job not completed) + :param read_only: indicates whether this NIC attribute can be changed + :param fqdd: Fully Qualified Device Description of the NICCard + Attribute + :param possible_values: list containing the allowed values for the NIC + attribute + """ + super(NICEnumerationAttribute, self).__init__(name, + instance_id, + current_value, + pending_value, + read_only, + fqdd) + self.possible_values = possible_values + + @classmethod + def parse(cls, nic_attr_xml): + """Parse XML and create a NICEnumerationAttribute object.""" + + nic_attr = NICAttribute.parse(cls.namespace, nic_attr_xml) + possible_values = [attr.text for attr + in utils.find_xml(nic_attr_xml, + 'PossibleValues', + cls.namespace, + find_all=True)] + + return cls(nic_attr.name, + nic_attr.instance_id, + nic_attr.current_value, + nic_attr.pending_value, + nic_attr.read_only, + nic_attr.fqdd, + possible_values) + + def validate(self, value): + """Validate new value.""" + + if str(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': value, + 'possible_values': self.possible_values} + return msg + + return None + + +class NICStringAttribute(NICAttribute): + """String NIC attribute class.""" + + namespace = uris.DCIM_NICString + + def __init__(self, + name, + instance_id, + current_value, + pending_value, + read_only, + fqdd, + min_length, + max_length, + pcre_regex): + """Construct a NICStringAttribute object. + + :param name: name of the NIC attribute + :param instance_id: opaque and unique identifier of the BIOS attribute + :param current_value: current value of the NIC attribute + :param pending_value: pending value of the NIC attribute, reflecting + an unprocessed change (eg. config job not completed) + :param read_only: indicates whether this NIC attribute can be changed + :param fqdd: Fully Qualified Device Description of the NICCard + Attribute + :param min_length: minimum length of the string + :param max_length: maximum length of the string + :param pcre_regex: is a PCRE compatible regular expression that the + string must match + """ + super(NICStringAttribute, self).__init__(name, + instance_id, + current_value, + pending_value, + read_only, + fqdd) + self.min_length = min_length + self.max_length = max_length + self.pcre_regex = pcre_regex + + @classmethod + def parse(cls, nic_attr_xml): + """Parse XML and create a NICStringAttribute object.""" + + nic_attr = NICAttribute.parse(cls.namespace, nic_attr_xml) + min_length = int(utils.get_wsman_resource_attr(nic_attr_xml, + cls.namespace, + 'MinLength')) + max_length = int(utils.get_wsman_resource_attr(nic_attr_xml, + cls.namespace, + 'MaxLength')) + pcre_regex = utils.get_wsman_resource_attr(nic_attr_xml, + cls.namespace, + 'ValueExpression', + nullable=True) + + return cls(nic_attr.name, + nic_attr.instance_id, + nic_attr.current_value, + nic_attr.pending_value, + nic_attr.read_only, + nic_attr.fqdd, + min_length, + max_length, + pcre_regex) + + def validate(self, value): + """Validate new value.""" + + if self.pcre_regex is not None: + regex = re.compile(self.pcre_regex) + + if regex.search(str(value)) is None: + msg = ("Attribute '%(attr)s' cannot be set to value '%(val)s.'" + " It must match regex '%(re)s'.") % { + 'attr': self.name, + 'val': value, + 're': self.pcre_regex} + return msg + + return None + + +class NICIntegerAttribute(NICAttribute): + """Integer NIC attribute class.""" + + namespace = uris.DCIM_NICInteger + + def __init__(self, + name, + instance_id, + current_value, + pending_value, + read_only, + fqdd, + lower_bound, + upper_bound): + """Construct a NICIntegerAttribute object. + + :param name: name of the NIC attribute + :param instance_id: opaque and unique identifier of the BIOS attribute + :param current_value: current value of the NIC attribute + :param pending_value: pending value of the NIC attribute, reflecting + an unprocessed change (eg. config job not completed) + :param read_only: indicates whether this NIC attribute can be changed + :param fqdd: Fully Qualified Device Description of the NICCard + Attribute + :param lower_bound: minimum value for the NIC attribute + :param upper_bound: maximum value for the NIC attribute + """ + super(NICIntegerAttribute, self).__init__(name, + instance_id, + current_value, + pending_value, + read_only, + fqdd) + self.lower_bound = lower_bound + self.upper_bound = upper_bound + + @classmethod + def parse(cls, nic_attr_xml): + """Parse XML and create a NICIntegerAttribute object.""" + + nic_attr = NICAttribute.parse(cls.namespace, nic_attr_xml) + lower_bound = utils.get_wsman_resource_attr(nic_attr_xml, + cls.namespace, + 'LowerBound') + upper_bound = utils.get_wsman_resource_attr(nic_attr_xml, + cls.namespace, + 'UpperBound') + + if nic_attr.current_value: + nic_attr.current_value = int(nic_attr.current_value) + + if nic_attr.pending_value: + nic_attr.pending_value = int(nic_attr.pending_value) + + return cls(nic_attr.name, + nic_attr.instance_id, + nic_attr.current_value, + nic_attr.pending_value, + nic_attr.read_only, + nic_attr.fqdd, + int(lower_bound), + int(upper_bound)) + + def validate(self, value): + """Validate new value.""" + + val = int(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': value, + 'lower': self.lower_bound, + 'upper': self.upper_bound} + return msg + + return None + + +class NICConfiguration(object): + + NAMESPACES = [(uris.DCIM_NICEnumeration, NICEnumerationAttribute), + (uris.DCIM_NICString, NICStringAttribute), + (uris.DCIM_NICInteger, NICIntegerAttribute)] + + def __init__(self, client): + """Construct a NICConfiguration object. + + :param client: an instance of WSManClient + """ + self.client = client + + def list_nic_settings(self, nic_id): + """Return the list of attribute settings of a NIC. + + :param nic_id: id of the network interface controller (NIC) + :returns: dictionary containing the NIC settings. The keys are + attribute names. Each value is a + NICEnumerationAttribute, NICIntegerAttribute, or + NICStringAttribute object. + :raises: WSManRequestFailure on request failures + :raises: WSManInvalidResponse when receiving invalid response + :raises: DRACOperationFailed on error reported back by the iDRAC + interface + """ + + result = utils.list_settings(self.client, + self.NAMESPACES, + fqdd_filter=nic_id) + + return result + + def set_nic_settings(self, nic_id, new_settings): + """Modify one or more settings of a NIC. + + To be more precise, it sets the pending_value parameter for each of the + attributes passed in. For the values to be applied, a config job may + need to be created and the node may need to be rebooted. + + :param nic_id: id of the network interface controller, + :param new_settings: a dictionary containing the proposed values, with + each key being the name of attribute qualified + with the group ID in the form "group_id#name" and + the value being the proposed value. + :returns: a dictionary containing: + - The is_commit_required key with a boolean value indicating + whether a config job must be created for the values to be + applied. + - The is_reboot_required key with a RebootRequired enumerated + value indicating whether the server must be rebooted for the + values to be applied. Possible values are true and false. + :raises: WSManRequestFailure on request failures + :raises: WSManInvalidResponse when receiving invalid response + :raises: DRACOperationFailed on error reported back by the DRAC + interface + :raises: DRACUnexpectedReturnValue on return value mismatch + :raises: InvalidParameterValue on invalid attribute + """ + + return utils.set_settings('iDRAC Card', + self.client, + self.NAMESPACES, + new_settings, + uris.DCIM_NICService, + "DCIM_NICService", + "DCIM:NICService", + nic_id) diff --git a/dracclient/resources/uris.py b/dracclient/resources/uris.py index 2d16822..b39a14b 100644 --- a/dracclient/resources/uris.py +++ b/dracclient/resources/uris.py @@ -73,6 +73,18 @@ DCIM_LifecycleJob = ('http://schemas.dell.com/wbem/wscim/1/cim-schema/2/' DCIM_MemoryView = ('http://schemas.dell.com/wbem/wscim/1/cim-schema/2/' 'DCIM_MemoryView') +DCIM_NICEnumeration = ('http://schemas.dell.com/wbem/wscim/1/cim-schema/2/' + 'DCIM_NICEnumeration') + +DCIM_NICInteger = ('http://schemas.dell.com/wbem/wscim/1/cim-schema/2/' + 'DCIM_NICInteger') + +DCIM_NICService = ('http://schemas.dell.com/wbem/wscim/1/cim-schema/2/' + 'DCIM_NICService') + +DCIM_NICString = ('http://schemas.dell.com/wbem/wscim/1/cim-schema/2/' + 'DCIM_NICString') + DCIM_NICView = ('http://schemas.dell.com/wbem/wscim/1/cim-schema/2/' 'DCIM_NICView') diff --git a/dracclient/tests/test_nic.py b/dracclient/tests/test_nic.py new file mode 100644 index 0000000..e393d5c --- /dev/null +++ b/dracclient/tests/test_nic.py @@ -0,0 +1,491 @@ +# +# 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 datetime +import lxml.etree +import mock +import re +import requests_mock + +import dracclient.client +from dracclient import constants +from dracclient import exceptions +from dracclient.resources.inventory import NIC +import dracclient.resources.job +from dracclient.resources import nic +from dracclient.resources import uris +from dracclient.tests import base +from dracclient.tests import utils as test_utils + + +@requests_mock.Mocker() +@mock.patch.object(dracclient.client.WSManClient, 'wait_until_idrac_is_ready', + spec_set=True, autospec=True) +class ClientNICTestCase(base.BaseTest): + + def setUp(self): + super(ClientNICTestCase, self).setUp() + self.drac_client = dracclient.client.DRACClient( + **test_utils.FAKE_ENDPOINT) + + def test_list_nics(self, mock_requests, + mock_wait_until_idrac_is_ready): + expected_nics = [ + NIC(id='NIC.Embedded.1-1-1', + mac='B0:83:FE:C6:6F:A1', + model='Broadcom Gigabit Ethernet BCM5720 - B0:83:FE:C6:6F:A1', + speed_mbps=1000, + duplex='full duplex', + media_type='Base T'), + NIC(id='NIC.Slot.2-1-1', + mac='A0:36:9F:52:7D:1E', + model='Intel(R) Gigabit 2P I350-t Adapter - A0:36:9F:52:7D:1E', + speed_mbps=1000, + duplex='full duplex', + media_type='Base T'), + NIC(id='NIC.Slot.2-2-1', + mac='A0:36:9F:52:7D:1F', + model='Intel(R) Gigabit 2P I350-t Adapter - A0:36:9F:52:7D:1F', + speed_mbps=1000, + duplex='full duplex', + media_type='Base T'), + NIC(id='NIC.Embedded.2-1-1', + mac='B0:83:FE:C6:6F:A2', + model='Broadcom Gigabit Ethernet BCM5720 - B0:83:FE:C6:6F:A2', + speed_mbps=1000, + duplex='full duplex', + media_type='Base T') + ] + + mock_requests.post( + 'https://1.2.3.4:443/wsman', + text=test_utils.InventoryEnumerations[uris.DCIM_NICView]['ok']) + + self.assertEqual(expected_nics, self.drac_client.list_nics()) + + def test_list_nics_sorted(self, mock_requests, + mock_wait_until_idrac_is_ready): + expected_nics = [ + NIC(id='NIC.Embedded.1-1-1', + mac='B0:83:FE:C6:6F:A1', + model='Broadcom Gigabit Ethernet BCM5720 - B0:83:FE:C6:6F:A1', + speed_mbps=1000, + duplex='full duplex', + media_type='Base T'), + NIC(id='NIC.Embedded.2-1-1', + mac='B0:83:FE:C6:6F:A2', + model='Broadcom Gigabit Ethernet BCM5720 - B0:83:FE:C6:6F:A2', + speed_mbps=1000, + duplex='full duplex', + media_type='Base T'), + NIC(id='NIC.Slot.2-1-1', + mac='A0:36:9F:52:7D:1E', + model='Intel(R) Gigabit 2P I350-t Adapter - A0:36:9F:52:7D:1E', + speed_mbps=1000, + duplex='full duplex', + media_type='Base T'), + NIC(id='NIC.Slot.2-2-1', + mac='A0:36:9F:52:7D:1F', + model='Intel(R) Gigabit 2P I350-t Adapter - A0:36:9F:52:7D:1F', + speed_mbps=1000, + duplex='full duplex', + media_type='Base T') + ] + + mock_requests.post( + 'https://1.2.3.4:443/wsman', + text=test_utils.InventoryEnumerations[uris.DCIM_NICView]['ok']) + + self.assertEqual(expected_nics, self.drac_client.list_nics(sort=True)) + + def test_list_nic_settings(self, mock_requests, + mock_wait_until_idrac_is_ready): + expected_enum_attr = nic.NICEnumerationAttribute( + name='BootStrapType', + instance_id='NIC.Integrated.1-3-1:BootStrapType', + fqdd='NIC.Integrated.1-3-1', + read_only=False, + current_value='AutoDetect', + pending_value=None, + possible_values=['AutoDetect', 'BBS', 'Int18h', 'Int19h']) + + expected_string_attr = nic.NICStringAttribute( + name='BusDeviceFunction', + instance_id='NIC.Integrated.1-3-1:BusDeviceFunction', + fqdd='NIC.Integrated.1-3-1', + read_only=True, + current_value='02:00:00', + pending_value=None, + min_length=0, + max_length=0, + pcre_regex=None) + + expected_integer_attr = nic.NICIntegerAttribute( + name='BlnkLeds', + instance_id='NIC.Integrated.1-3-1:BlnkLeds', + fqdd='NIC.Integrated.1-3-1', + read_only=False, + current_value=0, + pending_value=None, + lower_bound=0, + upper_bound=15) + + mock_requests.post('https://1.2.3.4:443/wsman', [ + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICEnumeration]['ok']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICString]['ok']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICInteger]['ok']}]) + + nic_settings = self.drac_client.list_nic_settings( + nic_id='NIC.Integrated.1-3-1') + + self.assertEqual(63, len(nic_settings)) + + self.assertIn('BootStrapType', nic_settings) + self.assertEqual(expected_enum_attr, + nic_settings['BootStrapType']) + + self.assertIn('BusDeviceFunction', nic_settings) + self.assertEqual(expected_string_attr, + nic_settings['BusDeviceFunction']) + + self.assertIn('BlnkLeds', nic_settings) + self.assertEqual(expected_integer_attr, + nic_settings['BlnkLeds']) + + def test_list_nic_settings_with_colliding_attrs( + self, mock_requests, mock_wait_until_idrac_is_ready): + mock_requests.post('https://1.2.3.4:443/wsman', [ + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICEnumeration]['ok']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICString]['colliding']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICInteger]['ok']}]) + + self.assertRaises( + exceptions.DRACOperationFailed, + self.drac_client.list_nic_settings, + nic_id='NIC.Integrated.1-3-1') + + @mock.patch.object(dracclient.client.WSManClient, 'invoke', spec_set=True, + autospec=True) + def test_set_nic_settings(self, mock_requests, mock_invoke, + mock_wait_until_idrac_is_ready): + mock_requests.post('https://1.2.3.4:443/wsman', [ + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICEnumeration]['ok']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICString]['ok']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICInteger]['ok']}]) + + expected_selectors = {'CreationClassName': 'DCIM_NICService', + 'Name': 'DCIM:NICService', + 'SystemCreationClassName': 'DCIM_ComputerSystem', + 'SystemName': 'DCIM:ComputerSystem'} + expected_properties = {'Target': 'NIC.Integrated.1-3-1', + 'AttributeValue': ['PXE'], + 'AttributeName': ['LegacyBootProto']} + + mock_invoke.return_value = lxml.etree.fromstring( + test_utils.NICInvocations[uris.DCIM_NICService][ + 'SetAttributes']['ok']) + + result = self.drac_client.set_nic_settings( + nic_id='NIC.Integrated.1-3-1', + settings={'LegacyBootProto': 'PXE'}) + + self.assertEqual({'is_commit_required': True, + 'is_reboot_required': constants.RebootRequired.true}, + result) + + mock_invoke.assert_called_once_with( + mock.ANY, uris.DCIM_NICService, 'SetAttributes', + expected_selectors, expected_properties) + + @mock.patch.object(dracclient.client.WSManClient, 'invoke', spec_set=True, + autospec=True) + def test_set_nic_settings_string(self, mock_requests, mock_invoke, + mock_wait_until_idrac_is_ready): + mock_requests.post('https://1.2.3.4:443/wsman', [ + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICEnumeration]['ok']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICString]['ok']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICInteger]['ok']}]) + + expected_selectors = {'CreationClassName': 'DCIM_NICService', + 'Name': 'DCIM:NICService', + 'SystemCreationClassName': 'DCIM_ComputerSystem', + 'SystemName': 'DCIM:ComputerSystem'} + expected_properties = {'Target': 'NIC.Integrated.1-3-1', + 'AttributeValue': ['D4:AE:52:A5:B1:01'], + 'AttributeName': ['VirtMacAddr']} + + mock_invoke.return_value = lxml.etree.fromstring( + test_utils.NICInvocations[uris.DCIM_NICService][ + 'SetAttributes']['ok']) + + result = self.drac_client.set_nic_settings( + nic_id='NIC.Integrated.1-3-1', + settings={'VirtMacAddr': 'D4:AE:52:A5:B1:01'}) + + self.assertEqual({'is_commit_required': True, + 'is_reboot_required': constants.RebootRequired.true}, + result) + + mock_invoke.assert_called_once_with( + mock.ANY, uris.DCIM_NICService, 'SetAttributes', + expected_selectors, expected_properties) + + @mock.patch.object(dracclient.client.WSManClient, 'invoke', spec_set=True, + autospec=True) + def test_set_nic_settings_integer(self, mock_requests, mock_invoke, + mock_wait_until_idrac_is_ready): + mock_requests.post('https://1.2.3.4:443/wsman', [ + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICEnumeration]['ok']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICString]['ok']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICInteger]['ok']}]) + + expected_selectors = {'CreationClassName': 'DCIM_NICService', + 'Name': 'DCIM:NICService', + 'SystemCreationClassName': 'DCIM_ComputerSystem', + 'SystemName': 'DCIM:ComputerSystem'} + expected_properties = {'Target': 'NIC.Integrated.1-3-1', + 'AttributeValue': [1], + 'AttributeName': ['SecondTgtBootLun']} + + mock_invoke.return_value = lxml.etree.fromstring( + test_utils.NICInvocations[uris.DCIM_NICService][ + 'SetAttributes']['ok']) + + result = self.drac_client.set_nic_settings( + nic_id='NIC.Integrated.1-3-1', + settings={'SecondTgtBootLun': 1}) + + self.assertEqual({'is_commit_required': True, + 'is_reboot_required': constants.RebootRequired.true}, + result) + + mock_invoke.assert_called_once_with( + mock.ANY, uris.DCIM_NICService, 'SetAttributes', + expected_selectors, expected_properties) + + def test_set_nic_settings_error(self, mock_requests, + mock_wait_until_idrac_is_ready): + mock_requests.post('https://1.2.3.4:443/wsman', [ + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICEnumeration]['ok']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICString]['ok']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICInteger]['ok']}, + {'text': test_utils.NICInvocations[ + uris.DCIM_NICService]['SetAttributes']['error']}]) + + self.assertRaises(exceptions.DRACOperationFailed, + self.drac_client.set_nic_settings, + 'NIC.InvalidTarget', + {'LegacyBootProto': 'PXE'}) + + def test_set_nic_settings_with_unknown_attr( + self, mock_requests, mock_wait_until_idrac_is_ready): + mock_requests.post('https://1.2.3.4:443/wsman', [ + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICEnumeration]['ok']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICString]['ok']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICInteger]['ok']}]) + + self.assertRaises(exceptions.InvalidParameterValue, + self.drac_client.set_nic_settings, + 'NIC.Integrated.1-3-1', + {'foo': 'bar'}) + + def test_set_nic_settings_with_unchanged_attr( + self, mock_requests, mock_wait_until_idrac_is_ready): + mock_requests.post('https://1.2.3.4:443/wsman', [ + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICEnumeration]['ok']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICString]['ok']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICInteger]['ok']}]) + + result = self.drac_client.set_nic_settings( + nic_id='NIC.Integrated.1-3-1', + settings={'LegacyBootProto': 'NONE'}) + + self.assertEqual({'is_commit_required': False, + 'is_reboot_required': + constants.RebootRequired.false}, + result) + + def test_set_nic_settings_with_readonly_attr( + self, mock_requests, mock_wait_until_idrac_is_ready): + expected_message = ( + "Cannot set read-only iDRAC Card attributes: ['LinkStatus'].") + mock_requests.post('https://1.2.3.4:443/wsman', [ + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICEnumeration]['ok']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICString]['ok']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICInteger]['ok']}]) + + self.assertRaisesRegexp( + exceptions.DRACOperationFailed, re.escape(expected_message), + self.drac_client.set_nic_settings, + 'NIC.Integrated.1-3-1', + {'LinkStatus': 'Connected'}) + + def test_set_nic_settings_with_incorrect_enum( + self, mock_requests, mock_wait_until_idrac_is_ready): + expected_message = ( + "Attribute 'LegacyBootProto' cannot be set to value 'foo'. " + "It must be in ['PXE', 'iSCSI', 'NONE'].") + mock_requests.post('https://1.2.3.4:443/wsman', [ + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICEnumeration]['ok']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICString]['ok']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICInteger]['ok']}]) + + self.assertRaisesRegexp( + exceptions.DRACOperationFailed, re.escape(expected_message), + self.drac_client.set_nic_settings, + 'NIC.Integrated.1-3-1', + {'LegacyBootProto': 'foo'}) + + def test_set_nic_settings_with_incorrect_regexp( + self, mock_requests, mock_wait_until_idrac_is_ready): + expected_message = ( + "Attribute 'VirtMacAddr' cannot be set to value 'foo.' " + "It must match regex '^([0-9a-fA-F]{2}:){5}([0-9a-fA-F]{2})$'.") + mock_requests.post('https://1.2.3.4:443/wsman', [ + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICEnumeration]['ok']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICString]['ok']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICInteger]['ok']}]) + + self.assertRaisesRegexp( + exceptions.DRACOperationFailed, re.escape(expected_message), + self.drac_client.set_nic_settings, + 'NIC.Integrated.1-3-1', + {'VirtMacAddr': 'foo'}) + + def test_set_nic_settings_with_out_of_bounds_value( + self, mock_requests, mock_wait_until_idrac_is_ready): + expected_message = ( + "Attribute BannerMessageTimeout cannot be set to value 100. " + "It must be between 0 and 14.") + mock_requests.post('https://1.2.3.4:443/wsman', [ + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICEnumeration]['ok']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICString]['ok']}, + {'text': test_utils.NICEnumerations[ + uris.DCIM_NICInteger]['ok']}]) + + self.assertRaisesRegexp( + exceptions.DRACOperationFailed, re.escape(expected_message), + self.drac_client.set_nic_settings, + 'NIC.Integrated.1-3-1', + {'BannerMessageTimeout': 100}) + + +class ClientNICSettingTestCase(base.BaseTest): + + def setUp(self): + super(ClientNICSettingTestCase, self).setUp() + self.drac_client = dracclient.client.DRACClient( + **test_utils.FAKE_ENDPOINT) + + @mock.patch.object(dracclient.resources.job.JobManagement, + 'create_config_job', spec_set=True, autospec=True) + def test_create_nic_config_job(self, mock_create_config_job): + + nic_id = 'NIC.Embedded.1-1-1' + self.drac_client.create_nic_config_job( + nic_id=nic_id) + + mock_create_config_job.assert_called_once_with( + mock.ANY, resource_uri=uris.DCIM_NICService, + cim_creation_class_name='DCIM_NICService', + cim_name='DCIM:NICService', + target=nic_id, + reboot=False, + start_time='TIME_NOW') + + @mock.patch.object(dracclient.resources.job.JobManagement, + 'create_config_job', spec_set=True, autospec=True) + def test_create_nic_config_job_reboot(self, mock_create_config_job): + + nic_id = 'NIC.Embedded.1-1-1' + self.drac_client.create_nic_config_job( + nic_id=nic_id, + reboot=True) + + mock_create_config_job.assert_called_once_with( + mock.ANY, resource_uri=uris.DCIM_NICService, + cim_creation_class_name='DCIM_NICService', + cim_name='DCIM:NICService', + target=nic_id, + reboot=True, + start_time='TIME_NOW') + + @mock.patch.object(dracclient.resources.job.JobManagement, + 'create_config_job', spec_set=True, autospec=True) + def test_create_nic_config_job_time(self, mock_create_config_job): + + nic_id = 'NIC.Embedded.1-1-1' + timestamp = datetime.datetime.today().strftime('%Y%m%d%H%M%S') + self.drac_client.create_nic_config_job( + nic_id=nic_id, + start_time=timestamp) + + mock_create_config_job.assert_called_once_with( + mock.ANY, resource_uri=uris.DCIM_NICService, + cim_creation_class_name='DCIM_NICService', + cim_name='DCIM:NICService', + target=nic_id, + reboot=False, + start_time=timestamp) + + @mock.patch.object(dracclient.resources.job.JobManagement, + 'create_config_job', spec_set=True, autospec=True) + def test_create_nic_config_job_no_time(self, mock_create_config_job): + + nic_id = 'NIC.Embedded.1-1-1' + self.drac_client.create_nic_config_job( + nic_id=nic_id, + start_time=None) + + mock_create_config_job.assert_called_once_with( + mock.ANY, resource_uri=uris.DCIM_NICService, + cim_creation_class_name='DCIM_NICService', + cim_name='DCIM:NICService', + target=nic_id, + reboot=False, + start_time=None) diff --git a/dracclient/tests/utils.py b/dracclient/tests/utils.py index 8eef943..76ea3f7 100644 --- a/dracclient/tests/utils.py +++ b/dracclient/tests/utils.py @@ -34,6 +34,7 @@ def load_wsman_xml(name): return xml_body + WSManEnumerations = { 'context': [ load_wsman_xml('wsman-enum_context-1'), @@ -178,6 +179,31 @@ LifecycleControllerInvocations = { } } +NICEnumerations = { + uris.DCIM_NICEnumeration: { + 'ok': load_wsman_xml('nic_enumeration-enum-ok'), + }, + uris.DCIM_NICString: { + 'ok': load_wsman_xml('nic_string-enum-ok'), + # this duplicates the LinkStatus from nic_enumeration-enum-ok + 'colliding': load_wsman_xml('nic_string-enum-colliding'), + }, + uris.DCIM_NICInteger: { + 'ok': load_wsman_xml('nic_integer-enum-ok') + }, +} + +NICInvocations = { + uris.DCIM_NICService: { + 'SetAttributes': { + 'ok': load_wsman_xml( + 'nic_service-invoke-set_attributes-ok'), + 'error': load_wsman_xml( + 'nic_service-invoke-set_attributes-error'), + } + }, +} + RAIDEnumerations = { uris.DCIM_ControllerView: { 'ok': load_wsman_xml('controller_view-enum-ok') diff --git a/dracclient/tests/wsman_mocks/nic_enumeration-enum-ok.xml b/dracclient/tests/wsman_mocks/nic_enumeration-enum-ok.xml new file mode 100644 index 0000000..a6ebf09 --- /dev/null +++ b/dracclient/tests/wsman_mocks/nic_enumeration-enum-ok.xml @@ -0,0 +1,767 @@ + + + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + http://schemas.xmlsoap.org/ws/2004/09/enumeration/EnumerateResponse + + uuid:608d7722-0302-4feb-8080-4652e0e0ab48 + + uuid:07820ac0-71f0-11f0-a4a1-a53ffbd9bed4 + + + + + + + Link Status + LinkStatus + Connected + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:LinkStatus + true + + Disconnected + Connected + Disconnected + + Connected + + + + TCP/IP Parameters via DHCP + + TcpIpViaDHCP + Enabled + IPv6Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-3-1:TcpIpViaDHCP + false + + Disabled + Enabled + Disabled + + Enabled + + + + IP Autoconfiguration + + IpAutoConfig + Enabled + IPv4Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-3-1:IpAutoConfig + true + + Disabled + Enabled + Disabled + + Enabled + + + + iSCSI Parameters via DHCP + + IscsiViaDHCP + Enabled + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-3-1:IscsiViaDHCP + false + + Disabled + Enabled + Disabled + + Enabled + + + + CHAP Authentication + + ChapAuthEnable + Disabled + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-3-1:ChapAuthEnable + false + + Disabled + Enabled + Disabled + + Enabled + + + + Boot to iSCSI Target + + IscsiTgtBoot + Enabled + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-3-1:IscsiTgtBoot + false + + Disabled + Enabled + OneTimeDisabled + Disabled + + Enabled + + One Time Disabled + + + + Use TCP Timestamp + + TcpTimestmp + Disabled + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-3-1:TcpTimestmp + false + + Disabled + Enabled + Disabled + + Enabled + + + + Target as First HDD + + FirstHddTarget + Disabled + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-3-1:FirstHddTarget + false + + Disabled + Enabled + Disabled + + Enabled + + + + IP Version + IpVer + IPv4 + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-3-1:IpVer + false + + IPv4 + IPv6 + IPv4 + IPv6 + + + Connect + ConnectFirstTgt + Disabled + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI First Target Parameters + + IscsiFirstTgtParams + NIC.Integrated.1-3-1:ConnectFirstTgt + false + + Disabled + Enabled + Disabled + + Enabled + + + + Connect + ConnectSecondTgt + Disabled + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Second Target Parameters + + IscsiSecondTgtParams + NIC.Integrated.1-3-1:ConnectSecondTgt + + false + + Disabled + Enabled + Disabled + + Enabled + + + + Legacy Boot Protocol + + LegacyBootProto + PXE + + NIC.Integrated.1-3-1 + MBA Configuration Menu + NICConfig + NIC.Integrated.1-3-1:LegacyBootProto + false + NONE + PXE + iSCSI + NONE + PXE + iSCSI + NONE + + + Boot Strap Type + BootStrapType + AutoDetect + + NIC.Integrated.1-3-1 + MBA Configuration Menu + NICConfig + NIC.Integrated.1-3-1:BootStrapType + false + + AutoDetect + BBS + Int18h + Int19h + Auto Detect + + BBS + Int 18h + + Int 19h + + + + Hide Setup Prompt + + HideSetupPrompt + Disabled + + NIC.Integrated.1-3-1 + MBA Configuration Menu + NICConfig + NIC.Integrated.1-3-1:HideSetupPrompt + false + + Disabled + Enabled + Disabled + + Enabled + + + + Link Speed + LnkSpeed + AutoNeg + + NIC.Integrated.1-3-1 + MBA Configuration Menu + NICConfig + NIC.Integrated.1-3-1:LnkSpeed + false + + AutoNeg + 10MbpsHalf + 10MbpsFull + 100MbpsHalf + 100MbpsFull + AutoNeg + + 10Mbps Half + + 10Mbps Full + + 100Mbps Half + + 100Mbps Full + + + + Pre-boot Wake On LAN + + WakeOnLan + Disabled + + NIC.Integrated.1-3-1 + MBA Configuration Menu + NICConfig + NIC.Integrated.1-3-1:WakeOnLan + false + + Disabled + Enabled + Disabled + + Enabled + + + + VLAN Mode + VLanMode + Disabled + + NIC.Integrated.1-3-1 + MBA Configuration Menu + NICConfig + NIC.Integrated.1-3-1:VLanMode + false + + Disabled + Enabled + Disabled + + Enabled + + + + Use Independent Target Portal + + UseIndTgtPortal + Disabled + Unavailable]]> + NIC.Integrated.1-3-1 + Secondary Device + SecondaryDevice + NIC.Integrated.1-3-1:UseIndTgtPortal + false + + Disabled + Enabled + Disabled + + Enabled + + + + Use Independent Target Name + + UseIndTgtName + Disabled + Unavailable]]> + NIC.Integrated.1-3-1 + Secondary Device + SecondaryDevice + NIC.Integrated.1-3-1:UseIndTgtName + false + + Disabled + Enabled + Disabled + + Enabled + + + + Link Status + LinkStatus + Disconnected + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:LinkStatus + true + + Disconnected + Connected + Disconnected + + Connected + + + + TCP/IP Parameters via DHCP + + TcpIpViaDHCP + Enabled + IPv6Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-4-1:TcpIpViaDHCP + false + + Disabled + Enabled + Disabled + + Enabled + + + + IP Autoconfiguration + + IpAutoConfig + Enabled + IPv4Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-4-1:IpAutoConfig + true + + Disabled + Enabled + Disabled + + Enabled + + + + iSCSI Parameters via DHCP + + IscsiViaDHCP + Enabled + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-4-1:IscsiViaDHCP + false + + Disabled + Enabled + Disabled + + Enabled + + + + CHAP Authentication + + ChapAuthEnable + Disabled + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-4-1:ChapAuthEnable + false + + Disabled + Enabled + Disabled + + Enabled + + + + Boot to iSCSI Target + + IscsiTgtBoot + Enabled + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-4-1:IscsiTgtBoot + false + + Disabled + Enabled + OneTimeDisabled + Disabled + + Enabled + + One Time Disabled + + + + Use TCP Timestamp + + TcpTimestmp + Disabled + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-4-1:TcpTimestmp + false + + Disabled + Enabled + Disabled + + Enabled + + + + Target as First HDD + + FirstHddTarget + Disabled + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-4-1:FirstHddTarget + false + + Disabled + Enabled + Disabled + + Enabled + + + + IP Version + IpVer + IPv4 + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-4-1:IpVer + false + + IPv4 + IPv6 + IPv4 + IPv6 + + + Connect + ConnectFirstTgt + Disabled + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI First Target Parameters + + IscsiFirstTgtParams + NIC.Integrated.1-4-1:ConnectFirstTgt + false + + Disabled + Enabled + Disabled + + Enabled + + + + Connect + ConnectSecondTgt + Disabled + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Second Target Parameters + + IscsiSecondTgtParams + NIC.Integrated.1-4-1:ConnectSecondTgt + + false + + Disabled + Enabled + Disabled + + Enabled + + + + Legacy Boot Protocol + + LegacyBootProto + NONE + + NIC.Integrated.1-4-1 + MBA Configuration Menu + NICConfig + NIC.Integrated.1-4-1:LegacyBootProto + false + + PXE + iSCSI + NONE + PXE + iSCSI + NONE + + + Boot Strap Type + BootStrapType + AutoDetect + + NIC.Integrated.1-4-1 + MBA Configuration Menu + NICConfig + NIC.Integrated.1-4-1:BootStrapType + false + + AutoDetect + BBS + Int18h + Int19h + Auto Detect + + BBS + Int 18h + + Int 19h + + + + Hide Setup Prompt + + HideSetupPrompt + Disabled + + NIC.Integrated.1-4-1 + MBA Configuration Menu + NICConfig + NIC.Integrated.1-4-1:HideSetupPrompt + false + + Disabled + Enabled + Disabled + + Enabled + + + + Link Speed + LnkSpeed + AutoNeg + + NIC.Integrated.1-4-1 + MBA Configuration Menu + NICConfig + NIC.Integrated.1-4-1:LnkSpeed + false + + AutoNeg + 10MbpsHalf + 10MbpsFull + 100MbpsHalf + 100MbpsFull + AutoNeg + + 10Mbps Half + + 10Mbps Full + + 100Mbps Half + + 100Mbps Full + + + + Pre-boot Wake On LAN + + WakeOnLan + Disabled + + NIC.Integrated.1-4-1 + MBA Configuration Menu + NICConfig + NIC.Integrated.1-4-1:WakeOnLan + false + + Disabled + Enabled + Disabled + + Enabled + + + + VLAN Mode + VLanMode + Disabled + + NIC.Integrated.1-4-1 + MBA Configuration Menu + NICConfig + NIC.Integrated.1-4-1:VLanMode + false + + Disabled + Enabled + Disabled + + Enabled + + + + Use Independent Target Portal + + UseIndTgtPortal + Disabled + Unavailable]]> + NIC.Integrated.1-4-1 + Secondary Device + SecondaryDevice + NIC.Integrated.1-4-1:UseIndTgtPortal + false + + Disabled + Enabled + Disabled + + Enabled + + + + Use Independent Target Name + + UseIndTgtName + Disabled + Unavailable]]> + NIC.Integrated.1-4-1 + Secondary Device + SecondaryDevice + NIC.Integrated.1-4-1:UseIndTgtName + false + + Disabled + Enabled + Disabled + + Enabled + + + + + + \ No newline at end of file diff --git a/dracclient/tests/wsman_mocks/nic_integer-enum-ok.xml b/dracclient/tests/wsman_mocks/nic_integer-enum-ok.xml new file mode 100644 index 0000000..b61485b --- /dev/null +++ b/dracclient/tests/wsman_mocks/nic_integer-enum-ok.xml @@ -0,0 +1,298 @@ + + + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + http://schemas.xmlsoap.org/ws/2004/09/enumeration/EnumerateResponse + + uuid:b37882c2-0355-4b03-b3b8-1cb69bf00a74 + + uuid:8473faf6-71f0-11f0-a53f-a53ffbd9bed4 + + + + + + + Blink LEDs + BlnkLeds + 0 + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:BlnkLeds + false + 0 + + 15 + + + Link Up Delay Time + + LnkUpDelayTime + 0 + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-3-1:LnkUpDelayTime + false + 0 + + 255 + + + LUN Busy Retry Count + + LunBusyRetryCnt + 0 + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-3-1:LunBusyRetryCnt + false + 0 + + 60 + + + TCP Port + FirstTgtTcpPort + 3260 + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI First Target Parameters + + IscsiFirstTgtParams + NIC.Integrated.1-3-1:FirstTgtTcpPort + false + 1 + + 65535 + + + Boot LUN + FirstTgtBootLun + 0 + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI First Target Parameters + + IscsiFirstTgtParams + NIC.Integrated.1-3-1:FirstTgtBootLun + false + 0 + + 255 + + + TCP Port + SecondTgtTcpPort + 3260 + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Second Target Parameters + + IscsiSecondTgtParams + NIC.Integrated.1-3-1:SecondTgtTcpPort + + false + 1 + + 65535 + + + Boot LUN + SecondTgtBootLun + 0 + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Second Target Parameters + + IscsiSecondTgtParams + NIC.Integrated.1-3-1:SecondTgtBootLun + + false + 0 + + 255 + + + Banner Message Timeout + + BannerMessageTimeout + 5 + + NIC.Integrated.1-3-1 + MBA Configuration Menu + NICConfig + NIC.Integrated.1-3-1:BannerMessageTimeout + + false + 0 + + 14 + + + VLAN ID (1..4094) + + VLanId + 1 + Disabled]]> + NIC.Integrated.1-3-1 + MBA Configuration Menu + NICConfig + NIC.Integrated.1-3-1:VLanId + true + 1 + + 4094 + + + Blink LEDs + BlnkLeds + 0 + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:BlnkLeds + false + 0 + + 15 + + + Link Up Delay Time + + LnkUpDelayTime + 0 + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-4-1:LnkUpDelayTime + false + 0 + + 255 + + + LUN Busy Retry Count + + LunBusyRetryCnt + 0 + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-4-1:LunBusyRetryCnt + false + 0 + + 60 + + + TCP Port + FirstTgtTcpPort + 3260 + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI First Target Parameters + + IscsiFirstTgtParams + NIC.Integrated.1-4-1:FirstTgtTcpPort + false + 1 + + 65535 + + + Boot LUN + FirstTgtBootLun + 0 + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI First Target Parameters + + IscsiFirstTgtParams + NIC.Integrated.1-4-1:FirstTgtBootLun + false + 0 + + 255 + + + TCP Port + SecondTgtTcpPort + 3260 + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Second Target Parameters + + IscsiSecondTgtParams + NIC.Integrated.1-4-1:SecondTgtTcpPort + + false + 1 + + 65535 + + + Boot LUN + SecondTgtBootLun + 0 + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Second Target Parameters + + IscsiSecondTgtParams + NIC.Integrated.1-4-1:SecondTgtBootLun + + false + 0 + 2 + + 255 + + + Banner Message Timeout + + BannerMessageTimeout + 5 + + NIC.Integrated.1-4-1 + MBA Configuration Menu + NICConfig + NIC.Integrated.1-4-1:BannerMessageTimeout + + false + 0 + + 14 + + + VLAN ID (1..4094) + + VLanId + 1 + Disabled]]> + NIC.Integrated.1-4-1 + MBA Configuration Menu + NICConfig + NIC.Integrated.1-4-1:VLanId + true + 1 + + 4094 + + + + + \ No newline at end of file diff --git a/dracclient/tests/wsman_mocks/nic_service-invoke-set_attributes-error.xml b/dracclient/tests/wsman_mocks/nic_service-invoke-set_attributes-error.xml new file mode 100644 index 0000000..2d18ed8 --- /dev/null +++ b/dracclient/tests/wsman_mocks/nic_service-invoke-set_attributes-error.xml @@ -0,0 +1,22 @@ + + + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + http://schemas.dell.com/wbem/wscim/1/cim-schema/2/DCIM_NICService/SetAttributesResponse + + uuid:e24aa9e2-28f3-487d-8f69-ab4234a2c9ba + + uuid:d3770d92-7202-1202-b927-a53ffbd9bed4 + + + + + Invalid parameter value for Target + Target + NIC004 + 2 + + + diff --git a/dracclient/tests/wsman_mocks/nic_service-invoke-set_attributes-ok.xml b/dracclient/tests/wsman_mocks/nic_service-invoke-set_attributes-ok.xml new file mode 100644 index 0000000..66ae03f --- /dev/null +++ b/dracclient/tests/wsman_mocks/nic_service-invoke-set_attributes-ok.xml @@ -0,0 +1,23 @@ + + + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + http://schemas.dell.com/wbem/wscim/1/cim-schema/2/DCIM_NICService/SetAttributesResponse + + uuid:bf8adefe-6fc0-456d-b97c-fd8d4aca2d6c + + uuid:84abf7b9-7176-1176-a11c-a53ffbd9bed4 + + + + + The command was successful. + NIC001 + Yes + 0 + Set PendingValue + + + \ No newline at end of file diff --git a/dracclient/tests/wsman_mocks/nic_string-enum-colliding.xml b/dracclient/tests/wsman_mocks/nic_string-enum-colliding.xml new file mode 100644 index 0000000..0aa8268 --- /dev/null +++ b/dracclient/tests/wsman_mocks/nic_string-enum-colliding.xml @@ -0,0 +1,1185 @@ + + + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + http://schemas.xmlsoap.org/ws/2004/09/enumeration/EnumerateResponse + + uuid:48fa32d6-5bdb-4080-a9cb-040fdd600ece + + uuid:66b00908-71f0-11f0-a516-a53ffbd9bed4 + + + + + + + Link Status + LinkStatus + BCM5720 A0 + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:ChipMdl + true + 0 + 0 + + + + + PCI Device ID + PCIDeviceID + 165F + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:PCIDeviceID + true + 0 + 0 + + + + + Bus:Dev:Func + BusDeviceFunction + 02:00:00 + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:BusDeviceFunction + + true + 0 + 0 + + + + + Permanent MAC Address + + MacAddr + D4:AE:52:A5:B1:EA + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:MacAddr + true + 17 + 17 + + + + + Virtual MAC Address + + VirtMacAddr + D4:AE:52:A5:B1:EA + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:VirtMacAddr + false + 17 + 17 + + ^([0-9a-fA-F]{2}:){5}([0-9a-fA-F]{2})$ + + + + FCoE Offload Support + + FCoEOffloadSupport + Unavailable + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:FCoEOffloadSupport + + true + 12 + 0 + + + + + iSCSI Offload Support + + iSCSIOffloadSupport + Unavailable + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:iSCSIOffloadSupport + + true + 12 + 0 + + + + + IBS + iSCSIBootSupport + Available + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:iSCSIBootSupport + + true + 12 + 0 + + + + + PBS + PXEBootSupport + Available + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:PXEBootSupport + true + 12 + 0 + + + + + FBS + FCoEBootSupport + Unavailable + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:FCoEBootSupport + true + 12 + 0 + + + + + NPS + NicPartitioningSupport + Unavailable + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:NicPartitioningSupport + + true + 12 + 0 + + + + + TBMax + TXBandwidthControlMaximum + Unavailable + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:TXBandwidthControlMaximum + + true + 12 + 0 + + + + + TBMin + TXBandwidthControlMinimum + Unavailable + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:TXBandwidthControlMinimum + + true + 12 + 0 + + + + + DHCP Vendor ID + DhcpVendId + BRCM ISAN + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-3-1:DhcpVendId + false + 32 + 0 + + + + + IP Address + IscsiInitiatorIpAddr + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-3-1:IscsiInitiatorIpAddr + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + Subnet Mask + IscsiInitiatorSubnet + 0.0.0.0 + UnavailableIPv6]]> + NIC.Integrated.1-3-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-3-1:IscsiInitiatorSubnet + + false + 15 + 7 + + ^([0-9]{1,3}.){3}[0-9]{1,3}$ + + + + Subnet Mask Prefix + + IscsiInitiatorSubnetPrefix + + UnavailableIPv4]]> + NIC.Integrated.1-3-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-3-1:IscsiInitiatorSubnetPrefix + + true + 3 + 1 + + + + + Default Gateway + IscsiInitiatorGateway + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-3-1:IscsiInitiatorGateway + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + Primary DNS + IscsiInitiatorPrimDns + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-3-1:IscsiInitiatorPrimDns + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + Secondary DNS + IscsiInitiatorSecDns + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-3-1:IscsiInitiatorSecDns + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + iSCSI Name + IscsiInitiatorName + iqn.1995-05.com.broadcom.iscsiboot + + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-3-1:IscsiInitiatorName + + false + 128 + 0 + + ^[-0-9a-zA-Z.:_]{0,128}$ + + + CHAP ID + IscsiInitiatorChapId + + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-3-1:IscsiInitiatorChapId + + false + 128 + 0 + + ^[x20-~]{0,128}$ + + + CHAP Secret + IscsiInitiatorChapPwd + + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-3-1:IscsiInitiatorChapPwd + + false + 16 + 0 + + ^[x20-~]{0,16}$ + + + IP Address + FirstTgtIpAddress + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI First Target Parameters + + IscsiFirstTgtParams + NIC.Integrated.1-3-1:FirstTgtIpAddress + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + iSCSI Name + FirstTgtIscsiName + + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI First Target Parameters + + IscsiFirstTgtParams + NIC.Integrated.1-3-1:FirstTgtIscsiName + + false + 128 + 0 + + ^[-0-9a-zA-Z.:_]{0,128}$ + + + CHAP ID + FirstTgtChapId + + + NIC.Integrated.1-3-1 + iSCSI First Target Parameters + + IscsiFirstTgtParams + NIC.Integrated.1-3-1:FirstTgtChapId + false + 128 + 0 + + ^[x20-~]{0,128}$ + + + CHAP Secret + FirstTgtChapPwd + + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI First Target Parameters + + IscsiFirstTgtParams + NIC.Integrated.1-3-1:FirstTgtChapPwd + false + 16 + 0 + + ^[x20-~]{0,16}$ + + + IP Address + SecondTgtIpAddress + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Second Target Parameters + + IscsiSecondTgtParams + NIC.Integrated.1-3-1:SecondTgtIpAddress + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + iSCSI Name + SecondTgtIscsiName + + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Second Target Parameters + + IscsiSecondTgtParams + NIC.Integrated.1-3-1:SecondTgtIscsiName + + false + 128 + 0 + + ^[-0-9a-zA-Z.:_]{0,128}$ + + + CHAP ID + SecondTgtChapId + + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Second Target Parameters + + IscsiSecondTgtParams + NIC.Integrated.1-3-1:SecondTgtChapId + false + 128 + 0 + + ^[x20-~]{0,128}$ + + + CHAP Secret + SecondTgtChapPwd + + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Second Target Parameters + + IscsiSecondTgtParams + NIC.Integrated.1-3-1:SecondTgtChapPwd + + false + 16 + 0 + + ^[x20-~]{0,16}$ + + + Firmware Family Version + + FamilyVersion + 7.4.8 + + NIC.Integrated.1-3-1 + Firmware Image Menu + FrmwImgMenu + NIC.Integrated.1-3-1:FamilyVersion + true + 20 + 0 + + + + + Bootcode + ControllerBIOSVersion + 1.30 + + NIC.Integrated.1-3-1 + Firmware Image Menu + FrmwImgMenu + NIC.Integrated.1-3-1:ControllerBIOSVersion + + true + 9 + 0 + + + + + EFI + EFIVersion + 15.4.6 + + NIC.Integrated.1-3-1 + Firmware Image Menu + FrmwImgMenu + NIC.Integrated.1-3-1:EFIVersion + true + 9 + 0 + + + + + Secondary Device + SecondaryDeviceMacAddr + 00:00:00:00:00:00 + Unavailable]]> + NIC.Integrated.1-3-1 + Secondary Device + SecondaryDevice + NIC.Integrated.1-3-1:SecondaryDeviceMacAddr + + false + 17 + 17 + + ^([0-9a-fA-F]{2}:){5}([0-9a-fA-F]{2})$ + + + + Chip Type + ChipMdl + BCM5720 A0 + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:ChipMdl + true + 0 + 0 + + + + + PCI Device ID + PCIDeviceID + 165F + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:PCIDeviceID + true + 0 + 0 + + + + + Bus:Dev:Func + BusDeviceFunction + 02:00:01 + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:BusDeviceFunction + + true + 0 + 0 + + + + + Permanent MAC Address + + MacAddr + D4:AE:52:A5:B1:EB + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:MacAddr + true + 17 + 17 + + + + + Virtual MAC Address + + VirtMacAddr + D4:AE:52:A5:B1:EB + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:VirtMacAddr + false + 17 + 17 + + ^([0-9a-fA-F]{2}:){5}([0-9a-fA-F]{2})$ + + + + FCoE Offload Support + + FCoEOffloadSupport + Unavailable + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:FCoEOffloadSupport + + true + 12 + 0 + + + + + iSCSI Offload Support + + iSCSIOffloadSupport + Unavailable + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:iSCSIOffloadSupport + + true + 12 + 0 + + + + + IBS + iSCSIBootSupport + Available + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:iSCSIBootSupport + + true + 12 + 0 + + + + + PBS + PXEBootSupport + Available + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:PXEBootSupport + true + 12 + 0 + + + + + FBS + FCoEBootSupport + Unavailable + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:FCoEBootSupport + true + 12 + 0 + + + + + NPS + NicPartitioningSupport + Unavailable + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:NicPartitioningSupport + + true + 12 + 0 + + + + + TBMax + TXBandwidthControlMaximum + Unavailable + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:TXBandwidthControlMaximum + + true + 12 + 0 + + + + + TBMin + TXBandwidthControlMinimum + Unavailable + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:TXBandwidthControlMinimum + + true + 12 + 0 + + + + + DHCP Vendor ID + DhcpVendId + BRCM ISAN + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-4-1:DhcpVendId + false + 32 + 0 + + + + + IP Address + IscsiInitiatorIpAddr + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-4-1:IscsiInitiatorIpAddr + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + Subnet Mask + IscsiInitiatorSubnet + 0.0.0.0 + UnavailableIPv6]]> + NIC.Integrated.1-4-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-4-1:IscsiInitiatorSubnet + + false + 15 + 7 + + ^([0-9]{1,3}.){3}[0-9]{1,3}$ + + + + Subnet Mask Prefix + + IscsiInitiatorSubnetPrefix + + UnavailableIPv4]]> + NIC.Integrated.1-4-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-4-1:IscsiInitiatorSubnetPrefix + + true + 3 + 1 + + + + + Default Gateway + IscsiInitiatorGateway + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-4-1:IscsiInitiatorGateway + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + Primary DNS + IscsiInitiatorPrimDns + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-4-1:IscsiInitiatorPrimDns + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + Secondary DNS + IscsiInitiatorSecDns + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-4-1:IscsiInitiatorSecDns + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + iSCSI Name + IscsiInitiatorName + iqn.1995-05.com.broadcom.iscsiboot + + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-4-1:IscsiInitiatorName + + false + 128 + 0 + + ^[-0-9a-zA-Z.:_]{0,128}$ + + + CHAP ID + IscsiInitiatorChapId + + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-4-1:IscsiInitiatorChapId + + false + 128 + 0 + + ^[x20-~]{0,128}$ + + + CHAP Secret + IscsiInitiatorChapPwd + + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-4-1:IscsiInitiatorChapPwd + + false + 16 + 0 + + ^[x20-~]{0,16}$ + + + IP Address + FirstTgtIpAddress + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI First Target Parameters + + IscsiFirstTgtParams + NIC.Integrated.1-4-1:FirstTgtIpAddress + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + iSCSI Name + FirstTgtIscsiName + + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI First Target Parameters + + IscsiFirstTgtParams + NIC.Integrated.1-4-1:FirstTgtIscsiName + + false + 128 + 0 + + ^[-0-9a-zA-Z.:_]{0,128}$ + + + CHAP ID + FirstTgtChapId + + + NIC.Integrated.1-4-1 + iSCSI First Target Parameters + + IscsiFirstTgtParams + NIC.Integrated.1-4-1:FirstTgtChapId + false + 128 + 0 + + ^[x20-~]{0,128}$ + + + CHAP Secret + FirstTgtChapPwd + + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI First Target Parameters + + IscsiFirstTgtParams + NIC.Integrated.1-4-1:FirstTgtChapPwd + false + 16 + 0 + + ^[x20-~]{0,16}$ + + + IP Address + SecondTgtIpAddress + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Second Target Parameters + + IscsiSecondTgtParams + NIC.Integrated.1-4-1:SecondTgtIpAddress + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + iSCSI Name + SecondTgtIscsiName + + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Second Target Parameters + + IscsiSecondTgtParams + NIC.Integrated.1-4-1:SecondTgtIscsiName + + false + 128 + 0 + + ^[-0-9a-zA-Z.:_]{0,128}$ + + + CHAP ID + SecondTgtChapId + + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Second Target Parameters + + IscsiSecondTgtParams + NIC.Integrated.1-4-1:SecondTgtChapId + false + 128 + 0 + + ^[x20-~]{0,128}$ + + + CHAP Secret + SecondTgtChapPwd + + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Second Target Parameters + + IscsiSecondTgtParams + NIC.Integrated.1-4-1:SecondTgtChapPwd + + false + 16 + 0 + + ^[x20-~]{0,16}$ + + + Firmware Family Version + + FamilyVersion + 7.4.8 + + NIC.Integrated.1-4-1 + Firmware Image Menu + FrmwImgMenu + NIC.Integrated.1-4-1:FamilyVersion + true + 20 + 0 + + + + + Bootcode + ControllerBIOSVersion + 1.30 + + NIC.Integrated.1-4-1 + Firmware Image Menu + FrmwImgMenu + NIC.Integrated.1-4-1:ControllerBIOSVersion + + true + 9 + 0 + + + + + EFI + EFIVersion + 15.4.6 + + NIC.Integrated.1-4-1 + Firmware Image Menu + FrmwImgMenu + NIC.Integrated.1-4-1:EFIVersion + true + 9 + 0 + + + + + Secondary Device + SecondaryDeviceMacAddr + 00:00:00:00:00:00 + Unavailable]]> + NIC.Integrated.1-4-1 + Secondary Device + SecondaryDevice + NIC.Integrated.1-4-1:SecondaryDeviceMacAddr + + false + 17 + 17 + + ^([0-9a-fA-F]{2}:){5}([0-9a-fA-F]{2})$ + + + + + + \ No newline at end of file diff --git a/dracclient/tests/wsman_mocks/nic_string-enum-ok.xml b/dracclient/tests/wsman_mocks/nic_string-enum-ok.xml new file mode 100644 index 0000000..1059b33 --- /dev/null +++ b/dracclient/tests/wsman_mocks/nic_string-enum-ok.xml @@ -0,0 +1,1185 @@ + + + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + http://schemas.xmlsoap.org/ws/2004/09/enumeration/EnumerateResponse + + uuid:48fa32d6-5bdb-4080-a9cb-040fdd600ece + + uuid:66b00908-71f0-11f0-a516-a53ffbd9bed4 + + + + + + + Chip Type + ChipMdl + BCM5720 A0 + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:ChipMdl + true + 0 + 0 + + + + + PCI Device ID + PCIDeviceID + 165F + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:PCIDeviceID + true + 0 + 0 + + + + + Bus:Dev:Func + BusDeviceFunction + 02:00:00 + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:BusDeviceFunction + + true + 0 + 0 + + + + + Permanent MAC Address + + MacAddr + D4:AE:52:A5:B1:EA + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:MacAddr + true + 17 + 17 + + + + + Virtual MAC Address + + VirtMacAddr + D4:AE:52:A5:B1:EA + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:VirtMacAddr + false + 17 + 17 + + ^([0-9a-fA-F]{2}:){5}([0-9a-fA-F]{2})$ + + + + FCoE Offload Support + + FCoEOffloadSupport + Unavailable + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:FCoEOffloadSupport + + true + 12 + 0 + + + + + iSCSI Offload Support + + iSCSIOffloadSupport + Unavailable + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:iSCSIOffloadSupport + + true + 12 + 0 + + + + + IBS + iSCSIBootSupport + Available + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:iSCSIBootSupport + + true + 12 + 0 + + + + + PBS + PXEBootSupport + Available + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:PXEBootSupport + true + 12 + 0 + + + + + FBS + FCoEBootSupport + Unavailable + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:FCoEBootSupport + true + 12 + 0 + + + + + NPS + NicPartitioningSupport + Unavailable + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:NicPartitioningSupport + + true + 12 + 0 + + + + + TBMax + TXBandwidthControlMaximum + Unavailable + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:TXBandwidthControlMaximum + + true + 12 + 0 + + + + + TBMin + TXBandwidthControlMinimum + Unavailable + + NIC.Integrated.1-3-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-3-1:TXBandwidthControlMinimum + + true + 12 + 0 + + + + + DHCP Vendor ID + DhcpVendId + BRCM ISAN + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-3-1:DhcpVendId + false + 32 + 0 + + + + + IP Address + IscsiInitiatorIpAddr + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-3-1:IscsiInitiatorIpAddr + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + Subnet Mask + IscsiInitiatorSubnet + 0.0.0.0 + UnavailableIPv6]]> + NIC.Integrated.1-3-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-3-1:IscsiInitiatorSubnet + + false + 15 + 7 + + ^([0-9]{1,3}.){3}[0-9]{1,3}$ + + + + Subnet Mask Prefix + + IscsiInitiatorSubnetPrefix + + UnavailableIPv4]]> + NIC.Integrated.1-3-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-3-1:IscsiInitiatorSubnetPrefix + + true + 3 + 1 + + + + + Default Gateway + IscsiInitiatorGateway + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-3-1:IscsiInitiatorGateway + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + Primary DNS + IscsiInitiatorPrimDns + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-3-1:IscsiInitiatorPrimDns + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + Secondary DNS + IscsiInitiatorSecDns + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-3-1:IscsiInitiatorSecDns + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + iSCSI Name + IscsiInitiatorName + iqn.1995-05.com.broadcom.iscsiboot + + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-3-1:IscsiInitiatorName + + false + 128 + 0 + + ^[-0-9a-zA-Z.:_]{0,128}$ + + + CHAP ID + IscsiInitiatorChapId + + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-3-1:IscsiInitiatorChapId + + false + 128 + 0 + + ^[x20-~]{0,128}$ + + + CHAP Secret + IscsiInitiatorChapPwd + + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-3-1:IscsiInitiatorChapPwd + + false + 16 + 0 + + ^[x20-~]{0,16}$ + + + IP Address + FirstTgtIpAddress + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI First Target Parameters + + IscsiFirstTgtParams + NIC.Integrated.1-3-1:FirstTgtIpAddress + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + iSCSI Name + FirstTgtIscsiName + + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI First Target Parameters + + IscsiFirstTgtParams + NIC.Integrated.1-3-1:FirstTgtIscsiName + + false + 128 + 0 + + ^[-0-9a-zA-Z.:_]{0,128}$ + + + CHAP ID + FirstTgtChapId + + + NIC.Integrated.1-3-1 + iSCSI First Target Parameters + + IscsiFirstTgtParams + NIC.Integrated.1-3-1:FirstTgtChapId + false + 128 + 0 + + ^[x20-~]{0,128}$ + + + CHAP Secret + FirstTgtChapPwd + + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI First Target Parameters + + IscsiFirstTgtParams + NIC.Integrated.1-3-1:FirstTgtChapPwd + false + 16 + 0 + + ^[x20-~]{0,16}$ + + + IP Address + SecondTgtIpAddress + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Second Target Parameters + + IscsiSecondTgtParams + NIC.Integrated.1-3-1:SecondTgtIpAddress + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + iSCSI Name + SecondTgtIscsiName + + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Second Target Parameters + + IscsiSecondTgtParams + NIC.Integrated.1-3-1:SecondTgtIscsiName + + false + 128 + 0 + + ^[-0-9a-zA-Z.:_]{0,128}$ + + + CHAP ID + SecondTgtChapId + + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Second Target Parameters + + IscsiSecondTgtParams + NIC.Integrated.1-3-1:SecondTgtChapId + false + 128 + 0 + + ^[x20-~]{0,128}$ + + + CHAP Secret + SecondTgtChapPwd + + Unavailable]]> + NIC.Integrated.1-3-1 + iSCSI Second Target Parameters + + IscsiSecondTgtParams + NIC.Integrated.1-3-1:SecondTgtChapPwd + + false + 16 + 0 + + ^[x20-~]{0,16}$ + + + Firmware Family Version + + FamilyVersion + 7.4.8 + + NIC.Integrated.1-3-1 + Firmware Image Menu + FrmwImgMenu + NIC.Integrated.1-3-1:FamilyVersion + true + 20 + 0 + + + + + Bootcode + ControllerBIOSVersion + 1.30 + + NIC.Integrated.1-3-1 + Firmware Image Menu + FrmwImgMenu + NIC.Integrated.1-3-1:ControllerBIOSVersion + + true + 9 + 0 + + + + + EFI + EFIVersion + 15.4.6 + + NIC.Integrated.1-3-1 + Firmware Image Menu + FrmwImgMenu + NIC.Integrated.1-3-1:EFIVersion + true + 9 + 0 + + + + + Secondary Device + SecondaryDeviceMacAddr + 00:00:00:00:00:00 + Unavailable]]> + NIC.Integrated.1-3-1 + Secondary Device + SecondaryDevice + NIC.Integrated.1-3-1:SecondaryDeviceMacAddr + + false + 17 + 17 + + ^([0-9a-fA-F]{2}:){5}([0-9a-fA-F]{2})$ + + + + Chip Type + ChipMdl + BCM5720 A0 + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:ChipMdl + true + 0 + 0 + + + + + PCI Device ID + PCIDeviceID + 165F + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:PCIDeviceID + true + 0 + 0 + + + + + Bus:Dev:Func + BusDeviceFunction + 02:00:01 + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:BusDeviceFunction + + true + 0 + 0 + + + + + Permanent MAC Address + + MacAddr + D4:AE:52:A5:B1:EB + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:MacAddr + true + 17 + 17 + + + + + Virtual MAC Address + + VirtMacAddr + D4:AE:52:A5:B1:EB + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:VirtMacAddr + false + 17 + 17 + + ^([0-9a-fA-F]{2}:){5}([0-9a-fA-F]{2})$ + + + + FCoE Offload Support + + FCoEOffloadSupport + Unavailable + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:FCoEOffloadSupport + + true + 12 + 0 + + + + + iSCSI Offload Support + + iSCSIOffloadSupport + Unavailable + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:iSCSIOffloadSupport + + true + 12 + 0 + + + + + IBS + iSCSIBootSupport + Available + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:iSCSIBootSupport + + true + 12 + 0 + + + + + PBS + PXEBootSupport + Available + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:PXEBootSupport + true + 12 + 0 + + + + + FBS + FCoEBootSupport + Unavailable + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:FCoEBootSupport + true + 12 + 0 + + + + + NPS + NicPartitioningSupport + Unavailable + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:NicPartitioningSupport + + true + 12 + 0 + + + + + TBMax + TXBandwidthControlMaximum + Unavailable + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:TXBandwidthControlMaximum + + true + 12 + 0 + + + + + TBMin + TXBandwidthControlMinimum + Unavailable + + NIC.Integrated.1-4-1 + Main Configuration Page + VndrConfigPage + NIC.Integrated.1-4-1:TXBandwidthControlMinimum + + true + 12 + 0 + + + + + DHCP Vendor ID + DhcpVendId + BRCM ISAN + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI General Parameters + IscsiGenParams + NIC.Integrated.1-4-1:DhcpVendId + false + 32 + 0 + + + + + IP Address + IscsiInitiatorIpAddr + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-4-1:IscsiInitiatorIpAddr + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + Subnet Mask + IscsiInitiatorSubnet + 0.0.0.0 + UnavailableIPv6]]> + NIC.Integrated.1-4-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-4-1:IscsiInitiatorSubnet + + false + 15 + 7 + + ^([0-9]{1,3}.){3}[0-9]{1,3}$ + + + + Subnet Mask Prefix + + IscsiInitiatorSubnetPrefix + + UnavailableIPv4]]> + NIC.Integrated.1-4-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-4-1:IscsiInitiatorSubnetPrefix + + true + 3 + 1 + + + + + Default Gateway + IscsiInitiatorGateway + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-4-1:IscsiInitiatorGateway + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + Primary DNS + IscsiInitiatorPrimDns + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-4-1:IscsiInitiatorPrimDns + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + Secondary DNS + IscsiInitiatorSecDns + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-4-1:IscsiInitiatorSecDns + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + iSCSI Name + IscsiInitiatorName + iqn.1995-05.com.broadcom.iscsiboot + + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-4-1:IscsiInitiatorName + + false + 128 + 0 + + ^[-0-9a-zA-Z.:_]{0,128}$ + + + CHAP ID + IscsiInitiatorChapId + + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-4-1:IscsiInitiatorChapId + + false + 128 + 0 + + ^[x20-~]{0,128}$ + + + CHAP Secret + IscsiInitiatorChapPwd + + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Initiator Parameters + + IscsiInitiatorParams + NIC.Integrated.1-4-1:IscsiInitiatorChapPwd + + false + 16 + 0 + + ^[x20-~]{0,16}$ + + + IP Address + FirstTgtIpAddress + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI First Target Parameters + + IscsiFirstTgtParams + NIC.Integrated.1-4-1:FirstTgtIpAddress + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + iSCSI Name + FirstTgtIscsiName + + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI First Target Parameters + + IscsiFirstTgtParams + NIC.Integrated.1-4-1:FirstTgtIscsiName + + false + 128 + 0 + + ^[-0-9a-zA-Z.:_]{0,128}$ + + + CHAP ID + FirstTgtChapId + + + NIC.Integrated.1-4-1 + iSCSI First Target Parameters + + IscsiFirstTgtParams + NIC.Integrated.1-4-1:FirstTgtChapId + false + 128 + 0 + + ^[x20-~]{0,128}$ + + + CHAP Secret + FirstTgtChapPwd + + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI First Target Parameters + + IscsiFirstTgtParams + NIC.Integrated.1-4-1:FirstTgtChapPwd + false + 16 + 0 + + ^[x20-~]{0,16}$ + + + IP Address + SecondTgtIpAddress + 0.0.0.0 + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Second Target Parameters + + IscsiSecondTgtParams + NIC.Integrated.1-4-1:SecondTgtIpAddress + + false + 39 + 2 + + ^([0-9]{1,3}.){3}[0-9]{1,3}|[0-9a-fA-F:]{2,39}$ + + + + iSCSI Name + SecondTgtIscsiName + + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Second Target Parameters + + IscsiSecondTgtParams + NIC.Integrated.1-4-1:SecondTgtIscsiName + + false + 128 + 0 + + ^[-0-9a-zA-Z.:_]{0,128}$ + + + CHAP ID + SecondTgtChapId + + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Second Target Parameters + + IscsiSecondTgtParams + NIC.Integrated.1-4-1:SecondTgtChapId + false + 128 + 0 + + ^[x20-~]{0,128}$ + + + CHAP Secret + SecondTgtChapPwd + + Unavailable]]> + NIC.Integrated.1-4-1 + iSCSI Second Target Parameters + + IscsiSecondTgtParams + NIC.Integrated.1-4-1:SecondTgtChapPwd + + false + 16 + 0 + + ^[x20-~]{0,16}$ + + + Firmware Family Version + + FamilyVersion + 7.4.8 + + NIC.Integrated.1-4-1 + Firmware Image Menu + FrmwImgMenu + NIC.Integrated.1-4-1:FamilyVersion + true + 20 + 0 + + + + + Bootcode + ControllerBIOSVersion + 1.30 + + NIC.Integrated.1-4-1 + Firmware Image Menu + FrmwImgMenu + NIC.Integrated.1-4-1:ControllerBIOSVersion + + true + 9 + 0 + + + + + EFI + EFIVersion + 15.4.6 + + NIC.Integrated.1-4-1 + Firmware Image Menu + FrmwImgMenu + NIC.Integrated.1-4-1:EFIVersion + true + 9 + 0 + + + + + Secondary Device + SecondaryDeviceMacAddr + 00:00:00:00:00:00 + Unavailable]]> + NIC.Integrated.1-4-1 + Secondary Device + SecondaryDevice + NIC.Integrated.1-4-1:SecondaryDeviceMacAddr + + false + 17 + 17 + + ^([0-9a-fA-F]{2}:){5}([0-9a-fA-F]{2})$ + + + + + + \ No newline at end of file