yes , you are right , I uploaded on catalog level and when i try to use UDP in API is not getting deployed and giving the below error . I tried to deploy global level getting the different error. Please find files attached. I will create PMR .Kindly let me know if there is anything wrong with files attached.
Original Message:
Sent: Wed July 19, 2023 05:47 PM
From: Steve Linn
Subject: custom modules
Hi Santhoshkumar,
We've determined that this is a defect. Please confirm in your case that you uploaded your user defined policy to your catalog. We found in this case, you would get an error that the referenced UDP was not supported (actually not deployed) when it really was. A fix is under development, but you really should open a PMR for this issue. As a work around, if you deploy your UDP globally, it should deploy with no issue. Since I already use a gateway extension with my gateway, I took my UDP yaml, included it in my gateway-extension.zip file, and updated the manifest.json file's section to add a reference to that file with a type of user-defined-policy-yaml. I then updated the gateway's gateway extension using the CMC Cloud Manager.
"files": [ { "filename": "forum-udp-in-udp.yaml", "deploy": "immediate", "type": "user-defined-policy-yaml" },
Best Regards,
Steve Linn
------------------------------
Steve Linn
Senior Consulting I/T Specialist
IBM
Original Message:
Sent: Wed July 19, 2023 02:44 PM
From: Steve Linn
Subject: custom modules
Hi Santhoshkumar,
I tried a simple use case and it didn't work either. I was surprised as I think it should. Please open a PMR. In the meantime, we're looking into it to understand why.
Best Regards,
Steve Linn
------------------------------
Steve Linn
Senior Consulting I/T Specialist
IBM
Original Message:
Sent: Tue July 18, 2023 12:33 PM
From: santhoshkumar surisetty
Subject: custom modules
Hi Linn,
Custom module is working fine but nested user defined policy is not working . do you have any examples. Could you please share ?
------------------------------
santhoshkumar surisetty
Original Message:
Sent: Mon July 17, 2023 08:48 AM
From: Steve Linn
Subject: custom modules
My apologies for missing the second question. You should be able to use a UDP within a UDP.
Best Regards,
Steve Linn
------------------------------
Steve Linn
Senior Consulting I/T Specialist
IBM
Original Message:
Sent: Fri July 14, 2023 12:00 PM
From: santhoshkumar surisetty
Subject: custom modules
thank you , i will try and let you know . My second question is that i created multiple custom policies . can i use these custom policies in another custom policy ?
------------------------------
santhoshkumar surisetty
Original Message:
Sent: Thu July 13, 2023 05:38 PM
From: Steve Linn
Subject: custom modules
Hi Santhoshkumar,
Yes you can. To deploy them to your gateway the file will need to be in a gateway extension. Then you'd just do a standard require to the path where you placed the file, ie local:///mypath/mymodule.js in your GatewayScript code that uses it. The module can be used by any API, including within user defined policies.
Best Regards,
Steve
------------------------------
Steve Linn
Senior Consulting I/T Specialist
IBM
Original Message:
Sent: Tue July 11, 2023 11:42 PM
From: santhoshkumar surisetty
Subject: custom modules
can we create custom modules like jwt , header-metadata and using them in every gateway script and xslts and can we custom policy developed inside another custom policy?
------------------------------
santhoshkumar surisetty
------------------------------