IP Infusion OcNOS connection templates
The ip-infusion/ folder holds two SSH templates for OcNOS-SP and OcNOS-DC, both Core and Pro. Both are rconfig-verified: the rConfig team ran them against OcNOS-SP 7.0.0 to 7.1.0 and OcNOS-DC 6.6.1 to 7.0.1 on UfiSpace and Edgecore hardware. This page covers release v2.2.2.
Which template
| Template | Use for |
|---|---|
ip-infusion-ocnos-ssh-enable |
Licensed devices. Logs in at host>, then runs enable |
ip-infusion-ocnos-ssh-noenable |
Devices without an installed licence, which refuse enable |
To check, log in by hand and type enable. If the prompt changes from host> to host#, use the enable template. If OcNOS refuses the command, use the no enable template, which stays in user mode and runs every command at the > prompt.
Enable without a password
OcNOS doesn’t ask for a password at enable. The enable template’s enablePassPrmpt matches the privileged prompt instead of a password prompt, so leave the enable password on the credential set blank.
The templates
rConfig-templates / ip-infusion /ip-infusion-ocnos-ssh-enable.ymlView on GitHub- Protocol
- SSH, port 22
- Enable
- on, no password
- Paging
- terminal length 0
- Status
- rconfig-verified
- Protocol
- SSH, port 22
- Enable
- off
- Paging
- terminal length 0
- Status
- rconfig-verified
Device prompts
Set the prompts on each device record from its hostname. The README’s examples:
| Template | Main prompt | Enable prompt |
|---|---|---|
| Enable template | ^R1-CE1# |
^R1-CE1> |
| No enable template | ^AS7326-56X-1> |
^AS7326-56X-1> |
Snippets
OcNOS has a transaction-based CLI: changes made in configure terminal take effect only after commit. End every config snippet with commit, then end.
Both templates carry snippet_errors, so on rConfig Pro V8.4.1 and later a snippet is sent one line at a time and stops at the first rejected line. The patterns cover % Invalid input, % Error, % Incomplete command, % Ambiguous command and % Un-committed transactions present; the last one catches a snippet that reaches end without commit.
When the device prompt starts with ^, add a config_prompt directive as the first line of the snippet, so rConfig recognises both the exec prompt and every (config...)# prompt:
#[config_prompt /(?:^|\n)(?:\w|\.|-)+(?:\((?:\w|-)+\))?#\s*$/]What to put in the command group
The README suggests:
show running-configshow versionshow interface briefshow system-information board-info