Search Engine: Elastic

Article ID: 129703, created on Oct 26, 2016, last review on Oct 26, 2016

  • Applies to:
  • Operations Automation 7.0
  • Operations Automation 6.0
  • Operations Automation 5.5
  • Operations Automation 5.4

Question

How to remove a service user if corresponding subscription is disabled?

Answer

This could be achieved in two ways: via Provider Control Panel and OpenAPI.

To remove a service user using Provider Control Panel:

  1. Temporary enable disabled subscription.
  2. Log in into the CCP as a Staff Member
  3. Remove the service user
  4. Disable subscription back in OA

To remove via API the pem.removeUser method should be used:

  1. Obtain user ID as it is not shown in OA UI. It can be done using the API method pem.getUserByLogin. See the example below:

    1.1 Create a file pem.getUserByLogin.xml with the content like below:

        <?xml version="1.0"?>
        <methodCall>
            <methodName>pem.getUserByLogin</methodName>
            <params>
                <param>
                    <value>
                        <struct>
                            <member>
                                <name>login</name>
                                <value><string>user1</string></value>
                            </member>
                        </struct>
                    </value>
                </param>
            </params>
        </methodCall>
    

    where user1 is the login name of the service user supposed to be deleted.

    1.2 Execute the followin request in the management node command line:

    # curl -d@pem.getUserByLogin.xml http://localhost:8440
    

    The output like below will contain the service user ID::

    <?xml version="1.0" encoding="utf-8"?>
    <methodResponse><params><param><value><struct><member><name>result</name>value><struct><member><name>user_id</name><value><i4>12345</i4></value></member>/struct></value></member><member><name>status</name><value><i4>0</i4></value></member></struct></value></param></params></methodResponse>
    

    the user ID here is 12345.

  2. Use OpenAPI method pem.removeUser to delete the service user. See the below example:

    2.1 Create a file pem.removeUser.xml with the content as below:

    <?xml version="1.0"?>
        <methodCall>
            <methodName>pem.removeUser</methodName>
                <params>
                    <param>
                        <value>
                        <struct>
                            <member>
                             <name>user_id</name>
                             <value><int>12345</int></value>
                            </member>
                        </struct>
                        </value>
                    </param>
                </params>
        </methodCall>
    

    (do not forget to specify required service user ID instead of 12345)

    2.2 Execute the following request in the management node command line:

    # curl -d@pem.removeUser.xml http://localhost:8440
    

    The output as below should be returned:

    <?xml version="1.0" encoding="utf-8"?><methodResponse><params><param><value><struct><member><name>status</name><value><i4>0</i4></value></member></struct></value></param></params></methodResponse>
    

    Status 0 means the command has been completed successfully.

5b048d9bddf8048a00aba7e0bdadef37 caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07 5356b422f65bdad1c3e9edca5d74a1ae 2554725ed606193dd9bbce21365bed4e ac82ce33439a9c1feec4ff4f2f638899 0871c0b47b3b86ae3b1af4c2942cd0ce 1941880841f714e458ae4dc3d9f3062d 956c448bddc7e1f3585373687602379f 6f1456866eed87488c0f02b298a741c0

Email subscription for changes to this article
Save as PDF