To create group name and privilege

- Test case to add user group name and its privilege.

Change-Id: I3bb71f658d69bdbc859ba364c301b4df078572fc
Signed-off-by: Sivas SRR <sivas.srr@in.ibm.com>
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/extended/test_user_management.robot b/extended/test_user_management.robot
index 9523477..6010dd8 100644
--- a/extended/test_user_management.robot
+++ b/extended/test_user_management.robot
@@ -24,6 +24,18 @@
     Should Not Be Empty  ${bmc_user_uris}
 
 
+Verify User Group And Privilege Created
+    [Documentation]  Verify user group and associated privilege is created.
+    [Tags]  Verify_User_Group_And_Privilege_Created
+    [Teardown]  FFDC On Test Case Fail
+
+    Create Group And Privilege  ${GROUP_NAME}  ${GROUP_PRIVILEGE}
+    ${bmc_user_uris}=  Read Properties  ${BMC_USER_URI}ldap/enumerate
+    ${bmc_user_uris}=  Convert To String  ${bmc_user_uris}
+    Should Contain  ${bmc_user_uris}  ${GROUP_NAME}
+    Should Contain  ${bmc_user_uris}  ${GROUP_PRIVILEGE}
+
+
 Verify Root Password Update
     [Documentation]  Update system "root" user password and verify.
     [Tags]  Verify_Root_Password_Update
@@ -70,3 +82,22 @@
 
     FFDC On Test Case Fail
     Close All Connections
+
+
+Create Group And Privilege
+    [Documentation]  Create group and privilege for users.
+    [Arguments]  ${user_group}  ${user_privilege}
+
+    # Description of argument(s):
+    # user_group  User group string.
+    # user_privilege  User privilge string  like priv-admin, priv-user.
+
+    @{ldap_parm_list}=  Create List
+    ...  ${user_group}  ${user_privilege}
+
+    ${data}=  Create Dictionary  data=@{ldap_parm_list}
+
+    ${resp}=  OpenBMC Post Request
+    ...  ${BMC_USER_URI}ldap/action/Create  data=${data}
+    Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
+    ...  msg=Updating the new root password failed, RC=${resp.status_code}.
diff --git a/tools/generate_argumentfile.sh b/tools/generate_argumentfile.sh
index dca60bf..b8f30bf 100755
--- a/tools/generate_argumentfile.sh
+++ b/tools/generate_argumentfile.sh
@@ -40,10 +40,10 @@
 echo "--variable LDAP_BASE_DN:$LDAP_BASE_DN" >> $ARG_FILE
 echo "--variable LDAP_BIND_DN:$LDAP_BIND_DN" >> $ARG_FILE
 echo "--variable LDAP_SERVER_URI:$LDAP_SERVER_URI" >> $ARG_FILE
-echo "--variable LDAP_SECURE_MODE:$LDAP_SECURE_MODE" >> $ARG_FILE
 echo "--variable LDAP_BIND_DN_PASSWORD:$LDAP_BIND_DN_PASSWORD" >> $ARG_FILE
 echo "--variable LDAP_SEARCH_SCOPE:$LDAP_SEARCH_SCOPE" >> $ARG_FILE
 echo "--variable LDAP_TYPE:$LDAP_TYPE" >> $ARG_FILE
 echo "--variable LDAP_USER:$LDAP_USER" >> $ARG_FILE
 echo "--variable LDAP_USER_PASSWORD:$LDAP_USER_PASSWORD" >> $ARG_FILE
-
+echo "--variable GROUP_NAME:$GROUP_NAME" >> $ARG_FILE
+echo "--variable GROUP_PRIVILEGE:$GROUP_PRIVILEGE" >> $ARG_FILE