FAIL01 test: read the RAM quota in Openstack
[osm/tests.git] / robot-systest / lib / openstack_lib.robot
index cd03eb8..c72892e 100644 (file)
@@ -46,3 +46,15 @@ Check NS Servers In VIM
     @{servers} =  Split String  ${stdout}
     ${n_servers}=  Get Length  ${servers}
     Should Be Equal As Integers   ${number}   ${n_servers}
+
+
+Get Project Quota
+    [Documentation]     Get a field (ram, cores, ports, etc.) from quota in current project.
+    [Arguments]   ${field}
+
+    Should Not Be Empty   ${field}
+    ${rc}   ${stdout}=   Run and Return RC and Output   openstack quota show -c ${field} -f value
+    log   ${stdout}
+    Should Be Equal As Integers   ${rc}   ${success_return_code}
+    [Return]  ${stdout}
+