community.network.opx_cps – CPS operations on networking device running Openswitch (OPX)¶
Note
This plugin is part of the community.network collection (version 1.3.2).
To install it use: ansible-galaxy collection install community.network
.
To use it in a playbook, specify: community.network.opx_cps
.
Synopsis¶
Executes the given operation on the YANG object, using CPS API in the networking device running OpenSwitch (OPX). It uses the YANG models provided in https://github.com/open-switch/opx-base-model.
Requirements¶
The below requirements are needed on the host that executes this module.
cps
cps_object
cps_utils
Parameters¶
Examples¶
- name: Create VLAN
community.network.opx_cps:
module_name: "dell-base-if-cmn/if/interfaces/interface"
attr_data: {
"base-if-vlan/if/interfaces/interface/id": 230,
"if/interfaces/interface/name": "br230",
"if/interfaces/interface/type": "ianaift:l2vlan"
}
operation: "create"
- name: Get VLAN
community.network.opx_cps:
module_name: "dell-base-if-cmn/if/interfaces/interface"
attr_data: {
"if/interfaces/interface/name": "br230",
}
operation: "get"
- name: Modify some attributes in VLAN
community.network.opx_cps:
module_name: "dell-base-if-cmn/if/interfaces/interface"
attr_data: {
"cps/key_data":
{ "if/interfaces/interface/name": "br230" },
"dell-if/if/interfaces/interface/untagged-ports": ["e101-008-0"],
}
operation: "set"
- name: Delete VLAN
community.network.opx_cps:
module_name: "dell-base-if-cmn/if/interfaces/interface"
attr_data: {
"if/interfaces/interface/name": "br230",
}
operation: "delete"
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Senthil Kumar Ganesan (@skg-net)