Add DMTF mockup fixtures and test helpers
Unmodified files from DMTF Redfish-Publications (public-rackmount1, public-localstorage, public-telemetry), only those the tests use, each set with DMTF's BSD-3-Clause license and a COMMANDS.txt naming the source commit and request paths. conftest.py loads them by request path and serves a mockup over mocked HTTP, with a SessionService that hands out a token, for the transport tests.
This commit is contained in:
77 files changed
+4051
No files matched your search
@@ -0,0 +1,11 @@
|
||||
Source: https://github.com/DMTF/Redfish-Publications
|
||||
Commit: 4f81814e399213c9055863ddaff42791c6b3706a
|
||||
Mockup: mockups/public-telemetry
|
||||
|
||||
Files are unmodified copies. Each request path maps to <path below /redfish/v1>/index.json
|
||||
(the service root is ./index.json), as in the mockup and as served by Redfish-Mockup-Server.
|
||||
|
||||
Request paths:
|
||||
GET /redfish/v1/Systems/1
|
||||
GET /redfish/v1/Systems/1/ResetActionInfo
|
||||
GET /redfish/v1/Managers/1/NetworkProtocol
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2014-2025, Contributing Member(s) of Distributed Management Task
|
||||
Force, Inc.. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation and/or
|
||||
other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"@odata.type": "#ManagerNetworkProtocol.v1_14_0.ManagerNetworkProtocol",
|
||||
"Id": "NetworkProtocol",
|
||||
"Name": "Manager Network Protocol",
|
||||
"Description": "Manager Network Service Status",
|
||||
"Status": {
|
||||
"State": "Enabled",
|
||||
"Health": "OK"
|
||||
},
|
||||
"HostName": "mymanager",
|
||||
"FQDN": "mymanager.mydomain.com",
|
||||
"HTTP": {
|
||||
"ProtocolEnabled": true,
|
||||
"Port": 80
|
||||
},
|
||||
"HTTPS": {
|
||||
"ProtocolEnabled": true,
|
||||
"Port": 443
|
||||
},
|
||||
"IPMI": {
|
||||
"ProtocolEnabled": true,
|
||||
"Port": 623
|
||||
},
|
||||
"SSH": {
|
||||
"ProtocolEnabled": true,
|
||||
"Port": 22
|
||||
},
|
||||
"SNMP": {
|
||||
"ProtocolEnabled": true,
|
||||
"Port": 161
|
||||
},
|
||||
"VirtualMedia": {
|
||||
"ProtocolEnabled": true,
|
||||
"Port": 17988
|
||||
},
|
||||
"SSDP": {
|
||||
"ProtocolEnabled": true,
|
||||
"Port": 1900,
|
||||
"NotifyMulticastIntervalSeconds": 600,
|
||||
"NotifyTTL": 5,
|
||||
"NotifyIPv6Scope": "Site"
|
||||
},
|
||||
"Telnet": {
|
||||
"ProtocolEnabled": true,
|
||||
"Port": 23
|
||||
},
|
||||
"KVMIP": {
|
||||
"ProtocolEnabled": true,
|
||||
"Port": 5288
|
||||
},
|
||||
"NTP": {
|
||||
"ProtocolEnabled": true,
|
||||
"NTPServers": [
|
||||
"0.pool.ntp.org",
|
||||
"1.pool.ntp.org",
|
||||
"time-a.nist.gov"
|
||||
]
|
||||
},
|
||||
"@odata.id": "/redfish/v1/Managers/1/NetworkProtocol",
|
||||
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"@odata.type": "#ActionInfo.v1_6_0.ActionInfo",
|
||||
"Id": "ResetActionInfo",
|
||||
"Name": "Reset Action Info",
|
||||
"Parameters": [
|
||||
{
|
||||
"Name": "ResetType",
|
||||
"Required": true,
|
||||
"DataType": "String",
|
||||
"AllowableValues": [
|
||||
"On",
|
||||
"ForceOff",
|
||||
"GracefulShutdown",
|
||||
"GracefulRestart",
|
||||
"ForceRestart",
|
||||
"Nmi",
|
||||
"ForceOn",
|
||||
"PushPowerButton"
|
||||
]
|
||||
}
|
||||
],
|
||||
"@odata.id": "/redfish/v1/Systems/1/ResetActionInfo",
|
||||
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
{
|
||||
"@odata.type": "#ComputerSystem.v1_29_0.ComputerSystem",
|
||||
"Id": "1",
|
||||
"Name": "My Computer System",
|
||||
"SystemType": "Physical",
|
||||
"AssetTag": "free form asset tag",
|
||||
"Manufacturer": "Manufacturer Name",
|
||||
"Model": "Model Name",
|
||||
"SKU": "",
|
||||
"SerialNumber": "2M220100SL",
|
||||
"PartNumber": "",
|
||||
"Description": "Description of server",
|
||||
"UUID": "00000000-0000-0000-0000-000000000000",
|
||||
"HostName": "web-srv344",
|
||||
"Status": {
|
||||
"State": "Enabled",
|
||||
"Health": "OK",
|
||||
"HealthRollup": "OK"
|
||||
},
|
||||
"IndicatorLED": "Off",
|
||||
"PowerState": "On",
|
||||
"Boot": {
|
||||
"BootSourceOverrideEnabled": "Once",
|
||||
"BootSourceOverrideMode": "UEFI",
|
||||
"BootSourceOverrideTarget": "Pxe",
|
||||
"BootSourceOverrideTarget@Redfish.AllowableValues": [
|
||||
"None",
|
||||
"Pxe",
|
||||
"Floppy",
|
||||
"Cd",
|
||||
"Usb",
|
||||
"Hdd",
|
||||
"BiosSetup",
|
||||
"Utilities",
|
||||
"Diags",
|
||||
"UefiTarget",
|
||||
"SDCard",
|
||||
"UefiHttp",
|
||||
"UefiBootNext"
|
||||
],
|
||||
"UefiTargetBootSourceOverride": ""
|
||||
},
|
||||
"BiosVersion": "P79 v1.00 (09/20/2013)",
|
||||
"ProcessorSummary": {
|
||||
"Count": 8,
|
||||
"LogicalProcessorCount": 256,
|
||||
"Model": "Multi-Core Intel(R) Xeon(R) processor 7xxx Series",
|
||||
"Status": {
|
||||
"State": "Enabled",
|
||||
"Health": "OK",
|
||||
"HealthRollup": "OK"
|
||||
}
|
||||
},
|
||||
"MemorySummary": {
|
||||
"TotalSystemMemoryGiB": 16,
|
||||
"MemoryMirroring": "System",
|
||||
"Status": {
|
||||
"State": "Enabled",
|
||||
"Health": "OK",
|
||||
"HealthRollup": "OK"
|
||||
}
|
||||
},
|
||||
"TrustedModules": [
|
||||
{
|
||||
"Status": {
|
||||
"State": "Enabled",
|
||||
"Health": "OK"
|
||||
},
|
||||
"InterfaceType": "TPM2_0",
|
||||
"FirmwareVersion": "3.1",
|
||||
"FirmwareVersion2": "1",
|
||||
"InterfaceTypeSelection": "None"
|
||||
}
|
||||
],
|
||||
"HostWatchdogTimer": {
|
||||
"FunctionEnabled": true,
|
||||
"WarningAction": "DiagnosticInterrupt",
|
||||
"WarningAction@Redfish.AllowableValues": [
|
||||
"DiagnosticInterrupt",
|
||||
"SMI",
|
||||
"None"
|
||||
],
|
||||
"TimeoutAction": "ResetSystem",
|
||||
"TimeoutAction@Redfish.AllowableValues": [
|
||||
"ResetSystem",
|
||||
"PowerCycle",
|
||||
"PowerDown",
|
||||
"None"
|
||||
],
|
||||
"Status": {
|
||||
"State": "StandbyOffline"
|
||||
}
|
||||
},
|
||||
"Processors": {
|
||||
"@odata.id": "/redfish/v1/Systems/1/Processors"
|
||||
},
|
||||
"Memory": {
|
||||
"@odata.id": "/redfish/v1/Systems/1/Memory"
|
||||
},
|
||||
"Links": {
|
||||
"Chassis": [
|
||||
{
|
||||
"@odata.id": "/redfish/v1/Chassis/1"
|
||||
}
|
||||
],
|
||||
"ManagedBy": [
|
||||
{
|
||||
"@odata.id": "/redfish/v1/Managers/1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Actions": {
|
||||
"#ComputerSystem.Reset": {
|
||||
"target": "/redfish/v1/Systems/1/Actions/ComputerSystem.Reset",
|
||||
"@Redfish.ActionInfo": "/redfish/v1/Systems/1/ResetActionInfo"
|
||||
}
|
||||
},
|
||||
"Oem": {
|
||||
"Contoso": {
|
||||
"@odata.type": "#Contoso.ComputerSystem",
|
||||
"ProductionLocation": {
|
||||
"FacilityName": "PacWest Production Facility",
|
||||
"Country": "USA"
|
||||
}
|
||||
},
|
||||
"Chipwise": {
|
||||
"@odata.type": "#Chipwise.ComputerSystem",
|
||||
"Style": "Executive"
|
||||
}
|
||||
},
|
||||
"@odata.id": "/redfish/v1/Systems/1",
|
||||
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
|
||||
}
|
||||
Reference in new issue
Block a user