Creating the Class

Before we create our first Automation script, we need to put some things in place. We'll begin by creating a new Domain called ACME.

In the Automation Explorer, highlight the Datastore icon in the side bar, and click Configuration -> Add a New Domain:

Screenshot


We'll give the Domain the name ACME, and ensure the Enabled checkbox is ticked:

Screenshot


Now we'll add a Namespace into this domain, called General. Highlight the ACME Domain icon in the side bar, and click Configuration -> Add a New Namespace:

Screenshot


Give the Namespace the name General:

Screenshot


Now we'll create a new Class, called Methods. (it may seem that naming a class Methods is somewhat confusing, however many of the generic Classes in the ManageIQ and RedHat Domains in the automation datastore are called Methods to signify their general-purpose nature).

Highlight the General Domain icon in the side bar, and click *Configuration -> Add a New Class:

Screenshot


Give the Class the name Methods:

Screenshot


We'll leave the Display Name blank for this example.

We'll create a simple Schema. Click the Schema tab for the Methods class, and click Configuration -> Edit selected Schema:

Screenshot


Click New Field, and add a single field with name execute, Type Method and Data Type String:

Screenshot


Click the tick in the left hand column to save the field entry, and click the Save button to save the Schema.

Screenshot


We now have our generic Class defininition called Methods setup, with a simple Schema that executes a single Method.

results matching ""

    No results matching ""