getTemplates
This method is used to return the list of Templates in HCL BigFix CLM.
Method Signature:
getTemplates (controlId, async, callback, addlparam, null, namespaceuid)
Sample Response:
[{"entityID":"TEMP-AE57BE1D-40BA-492E-84DA-134310FF0D43",
"platformEntityID":"OCP-C5E26138-7E86-407C-8666-8909360ADB4D",
"uid":"08556a9b-649f-4ebf-97ef-98be64abb170","name":"example",
"nameSpaceName":"default","nameSpaceUid":"xxxxx","labels":
{"os.template.kubevirt.io/fedora":"true","template.kubevirt.io/type":"vm",
"workload.template.kubevirt.io/server":"true"},"annotations":
{"description":"VM template example","iconClass":"icon-fedora",
"name.os.template.kubevirt.io/fedora":"Fedora","openshift.io/display-name":
"Fedora VM"},"flavour":"small","os":"fedora","workload":"server","volumes":
[{"name":"rootdisk","containerDisk": {"image":"registry.redhat.io/container-native-virtualization/virtio-win-rhel9@sha256:077e155806a35
41ef2d6c0ea3bf87bc7491a51cb1197be4991cf0da13eadefab"}},{"cloudInitNoCloud":
{"userData":"#cloud-confignuser: fedoranpassword:
\'${CLOUD_USER_PASSWORD}\'nchpasswd: { expire: False }"},"name":"cloudinitdisk"},
{"name":"disk-tomato-chameleon-80","persistentVolumeClaim":
{"claimName":"win2k22-purple-boar-57"}}],
"machineType":"q35","networkDetails":{"cloudInitNoCloud":
{"userData":"#cloud-confignuser: fedoranpassword: \'${CLOUD_USER_PASSWORD}\'nchpasswd:
{ expire: False }"},"name":"cloudinitdisk","nicdetails":[{"name":"default","pod":{},"model":"virtio","masquerade":{}}]},"dataVolumes":[],"isActive":"N","createdBy":
"USER-703291E7-54BE-410A-B604-3C692CD36268","createdDate":"2024-08-22T07:02:18.24",
"modifiedBy":"USER-703291E7-54BE-410A-B604-3C692CD36268"}]
Parameter Details:
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| controlId | String | N |
Id of ‘Select’ control to be populated. If Id Control of dynamic UI is passed, then control will be populated with values return from this function else “Result set” will be returned in JSON format. |
| async | Boolean | N |
In case it’s False: Function will be called in synchronous mode. i.e., Current execution will wait for method execution to complete In case it’s True: Function will be called asynchronously. Execution will not wait for method execution completion. It will jump to next statement. |
| callback | Function | N | User can pass function name that can be executed on completion of Parent function call. |
| addlparam | Object | N |
Addlparam is used for filtering and sorting the records. It contains 3 properties filter/sortby/sortorder. To Filter: To filter records based on column name received from output. e.g., filter="keyname='keyvalue'" To Sort By: To sort the data based on column name. e.g., sortby="keyname" To Sort Order: To define sorting order either ASC (Ascending) or DESC (descending). e.g., sortorder="ASC” |
| namespaceuid | String | Y | User has to pass namespaceuid, then details of passed namespaceuid are returned. |