PATCH – Update network device PCIe functions resource
Use the PATCH method to update properties in NetworkDeviceFunction resource for Redfish service.
Request URL
PATCH https://<BMC_IPADDR>/redfish/v1/Chassis/1/NetworkAdapters/{Location}/NetworkDeviceFunctions/{1-M}.{1-N}/Pending
Request body
Properties to be updated are shown as bellow, all of these properties can be changed individually.
Field | Type | Description | |
---|---|---|---|
iSCSIBoot | Object | The location of chassis. | |
AuthenticationMethod | String | The iSCSI boot authentication method for this network device function. | |
CHAPSecret | String | The shared secret for CHAP authentication. | |
CHAPUsername | String | The user name for CHAP authentication. | |
IPAddressType | String | The type of IP address being populated in the iSCSIBoot IP address fields. Valid values: “IPv4”, “IPV6” | |
InitiatorDefaultGateway | String | The IPv6 or IPv4 iSCSI boot default gateway. | |
InitiatorIPAddress | String | The IPv6 or IPv4 iSCSI boot default gateway. | |
InitiatorName | String | The iSCSI initiator name. | |
InitiatorNetmask | String | The IPv6 or IPv4 netmask of the iSCSI boot initiator. | |
MutualCHAPSecret | String | The CHAP secret for two-way CHAP authentication. | |
MutualCHAPUsername | String | The CHAP user name for two-way CHAP authentication. | |
PrimaryLUN | Number | The logical unit number (LUN) for the primary iSCSI boot target. | |
PrimaryTargetIPAddress | String | The IPv4 or IPv6 address for the primary iSCSI boot target. | |
PrimaryTargetName | String | The name of the iSCSI primary boot target. | |
PrimaryTargetTCPPort | Number | The TCP port for the primary iSCSI boot target. | |
TargetInfoViaDHCP | Boolean | An indication of whether the iSCSI boot target name, LUN, IP address, and netmask should be obtained from DHCP. |
The CHAPUsername and CHAPSecret can be patched only when AuthenticationMethod is CHAP. The MutualCHAPUsername and MutualCHAPSecret can be patched only when AuthenticationMethod is MutualCHAP.
Response body
The response returns same content as GET operation with updated properties.
Status code
HTTP Status Code | Error Message ID |
---|---|
500 | InternalError |
Example
The following example is PATCH body
{
"iSCSIBoot": {
"AuthenticationMethod": "MutualCHAP",
"IPAddressType": "IPv4",
"InitiatorDefaultGateway": "192.168.1.1",
"InitiatorIPAddress": "0.0.0.0",
"InitiatorName": "iqn.com.example",
"InitiatorNetmask": "255.255.255.0"
"MutualCHAPSecret": "
"MutualCHAPUsername": "username",
"PrimaryLUN": 0,
"PrimaryTargetIPAddress": "192.168.1.10",
"PrimaryTargetName": "iqn.example",
"PrimaryTargetTCPPort": 3261,
"TargetInfoViaDHCP": false
}
}
After the PATCH operation runs successfully, querying the chassis resource returns below example JSON response:
{
"Ethernet": {
"MACAddress": "b8:59:9f:03:00:3f",
"PermanentMACAddress": "b8:59:9f:03:00:3f",
"MTUSize": 32768
},
"@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/slot-13/NetworkDeviceFunctions/1.1",
"Links": {
"PhysicalPortAssignment": {
"@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/slot-13/NetworkPorts/1"
},
"PCIeFunction": {
"@odata.id": "/redfish/v1/Chassis/1/PCIeDevices/slot_13/PCIeFunctions/slot_13.00"
}
},
"Description": "A Network Device Function represents a logical interface exposed by the network adapter.",
"iSCSIBoot": {
"AuthenticationMethod": "MutualCHAP",
"IPAddressType": "IPv4",
"InitiatorDefaultGateway": "192.168.1.1",
"InitiatorIPAddress": "0.0.0.0",
"InitiatorName": "iqn.com.example",
"InitiatorNetmask": "255.255.255.0"
"MutualCHAPSecret": "
"MutualCHAPUsername": "username",
"PrimaryLUN": 0,
"PrimaryTargetIPAddress": "192.168.1.10",
"PrimaryTargetName": "iqn.example",
"PrimaryTargetTCPPort": 3261,
"TargetInfoViaDHCP": false
},
"PhysicalPortAssignment": {
"@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/slot-13/NetworkPorts/1"
},
"DeviceEnabled": true,
"AssignablePhysicalPorts@odata.count": 1,
"NetDevFuncType": "iSCSI",
"AssignablePhysicalPorts": [
{
"@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/slot-13/NetworkPorts/1"
}
],
"@Redfish.Settings": {
"SettingsObject": {
"@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/slot-13/NetworkDeviceFunctions/1.1/Pending"
},
"@odata.type": "#Settings.v1_3_0.Settings",
"SupportedApplyTimes": [
"OnReset"
],
"Messages": [],
"Time": null
},
"@odata.type": "#NetworkDeviceFunction.v1_4_0.NetworkDeviceFunction",
"Status": {
"State": "Enabled",
"Health": "OK",
"HealthRollup": "OK"
},
"Name": "Logical Port 1",
"@odata.etag": "\"c583b2e1c88932caff70d\"",
"Id": "1.1",
"PhysicalPortAssignment@Redfish.Deprecated": "The property is deprecated. Please use Links/PhysicalPortAssignment instead."
}