Replaced REST usage with Redfish for core dump test case

Changes
   - Replaced REST usage with Redfish for core dump test case
   - Moved Core dump size test case to new redfish bucket

Tested:

       -  Ran the test successfully from sandbox.

Change-Id: Ib57ccaa19397908677296ff88b629895ba305465
Signed-off-by: manashsarma <manashsarma@in.ibm.com>
diff --git a/redfish/extended/test_bmc_dump.robot b/redfish/extended/test_bmc_dump.robot
index a59a380..7044303 100644
--- a/redfish/extended/test_bmc_dump.robot
+++ b/redfish/extended/test_bmc_dump.robot
@@ -16,21 +16,6 @@
 
 *** Test Cases ***
 
-Verify Core Dump Size
-    [Documentation]  Verify BMC core dump size is under 200k.
-    [Tags]  Verify_Core_Dump_Size
-
-    Redfish Delete All BMC Dumps
-    Trigger Core Dump
-    Wait Until Keyword Succeeds  2 min  10 sec  Get Dump Entries
-
-    ${dump_entries}=  Get URL List  ${DUMP_ENTRY_URI}
-    ${dump_size}=  Read Attribute  ${dump_entries[0]}  Size
-
-    # Max size for dump is 200k = 200x1024
-    Should Be True  0 < ${dump_size} < 204800  msg=Size of dump is incorrect.
-
-
 Verify Dump After Host Watchdog Error Injection
     [Documentation]  Inject host watchdog error and verify whether dump is generated.
     [Tags]  Verify_Dump_After_Host_Watchdog_Error_Injection
diff --git a/redfish/managers/test_bmc_dumps.robot b/redfish/managers/test_bmc_dumps.robot
index 18ad87c..1160262 100644
--- a/redfish/managers/test_bmc_dumps.robot
+++ b/redfish/managers/test_bmc_dumps.robot
@@ -208,6 +208,26 @@
     Wait Until Keyword Succeeds  2 min  10 sec  Is BMC Dump Available
 
 
+Verify Core Dump Size
+    [Documentation]  Verify BMC core dump size is under 20 MB.
+    [Tags]  Verify_Core_Dump_Size
+
+    Redfish Power Off  stack_mode=skip
+
+    # Ensure all dumps are cleaned out.
+    Redfish Delete All BMC Dumps
+    Trigger Core Dump
+
+    # Verify that BMC dump is available.
+    Wait Until Keyword Succeeds  2 min  10 sec  Is BMC Dump Available
+    ${dump_entries}=  Get BMC Dump Entries
+    ${resp}=  Redfish.Get Properties
+    ...  /redfish/v1/Managers/bmc/LogServices/Dump/Entries/${dump_entries[0]}
+
+    # Max size for dump is 20 MB = 20x1024x1024 Byte.
+    Should Be True  0 < ${resp["AdditionalDataSizeBytes"]} < 20971520
+
+
 *** Keywords ***
 
 Get BMC Dump Entries