Add keywords in Openstack robot file 20/74220/2
authormpany <madhusmita.p@altencalsoftlabs.com>
Thu, 19 Jul 2018 14:40:06 +0000 (20:10 +0530)
committermpany <madhusmita.p@altencalsoftlabs.com>
Fri, 20 Jul 2018 14:47:43 +0000 (20:17 +0530)
Change-Id: I11e1880bbda242961b0361228b0e32616fcde8a9
Signed-off-by: mpany <madhusmita.p@altencalsoftlabs.com>
csit/libraries/OpenStackOperations.robot

index 01984e30d0e12b2e43f91052e059a2dca4f6bc19..61d6e06aa1481b264ea01ec0a48996021fa4f2ed 100644 (file)
@@ -1118,3 +1118,15 @@ Verify Expected Default Tables
     BuiltIn.Log    ${flow_dump}
     : FOR    ${table}    IN    @{DEFAULT_FLOW_TABLES}
     \    Builtin.Should Match Regexp    ${flow_dump}    .*table=${table}.*priority=0
+
+Get Project Id
+    [Arguments]    ${project_name}
+    [Documentation]    Returns project ID for the given project name.
+    ${project_id} =    OpenStack CLI    openstack project show ${project_name} -f value -c id
+    [Return]    ${project_id}
+
+Set Instance Quota For Project
+    [Arguments]    ${num_instances}    ${project_id}
+    [Documentation]    Set quota for the created instances using the specific project id.
+    ${output} =    OpenStack CLI    openstack quota set --instances ${num_instances} ${project_id}
+    [Return]    ${output}