# system.kanoa.tooling.mount(mountInfo, userId)

Mounts a tool on an asset, or in a pocket of another tool, and snapshots its positions. Tools in the tool's pockets come with it. Refused (nothing changes) when the tool is already mounted, disabled or not a tool; when the start time overlaps its history or is in the future; when the tool belongs to a site and the asset (or the pocket's tool) is not in it; when the asset doesn't use tooling or already has another tool with output positions; when the pocket isn't an empty pocket of the parent or the parent is inside the tool; and when the tool's compatibility rules don't allow the parent. Warnings: the tool is over a limit, or the site's validation hook (the core.config values toolingValidationProject and toolingValidationFunction name a project library function, e.g. 'myProject' and 'tooling.validateMount') returns warnings. The hook gets the proposed mount as a dict (action, toolingAssetId, toolingName, assetId, hostAssetId, parentToolingAssetId, parentPositionId, startDate, workOrderId, source, userId, assembly, positions) and returns &#123;'errors': [...], 'warnings': [...]&#125; or None; its errors refuse the mount. A hook that fails or takes over 10 seconds becomes a warning.

---

### Parameters

**mountInfo** `Dictionary`<br />
<table class='dictionaryKeyTable'>
 <tbody>
  <tr><td> - toolingAssetId</td><td>Integer</td><td>Required</td></tr>
  <tr><td> - assetId</td><td>Integer</td><td>Mount on this asset, or</td></tr>
  <tr><td> - parentToolingAssetId</td><td>Integer</td><td>and parentPositionId (Integer): mount in this pocket of another tool</td></tr>
  <tr><td> - workOrderId</td><td>Integer</td><td></td></tr>
  <tr><td> - source</td><td>String</td><td>'user', 'tag', 'workOrder', 'migration' or 'correction'. Defaults to 'user'</td></tr>
  <tr><td> - startDate</td><td>Date</td><td>Defaults to now. Can be earlier, but not before the tool's last unmount</td></tr>
  <tr><td> - acceptWarnings</td><td>Boolean</td><td>Mount despite warnings. Defaults to False, which refuses a mount with warnings with a message starting 'Needs confirmation:' (warnings separated by ' | '); mount again with True to accept them, and they are kept on the assignment's note</td></tr>
 </tbody>
</table>

**userId** `Integer`: The user making the change<br />

---

### Returns

**(toolingAssignmentId, message)**<br />

---

### Example

```python
mountInfo = {'toolingAssetId': 1, 'assetId': 1, 'parentToolingAssetId': 1, 'workOrderId': 1, 'source': 'user'}
userId = 5
toolingAssignmentId, message = system.kanoa.tooling.mount(mountInfo, userId)
```
