Menu Close
Chapter 3. Managing Record Attributes
You can specify any attribute via the URI or CMDB class instance. If neither exists, the value is determined from the Red Hat CloudForms VM or miq_provision objects.
The attributes can be reduced or extended as required by amending the Ruby methods.
Some attributes are not free-text (variable) fields, that is, they must be specific values. For example, the vendor
value must already exist in the ServiceNow Vendor table beforehand.
3.1. Create and Update (_patch) Record
You can use the following attributes when creating and/or updating a record.
3.1.1. Attribute
Attribute | Value |
virtual | Boolean true or false, set to true. |
name VMs | Virtual infrastructure name. |
short_description | Red Hat CloudForms virtual machine GUID. |
host_name | The virtual machine’s operating system hostname. |
cpu_count | The virtual machine’s CPU count. |
ram | The virtual machine’s memory. |
vendor | The virtual machine’s hardware vendor (provider). |
sys_id [a] | ServiceNow record unique system ID. |
[a]
sys_id attribute is not required during create . Its value is returned from the create request and the Red Hat CloudForms object custom attribute servicenow_sys_id is created and updated.
|
3.2. Get and Delete Record
You can use the following attribute for getting or deleting a record.
Attribute | Value |
sys_id | ServiceNow record unique system ID. |
3.3. Get All Records
There are no attributes required to get all records. This method gets all records in the specified ServiceNow table and writes their attributes to automation.log
.