-
Notifications
You must be signed in to change notification settings - Fork 2
object operations
Ryan Newington edited this page Jun 6, 2016
·
1 revision
The SSH MA allows custom commands to be defined for each operation against an object. The <object-operations>
element contains the definition of the operations and their commands.
The <object-operations>
element must contain the following attributes
XML Attribute | Description | Allowed Values |
---|---|---|
object-class | The class of object that the contained operations apply to | Any object class defined in the MA schema |
The following object operations are supported by this MA |
- object-operation-ImportFull
- object-operation-ImportDelta
- object-operation-ExportAdd
- object-operation-ExportDelete
- object-operation-ExportModify
- object-operation-PasswordChange
- object-operation-PasswordSet
As a minimum, a FullImport operation must be defined for each object type. The <object-operations>
element supports one or more <object-operation>
elements.
<object-operations object-class="user">
<object-operation xsi:type="sshma:object-operation-ExportAdd">
<commands>
<command>/usr/local/bin/sudo /usr/sbin/useradd {dn:$1}</command>
</commands>
</object-operation>
</object-operations>
<object-operations object-class="group">
<object-operation xsi:type="sshma:object-operation-ExportAdd">
<commands>
<command>/usr/local/bin/sudo /usr/sbin/groupadd {dn:$1}</command>
</commands>
</object-operation>
</object-operations>
In the example above, an ExportAdd command calls the useradd
command on a target system to create a new user.