Symptoms

When Parallels Operations Automation (POA) is integrated with Parallels Business Automation (PBA), the possibility to manage subscriptions is disabled in the POA Provider Control Panel - there is no way to create or remove subscriptions. The reason is simple - all subscription management must be completed through PBA.

Still, there may be cases when a Provider needs to create or remove subscriptions in POA. For example, subscriptions may be created in POA before it was integrated with PBA.

This article described how to create or remove subscriptions in POA without using the Provider Control Panel.

Resolution

Use the POA OpenAPI methods pem.activateSubscription and pem.removeSubscription.

Important notes:

  1. Create subscriptions in POA with ID < 1000000 in order to avoid accidentally using a subscription ID which PBA may use for its subscriptions.

  2. Do not remove subscriptions which exist in PBA. Instead, terminate the subscription and remove services in PBA Control Panel.

Create subscription

  1. Create the pem.activateSubscription.xml file on the POA Management Node with the following content:

    <?xml version='1.0'?>
    <methodCall>
      <methodName>pem.activateSubscription</methodName>
      <params>
        <param>
          <value>
            <struct>
              <member>
                <name>subscription_id</name>
                <value><i4>SUB_ID</i4></value>
              </member>
              <member>
                <name>account_id</name>
                <value><i4>ACCOUNT_ID</i4></value>
              </member>
              <member>
                <name>service_template_id</name>
                <value><i4>ST_ID</i4></value>
              </member>
            </struct>
          </value>
        </param>
      </params>
    </methodCall>
    

    Replace the <SUB_ID>, <ACCOUNT_ID> and <ST_ID> in the content above with the subscription ID, customer account ID and Service Template ID respectively.

  2. Send an XML API request to POA using the curl utility:

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

Remove subscription

  1. Create a pem.removeSubscription.xml file on the POA Management Node with the following content:

    <?xml version='1.0'?>
    <methodCall>
      <methodName>pem.removeSubscription</methodName>
      <params>
        <param>
          <value>
            <struct>
              <member>
                <name>subscription_id</name>
                <value><int>SUB_ID</int></value>
              </member>
            </struct>
          </value>
        </param>
      </params>
    </methodCall>
    

    Replace the <SUB_ID> in the content above with the ID of the existing subscription you are going to remove.

  2. Send an XML API request to POA using the curl utility:

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

For additional details, please refer to the POA 5.4 OpenAPI guide or POA 5.5 OpenAPI guide

Internal content