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
+57
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"@odata.type": "#EthernetInterface.v1_12_6.EthernetInterface",
|
||||
"Id": "ToHost",
|
||||
"Name": "Manager Ethernet Interface",
|
||||
"Description": "Management Network Interface",
|
||||
"Status": {
|
||||
"State": "Enabled",
|
||||
"Health": "OK"
|
||||
},
|
||||
"InterfaceEnabled": true,
|
||||
"PermanentMACAddress": "AA:BB:CC:DD:EE:FF",
|
||||
"MACAddress": "AA:BB:CC:DD:EE:FF",
|
||||
"SpeedMbps": 100,
|
||||
"AutoNeg": true,
|
||||
"FullDuplex": true,
|
||||
"MTUSize": 1500,
|
||||
"HostName": "bmc-host-interface",
|
||||
"FQDN": "bmc-host-interface.dmtf.org",
|
||||
"MaxIPv6StaticAddresses": 1,
|
||||
"IPv4Addresses": [
|
||||
{
|
||||
"Address": "192.168.20.55",
|
||||
"SubnetMask": "255.255.255.0",
|
||||
"AddressOrigin": "Static",
|
||||
"Gateway": "192.168.20.1"
|
||||
}
|
||||
],
|
||||
"IPv6AddressPolicyTable": [
|
||||
{
|
||||
"Prefix": "::1/128",
|
||||
"Precedence": 50,
|
||||
"Label": 0
|
||||
}
|
||||
],
|
||||
"IPv6StaticAddresses": [
|
||||
{
|
||||
"Address": "fe80::1ec1:deff:fe6f:1e24",
|
||||
"PrefixLength": 64
|
||||
}
|
||||
],
|
||||
"IPv6DefaultGateway": "fe80::1ec1:deff:fe6f:1e24",
|
||||
"IPv6Addresses": [
|
||||
{
|
||||
"Address": "fe80::1ec1:deff:fe6f:1e24",
|
||||
"PrefixLength": 64,
|
||||
"AddressOrigin": "Static",
|
||||
"AddressState": "Preferred"
|
||||
}
|
||||
],
|
||||
"Links": {
|
||||
"HostInterface": {
|
||||
"@odata.id": "/redfish/v1/Managers/BMC/HostInterfaces/1"
|
||||
}
|
||||
},
|
||||
"@odata.id": "/redfish/v1/Managers/BMC/EthernetInterfaces/ToHost",
|
||||
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
|
||||
}
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"@odata.type": "#EthernetInterface.v1_12_6.EthernetInterface",
|
||||
"Id": "eth0",
|
||||
"Name": "Manager Ethernet Interface",
|
||||
"Description": "Management network interface on a dedicated port",
|
||||
"Status": {
|
||||
"State": "Enabled",
|
||||
"Health": "OK"
|
||||
},
|
||||
"LinkStatus": "LinkUp",
|
||||
"InterfaceEnabled": true,
|
||||
"PermanentMACAddress": "23:11:8A:33:CF:EA",
|
||||
"MACAddress": "23:11:8A:33:CF:EA",
|
||||
"SpeedMbps": 100,
|
||||
"AutoNeg": true,
|
||||
"FullDuplex": true,
|
||||
"MTUSize": 1500,
|
||||
"HostName": "web483-bmc",
|
||||
"FQDN": "web483-bmc.dmtf.org",
|
||||
"MaxIPv6StaticAddresses": 1,
|
||||
"VLAN": {
|
||||
"VLANEnable": true,
|
||||
"VLANId": 101
|
||||
},
|
||||
"IPv4Addresses": [
|
||||
{
|
||||
"Address": "192.168.0.10",
|
||||
"SubnetMask": "255.255.252.0",
|
||||
"AddressOrigin": "DHCP",
|
||||
"Gateway": "192.168.0.1"
|
||||
}
|
||||
],
|
||||
"IPv6AddressPolicyTable": [
|
||||
{
|
||||
"Prefix": "::1/128",
|
||||
"Precedence": 50,
|
||||
"Label": 0
|
||||
}
|
||||
],
|
||||
"IPv6StaticAddresses": [
|
||||
{
|
||||
"Address": "fe80::1ec1:deff:fe6f:1e24",
|
||||
"PrefixLength": 16
|
||||
}
|
||||
],
|
||||
"IPv6DefaultGateway": "fe80::1ec1:deff:fe6f:1e24",
|
||||
"IPv6Addresses": [
|
||||
{
|
||||
"Address": "fe80::1ec1:deff:fe6f:1e24",
|
||||
"PrefixLength": 64,
|
||||
"AddressOrigin": "SLAAC",
|
||||
"AddressState": "Preferred"
|
||||
}
|
||||
],
|
||||
"NameServers": [
|
||||
"names.dmtf.org"
|
||||
],
|
||||
"Links": {
|
||||
"Ports": [
|
||||
{
|
||||
"@odata.id": "/redfish/v1/Managers/BMC/DedicatedNetworkPorts/1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"@Redfish.Settings": {
|
||||
"@odata.type": "#Settings.v1_5_0.Settings",
|
||||
"SettingsObject": {
|
||||
"@odata.id": "/redfish/v1/Managers/BMC/EthernetInterfaces/eth0/SD"
|
||||
},
|
||||
"Time": "2012-03-07T14:44.30-05:00",
|
||||
"ETag": "84ffcbb050ddc7fa9cddb59014546e59",
|
||||
"Messages": [
|
||||
{
|
||||
"MessageId": "Base.1.0.SettingsFailed",
|
||||
"RelatedProperties": [
|
||||
"/IPv6Addresses/PrefixLength"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"@odata.id": "/redfish/v1/Managers/BMC/EthernetInterfaces/eth0",
|
||||
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"@odata.type": "#EthernetInterfaceCollection.EthernetInterfaceCollection",
|
||||
"Name": "Ethernet Network Interface Collection",
|
||||
"Description": "Collection of EthernetInterfaces for this Manager",
|
||||
"Members@odata.count": 2,
|
||||
"Members": [
|
||||
{
|
||||
"@odata.id": "/redfish/v1/Managers/BMC/EthernetInterfaces/eth0"
|
||||
},
|
||||
{
|
||||
"@odata.id": "/redfish/v1/Managers/BMC/EthernetInterfaces/ToHost"
|
||||
}
|
||||
],
|
||||
"@odata.id": "/redfish/v1/Managers/BMC/EthernetInterfaces",
|
||||
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"@odata.type": "#LogEntryCollection.LogEntryCollection",
|
||||
"Name": "Log Service Collection",
|
||||
"Description": "Collection of Logs for this System",
|
||||
"Members@odata.count": 1,
|
||||
"Members": [
|
||||
{
|
||||
"@odata.id": "/redfish/v1/Managers/BMC/LogServices/Log/Entries/1",
|
||||
"@odata.type": "#LogEntry.v1_22_0.LogEntry",
|
||||
"Id": "1",
|
||||
"Name": "Log Entry 1",
|
||||
"EntryType": "Event",
|
||||
"Severity": "Critical",
|
||||
"Created": "2012-03-07T14:44:00Z",
|
||||
"SensorNumber": 1,
|
||||
"Message": "System May be Melting",
|
||||
"MessageId": "Event.1.0.TempWayTooHot",
|
||||
"MessageArgs": [
|
||||
"88"
|
||||
],
|
||||
"Links": {
|
||||
"OriginOfCondition": {
|
||||
"@odata.id": "/redfish/v1/Chassis/1U/Thermal"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"@odata.id": "/redfish/v1/Managers/BMC/LogServices/Log/Entries",
|
||||
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"@odata.type": "#LogService.v1_9_0.LogService",
|
||||
"Id": "Log",
|
||||
"Name": "System Log Service",
|
||||
"MaxNumberOfRecords": 1000,
|
||||
"OverWritePolicy": "WrapsWhenFull",
|
||||
"DateTime": "2015-03-13T04:14:33+06:00",
|
||||
"DateTimeLocalOffset": "+06:00",
|
||||
"ServiceEnabled": true,
|
||||
"Status": {
|
||||
"State": "Enabled",
|
||||
"Health": "OK"
|
||||
},
|
||||
"Actions": {
|
||||
"#LogService.ClearLog": {
|
||||
"target": "/redfish/v1/Managers/BMC/LogServices/Log/Actions/LogService.ClearLog"
|
||||
}
|
||||
},
|
||||
"Entries": {
|
||||
"@odata.id": "/redfish/v1/Managers/BMC/LogServices/Log/Entries"
|
||||
},
|
||||
"@odata.id": "/redfish/v1/Managers/BMC/LogServices/Log",
|
||||
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"@odata.type": "#LogServiceCollection.LogServiceCollection",
|
||||
"Name": "Log Service Collection",
|
||||
"Description": "Collection of Log Services for this Manager",
|
||||
"Members@odata.count": 1,
|
||||
"Members": [
|
||||
{
|
||||
"@odata.id": "/redfish/v1/Managers/BMC/LogServices/Log"
|
||||
}
|
||||
],
|
||||
"@odata.id": "/redfish/v1/Managers/BMC/LogServices",
|
||||
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
|
||||
}
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
{
|
||||
"@odata.type": "#ManagerNetworkProtocol.v1_14_0.ManagerNetworkProtocol",
|
||||
"Id": "NetworkProtocol",
|
||||
"Name": "Manager Network Protocol",
|
||||
"Description": "Manager Network Service",
|
||||
"Status": {
|
||||
"State": "Enabled",
|
||||
"Health": "OK"
|
||||
},
|
||||
"HostName": "web483-bmc",
|
||||
"FQDN": "web483-bmc.dmtf.org",
|
||||
"HTTP": {
|
||||
"ProtocolEnabled": true,
|
||||
"Port": 80
|
||||
},
|
||||
"HTTPS": {
|
||||
"ProtocolEnabled": true,
|
||||
"Port": 443,
|
||||
"Certificates": {
|
||||
"@odata.id": "/redfish/v1/Managers/BMC/NetworkProtocol/HTTPS/Certificates"
|
||||
}
|
||||
},
|
||||
"Proxy": {
|
||||
"Enabled": true,
|
||||
"ProxyServerURI": "https://proxy.intranet.contoso.com:9900",
|
||||
"Username": "proxy",
|
||||
"Password": null,
|
||||
"PasswordSet": true,
|
||||
"ExcludeAddresses": [],
|
||||
"ProxyAutoConfigURI": "proxy.intranet.contoso.com/proxy.pac"
|
||||
},
|
||||
"IPMI": {
|
||||
"ProtocolEnabled": true,
|
||||
"Port": 623
|
||||
},
|
||||
"SSH": {
|
||||
"ProtocolEnabled": true,
|
||||
"Port": 22
|
||||
},
|
||||
"SNMP": {
|
||||
"ProtocolEnabled": true,
|
||||
"EnableSNMPv1": true,
|
||||
"EnableSNMPv2c": false,
|
||||
"EnableSNMPv3": true,
|
||||
"Port": 161,
|
||||
"CommunityStrings": [
|
||||
{
|
||||
"Name": "Read-only community",
|
||||
"CommunityString": null,
|
||||
"AccessMode": "Limited"
|
||||
},
|
||||
{
|
||||
"Name": "Full access community",
|
||||
"CommunityString": null,
|
||||
"AccessMode": "Full"
|
||||
}
|
||||
],
|
||||
"EngineId": {
|
||||
"PrivateEnterpriseId": "00 00 01 9C",
|
||||
"EnterpriseSpecificMethod": "00 11 22 33 44 55 66 77"
|
||||
},
|
||||
"HideCommunityStrings": true,
|
||||
"AuthenticationProtocol": "HMAC_SHA96",
|
||||
"EncryptionProtocol": "CFB128_AES128"
|
||||
},
|
||||
"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
|
||||
},
|
||||
"@odata.id": "/redfish/v1/Managers/BMC/NetworkProtocol",
|
||||
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
{
|
||||
"@odata.type": "#Manager.v1_25_0.Manager",
|
||||
"Id": "BMC",
|
||||
"Name": "Manager",
|
||||
"ManagerType": "BMC",
|
||||
"Description": "Contoso BMC",
|
||||
"ServiceEntryPointUUID": "92384634-2938-2342-8820-489239905423",
|
||||
"UUID": "58893887-8974-2487-2389-841168418919",
|
||||
"Model": "Joo Janta 200",
|
||||
"DateTime": "2015-03-13T04:14:33+06:00",
|
||||
"DateTimeLocalOffset": "+06:00",
|
||||
"DateTimeSource": "NTP",
|
||||
"Status": {
|
||||
"State": "Enabled",
|
||||
"Health": "OK"
|
||||
},
|
||||
"PowerState": "On",
|
||||
"GraphicalConsole": {
|
||||
"ServiceEnabled": true,
|
||||
"MaxConcurrentSessions": 2,
|
||||
"ConnectTypesSupported": [
|
||||
"KVMIP"
|
||||
]
|
||||
},
|
||||
"SerialConsole": {
|
||||
"ServiceEnabled": true,
|
||||
"MaxConcurrentSessions": 1,
|
||||
"ConnectTypesSupported": [
|
||||
"Telnet",
|
||||
"SSH",
|
||||
"IPMI"
|
||||
]
|
||||
},
|
||||
"CommandShell": {
|
||||
"ServiceEnabled": true,
|
||||
"MaxConcurrentSessions": 4,
|
||||
"ConnectTypesSupported": [
|
||||
"Telnet",
|
||||
"SSH"
|
||||
]
|
||||
},
|
||||
"FirmwareVersion": "1.45.455b66-rev4",
|
||||
"AdditionalFirmwareVersions": {
|
||||
"Bootloader": "v2022.01",
|
||||
"Kernel": "Linux 5.13.0-30-generic arm71",
|
||||
"Oem": {
|
||||
"Contoso": {
|
||||
"@odata.type": "#ContosoSoftwareInventory.v1_0_0.AdditionalVersions",
|
||||
"ManagementApp": "1.30"
|
||||
}
|
||||
}
|
||||
},
|
||||
"NetworkProtocol": {
|
||||
"@odata.id": "/redfish/v1/Managers/BMC/NetworkProtocol"
|
||||
},
|
||||
"EthernetInterfaces": {
|
||||
"@odata.id": "/redfish/v1/Managers/BMC/EthernetInterfaces"
|
||||
},
|
||||
"HostInterfaces": {
|
||||
"@odata.id": "/redfish/v1/Managers/BMC/HostInterfaces"
|
||||
},
|
||||
"SerialInterfaces": {
|
||||
"@odata.id": "/redfish/v1/Managers/BMC/SerialInterfaces"
|
||||
},
|
||||
"LogServices": {
|
||||
"@odata.id": "/redfish/v1/Managers/BMC/LogServices"
|
||||
},
|
||||
"DedicatedNetworkPorts": {
|
||||
"@odata.id": "/redfish/v1/Managers/BMC/DedicatedNetworkPorts"
|
||||
},
|
||||
"SecurityPolicy": {
|
||||
"@odata.id": "/redfish/v1/Managers/BMC/SecurityPolicy"
|
||||
},
|
||||
"Links": {
|
||||
"ManagerForServers": [
|
||||
{
|
||||
"@odata.id": "/redfish/v1/Systems/437XR1138R2"
|
||||
}
|
||||
],
|
||||
"ManagerForChassis": [
|
||||
{
|
||||
"@odata.id": "/redfish/v1/Chassis/1U"
|
||||
}
|
||||
],
|
||||
"ManagerInChassis": {
|
||||
"@odata.id": "/redfish/v1/Chassis/1U"
|
||||
}
|
||||
},
|
||||
"Actions": {
|
||||
"#Manager.Reset": {
|
||||
"target": "/redfish/v1/Managers/BMC/Actions/Manager.Reset",
|
||||
"ResetType@Redfish.AllowableValues": [
|
||||
"ForceRestart",
|
||||
"GracefulRestart"
|
||||
]
|
||||
}
|
||||
},
|
||||
"@odata.id": "/redfish/v1/Managers/BMC",
|
||||
"@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