Cloud Services

Enterprise Marketplace

Catalog personalization policies
Published On Dec 17, 2024 - 12:57 PM

Catalog personalization policies

Create and manage policies for the catalog page
The Catalog Admin user should be able to manage all the contents, including add-on services irrespective if these contents are onboard via Pull Content feature or via BUS Process or via the Import API or PUSH content.
The history will ONLY be available for PullContent Job,Import API and Push content Jobs
The Catalog Admin Persona should be able to see and manage the lifecycle of all the contents across all providers irrespective of their onboarding process.
The catalog admin persona should be able to add, remove labels for these catalogs.
To display all the public cloud services which have not been discovered as well. It will be in published state by default. The user will not be able to edit the service configuration parameters or any other aspect for the catalog. The only advantage the user has is to be able to retire the catalog from UI and add labels, category to it.

Use cases for catalog personalization policies

Following are the use cases. Only users with authorized role will be able to perform the following via UI:
  • View list of policies
  • View details of a policy
  • Create policy - link all or specific catalogs of a provider to team/org
  • Edit policy
  • Delete policy

Sample policies

Following are a few sample policies:
  1. Define and manage personalization policy for a provider/catalog assignable to one or more teams.
  2. Define and manage personalization policy for a provider/catalog assignable to one or more orgs.
    Example:
    • Set up Service A, B, & C to be visible in the Store for teams in a certain region
    • Set up Service D, E, & F to be visible in the Store for teams that can set up catalogs in production environment
  3. Define and manage personalization policy for a Label assignable to one or more orgs/teams.
    We create a Catalog personalization Policy for a set of labels such as Canada, AWS, database assigned to a particular Org. If we create a catalog with these labels then automatically the CPP will be applied to this catalog belonging to the particular Org by honoring the labels.
  4. You should be able to duplicate CPP, which is an exact duplicate of the Policy that includes a creation timestamp.

Catalog support for visibility modes and contexts

The Catalog Admin (global role) - can view all the visibility modes and turn on the specific visibility mode.

Use cases

The following are the use cases. User with the authorized role will be able to perform the following:
  • View list of visibility modes
  • Turn on specific visibility mode
  • Catalogs can be filtered based on active visibility mode.
  • User can see providers if catalogs (fetched based on active visibility mode) are available for that provider.
  • Catalog admin can see all providers and catalogs.

APIs

The following are the APIs related to visibility modes:

CREATE visibility modes

  • Definition:
    • URL:
      /core/configuration/v1/configvalues
    • Method:
      POST
    • Required:
      • Request Payload
      • Request Headers
    • Description:
      Visibility modes are created during post initialization of cb-catalog-api. So no need to create it externally.
  • Request Payload:
{ "configurationkey": "visibilityMode", "configurationvalue": { "visibilityMode": [ { "filter-with-cpp-and-so-contexts-intersection": false, "id": 1, "description": "The Service Offerings will be filtered using applicable CPP policies and any visibility contexts for the ServiceOfferings. Result will be the instersection of both filters. " }, { "filter-with-union-cpp-and-so-contexts": false, "id": 2, "description": "The Service Offerings will be filtered using applicable CPP policies and any visibility contexts for the ServiceOffering. Result will be the union of both filters" }, { "filter-with-so-contexts-fallback-on-cpp": true, "id": 3, "description": "The Service Offerings will be filtered only using any visibility contexts for the ServiceOfferings. If there is no contexts for ServiceOfferings then the list will be filtered using applicable CPP policies. " }, { "filter-with-cpp-fallback-on-so-contexts": false, "id": 4, "description": "The Service Offerings will be filtered only using applicable CPP policies. If there is no CPP policies then the list will be filtered using any visibility contexts for the ServiceOfferings. " } ] } }

GET visibility modes

  • Definition
    • URL:
      /catalog/v3/admin/configs/visibilitymodes
    • Method:
      GET
    • Required:
      • Request Headers
  • Description:
    Visibility modes will be fetched using the config key by using the CORE configuration API
    .
  • Headers:
Key
Value
Description
Username
The broker userid
Api-Key
The broker user api-key
Response contract:
{ "visibilityMode": [{ "filter-with-cpp-and-so-contexts-intersection": false, "id": 1, "description": "The Service Offerings will be filtered using applicable CPP policies and any visibility contexts for the ServiceOfferings. Result will be the instersection of both filters. " }, { "filter-with-union-cpp-and-so-contexts": false, "id": 2, "description": "The Service Offerings will be filtered using applicable CPP policies and any visibility contexts for the ServiceOffering. Result will be the union of both filters" }, { "filter-with-so-contexts-fallback-on-cpp": true, "id": 3, "description": "The Service Offerings will be filtered only using any visibility contexts for the ServiceOfferings. If there is no contexts for ServiceOfferings then the list will be filtered using applicable CPP policies. " }, { "filter-with-cpp-fallback-on-so-contexts": false, "id": 4, "description": "The Service Offerings will be filtered only using applicable CPP policies. If there is no CPP policies then the list will be filtered using any visibility contexts for the ServiceOfferings. " } ], "reasons": [{ "statusCode": 200, "status": "OK", "messages": [ "Visibility modes are Successfully retrieved" ], "id": "", "translateCode": "CA_8992_V3_VM_SUCCESS", "translateParameters": [] }] }
  • Response contract explanation:
Name
Type
Description
Required
Possible Values
visibilityMode
List
List of visibility modes. Only one visibility mode active at a time.
True
There will be given 4 visibility modes and only one active at a time.
filter-with-cpp-and-so-contexts-intersection
Boolean
Catalogs can be filtered based on cpp and so contexts. The result will be intersection of both cpp and so context filters.
True
True/False
filter-with-union-cpp-and-so-contexts
Boolean
Catalogs can be filtered based on cpp and so contexts. The result will be union of both cpp and so context filters.
True
True/False
filter-with-so-contexts-fallback-on-cpp
Boolean
Catalogs can be filtered based on so contexts. If so contexts are not present then filtered through cpp.
True
True/False
filter-with-cpp-fallback-on-so-contexts
Boolean
Catalogs can be filtered based on cpp. If deafult cpp is true then filter with so context.
True
True/False
visibilityMode.id
Integer
Unique id to represent the sequence of visibility mode.
True
1,2,3,4
visibilityMode.description
String
Description about that visibility mode.
True
-

HTTP status codes

Status code
Description
200
Visibility modes are Successfully retrieved.
400
config key not found.
404
config key is present but config response is empty.

Patch visibility mode

  • Definition:
    • URL:
      /catalog/v3/admin/configs/visibilitymodes/{visibility_mode_id}/turnon
    • Method:
      PATCH
    • Required:
      • Request Headers
  • Headers:
Key
Value
Description
Username
The broker userid
Api-Key
The broker user api-key

Request Contract

Request Contract
  • Param
    - {visibility_mode_id}
  • Description:
    Visibility mode id is unique. This API sets the visibility mode to true for given id.
  • Response Contract
    Response Contract
  • Response Payload:
{ "visibilityMode": [ { "filter-with-cpp-and-so-contexts-intersection": false, "description": "The Service Offerings will be filtered using applicable CPP policies and any visibility contexts for the ServiceOfferings. Result will be the instersection of both filters. ", "id": 1 }, { "filter-with-union-cpp-and-so-contexts": false, "id": 2, "description": "The Service Offerings will be filtered using applicable CPP policies and any visibility contexts for the ServiceOffering. Result will be the union of both filters" }, { "filter-with-so-contexts-fallback-on-cpp": true, "id": 3, "description": "The Service Offerings will be filtered only using any visibility contexts for the ServiceOfferings. If there is no contexts for ServiceOfferings then the list will be filtered using applicable CPP policies. " }, { "filter-with-cpp-fallback-on-so-contexts": false, "description": "The Service Offerings will be filtered only using applicable CPP policies. If there is no CPP policies then the list will be filtered using any visibility contexts for the ServiceOfferings. ", "id": 4 } ], "reasons": [ { "statusCode": 200, "status": "OK", "messages": [ "Visibility mode with id: 3 is Successfully patched" ], "id": "", "translateCode": "CA_8993_V3_VM_SUCCESS1", "translateParameters": [ 3 ] } ] }

HTTP status codes

Status code
Description
200
Visibility mode with id: is Successfully patched.
400
If given visibility mode is invalid. id > 4 or id < 1.
400
If given visibility mode is invalid. id > 4 or id < 1.
400
config key is not present.
400
If Configuration API return any error for update.
404
If visibility modes are not present in the config response.

Use case of visibility modes

By default 3rd mode: is
active
.
Catalog admin can see all catalogs and all providers in any visibility mode. Below test cases are for other than catalog admin persona.
  • Refer Context Matching Rules Attachment to know how user contexts matched with catalog contexts.
  • Final_Get_Services_result = Catalogs fetched from DB based on active visibility mode.
  • All_Available_Providers_in_DB :- All the providers present in DB
  • Final Providers Intersection Result = Intersection between providers extracted from Modewise_get_services_result and All_Available_Providers_in_DB
Do you have two minutes for a quick survey?
Take Survey