aboutsummaryrefslogtreecommitdiffstats
path: root/hdv/redfish/conf
diff options
context:
space:
mode:
Diffstat (limited to 'hdv/redfish/conf')
-rw-r--r--hdv/redfish/conf/cases.xlsxbin17263 -> 0 bytes
-rw-r--r--hdv/redfish/conf/cases.yaml329
-rw-r--r--hdv/redfish/conf/config.yaml11
-rw-r--r--hdv/redfish/conf/depends.yaml33
4 files changed, 234 insertions, 139 deletions
diff --git a/hdv/redfish/conf/cases.xlsx b/hdv/redfish/conf/cases.xlsx
deleted file mode 100644
index e7fc61d..0000000
--- a/hdv/redfish/conf/cases.xlsx
+++ /dev/null
Binary files differ
diff --git a/hdv/redfish/conf/cases.yaml b/hdv/redfish/conf/cases.yaml
index 5d92689..3a64ebc 100644
--- a/hdv/redfish/conf/cases.yaml
+++ b/hdv/redfish/conf/cases.yaml
@@ -1,186 +1,281 @@
---
- case_name: get asset code
case_sn: 1
+ enabled: false
expected_code: 200
- expected_result: '{"AssetTag": "CM_cc@1234"}'
+ expected_result:
+ AssetTag: CM_cc@1234
group: asset managment
header: null
method: GET
request_body: null
url: /redfish/v1/Systems/{system_id}
- key_flag_dict: {"system_id": "Members"}
+ key_flag_dict:
+ system_id: Members
+
- case_name: check main board name
case_sn: 8
+ enabled: true
expected_code: 200
- expected_result: '{"Oem":{"Mainboard": {"BoardName": "RS33M2C9S"}}}'
+ expected_result:
+ Oem:
+ Mainboard:
+ BoardName: RS33M2C9S
group: asset managment
header: null
method: GET
request_body: null
url: /redfish/v1/Chassis/{chassis_id}
- key_flag_dict: {"chassis_id": "Members"}
+ key_flag_dict:
+ chassis_id: Members
+
- case_name: check CPU amount
case_sn: 11
+ enabled: true
expected_code: 200
- expected_result: '{"Members@odata.count": 2}'
+ expected_result:
+ Members@odata.count: 2
group: compoment management
header: null
method: GET
request_body: null
url: /redfish/v1/Systems/{system_id}/Processors
- key_flag_dict: {"system_id": "Members"}
+ key_flag_dict:
+ system_id: Members
+
- case_name: check CPU info
case_sn: 2
+ enabled: true
expected_code: 200
- expected_result: '{ "count": 2, "Manufacturer": "Intel(R) Corporation", "MaxSpeedMHz":
- 2300, "Model": "Intel(R) Xeon(R) Gold 5218N CPU @ 2.30GHz", "ProcessorArchitecture":
- ["x86", "IA-64", "ARM", "MIPS", "OEM"], "Socket": [1, 2], "Status": { "Health":
- "OK", "State": "Enabled" }, "TotalCores": 16, "TotalThreads":
- 32}'
+ expected_result:
+ count: 2
+ Manufacturer: "Intel(R) Corporation"
+ MaxSpeedMHz: 2300
+ Model: "Intel(R) Xeon(R) Gold 5218N CPU @ 2.30GHz"
+ ProcessorArchitecture: ["x86", "IA-64", "ARM", "MIPS", "OEM"]
+ Socket: [1, 2]
+ Status:
+ Health: OK
+ State: Enabled
+ TotalCores: 16
+ TotalThreads: 32
group: compoment management
header: null
method: GET
request_body: null
url: /redfish/v1/Systems/{system_id}/Processors/{cpu_id}
- key_flag_dict: {"system_id": "Members", "cpu_id": "Members"}
+ key_flag_dict:
+ system_id: Members
+ cpu_id: Members
+
- case_name: set asset code
case_sn: 1
+ enabled: true
expected_code: 200
- expected_result: '{"AssetTag": "CM_cc@1234"}'
+ expected_result:
+ AssetTag: CM_cc@1234
group: asset managment
header: null
method: PATCH
request_body: '{"AssetTag": "CM_cc@1234"}'
url: /redfish/v1/Systems/{system_id}
- key_flag_dict: {"system_id": "Members"}
+ key_flag_dict:
+ system_id: Members
+
- case_name: set host name
case_sn: 3
+ enabled: true
expected_code: 200
- expected_result: '{"HostName": "NFV-RPZJHZ-01B"}'
+ expected_result:
+ HostName: NFV-RPZJHZ-01B
group: asset managment
header: null
method: PATCH
request_body: '{"HostName": "NFV-RPZJHZ-01B"}'
url: /redfish/v1/Systems/{system_id}
- key_flag_dict: {"system_id": "Members"}
+ key_flag_dict:
+ system_id: Members
+
- case_name: check host name
case_sn: 4
+ enabled: true
expected_code: 200
- expected_result: '{"HostName": "NFV-RPZJHZ-01B"}'
+ expected_result:
+ HostName: NFV-RPZJHZ-01B
group: asset managment
header: null
method: GET
request_body: null
url: /redfish/v1/Systems/{system_id}
- key_flag_dict: {"system_id": "Members"}
+ key_flag_dict:
+ system_id: Members
+
- case_name: check manufacturer
case_sn: 5
+ enabled: true
expected_code: 200
- expected_result: '{"Manufacturer": "New H3C Technologies Co., Ltd."}'
+ expected_result:
+ Manufacturer: "New H3C Technologies Co., Ltd."
group: asset managment
header: null
method: GET
request_body: null
url: /redfish/v1/Systems/{system_id}
- key_flag_dict: {"system_id": "Members"}
+ key_flag_dict:
+ system_id: Members
+
- case_name: check model
case_sn: 6
+ enabled: true
expected_code: 200
- expected_result: '{"Model": "UniServer R4900 G3"}'
+ expected_result:
+ Model: "UniServer R4900 G3"
group: asset managment
header: null
method: GET
request_body: null
url: /redfish/v1/Systems/{system_id}
- key_flag_dict: {"system_id": "Members"}
+ key_flag_dict:
+ system_id: Members
+
- case_name: check serial number
case_sn: 7
+ enabled: true
expected_code: 200
- expected_result: '{"SerialNumber": "N/A"}'
+ expected_result:
+ SerialNumber: N/A
group: asset managment
header: null
method: GET
request_body: null
url: /redfish/v1/Systems/{system_id}
- key_flag_dict: {"system_id": "Members"}
+ key_flag_dict:
+ system_id: Members
+
- case_name: check main board name
case_sn: 8
+ enabled: true
expected_code: 200
- expected_result: '{"Oem":{"Mainboard": {"BoardName": "RS33M2C9S"}}}'
+ expected_result:
+ Oem:
+ Mainboard:
+ BoardName: RS33M2C9S
group: asset managment
header: null
method: GET
request_body: null
url: /redfish/v1/Chassis/{chassis_id}
- key_flag_dict: {"chassis_id": "Members"}
+ key_flag_dict:
+ chassis_id: Members
+
- case_name: check main board serial number
case_sn: 9
+ enabled: true
expected_code: 200
- expected_result: '{"Oem": {"Mainboard": {"SerialNumber": "N/A"}}}'
+ expected_result:
+ Oem:
+ Mainboard:
+ SerialNumber: N/A
group: asset managment
header: null
method: GET
request_body: null
url: /redfish/v1/Chassis/{chassis_id}
- key_flag_dict: {"chassis_id": "Members"}
+ key_flag_dict:
+ chassis_id: Members
+
- case_name: check BIOS version
case_sn: 10
+ enabled: true
expected_code: 200
- expected_result: '{"BiosVersion": "2.00.35P01 V100R001B02D035SP01"}'
+ expected_result:
+ BiosVersion: "2.00.35P01 V100R001B02D035SP01"
group: asset managment
header: null
method: GET
request_body: null
url: /redfish/v1/Systems/{system_id}
- key_flag_dict: {"system_id": "Members"}
+ key_flag_dict:
+ system_id: Members
+
- case_name: check CPU amount
case_sn: 11
+ enabled: true
expected_code: 200
- expected_result: '{"Members@odata.count": 2}'
+ expected_result:
+ Members@odata.count: 2
group: compoment management
header: null
method: GET
request_body: null
url: /redfish/v1/Systems/{system_id}/Processors
- key_flag_dict: {"system_id": "Members"}
+ key_flag_dict:
+ system_id: Member
+
- case_name: check CPU info
case_sn: 12
+ enabled: true
expected_code: 200
- expected_result: '{ "count": 2, "Manufacturer": "Intel(R) Corporation", "MaxSpeedMHz":
- 2300, "Model": "Intel(R) Xeon(R) Gold 5218N CPU @ 2.30GHz", "ProcessorArchitecture":
- ["x86", "IA-64", "ARM", "MIPS", "OEM"], "Socket": [1, 2], "Status": { "Health":
- "OK", "State": "Enabled" }, "TotalCores": 16, "TotalThreads":
- 32}'
+ expected_result:
+ count: 2
+ Manufacturer: Intel(R) Corporation
+ MaxSpeedMHz: 2300
+ Model: "Intel(R) Xeon(R) Gold 5218N CPU @ 2.30GHz"
+ ProcessorArchitecture: ["x86", "IA-64", "ARM", "MIPS", "OEM"]
+ Socket: [1, 2]
+ Status:
+ Health: OK
+ State: Enabled
+ TotalCores: 16
+ TotalThreads: 32
group: compoment management
header: null
method: GET
request_body: null
url: /redfish/v1/Systems/{system_id}/Processors/{cpu_id}
- key_flag_dict: {"system_id": "Members","cpu_id": "Members"}
+ key_flag_dict:
+ system_id: Members
+ cpu_id: Members
+
- case_name: check memory mount
case_sn: 13
+ enabled: true
expected_code: 200
- expected_result: '{"Members@odata.count": 12}'
+ expected_result:
+ Members@odata.count: 12
group: compoment management
header: null
method: GET
request_body: null
url: /redfish/v1/Systems/{system_id}/Memory
- key_flag_dict: {"system_id": "Members"}
+ key_flag_dict:
+ system_id: Members
+
- case_name: check memory information
case_sn: 14
+ enabled: true
expected_code: 200
- expected_result: '{ "count": 12, "BaseModuleType": "RDIMM", "CapacityMiB":
- 32768, "DeviceLocator": "N/A", "Manufacturer": ["Hynix Semiconductor", "Micron"], "MemoryDeviceType":
- "DDR4", "OperatingSpeedMhz": 2666, "PartNumber": ["HMA84GR7AFR4N-VK","36ASF4G72PZ-2G6D1"], "Status":
- { "Health": "OK", "State": "Enabled" }}'
+ expected_result:
+ count: 12
+ BaseModuleType: RDIMM
+ CapacityMiB: 32768
+ DeviceLocator: N/A
+ Manufacturer: ["Hynix Semiconductor", "Micron"]
+ MemoryDeviceType: DDR4
+ OperatingSpeedMhz: 2666
+ PartNumber: ["HMA84GR7AFR4N-VK", "36ASF4G72PZ-2G6D1"]
+ Status:
+ Health: OK
+ State: Enabled
group: compoment management
header: null
method: GET
request_body: null
url: /redfish/v1/Systems/{system_id}/Memory/{memory_id}
- key_flag_dict: {"system_id" : "Members", "memory_id" : "Members"}
-
+ key_flag_dict:
+ System_id: Members
+ memory_id: Members
+
# - case_name: check raid card amount
# case_sn: 15
# expected_code: 200
@@ -236,42 +331,78 @@
# method: GET
# request_body: null
# url: https://{bmc_ip}{networkports_id}
-# - case_name: check fans information
-# case_sn: 20
-# expected_code: 200
-# expected_result: '{ "FanSummary": { "Count": 6 }, "Fans": [ { "MemberId":
-# "N/A", "Oem": { "Public": { "SpeedRatio":
-# "N/A" } }, "Status": { "Health":
-# "OK", "State": "Enabled" } }, { "MemberId":
-# "N/A", "Oem": { "Public": { "SpeedRatio":
-# "N/A" } }, "Status": { "Health":
-# "OK", "State": "Enabled" } },{ "MemberId":
-# "N/A", "Oem": { "Public": { "SpeedRatio":
-# "N/A" } }, "Status": { "Health":
-# "OK", "State": "Enabled" } },{ "MemberId":
-# "N/A", "Oem": { "Public": { "SpeedRatio":
-# "N/A" } }, "Status": { "Health":
-# "OK", "State": "Enabled" } },{ "MemberId":
-# "N/A", "Oem": { "Public": { "SpeedRatio":
-# "N/A" } }, "Status": { "Health":
-# "OK", "State": "Enabled" } },{ "MemberId":
-# "N/A", "Oem": { "Public": { "SpeedRatio":
-# "N/A" } }, "Status": { "Health":
-# "OK", "State": "Enabled" } } ],}'
-# group: compoment management
-# header: null
-# method: GET
-# request_body: null
-# url: https://{bmc_ip}/redfish/v1/Chassis/{chassis_id}/Thermal
-# - case_name: check power amount
-# case_sn: 21
-# expected_code: 200
-# expected_result: '{ "DeviceMaxNum": { "PowerSupplyNum": 2},}'
-# group: compoment management
-# header: null
-# method: GET
-# request_body: null
-# url: https://{bmc_ip}/redfish/v1/Chassis/{chassis_id}
+- case_name: check fans information
+ case_sn: 20
+ enabled: true
+ expected_code: 200
+ expected_result:
+ FanSummary:
+ Count: 6
+ Fans:
+ - MemberId: N/A
+ Oem:
+ Public:
+ SpeedRatio: N/A
+ Status:
+ Health: OK
+ State: Enabled
+ - MemberId: N/A
+ Oem:
+ Public:
+ SpeedRatio: N/A
+ Status:
+ Health: OK
+ State: Enabled
+ - MemberId: N/A
+ Oem:
+ Public:
+ SpeedRatio: N/A
+ Status:
+ Health: OK
+ State: Enabled
+ - MemberId: N/A
+ Oem:
+ Public:
+ SpeedRatio: N/A
+ Status:
+ Health: OK
+ State: Enabled
+ - MemberId: N/A
+ Oem:
+ Public:
+ SpeedRatio: N/A
+ Status:
+ Health: OK
+ State: Enabled
+ - MemberId: N/A
+ Oem:
+ Public:
+ SpeedRatio: N/A
+ Status:
+ Health: OK
+ State: Enabled
+ group: compoment management
+ header: null
+ method: GET
+ request_body: null
+ url: /redfish/v1/Chassis/{chassis_id}/Thermal
+ key_flag_dict:
+ chassis_id: Members
+
+- case_name: check power amount
+ case_sn: 21
+ enabled: true
+ expected_code: 200
+ expected_result:
+ DeviceMaxNum:
+ PowerSupplyNum: 2
+ group: compoment management
+ header: null
+ method: GET
+ request_body: null
+ url: /redfish/v1/Chassis/{chassis_id}
+ key_flag_dict:
+ chassis_id: MemberId
# - case_name: check power detail info
# case_sn: 22
# expected_code: 200
@@ -306,19 +437,27 @@
# method: GET
# request_body: null
# url: https://{bmc_ip}/redfish/v1/Chassis/{chassis_id}/Thermal
-# - case_name: check cpu temperature
-# case_sn: 25
-# expected_code: 200
-# expected_result: '{ "Temperatures": [ { "Name": "INPUT_TEMP", "ReadingCelsius":
-# "N/A", }, { "Name": "CPU1_TEMP", "ReadingCelsius":
-# "N/A", }, { "Name": "CPU2_TEMP", "ReadingCelsius":
-# "N/A", }, ]}'
-# group: sensor management
-# header: null
-# method: GET
-# request_body: null
-# url: https://{bmc_ip}/redfish/v1/Chassis/{chassis_id}/Thermal
-# - case_name: check server power state
+- case_name: check cpu temperature
+ case_sn: 25
+ enabled: true
+ expected_code: 200
+ expected_result:
+ Temperatures:
+ - Name: INPUT_TEMP
+ ReadingCelsius: N/A
+ - Name: CPU1_TEMP
+ ReadingCelsius: N/A
+ - Name: CPU2_TEMP
+ ReadingCelsius: N/A
+ group: sensor management
+ header: null
+ method: GET
+ request_body: null
+ url: /redfish/v1/Chassis/{chassis_id}/Thermal
+ key_flag_dict:
+ chassis_id: Member
+
+#- case_name: check server power state
# case_sn: 26
# expected_code: 200
# expected_result: '{"PowerState": "On"}'
diff --git a/hdv/redfish/conf/config.yaml b/hdv/redfish/conf/config.yaml
index 4f71234..4ed6876 100644
--- a/hdv/redfish/conf/config.yaml
+++ b/hdv/redfish/conf/config.yaml
@@ -2,14 +2,3 @@
bmc_ip: https://172.29.160.22
bmc_user: root
bmc_pwd: Huawei12#$
-attr_name: 3
-pro_seq: 4
-url_seq: 5
-req_header_seq: 6
-req_body_seq: 7
-expect_return_code_seq: 8
-expect_return_value_seq: 9
-return_code_seq: 10
-return_value_seq: 11
-detail_result: 12
-final_result: 13
diff --git a/hdv/redfish/conf/depends.yaml b/hdv/redfish/conf/depends.yaml
deleted file mode 100644
index eecdcd4..0000000
--- a/hdv/redfish/conf/depends.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-- component_id: cpu_id
- key_flags: Members
- pro_value: GET
- url_value: https://{bmc_ip}/redfish/v1/Systems/{system_id}/Processors
-- component_id: memory_id
- key_flags: Members
- pro_value: GET
- url_value: https://{bmc_ip}/redfish/v1/Systems/{system_id}/Memory
-- component_id: storage_id
- key_flags: Members
- pro_value: GET
- url_value: https://{bmc_ip}/redfish/v1/Systems/{system_id}/Storages
-- component_id: drives_id
- key_flags: Drives
- pro_value: GET
- url_value: https://{bmc_ip}{storage_id}
-- component_id: networkadapters_id
- key_flags: Members
- pro_value: GET
- url_value: https://{bmc_ip}/redfish/v1/Chassis/{chassis_id}/NetworkAdapters
-- component_id: networkports_id
- key_flags: Controllers:Link:NetworkPorts
- pro_value: GET
- url_value: https://{bmc_ip}{networkadapters_id}
-- component_id: volume_id
- key_flags: Members
- pro_value: GET
- url_value: https://{bmc_ip}{storage_id}/Volumes
-- component_id: manager_id
- key_flags: Members
- pro_value: GET
- url_value: https://{bmc_ip}/redfish/v1/Managers