'Create OHS Domain (Collocated) using WLST

I'm working on a project on which I have to install Fusion middleware with Weblogic and OHS(12.2.1.4v) (Collocated)

We're not allowed to use GUI at all so this is out of the picture.

I've managed to install them without an issue. The problem comes when trying to create an OHS domain. I want it to be created via an WLST script like this one -

https://myofmwexperiments.blogspot.com/2020/02/create-ohs-domain-standalone-using-wlst.html?spref=pi

But this one above is for a Standalone domain creation and not a Collocated.

I've tried modifying it but with no success. Do you have any idea what should I modify or does anyone have a ready script for a Collocated version ?

Thank you in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source