Oracle Cloud Infrastructure (OCI) Marketplace enables partners to share their products in a form of listings that common customers of OCI and partners can use. Partners can publish listings using Partner Portal. Usually you submit them directly through Partner Portal GUI or write your own automation around Oracle Cloud Marketplace publisher APIs.

We have recently published an automation tool, WIND, which is written around Python3 and Robot Framework. It exposes Marketplace Partner Portal publisher APIs CRUD operations in simple keywords, which allows partners to perform operations on their listings and partner portal available options.

Use cases

This tool covers many use cases that partner can perform daily within the Partner Portal, including the following example key words:

  • Create image artifact

  • Create stack artifact

  • Create application

  • Publish application

To learn more about key word usage and use cases, see the documentation.

Prerequisites

  • An active Partner Portal account where the partner manages OCI Marketplace Listings. If you don’t have an account, you can follow the instructions in the documentation.

  • An Oracle Cloud account to view Partners listings within the Oracle Cloud Console. If you don’t have an account, you can sign up for an Oracle Cloud Free Tier account.

  • Follow the README installation instructions to install WIND tool local to your test environment.

WIND is an open source tool, and you can consume and contribute to this tool.

Usage

This section focuses on how to create an application listing placeholder after you successfully install the tool.

Create a robot variable file named variables.robot and update the required minimum variables according to README instructions of WIND tool:


*** Settings ***
Library         MarketplaceLibrary    WITH NAME    OCI

*** Variables ***
${api_url}                      https://ocm-apis-cloud.oracle.com
${client_id}                    XXXXXX
${secret_key}                   YYYYYY
${username}                     ZZZZZZ

After you create a variable file, refer to file test.robot as part of your use case file:


*** Settings ***
Resource        ./variables.robot

*** Test Cases ***

Login to OCI Marketplace
    OCI.Generate Auth Token
    ...    base_api_url=${api_url}
    ...    client_id=${client_id}
    ...    secret_key=${secret_key}
    ...    username=${username}

Create Listing For Test Partner
    ${new_application} =    OCI.Create Application
                            ...    name=Partner-JAN-22
                            ...    short_description=PartnerDetails2
                            ...    long_description=PartnerDetails3
                            ...    usage_information=PartnerDetails4
                            ...    tags=PartnerDetails5
                            ...    pricing_type=PAYGO
                            ...    cataegory_name=SECURITY
                            ...    tag_line=Security Software | Sales Enablement
    Log To Console    ${new_application}

Get Application Details
    ${get_application} =    OCI.Get Application Details
                            ...    application_name=Partner-JAN-22
    Log To Console    ${get_application}

Run the WIND tool from your command line to create an application placeholder with a path of test.robot file. Successful output looks like the following screenshot:


Figure 1: Create application example with WIND

Validation

Now, you can view the application listing present within your Partner Portal account.


Figure 2: Partner Portal GUI showing the example application listing

You can also see locally generated log files within your browser:

Figure 3: Robot framework test logs file

Conclusion

This post explained how to use WIND to perform CRUD operations on Partner Portal. You can use this post as a reference point to know more about the tool and consume and contribute accordingly. To learn more about WIND, follow the GitHub repo.