| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Redfish DHCP handling has independent control of DHCPv4 and
DHCPv6. This change combines with phosphor-network and
phosphor-dbus-interface changes to implement the independent control
capability.
Tested by:
Verified DHCP is able to be enabled for both DHCPv4 and DHCPv6
Verified DHCPv4 can be enabled, and static IPv6 addresses configured
Verified DHCPv6 can be enabled, and static IPv4 addresses configured
Verified DHCP can be disabled for both interfaces
Confirmed enable/disable of UseNTP, UseDNS, and UseHostname
Passes Redfish Service Validator
Change-Id: I449ec096a3c41231c9bc9aa1bf67824982525cec
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
using the list of warnings from here:
https://github.com/lefticus/cppbestpractices/blob/e73393f25a85f83fed7399d8b65cb117d00b2231/02-Use_the_Tools_Available.md#L100
Seems like a good place to start, and would improve things a bit
type-wise. This patchset attempts to correct all the issues in one
shot.
Tested:
It builds. Will test various subsystems that have been touched
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: I588c26440e5a97f718a0f0ea74cc84107d53aa1e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PATCH commands only changed the state of the DBus database. The PATCH
did not actually change the state of the NIC settings. IPMITOOL and
"ip addr" both delete the specific hash entry, and then create a new
entry using the requested state. This change aligns Redfish with that
behavior. The requested element is deleted, and subsequently recreated
with the new values. This guarantees the NIC HW is actually updated,
and in sync with the DBus database.
Tested by:
From eth1 modify eth0 state:
IPv4 tests:
Delete all addresses
Create five new addresses
Add a new entry to the end of the collection
Delete the new entry just added
Send a "keep" command that does not modify any state, and "keeps" more
entries than are actually in the IPv4Addresses collection
Keep all entries, and delete entries that do not exist
Delete all entries except self assigned
Send a PATCH with an empty IPv4StaticAddresses array
IPv6 tests:
Delete all entries except SLAAC
Create five static entries
Modify only the prefix for one entry
Modify only the address for one entry
Add an additional entry
Delete the new entry
Keep all entries, plus a few that don't exist
Keep all entries, delete a few that don't exist
Delete all entries except SLAAC
Send a PATCH with an empty IPv6StaticAddresses array
Change-Id: Id5f733f795588ba36b5d3ab3b0017a01ee3f2da7
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On a DHCP Enabled System, the StaticNameServer property
is not aligned to the redfish schema rules and the validator
reports the below error:
StaticNameServers: Value of Collection property is null but
Collections cannot be null, only their entries.
Testedby: Redfish Validator
*** /redfish/v1/JsonSchemas/EthernetInterface
Type (#JsonSchemaFile.v1_0_2.JsonSchemaFile), GET SUCCESS (time: 1.134773)
PASS
Note:
- Previously missed this failure, as i verified the validator on
Statically configured setup
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: I6119e8d5783571ac75084301b49df1f44a558c8b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Redfish ethernet schema has two properties for nameservers
1.NameServers - Represents nameservers currently in use on Interface
2.StaticNameServers -Represents only statically defined set of DNS
As we have only one DBUS property `Nameservers` which is used for both
the static and dynamic nameservers, So the idea behind this commit is
to not populate the StaticnameServers property when DHCP mode is
enabled.
Tested By:
GET https://${BMC_IP}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: I64f66bde55ec41dc78befbb659a0cbc425bbc24b
|
|
|
|
|
|
|
|
|
| |
Tested by:
configuring DHCP,
GET https://${BMC_IP}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0
Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
Change-Id: Ic7067db41fbb8327ef55cc7552f9153d1ecfb63a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added GET and PATCH support for IPv4StaticAddresses
and modified IPv4Addresses as read-only property
Tested by:
GET
PATCH -D patch.txt -d '{"IPv4StaticAddresses": [{},{},{"Address": "10.7.8.7","SubnetMask": "255.255.0.0","Gateway":"10.7.8.1"}]}'
PATCH -D patch.txt -d '{"IPv4StaticAddresses": [{},{"Address": "10.7.7.8","SubnetMask": "255.255.0.0","Gateway":"10.7.7.1"}]}'
PATCH -D patch.txt -d '{"IPv4StaticAddresses": [null,{},{"Address": "10.7.7.9","SubnetMask": "255.255.0.0","Gateway":"10.7.7.1"}]}']}'
PATCH -D patch.txt -d '{"IPv4StaticAddresses": [{},{"Address": "10.8.8.9"}]}'
Tested with validator and no errors.
Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
Change-Id: I580787933f1d93d0734e32f71ac9fc80dc108247
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FQDN and IPv6Address are mandatory properties in OCP profile.
Tested:
GET /redfish/v1/Managers/bmc/NetworkProtocol HTTP/1.1
Response:
{
"@odata.context": "/redfish/v1/$metadata#ManagerNetworkProtocol.ManagerNetworkProtocol",
"@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol",
"@odata.type": "#ManagerNetworkProtocol.v1_4_0.ManagerNetworkProtocol",
"Description": "Manager Network Service",
"FQDN": <host name>.<domain name>,
"HTTPS": {
"Port": 443,
"ProtocolEnabled": true
},
"HostName": <host name>,
...
}
GET /redfish/v1/Managers/bmc/EthernetInterfaces/eth0 HTTP/1.1
Response:
{
"@odata.context": "/redfish/v1/$metadata#EthernetInterface.EthernetInterface",
"@odata.id": "/redfish/v1/Managers/bmc/EthernetInterfaces/eth0",
"@odata.type": "#EthernetInterface.v1_4_1.EthernetInterface",
...
"FQDN": <host name>.<domain name>,
"HostName": <host name>,
...
"IPv6Addresses": [],
...
}
Signed-off-by: Jennifer Lee <jennifer1.lee@intel.com>
Change-Id: I0ca8f98523cbcfc935e0ac3bbf93f87762ff183b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A PATCH command should not return any JSON content for the NICs. PATCH
commands should only return success or failure responses.
Reporting state based upon the input to the command is, in most
instances, going to be incorrect in comparison to the actual state of
the HW. For example: moving from static addresses to a DHCP assigned
address cannot be predicted based upon the input. It also takes
several seconds for a DHCP transaction to complete, which creates a
significant temporal lag between what was sent and what will be.
Tested: Performed the following tests:
For IPv4:
"IPv4Addresses": [
{},
{
"Address": "192.168.20.12",
"SubnetMask": "255.255.255.0",
"Gateway": "192.168.20.1"
}
]
For IPv6:
"IPv6StaticAddresses": [
{
"Address": "2001::5:4:3:4",
"PrefixLength": 64
}
]
Both tests complete without emitting any JSON content.
Change-Id: Ic7eb824eb6d996d85d52a3b7c855e9825f4a0d87
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The AddressOrigin entry in the IPv4Addresses schema is read-only. It
is not permitted to PATCH the AddressOrigin.
Tested: Added the "AddressOrigin": "DHCP" to an IPv4Addresses PATCH
command. The JSON response is "property is not in the list of valid
properties".
Change-Id: Id7d41e9f1b393738e20725495b3821dd2f9f69d0
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
|
|
|
|
|
|
|
|
|
| |
Self assigned IPv4 addresses must be flagged as LinkLocal, not
LinkGlobal. Likewise global IPv4 addresses must be flagged as
LinkGlobal.
Change-Id: I9f6f0ceb3d312dd0198cb54c59c579ed96fbc38a
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
|
|
|
|
|
|
|
|
|
| |
Manipulating IPv6 static addresses works the same way as IPv4 static
addresses. Keep the IPv6StaticAddresses collection, and remove write
access from the read-only IPv6Addresses collection.
Change-Id: If58c858c676f7ae843e0642800a4083c5df79d1d
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added GET support for IPv6Addresses
Added GET and PATCH support for IPv6StaticAddresses
Tested by:
GET
PATCH -D patch.txt -d '{"IPv6StaticAddresses": [{"Address": "2002:905:150e:301:72e2:84ff:fe14:222","PrefixLength": 64}]}'
PATCH -D patch.txt -d '{"IPv6StaticAddresses": [{},{"Address": "2002:905:150e:301:72e2:84ff:fe14:333","PrefixLength": 64}]}'
PATCH -D patch.txt -d '{"IPv6StaticAddresses": [null,{},{"Address": "2002:905:150e:301:72e2:84ff:fe14:444","PrefixLength": 64}]}'
PATCH -D patch.txt -d '{"IPv6StaticAddresses": [{"Address": "2002:905:150e:301:72e2:84ff:fe14:555","PrefixLength": 64},{}]}'
PATCH -D patch.txt -d '{"IPv6StaticAddresses": [{},{"Address": "2002:905:150e:301:72e2:84ff:fe14:666"}]}'
PATCH -D patch.txt -d '{"IPv6StaticAddresses": [{},{"PrefixLength": 64}]}'
Tested with validator and no errors.
Change-Id: I7d1314a0c7843aae8425d66119f0d205a5cfac55
Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DHCPv4 were read-only properties, this code change make following
properties to be PATCHable:
- DHCPEnabled
- UseDNSServers
- UseDomainName
- UseNTPServers
Tested:
1. Check DHCPv4 properties value
GET /redfish/v1/Managers/bmc/EthernetInterfaces/<ethID> HTTP/1.1
Response:
{
......
"DHCPv4": {
"DHCPEnabled": true,
"UseDNSServers": true,
"UseDomainName": true,
"UseNTPServers": true
},
......
}
2. PATCH DHCPv4
PATCH /redfish/v1/Managers/bmc/EthernetInterfaces/eth1 HTTP/1.1
{
"DHCPv4": {
"DHCPEnabled":false,
"UseDNSServers": false,
"UseDomainName": false,
"UseNTPServers": false
}
}
3. Check whether DHCPv4 properties are set
GET /redfish/v1/Managers/bmc/EthernetInterfaces/<ethID> HTTP/1.1
Response:
{
......
"DHCPv4": {
"DHCPEnabled": false,
"UseDNSServers": false,
"UseDomainName": false,
"UseNTPServers": false
},
......
}
Signed-off-by: Jennifer Lee <jennifer1.lee@intel.com>
Change-Id: I125029ae4cdef329edabd18f6aa6a16db6e27d3d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, when a user requested a network interface that was
non-sensical, like:
/redfish/v1/Managers/bmc/EthernetInterfaces/foobar/VLANs
OR
/redfish/v1/Managers/bmc/EthernetInterfaces/foobar
They would be presented with a 200-OK, and a partially filled in object.
While this doesn't matter much for the casual redfish user, who uses the
collection to properly enumerate devices, this causes an issue with
security scanners, which think they've found some vulnerability when
they can throw whatever injection text they want to in the message, and
it shows up in the response.
This patchset corrects this, and causes the urls referenced above to
properly return 404, and the appropriate "ResourceNotFound" error
message.
Tested:
Attempted both URLs shown above. Both return 404.
Ran redfish service validator, observed no errors related to
EthernetInterface, or sub nodes. Attempted good URLs, and observed no
change to the payload.
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: Idb2758858d4dbaf421c0cef28b1d5d02402e0ad8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Testing:
"NameServers": [],
"NameServers@Message.ExtendedInfo": [
{
"@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message",
"Message": "The property NameServers is a read only property and cannot be assigned a value.",
"MessageArgs": [
"NameServers"
],
"MessageId": "Base.1.4.0.PropertyNotWritable",
"Resolution": "Remove the property from the request body and resubmit the request if the operation failed.",
"Severity": "Warning"
}
]
Change-Id: I12b8cb0ad9b8ad83371ee1d834f38e7537cc7b61
Signed-off-by: RAJESWARAN THILLAIGOVINDAN <rajeswgo@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added GET support for IPv6DefaultGateway.its read only property
On Patch operation display "PropertyNotWritable" message.
Tested by:
GET
PATCH -D patch.txt -d '{"IPv6DefaultGateway": "fe80::226:88ff:feac:8401"}'
Tested with validator and no errors.
Change-Id: Ib67234496b70ec53508a9be36cd86c1859b5d895
Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If an IPV4 gateway is empty use "0.0.0.0".
The RedfishServiceValidator throws the following error on
a Witherspoon system:
"IPv4Addresses[0].Gateway: String '' does not match pattern
''^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$''"
Tested: Ran RedfishServiceValidator and no longer observe the
error. IPV4 addresses with gateways are untouched.
Change-Id: I423aeeb0bec46fa5cc0c8cf5a017c16d20314984
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Testing:
PATCH -D patch.txt -d '{"StaticNameServers": ["3.3.3.3"]}'
PATCH -D patch.txt -d '{"StaticNameServers": ["3.3.3.3","6.6.6.6"]}'
PATCH -D patch.txt -d '{"StaticNameServers": []}'
Signed-off-by: RAJESWARAN THILLAIGOVINDAN <rajeswgo@in.ibm.com>
Change-Id: I3ffb7f5b704437b31ddfeb6a74eae3e6a582164a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch set fixes the issue at the Patch operation on VLAN resource.
Before this for any new value of VLANId , the patch command used to apply
value 1 as the new VLANId
Tested by :
GET https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0/VLANs/eth0_10
PATCH https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0/VLANs/eth0_10 -d '{ "VLANId" : 12, "VLANEnable": true}'
PATCH https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0/VLANs/eth0_10 -d '{ "VLANId" : 20, "VLANEnable": false}'
Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com>
Change-Id: Ia18e58816e6c78c8609e0daa558bc66d6914568e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes the following issues. Before this fix the VLAN functionality was inconsiststant.
1)Add VLANs property to the EthernetInterface resource
2)Removed VLAN property under EthernetInterface resource
3)Made the property - VLANEnable mandatory for creating vlans (POST command)
4)Fetch the VLANId when GET on the VLAN Interface resource
5)Updated Ethernet schema to EthernetInterface.v1_4_1
6)Changed the propert name "DHCPv4Configuration" to "DHCPv4" as per the schema
Tested by:
GET https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0
GET https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0/VLANs
POST -D headers.txt https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0/VLANs -d '{ "VLANId" : 30, "VLANEnable": true}'
GET https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0/VLANs/eth0_30
Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com>
Change-Id: I2339f6711cdd56fe42fee030701125492911dc26
|
|
|
|
|
|
|
|
| |
This reverts commit 6ea007a2faec52ad62680015d2a3f00371a1e351.
Reason for revert: Reports of bmcweb seg faults.
Change-Id: I408f1bb29c2f8e427a6621cdaac8c31b847ebf06
|
|
|
|
|
|
|
|
|
|
|
|
| |
bmcweb classically has not taken a strong opinion on warnings. With
this commit, that policy is changing, and bmcweb will invoke the best
warnings we are able to enable, and turn on -Werror for all builds.
This is intended to reduce the likelihood of hard-to-debug situations
that the compiler coulve caught early on.
Change-Id: I57474410821e82666b3a108cfd0db7d070e8900a
Signed-off-by: Ed Tanous <ed@tanous.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
object.
Before this commit after creating the IPv4 address object,JSON response
was having empty string for the newly added object.
This commit fixes the problem.
Tested By:
Assuming there are already two IP addresses configured then the following
PATCH request would throw the following output
PATCH -D patch.txt -d '{"IPv4Addresses": [{},{},{"Address": "a.a.a.a","Address
Origin": "Static","SubnetMask": "255.255.0.0","Gateway":"g.g.g.g"}]}
{
"@odata.id": "/redfish/v1/Managers/bmc/EthernetInterfaces/eth0",
"HostName": "witherspoon",
"IPv4Addresses": [
{
"Address": "169.254.201.17",
"AddressOrigin": "IPv4LinkLocal",
"Gateway": "9.3.185.1",
"SubnetMask": "255.255.0.0"
},
{
"Address": "9.3.185.83",
"AddressOrigin": "Static",
"Gateway": "9.3.185.1",
"SubnetMask": "255.255.255.0"
},
{
"Address": "a.a.a.a",
"Gateway": "g.g.g.g",
"SubnetMask": "255.255.0.0"
}
],
Change-Id: I6be340051020839ff7f669296c2077ecfdce78ff
Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
| |
TestedBy:
PATCH '{"MACAddress": "x2:xx:xx:xx:xx:xx"}'
Change-Id: I6dc421ea509506a2f3062fc0531778ffa2b00310
Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this commit we were reading the IPV4address through readJSON
function in vector of json, readJSON doesn't like the null list
parameter and throws the error as below
"The value null for the property IPv4Addresses is of a different type
than the property can accept"
This commit fixes that problem and some restructuring the code to make
delete work.
TestedBy:
PATCH {"IPv4Addresses": [{},null,{},{}]}
deletes second object
PATCH {"IPv4Addresses": [null,{}]}
deletes first object
Suppose if the IPv4Address has two addresses then the
Following PATCH request would give the folowing error.
PATCH {"IPv4Addresses": [{},{},null]
{
"IPv4Addresses/0@Message.ExtendedInfo": [
{
"@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message",
"Message": "The value [{},{},null] for the property IPv4Addresses/2 is of a
different format than the property can accept.",
"MessageArgs": [
"[{},{},null]",
"IPv4Addresses/2"
],
}
Change-Id: Iaefd59de469cb345e86b19349b27567a4fcec3fa
Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this commit the get-request on ethernet interface service
gets the DHCPv4Configuration.The following are the properties
that are add as a part of this commit.
- UseDNSServers
- UseNTPServers
- UseDomainName
- DHCPEnabled
Tested By:(On Qemu)
GET https://<ip>/redfish/v1/Managers/bmc/EthernetInterfaces/eth0
Change-Id: Ia1f6dbe2c4f1f2ed33adc54f7fd99b61a36c1058
Signed-off-by: manojkiraneda <manojkiran.eda@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tested by:
Assuming there are two IP addresses in the IPv4Addresses for the
following PATCH request.
1) PATCH {"IPv4Addresses": [{},{}]} =>No change in the existing list.
2) PATCH {"IPv4Addresses": [{},{},{}]}
Following error for the third list item.
"IPv4Addresses/0/Address@Message.ExtendedInfo": [
{
"@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message",
"Message": "The property IPv4Addresses/2/Address is a required property
and must be included in the request.",
"MessageArgs": [
"IPv4Addresses/2/Address"
],
"MessageId": "Base.1.4.0.PropertyMissing",
"Resolution": "Ensure that the property is in the request body and has a
valid value and resubmit the request if the operation failed.",
"Severity": "Warning"
}
Change-Id: I24d11ca82cf6843611f72912499878bcbe1aecac
Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During Property Update for the Ipv4address, Index was getting
converted into string which was causing the bmcweb to crash.
This commit fixes this problem.
TestedBy:
Assumption: There is already three IP address and updating the
third one.
PATCH -D patch.txt -d '{"IPv4Addresses":
[{},{},{"Address": "x.x.x.x","AddressOrigin": "Static","SubnetMask": "255.255.0.0","Gateway":"x.x.x.x"}]}
Change-Id: Ic055649b75aaa36e16bda5d8dc4e4e9c87dcb315
Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These variables are of type std::optional,The values should be
filled by the readJSON function,as further decision to handle the
patch for the vlan is dependent on whether the value for vlanID and vlanEnable
is not null.
Due to this issue, control goes to handle the vlan patch and the
readJSON inside the handleVlanPatch doesn't find the values for
vlanID and vlanEnable so set the resp result to forbidden.
After that if any other readJSON would be called it would return failure
and due to that no other PATCH operation on the ipv4Address can be
completed.
Change-Id: I3ebab18ae4adfa7c871ecab862a2865dc14f154d
Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
| |
This commit moves the various vlan interfaces to use the existing
std::vector based implementations, and not the existing implementations.
Change-Id: Id2503d5e2f1503b61ec7dbdb25098611382b24c5
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patchset attempts to fix all compiler warnings in bmcweb owned
files. There are 2 warnings left, both in sdbusplus, which will be
resolved in a patchset there.
Tested By:
Recompiled, observed warning count went from 30, to zero.
Change-Id: Ife90207aa5773bc28faa8b04c732cafa5a56e4e4
Signed-off-by: Ed Tanous <ed@tanous.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes the redfish behavior to move to a single, known name
under the /redfish/v1/Systems/system path. This is advantageous for a
lot of reasons.
1. Lots fewer dbus calls to determine the system name for every path.
This could be optimized in other ways, like checking the system name on
startup, but because redfish paths are not intended to be informative,
this patchset takes the opinion that less code is better.
2. Lots of lowered complexity, given that each endpoint underneath
/system doesn't need an individual "does this system exist, and is the
name right" check.
3. This makes it possible to correctly implement the "Links" property in
Chassis, which is required for the OCP base server profile
Tested By:
Very minimal testing done, but it seems to pass the validator.
Change-Id: Iea3cb5081b92a3843b6877decd009936de00561c
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I9d7069668f91f2ac72d2f4a440f63e0e85dd5269
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
| |
The ethernet interface previous hardcoded error handling patterns for
the interfaces shown. This commit moves it to the generic ReadJson
mechanisms for error handling
Change-Id: I710188c808ee62c5797059d7ee8f9876bf872a11
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
In certain cases, redfish wants to unpack specialized types that might
be more complex than just simple structs. This commit adds the ability
to unpack a nlohman json object directly, and moves the ethernet schema
over to the new api
Change-Id: Ib3c25e6c4d8f0a163647092adfb454355d329170
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
| |
This change is largely a sed replace, and gets us closer to standards
compliance.
Change-Id: Ie60437eff43de830ef19389344a55430dabd9d16
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
| |
Now that sdbusplus variant supports std::get_if, we can remove our
custom, mapbox namespaced implementation that does the same thing.
Change-Id: I854c473003e28e41dd45dba08ca683433f1c1774
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the original incarnation of bmcweb, route registration was done
automatically. This has proved to be a terrible idea, wraught with
corner cases and issues.
The route registration is currently the only user of the
redfish::Node::json element. Unfortunately, as written, this structure
consumes a lot of memory that's duplicated and not very useful. From a
performance perspective, there is almost no difference between
rebuilding the structure for each GET request, and having the "cache"
that needs to be copied into the response and modified before it can be
useful.
In the programming tradeoffs for bmc, lower memory usage is more important
than latency, especially at these levels.
Change-Id: I785e8352123e5e886acf05cd59cb23648f93839d
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The error message code used a json_pointer object which must
begin with a '/' character and had to be sent as an extra
parameter. This change simplifies the interface by using a
string so there doesn't have to be a '/'. This allowed the
same property argument passed for the message to be used
for the property field path.
Tested: Sent an error with a property and verified that it is
correctly displayed.
Change-Id: I0571e2eee627cedf29d751588a4f1bceee66f084
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Makes the Redfish error reporting interface automatically handle
setting the http status and JSON content in the response object.
When using an AsyncResp object, this allows for simply calling
the Redfish error and returning.
Change-Id: Icfdce2de763225f070e8dd61e591f296703f46bb
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several rounds of cleanup to the ethernet interfaces. Changes involved:
1. Move schemas to std::shared_ptr for handling responses
2. Remove the use of the "providers" interface. As there is currently
only one usage, the providers interface doesn't give us any flexibility.
3 Move the ethernet interfaces to flat_set, to allow better sorting
and lookup times.
4. Fix a number of "use after free" bugs with lambda callbacks that
were passing by reference instead of by value.
Change-Id: I3f8ffb10702563b25fda88155f1929b8d8e38bf5
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This commit implements an optional LogService endpoint for debugging
CPUs over Redish. It exposes both the ability to create a new log with
the LogImmediate action, as well as to pull a stored log using the
LogCollection schema. This feature is disabled by default, and should
be enabled in the meta-x86 layer.
Change-Id: Ied1d5e263a0857e09cd9a24fddec9c11a4066cd2
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
| |
This commit moves the codebase to the lastest clang-format file from
upstream, as well as clang-format-6.0.
Change-Id: Ice8313468097c0c42317fbb9e10ddf036e8cff4c
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
| |
A few patches were in flight when we did the great variable renaming.
This catches all the patches that have been merged since
Change-Id: Ie9642a4812b2a679ffa01ce540f5c4515a4c710b
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It looks like some of the code reviews in progress contain clang-format
fixes as well.
This squashes all of the clang-format fixes into a single commit, that
hopefully can go through the process a little faster, as it should only
be whitespace changes.
In the past, clang-formatting the naughty strings file proved
to return inconsistent results, and even formatted files would still be
detected as unformatted. Aparently the solution was to run
clang-format-5.0 approximately 20 times in a loop, until it decided on
a code layout that it was ok with iteration to iteration.
This is a bit of a corner case, so I don't think we need to get CI
running multiple runs in the future, and can just handle this on a case
by case basis. I'd be surprised if anyone else had this issue.
Change-Id: I57e2a03676bce20dc376fd9cea724732b2dc7010
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
| |
Got a couple patches that collided in air, and now builds are broken.
This resolves the collision by moving the new patches forward to the
latest #defines
Change-Id: I1fe35d17a68c61ad90752ae73000e2579131bf5d
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patchset moves bmcweb over to the upstream style naming
conventions for variables, classes, and functions, as well as imposes
the latest clang-format file.
This changeset was mostly built automatically by the included
.clang-tidy file, which has the ability to autoformat and auto rename
variables. At some point in the future I would like to see this in
greater use, but for now, we will impose it on bmcweb, and see how it
goes.
Tested: Code still compiles, and appears to run, although other issues
are possible and likely.
Change-Id: If422a2e36df924e897736b3feffa89f411d9dac1
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ethernet and VLAN Interfaces lacked detection whether interface
actually existed. So this detection had to be added. Additionally
there was slight inconsistency with error messages and statuses,
this is fixed now.
Tested on x86 development machine and dedicated platform. Does not
introduce any regression.
Change-Id: Ic9e2a98c748ac0dd1cf412b6a54a14f3f53eb9fa
Signed-off-by: Kowalski, Kamil <kamil.kowalski@intel.com>
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- SessionStore class now has a proper singleton structure
- session_storage_singleton.hpp is removed
- from_json(..) function for SessionStore is changed to a specialized
template
- minor cosmetic fixes added
- Move the template class usages of Crow App over to a non-template
parameter
Change-Id: Ic9effd5b7bac089a84c80a0caa97bd46d4984416
Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com>
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|