(Click to open topic with navigation)
Path: Catalog > Service Template Management > New/Edit > Resources
Path: Catalog > New Service Template > Resources
The Resources tab is populated with different fields based on the template type you specify in the Template properties (see Fields: Template properties). When you choose "Virtual machine" as the template type, the Resources tab is populated with the following required resource fields.
You will notice that many of the Field type and ID fields are already filled and cannot be edited. The reason for this is that each of these fields are required and must be included in every virtual machine template. If you want to add additional fields to the template, you can click Add field under the "Catalog options" heading (for more information, see Adding new fields).
Image 12-3: Required resources for VM templates |
Click to enlarge |
Header
This section will appear in the user form as the text heading.
Header caption
Lets you specify the text that will appear as the form heading.
Image
This section will appear in the user form as two drop-down fields that allow users to choose the OS type and Image for their VM service.
Default OS type
Lets you specify which OS type will appear in the user form as the default. Only the available OS types for the VM will appear in the options.
If you want to enforce that users are only able choose one OS type, then choose the default OS type and clear the Editable by user option.
Default image
Lets you specify which image will appear in the user form as the default. Only the available images for the VM will appear in the options.
If you want to enforce that users are only able choose one image, then choose the default image and clear the Image editable by user option.
Processors
This section will appear in the user form as a drop-down list of the number of processors users can request with their VM service.
Label
Lets you specify the descriptive label (or name) of the field. What you specify in this field is what the user will see in the form.
By default, the label is "Processors."
Default value
Lets you specify the default number value (of processors) that will be pre-populated in the field when the user opens the form.
Make sure that the default value is an actual option in the List Contents field.
Lets you specify possible number values for the field. The "Processors" field is a drop-down that will display the items you specify in this field. For example, if you want a user to choose between 1, 2, 4, or 6 processors, you would add a list item for each of these numbers.
The items you add must be positive integers.
To add a new option, specify a number in the Item field and choose Add list item. To remove an item, click Remove next to the list item you want to remove.
This field must have at least one item in order to create the PM service template.
Validation
Lets you specify a regular expression (using JavaScript regex syntax) that will check and validate the user input on this field.
This validation causes Viewpoint to notify users when they enter something invalid in the field. (For information about regular expressions, please see http://www.regular-expressions.info/.)
Memory (MB)
This section will appear in the user form as a number spinner that users can use to specify how much memory to request with their VM service.
Label
Lets you specify the descriptive label (or name) of the field. What you specify in this field is what the user will see in the form.
By default, the label is "Memory (MB)."
Default value
Lets you specify a number value that will be pre-populated in the field when the user opens the form.
You must make sure that the Default value is greater than or equal to the Minimum value and less than or equal to the Maximum value.
If you have not selected the Editable by user option (meaning the user cannot edit the field), then the default value will be the only option for the user. If you want the user to be able to choose from more than the default value, make sure you select the Editable by user option.
Lets you specify the minimum value that Viewpoint will accept from the user.
For example, if you specify a minimum value of 1024 MB, the user will not be allowed to request less than 1024 MB of memory.
Lets you specify the maximum value that Viewpoint will accept from the user.
For example, if you specify a maximum value of 4096 MB, the user will not be allowed to request more than 4096 MB of memory.
Lets you specify a number interval that the number spinner uses to move up or down. For example, if you specify "2," the number spinner will move up or down by two integers each time the user clicks up or down. Likewise, if you specify "1024," the number spinner will move up or down 1 GB each time the user clicks up or down.
Enforce Step
Lets you enforce that the users cannot specify a number value (by typing it in) that does not conform to the Step settings you specify.
For example, if you only want users to request gigabytes in their services, you would do the following:
Features
Label
Lets you specify the name of the field that the user will see. By default, the label is "Features."
Default feature tags
Lets you type the names of feature tags to be attached to a service when the template is submitted.
Attaching feature tags to services enables Moab to locate instances of the feature when it follows any configured feature-based rules. This is an auto-complete field that will suggest tags as you type. To select the suggested feature, click Enter. To remove a tag, click the X next to it.
Additional options
Some fields have the one or more of the following additional options:
Lets you specify whether or not the user will be allowed to modify the specifications of the resource.
If you select this option, you must be sure you specify a default value. Failing to do this will leave a blank field that the user will not be able to do anything with.
Schedulable resource
Lets you specify whether the field represents a schedulable resource. When a field is marked as a schedulable resource, its value must be an integer. If you do not select this option, Viewpoint assumes the field is a variable, and its value can be non-numeric.
The Schedulable resource option is, in essence, an attribute that allows you to define the type of data being written. For example, if you select Schedulable resource when defining a text field with the ID set to "bob" and the Value set to "5", then the service request would have an "attributes" section like this (with the "bob" key-value pair written to the resources object in the service request):
attributes: {
moab: {
job: {
resources: {
bob: "5"
},
variables: {
}
}
}
}
If you left the Schedulable resource option unchecked, then the same input field would be interpreted as a variable (written in the variable object):
attributes: {
moab: {
job: {
resources: {
},
variables: {
bob: "5"
}
}
}
}
Visible to user
Lets you specify whether or not the field will appear in the user service template form.
When you select this option, the Editable by user option will automatically clear. (If a user cannot see the field, they cannot edit it.)
Related topics