Chapter 18. Customizing Gold Objects

Gold provides the ability to dynamically create new objects or customize or delete existing objects through the gold control program (goldsh).

Note

The object customizations described in this chapter will be noticeable in subsequent goldsh queries (and in the web GUI after a fresh login). For installations with a database that supports multiple connections (e.g. PostgreSQL) these changes will be visible immediately while others (e.g. SQLite) will require the gold server to be restarted. Client commands may need to be modified to properly interact with changed objects or attributes.

Caution

The goldsh control program allows you to make powerful and sweeping modifications to many objects with a single command. Inadvertent mistakes could result in modifications that are very difficult to reverse.

18.1. Removing an Attribute from an Object

To delete an attribute from an object, use the command goldsh Attribute Delete:

goldsh Attribute Delete Object==<Object Name> Name==<Attribute Name> [ShowUsage:=True]

Caution

The goldsh control program allows you to make powerful and sweeping modifications to gold objects. Misuse of this command could result in the inadvertent deletion of all attributes.

Caution

When using Gold as an Allocation Manager, certain objects and attributes are assumed to exist. For example, a call to Job Charge would fail if you had deleted the Allocation Amount attribute. The Attribute Undelete command might come in useful in such a case.

Example 18-1. Removing the Organization attribute from Machine

$ goldsh Attribute Delete Object==Machine Name==Organization

Successfully deleted 1 Attribute
        

Example 18-2. Perhaps we don't care to track the Executable attribute in a Job

$ goldsh Attribute Delete Object==Job Name==Executable

Successfully deleted 1 Attribute