12 changed files with 4460 additions and 4 deletions
@ -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) |
@ -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) |
@ -0,0 +1,767 @@
|
||||
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" |
||||
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" |
||||
xmlns:wsen="http://schemas.xmlsoap.org/ws/2004/09/enumeration" |
||||
xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" |
||||
xmlns:n1="http://schemas.dell.com/wbem/wscim/1/cim-schema/2/DCIM_NICEnumeration" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
||||
<s:Header> |
||||
<wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous |
||||
</wsa:To> |
||||
<wsa:Action>http://schemas.xmlsoap.org/ws/2004/09/enumeration/EnumerateResponse |
||||
</wsa:Action> |
||||
<wsa:RelatesTo>uuid:608d7722-0302-4feb-8080-4652e0e0ab48 |
||||
</wsa:RelatesTo> |
||||
<wsa:MessageID>uuid:07820ac0-71f0-11f0-a4a1-a53ffbd9bed4 |
||||
</wsa:MessageID> |
||||
</s:Header> |
||||
<s:Body> |
||||
<wsen:EnumerateResponse> |
||||
<wsman:Items> |
||||
<n1:DCIM_NICEnumeration> |
||||
<n1:AttributeDisplayName>Link Status</n1:AttributeDisplayName> |
||||
<n1:AttributeName>LinkStatus</n1:AttributeName> |
||||
<n1:CurrentValue>Connected</n1:CurrentValue> |
||||
<n1:Dependency xsi:nil="true" /> |
||||
<n1:FQDD>NIC.Integrated.1-3-1</n1:FQDD> |
||||
<n1:GroupDisplayName>Main Configuration Page</n1:GroupDisplayName> |
||||
<n1:GroupID>VndrConfigPage</n1:GroupID> |
||||
<n1:InstanceID>NIC.Integrated.1-3-1:LinkStatus</n1:InstanceID> |
||||
<n1:IsReadOnly>true</n1:IsReadOnly> |
||||
<n1:PendingValue xsi:nil="true" /> |
||||
<n1:PossibleValues>Disconnected</n1:PossibleValues> |
||||
<n1:PossibleValues>Connected</n1:PossibleValues> |
||||
<n1:PossibleValuesDescription>Disconnected |
||||
</n1:PossibleValuesDescription> |
||||
<n1:PossibleValuesDescription>Connected |
||||
</n1:PossibleValuesDescription> |
||||
</n1:DCIM_NICEnumeration> |
||||
<n1:DCIM_NICEnumeration> |
||||
<n1:AttributeDisplayName>TCP/IP Parameters via DHCP |
||||
</n1:AttributeDisplayName> |
||||
<n1:AttributeName>TcpIpViaDHCP</n1:AttributeName> |
||||
<n1:CurrentValue>Enabled</n1:CurrentValue> |
||||
<n1:Dependency><![CDATA[<Dep><AttrLev Op="OR"><ROIf Name="IpVer">IPv6</ROIf><ROIf Name="iSCSIBootSupport">Unavailable</ROIf></AttrLev></Dep>]]></n1:Dependency> |
||||
<n1:FQDD>NIC.Integrated.1-3-1</n1:FQDD> |
||||
<n1:GroupDisplayName>iSCSI General Parameters</n1:GroupDisplayName> |
||||
<n1:GroupID>IscsiGenParams</n1:GroupID> |
||||
<n1:InstanceID>NIC.Integrated.1-3-1:TcpIpViaDHCP</n1:InstanceID> |
||||
<n1:IsReadOnly>false</n1:IsReadOnly> |
||||
<n1:PendingValue xsi:nil="true" /> |
||||
<n1:PossibleValues>Disabled</n1:PossibleValues> |
||||
<n1:PossibleValues>Enabled</n1:PossibleValues> |
||||
<n1:PossibleValuesDescription>Disabled |
||||
</n1:PossibleValuesDescription> |
||||
<n1:PossibleValuesDescription>Enabled |
||||
</n1:PossibleValuesDescription> |
||||
</n1:DCIM_NICEnumeration> |
||||
<n1:DCIM_NICEnumeration> |
||||
<n1:AttributeDisplayName>IP Autoconfiguration |
||||
</n1:AttributeDisplayName> |
||||
<n1:AttributeName>IpAutoConfig</n1:AttributeName> |
||||
<n1:CurrentValue>Enabled</n1:CurrentValue> |
||||
<n1:Dependency><![CDATA[<Dep><AttrLev Op="OR"><ROIf Name="IpVer">IPv4</ROIf><ROIf Name="iSCSIBootSupport">Unavailable</ROIf></AttrLev></Dep>]]></n1:Dependency> |
||||
<n1:FQDD>NIC.Integrated.1-3-1</n1:FQDD> |
||||
<n1:GroupDisplayName>iSCSI General Parameters</n1:GroupDisplayName> |
||||
<n1:GroupID>IscsiGenParams</n1:GroupID> |
||||
<n1:InstanceID>NIC.Integrated.1-3-1:IpAutoConfig</n1:InstanceID> |
||||
<n1:IsReadOnly>true</n1:IsReadOnly> |
||||
<n1:PendingValue xsi:nil="true" /> |
||||
<n1:PossibleValues>Disabled</n1:PossibleValues> |
||||
<n1:PossibleValues>Enabled</n1:PossibleValues> |
||||
<n1:PossibleValuesDescription>Disabled |
||||
</n1:PossibleValuesDescription> |
||||
<n1:PossibleValuesDescription>Enabled |
||||
</n1:PossibleValuesDescription> |
||||
</n1:DCIM_NICEnumeration> |
||||
<n1:DCIM_NICEnumeration> |
||||
<n1:AttributeDisplayName>iSCSI Parameters via DHCP |
||||
</n1:AttributeDisplayName> |
||||
<n1:AttributeName>IscsiViaDHCP</n1:AttributeName> |
||||
<n1:CurrentValue>Enabled</n1:CurrentValue> |
||||
<n1:Dependency><![CDATA[<Dep><AttrLev Op="OR"><ROIf Name="iSCSIBootSupport">Unavailable</ROIf></AttrLev></Dep>]]></n1:Dependency> |
||||
<n1:FQDD>NIC.Integrated.1-3-1</n1:FQDD> |
||||
<n1:GroupDisplayName>iSCSI General Parameters</n1:GroupDisplayName> |
||||
<n1:GroupID>IscsiGenParams</n1:GroupID> |
||||
<n1:InstanceID>NIC.Integrated.1-3-1:IscsiViaDHCP</n1:InstanceID> |
||||
<n1:IsReadOnly>false</n1:IsReadOnly> |
||||
<n1:PendingValue xsi:nil="true" /> |
||||
<n1:PossibleValues>Disabled</n1:PossibleValues> |
||||
<n1:PossibleValues>Enabled</n1:PossibleValues> |
||||
<n1:PossibleValuesDescription>Disabled |
||||
</n1:PossibleValuesDescription> |
||||
<n1:PossibleValuesDescription>Enabled |
||||
</n1:PossibleValuesDescription> |
||||
</n1:DCIM_NICEnumeration> |
||||
<n1:DCIM_NICEnumeration> |
||||
<n1:AttributeDisplayName>CHAP Authentication |
||||
</n1:AttributeDisplayName> |
||||
<n1:AttributeName>ChapAuthEnable</n1:AttributeName> |
||||
<n1:CurrentValue>Disabled</n1:CurrentValue> |
||||
<n1:Dependency><![CDATA[<Dep><AttrLev Op="OR"><ROIf Name="iSCSIBootSupport">Unavailable</ROIf></AttrLev></Dep>]]></n1:Dependency> |
||||
<n1:FQDD>NIC.Integrated.1-3-1</n1:FQDD> |
||||
<n1:GroupDisplayName>iSCSI General Parameters</n1:GroupDisplayName> |
||||
<n1:GroupID>IscsiGenParams</n1:GroupID> |
||||
<n1:InstanceID>NIC.Integrated.1-3-1:ChapAuthEnable</n1:InstanceID> |
||||
<n1:IsReadOnly>false</n1:IsReadOnly> |
||||
<n1:PendingValue xsi:nil="true" /> |
||||
<n1:PossibleValues>Disabled</n1:PossibleValues> |
||||
<n1:PossibleValues>Enabled</n1:PossibleValues> |
||||
<n1:PossibleValuesDescription>Disabled |
||||
</n1:PossibleValuesDescription> |
||||
<n1:PossibleValuesDescription>Enabled |
||||
</n1:PossibleValuesDescription> |
||||
</n1:DCIM_NICEnumeration> |
||||
<n1:DCIM_NICEnumeration> |
||||
<n1:AttributeDisplayName>Boot to iSCSI Target |
||||
</n1:AttributeDisplayName> |
||||
<n1:AttributeName>IscsiTgtBoot</n1:AttributeName> |
||||
<n1:CurrentValue>Enabled</n1:CurrentValue> |
||||
<n1:Dependency><![CDATA[<Dep><AttrLev Op="OR"><ROIf Name="iSCSIBootSupport">Unavailable</ROIf></AttrLev></Dep>]]></n1:Dependency> |
||||
<n1:FQDD>NIC.Integrated.1-3-1</n1:FQDD> |
||||
<n1:GroupDisplayName>iSCSI General Parameters</n1:GroupDisplayName> |
||||
<n1:GroupID>IscsiGenParams</n1:GroupID> |
||||
<n1:InstanceID>NIC.Integrated.1-3-1:IscsiTgtBoot</n1:InstanceID> |
||||
<n1:IsReadOnly>false</n1:IsReadOnly> |
||||
<n1:PendingValue xsi:nil="true" /> |
||||
<n1:PossibleValues>Disabled</n1:PossibleValues> |
||||
<n1:PossibleValues>Enabled</n1:PossibleValues> |
||||
<n1:PossibleValues>OneTimeDisabled</n1:PossibleValues> |
||||
<n1:PossibleValuesDescription>Disabled |
||||
</n1:PossibleValuesDescription> |
||||
<n1:PossibleValuesDescription>Enabled |
||||
</n1:PossibleValuesDescription> |
||||
<n1:PossibleValuesDescription>One Time Disabled |
||||
</n1:PossibleValuesDescription> |
||||
</n1:DCIM_NICEnumeration> |
||||
<n1:DCIM_NICEnumeration> |
||||
<n1:AttributeDisplayName>Use TCP Timestamp |
||||
</n1:AttributeDisplayName> |
||||
<n1:AttributeName>TcpTimestmp</n1:AttributeName> |
||||
<n1:CurrentValue>Disabled</n1:CurrentValue> |
||||
<n1:Dependency><![CDATA[<Dep><AttrLev Op="OR"><ROIf Name="iSCSIBootSupport">Unavailable</ROIf></AttrLev></Dep>]]></n1:Dependency> |
||||
<n1:FQDD>NIC.Integrated.1-3-1</n1:FQDD> |
||||
<n1:GroupDisplayName>iSCSI General Parameters</n1:GroupDisplayName> |
||||
<n1:GroupID>IscsiGenParams</n1:GroupID> |
||||
<n1:InstanceID>NIC.Integrated.1-3-1:TcpTimestmp</n1:InstanceID> |
||||
<n1:IsReadOnly>false</n1:IsReadOnly> |
||||
<n1:PendingValue xsi:nil="true" /> |
||||
<n1:PossibleValues>Disabled</n1:PossibleValues> |
||||
<n1:PossibleValues>Enabled</n1:PossibleValues> |
||||
<n1:PossibleValuesDescription>Disabled |
||||
</n1:PossibleValuesDescription> |
||||
<n1:PossibleValuesDescription>Enabled |
||||
</n1:PossibleValuesDescription> |
||||
</n1:DCIM_NICEnumeration> |
||||
<n1:DCIM_NICEnumeration> |
||||
<n1:AttributeDisplayName>Target as First HDD |
||||
</n1:AttributeDisplayName> |
||||
<n1:AttributeName>FirstHddTarget</n1:AttributeName> |
||||
<n1:CurrentValue>Disabled</n1:CurrentValue> |
||||
<n1:Dependency><![CDATA[<Dep><AttrLev Op="OR"><ROIf Name="iSCSIBootSupport">Unavailable</ROIf></AttrLev></Dep>]]></n1:Dependency> |
||||
<n1:FQDD>NIC.Integrated.1-3-1</n1:FQDD> |
||||
<n1:GroupDisplayName>iSCSI General Parameters</n1:GroupDisplayName> |
||||
<n1:GroupID>IscsiGenParams</n1:GroupID> |
||||
<n1:InstanceID>NIC.Integrated.1-3-1:FirstHddTarget</n1:InstanceID> |
||||
<n1:IsReadOnly>false</n1:IsReadOnly> |
||||
<n1:PendingValue xsi:nil="true" /> |
||||
<n1:PossibleValues>Disabled</n1:PossibleValues> |
||||
<n1:PossibleValues>Enabled</n1:PossibleValues> |
||||
<n1:PossibleValuesDescription>Disabled |
||||
</n1:PossibleValuesDescription> |
||||
<n1:PossibleValuesDescription>Enabled |
||||
</n1:PossibleValuesDescription> |
||||
</n1:DCIM_NICEnumeration> |
||||
<n1:DCIM_NICEnumeration> |
||||
<n1:AttributeDisplayName>IP Version</n1:AttributeDisplayName> |
||||
<n1:AttributeName>IpVer</n1:AttributeName> |
||||
<n1:CurrentValue>IPv4</n1:CurrentValue> |
||||
<n1:Dependency><![CDATA[<Dep><AttrLev Op="OR"><ROIf Name="iSCSIBootSupport">Unavailable</ROIf></AttrLev></Dep>]]></n1:Dependency> |
||||
<n1:FQDD>NIC.Integrated.1-3-1</n1:FQDD> |
||||
<n1:GroupDisplayName>iSCSI General Parameters</n1:GroupDisplayName> |
||||
<n1:GroupID>IscsiGenParams</n1:GroupID> |
||||
<n1:InstanceID>NIC.Integrated.1-3-1:IpVer</n1:InstanceID> |
||||
<n1:IsReadOnly>false</n1:IsReadOnly> |
||||
<n1:PendingValue xsi:nil="true" /> |
||||
<n1:PossibleValues>IPv4</n1:PossibleValues> |
||||
<n1:PossibleValues>IPv6</n1:PossibleValues> |
||||
<n1:PossibleValuesDescription>IPv4</n1:PossibleValuesDescription> |
||||
<n1:PossibleValuesDescription>IPv6</n1:PossibleValuesDescription> |
||||
</n1:DCIM_NICEnumeration> |
||||
<n1:DCIM_NICEnumeration> |
||||
<n1:AttributeDisplayName>Connect</n1:AttributeDisplayName> |
||||
<n1:AttributeName>ConnectFirstTgt</n1:AttributeName> |
||||
<n1:CurrentValue>Disabled</n1:CurrentValue> |
||||
<n1:Dependency><![CDATA[<Dep><AttrLev Op="OR"><ROIf Name="iSCSIBootSupport">Unavailable</ROIf></AttrLev></Dep>]]></n1:Dependency> |
||||
<n1:FQDD>NIC.Integrated.1-3-1</n1:FQDD> |
||||
<n1:GroupDisplayName>iSCSI First Target Parameters |
||||
</n1:GroupDisplayName> |
||||
<n1:GroupID>IscsiFirstTgtParams</n1:GroupID> |
||||
<n1:InstanceID>NIC.Integrated.1-3-1:ConnectFirstTgt</n1:InstanceID> |
||||
<n1:IsReadOnly>false</n1:IsReadOnly> |
||||
<n1:PendingValue xsi:nil="true" /> |
||||
<n1:PossibleValues>Disabled</n1:PossibleValues> |
||||
<n1:PossibleValues>Enabled</n1:PossibleValues> |
||||
<n1:PossibleValuesDescription>Disabled |
||||
</n1:PossibleValuesDescription> |
||||
<n1:PossibleValuesDescription>Enabled |
||||
</n1:PossibleValuesDescription> |
||||
</n1:DCIM_NICEnumeration> |
||||
<n1:DCIM_NICEnumeration> |
||||
<n1:AttributeDisplayName>Connect</n1:AttributeDisplayName> |
||||
<n1:AttributeName>ConnectSecondTgt</n1:AttributeName> |
||||
<n1:CurrentValue>Disabled</n1:CurrentValue> |
||||
<n1:Dependency><![CDATA[<Dep><AttrLev Op="OR"><ROIf Name="iSCSIBootSupport">Unavailable</ROIf></AttrLev></Dep>]]></n1:Dependency> |
||||
<n1:FQDD>NIC.Integrated.1-3-1</n1:FQDD> |
||||
<n1:GroupDisplayName>iSCSI Second Target Parameters |
||||
</n1:GroupDisplayName> |
||||
<n1:GroupID>IscsiSecondTgtParams</n1:GroupID> |
||||
<n1:InstanceID>NIC.Integrated.1-3-1:ConnectSecondTgt |
||||
</n1:InstanceID> |
||||
<n1:IsReadOnly>false</n1:IsReadOnly> |
||||
<n1:PendingValue xsi:nil="true" /> |
||||
<n1:PossibleValues>Disabled</n1:PossibleValues> |
||||
<n1:PossibleValues>Enabled</n1:PossibleValues> |
||||
<n1:PossibleValuesDescription>Disabled |
||||
</n1:PossibleValuesDescription> |
||||
<n1:PossibleValuesDescription>Enabled |
||||
</n1:PossibleValuesDescription> |
||||
</n1:DCIM_NICEnumeration> |
||||
<n1:DCIM_NICEnumeration> |
||||
<n1:AttributeDisplayName>Legacy Boot Protocol |
||||
</n1:AttributeDisplayName> |
||||
<n1:AttributeName>LegacyBootProto</n1:AttributeName> |
||||
<n1:CurrentValue>PXE</n1:CurrentValue> |
||||
<n1:Dependency xsi:nil="true" /> |
||||
<n1:FQDD>NIC.Integrated.1-3-1</n1:FQDD> |
||||
<n1:GroupDisplayName>MBA Configuration Menu</n1:GroupDisplayName> |
||||
<n1:GroupID>NICConfig</n1:GroupID> |
||||
<n1:InstanceID>NIC.Integrated.1-3-1:LegacyBootProto</n1:InstanceID> |
||||
<n1:IsReadOnly>false</n1:IsReadOnly> |
||||
<n1:PendingValue>NONE</n1:PendingValue> |
||||
<n1:PossibleValues>PXE</n1:PossibleValues> |
||||
<n1:PossibleValues>iSCSI</n1:PossibleValues> |
||||
<n1:PossibleValues>NONE</n1:PossibleValues> |
||||
<n1:PossibleValuesDescription>PXE</n1:PossibleValuesDescription> |
||||
<n1:PossibleValuesDescription>iSCSI</n1:PossibleValuesDescription> |
||||
<n1:PossibleValuesDescription>NONE</n1:PossibleValuesDescription> |
||||
</n1:DCIM_NICEnumeration> |
||||
<n1:DCIM_NICEnumeration> |
||||
<n1:AttributeDisplayName>Boot Strap Type</n1:AttributeDisplayName> |
||||
<n1:AttributeName>BootStrapType</n1:AttributeName> |
||||
<n1:CurrentValue>AutoDetect</n1:CurrentValue> |
||||
<n1:Dependency xsi:nil="true" /> |
||||
<n1:FQDD>NIC.Integrated.1-3-1</n1:FQDD> |
||||
<n1:GroupDisplayName>MBA Configuration Menu</n1:GroupDisplayName> |
||||
<n1:GroupID>NICConfig</n1:GroupID> |
||||
<n1:InstanceID>NIC.Integrated.1-3-1:BootStrapType</n1:InstanceID> |
||||
<n1:IsReadOnly>false</n1:IsReadOnly> |
||||
<n1:PendingValue xsi:nil="true" /> |
||||
<n1:PossibleValues>AutoDetect</n1:PossibleValues> |
||||
<n1:PossibleValues>BBS</n1:PossibleValues> |
||||
<n1:PossibleValues>Int18h</n1:PossibleValues> |
||||
<n1:PossibleValues>Int19h</n1:PossibleValues> |
||||
<n1:PossibleValuesDescription>Auto Detect |
||||
</n1:PossibleValuesDescription> |
||||
<n1:PossibleValuesDescription>BBS</n1:PossibleValuesDescription> |
||||
<n1:PossibleValuesDescription>Int 18h |
||||
</n1:PossibleValuesDescription> |
||||
<n1:PossibleValuesDescription>Int 19h |
||||
</n1:PossibleValuesDescription> |
||||
</n1:DCIM_NICEnumeration> |
||||
<n1:DCIM_NICEnumeration> |
||||
<n1:AttributeDisplayName>Hide Setup Prompt |
||||
</n1:AttributeDisplayName> |
||||
<n1:AttributeName>HideSetupPrompt</n1:AttributeName> |
||||
<n1:CurrentValue>Disabled</n1:CurrentValue> |
||||
<n1:Dependency xsi:nil="true" /> |
||||
<n1:FQDD>NIC.Integrated.1-3-1</n1:FQDD> |
||||
<n1:GroupDisplayName>MBA Configuration Menu</n1:GroupDisplayName> |
||||
<n1:GroupID>NICConfig</n1:GroupID> |
||||
<n1:InstanceID>NIC.Integrated.1-3-1:HideSetupPrompt</n1:InstanceID> |
||||
<n1:IsReadOnly>false</n1:IsReadOnly> |
||||
<n1:PendingValue xsi:nil="true" /> |
||||
<n1:PossibleValues>Disabled</n1:PossibleValues> |
||||
<n1:PossibleValues>Enabled</n1:PossibleValues> |
||||
<n1:PossibleValuesDescription>Disabled |
||||
</n1:PossibleValuesDescription> |
||||
<n1:PossibleValuesDescription>Enabled |
||||
</n1:PossibleValuesDescription> |
||||
</n1:DCIM_NICEnumeration> |
||||
<n1:DCIM_NICEnumeration> |
||||
<n1:AttributeDisplayName>Link Speed</n1:AttributeDisplayName> |
||||
<n1:AttributeName>LnkSpeed</n1:AttributeName> |
||||
<n1:CurrentValue>AutoNeg</n1:CurrentValue> |
||||
<n1:Dependency xsi:nil="true" /> |
||||
<n1:FQDD>NIC.Integrated.1-3-1</n1:FQDD> |
||||
<n1:GroupDisplayName>MBA Configuration Menu</n1:GroupDisplayName> |
||||
<n1:GroupID>NICConfig</n1:GroupID> |
||||
<n1:InstanceID>NIC.Integrated.1-3-1:LnkSpeed</n1:InstanceID> |
||||
<n1:IsReadOnly>false</n1:IsReadOnly> |
||||
<n1:PendingValue xsi:nil="true" /> |
||||
<n1:PossibleValues>AutoNeg</n1:PossibleValues> |
||||
<n1:PossibleValues>10MbpsHalf</n1:PossibleValues> |
||||
<n1:PossibleValues>10MbpsFull</n1:PossibleValues> |
||||
<n1:PossibleValues>100MbpsHalf</n1:PossibleValues> |
||||
<n1:PossibleValues>100MbpsFull</n1:PossibleValues> |
||||
<n1:PossibleValuesDescription>AutoNeg |
||||
</n1:PossibleValuesDescription> |
||||
<n1:PossibleValuesDescription>10Mbps Half |
||||
</n1:PossibleValuesDescription> |
||||
<n1:PossibleValuesDescription>10Mbps Full |
||||
</n1:PossibleValuesDescription> |
||||
<n1:PossibleValuesDescription>100Mbps Half |
||||
</n1:PossibleValuesDescription> |
||||
<n1:PossibleValuesDescription>100Mbps Full |
||||
</n1:PossibleValuesDescription> |
||||