How to change plan identification during PLM import from plan names to unique IDs
In version 3.0, Product Lifecycle Management (PLM) supports plan identification using unique IDs of the plans. Previously, identification was done using plan names.
The change of identification method is done by product line. To change it for plans based on a product line, complete the following steps:
Note: PLM must be updated to version 3.0 or later before completing these instructions.
- Access a workstation with access to the Kubernetes cluster, where your CloudBlue Commerce is deployed.
- Enter the OSS pod:
kubectl exec -it oss-node-0 -n <namespace> -- /bin/bash
- Switch to the build directory:
cd build
- Copy the export.py script to that directory.
- Identify the UUID of the product line whose plans you need to update.
- Run the script, replacing the sample UUID with one of your product line:
python export.py --productLineUUID=87ccdca6-dd0c-4648-a38e-e8df1437c1f0
-
As a result, a message similar to the following will appear:
Completed successfully; the export file saved as product_line_87ccdca6-dd0c-4648-a38e-e8df1437c1f0.csv
-
The script "uid_generator.py" in the next step requires Python 3. If it is not installed in the pod (generally, Python 2.7 is installed instead), complete the following three commands consequently:
microdnf install --disablerepo=pgrpm13 dnf
dnf install --disablerepo=pgrpm13 python3
python3 -m pip install click
- Configure IDs for the plans. Depending on the vendor, do this in one of the following ways:
- Copy the import.py script to the build directory on the OSS pod.
- Run the script replacing the UUID of the product line to the one of your product line:
python import.py --productLineUUID=87ccdca6-dd0c-4648-a38e-e8df1437c1f0 --file=product_line_87ccdca6-dd0c-4648-a38e-e8df1437c1f0.csv
- If import.py finds duplicated UIDs it will be needed to choose between the affected plans and rename the UID of one of them with prefix "[EOS]". Usually can be checked in connect what plan is the right one as it will have the correct name. If a plan meant to be renamed have subscriptions (The CSV file have this column "Subscriptions" to check this) check with Delivery team prior to rename the UID of a plan with subscriptions.
- After successful import, check the CSV file again and filter by "[EOS]". If any of the UIDs renamed as "[EOS]" is published (CSV file have a column "Published" to check this), unpublish it from the control panel.
- From this moment, plan identification during import will be performed using plan IDs.