The Connect Processor SDK Template for Python provides developers with a set of resources that are required to build the middleware between a Vendor system and the CloudBlue Connect platform via the Python programming language.

Processor Template can be deployed on any platform selected by Vendors. It is also commonly deployed on:

  • Microsoft Azure
  • A local on-premise server

Requirements

Make sure that you have a relevant environment to run the Python scripts. It is recommended to use Python 3.6 or above.

Next, it is necessary to create isolated Python environments during the Processor deployment. Therefore, make sure to install the Virtualenv for Python.

The Processor Template also requires configured Connect API. Refer to Connect REST API for more information.

It is highly recommended to configure your Product before deploying the Processor Template.

Furthermore, it is recommended to familiarize yourself with the Connect community page to understand purposes of the Connect platform and functionality of the Processor.

Installation

Once Python 3.6 (or a newer version) is installed, you can deploy the Connect Processor Template for Python by following the steps below:

1. Install Cookiecutter

Install the Cookiecutter on your computer. For example, you can install it by using the PIP package manager:

$ pip install cookiecutter

2. Create Your Processor Project

Once Cookiecutter is successfully installed, you can instantiate it to create your Connect Processor project by using the following command:

$ cookiecutter https://github.com/cloudblue/connect-processor-template-for-python

You’ll be prompted to specify certain values, such as project name, description and so on. Provide required values as shown below:

project_name [My Connect Processor]: My Awesome Processor
project_slug [my_connect_processor]: my_connect_processor
description [My processor will auto-process subscription requests in CloudBlue Connect]:
author: CloudBlue Vendor,
Require_subscription_change_usecase [y/n]: y
Require_subscription_cancel_usecase [y/n]: y
Require_subscription_suspend_and_resume_usecases [y/n]: y
Require_usage_reporting_for_Pay_as_you_go_usecase [y/n]: y
Require_dynamic_validation_of_ordering_parameters_for_subscription [y/n]: y
Require_reseller_information_for_provisioning [y/n]: y	
Done! Your project is ready to go!

Thereafter, access your recently created project folder by using the following command:

$ cd my_connect_processor
$ ls

3. Install Required Dependencies 

Run this command to install the package requirements:

$ pip install -r requirements/dev.txt

4. Set up your Environment 

Once Virtualenv is successfully installed, create a virtual environment inside your Processor folder by running the following command:

$ cd my_connect_processor
cd /usr/processor/<processor application folder name>.
scl enable rh-python36 bash
python -m venv venv
source venv/bin/activate

5. Initial Configuration

Provide the Connect API endpoint and your Token in config.json .

In case your Processor should support report_usage use case, configure the rootPathUsage to create and store the usage reports.

Specify your Product IDs and other product data on the Connect platform in globals.py .

Access the Processor Configuration documentation to learn more about the Processor file structure and required configuration.

Is this page helpful?
Translate with Google
Copied to clipboard