WORKLOAD AUTOMATION COMMUNITY
  • Home
  • Blogs
  • Forum
  • Resources
  • Events
  • About
  • Contact
  • What's new

OCLI Model: Leveraging JSON and YAML formats for better performance

12/12/2024

0 Comments

 
Picture
​The release of OCLI version 10.2.2 has made available two additional formats for model commands: YAML and JSON:
​●       The YAML format is very easy to write and read, which makes it more accessible and less error prone.
●       The JSON format is designed to simplify parsing and it is compatible with Java script.
 
One of the OCLI's features is its ability to easily use and display different object formats with simple commands.
Picture
​​The following example illustrates how an object already defined in the Database can be visualized in a YAML file after it was extracted in that format.
Before starting to work with the OCLI, it is important that its config.yaml file is well configured. Beside that, it is also possible to set a working directory for the creation of Jobs using this command:
 
ocli context set current_folder=/OCLI_FOLDER
Once this option is set, all the new objects defined with OCLI will be automatically created in the specified folder.
Let’s now create a new Job. Run the following command to open the editor:

ocli model n
Add the following Job Definition in schedLang format:
$JOBS
/WORKSTATION-NAME#JOB-NAME_OCLI
DOCOMMAND "netstat -an"
STREAMLOGON "User"
TASKTYPE UNIX
RECOVERY CONTINUE
The same Job definition created previously in schedLang format can be visualized in JSON format running this command:
ocli model di job=/WORKSTATION-NAME#/OCLI_FOLDER/JOB-NAME_OCLI -format json
This is what our Job looks like:
Picture
Picture
​It is now possible to extract the Job in YAML format with these commands:
1)ocli context set format=yaml
2)ocli model extract /tmp/job.yaml from job=/WORKSTATION-NAME#/OCLI_FOLDER/JOB-NAME_OCLI
Where “1)” set the YAML format as default and “2)” is the extract command.
Finally, this is our Job in YAML format:
Picture
Picture
​Extracting files to YAML makes it possible to commit them on GitHub. This enables versioning on GitHub, giving software engineering teams complete visibility to the code history and a single source of documentation for all files.

If a YAML file were to be modified on GitHub, the edited file could be imported through OCLI. For example, if our YAML job definition was modified from “User” to “User2”, the following command can be used to import the updated job definition:
ocli model add /tmp/job.yaml
Picture
​With the latest OCLI version 10.2.3, the context command can be used on even more object types.

Picture
​Gabriele Buccioli, Software Engineer for Workload Automation
He joined HCL in February 2022 as a member of the Verification Test team and works as verification tester for the Workload Automation suite on distributed environments.
He has a Master's Degree in Management and Automation Engineering at Rome Tre University.

Picture
​Matteo Liotta, Software Engineer for Workload Automation
He joined HCL in May 2022 as a member of the Verification Test team.He works as verification tester for the Workload Automation suite on distributed environments.
He has a Master's Degree in Electronic Engineering at Sapienza University
0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    Archives

    December 2025
    October 2025
    July 2025
    June 2025
    May 2025
    March 2025
    February 2025
    January 2025
    December 2024
    November 2024
    October 2024
    September 2024
    August 2024
    July 2024
    June 2024
    May 2024
    April 2024
    March 2024
    February 2024
    January 2024
    October 2023
    August 2023
    July 2023
    June 2023
    May 2023
    April 2023
    March 2023
    February 2023
    January 2023
    December 2022
    September 2022
    August 2022
    July 2022
    June 2022
    May 2022
    April 2022
    March 2022
    February 2022
    January 2022
    December 2021
    October 2021
    September 2021
    August 2021
    July 2021
    June 2021
    May 2021
    April 2021
    March 2021
    February 2021
    January 2021
    December 2020
    November 2020
    October 2020
    September 2020
    August 2020
    July 2020
    June 2020
    May 2020
    April 2020
    March 2020
    January 2020
    December 2019
    November 2019
    October 2019
    August 2019
    July 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2018
    August 2018
    July 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    August 2017
    July 2017
    June 2017
    May 2017

    Categories

    All
    Analytics
    Azure
    Business Applications
    Cloud
    Data Storage
    DevOps
    Monitoring & Reporting

    RSS Feed

www.hcltechsw.com
About HCL Software 
HCL Software is a division of HCL Technologies (HCL) that operates its primary software business. It develops, markets, sells, and supports over 20 product families in the areas of DevSecOps, Automation, Digital Solutions, Data Management, Marketing and Commerce, and Mainframes. HCL Software has offices and labs around the world to serve thousands of customers. Its mission is to drive ultimate customer success with their IT investments through relentless innovation of its products. For more information, To know more  please visit www.hcltechsw.com.  Copyright © 2024 HCL Technologies Limited
  • Home
  • Blogs
  • Forum
  • Resources
  • Events
  • About
  • Contact
  • What's new