??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
ó
àUdac @` s, d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d
Z d d l
m Z d d l m
Z
d d
l m Z y. d d l Z d d l Z d d l Z e Z Wn e k
rÉ e Z n Xd „ Z d „ Z d d d d „ Z d „ Z d „ Z d „ Z d „ Z e d k r(e ƒ n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust communityt supported_bys)
---
module: opx_cps
version_added: "2.7"
author: "Senthil Kumar Ganesan (@skg-net)"
short_description: CPS operations on networking device running Openswitch (OPX)
description:
- 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.
options:
module_name:
description:
- Yang path to be configured.
attr_type:
description:
- Attribute Yang type.
attr_data:
description:
- Attribute Yang path and their corresponding data.
operation:
description:
- Operation to be performed on the object.
default: create
choices: ['delete', 'create', 'set', 'action', 'get']
db:
description:
- Queries/Writes the specified yang path from/to the db.
type: bool
default: 'no'
qualifier:
description:
- A qualifier provides the type of object data to retrieve or act on.
default: target
choices: ['target', 'observed', 'proposed', 'realtime', 'registration', 'running', 'startup']
commit_event:
description:
- Attempts to force the auto-commit event to the specified yang object.
type: bool
default: 'no'
requirements:
- "cps"
- "cps_object"
- "cps_utils"
sÙ
- name: Create VLAN
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
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
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
opx_cps:
module_name: "dell-base-if-cmn/if/interfaces/interface"
attr_data: {
"if/interfaces/interface/name": "br230",
}
operation: "delete"
s»
response:
description: Output from the CPS transaction.
Output of CPS Get operation if CPS set/create/delete not done.
returned: when a CPS transaction is successfully performed.
type: list
sample:
[{
"data": {
"base-if-vlan/if/interfaces/interface/id": 230,
"cps/object-group/return-code": 0,
"dell-base-if-cmn/if/interfaces/interface/if-index": 46,
"if/interfaces/interface/name": "br230",
"if/interfaces/interface/type": "ianaift:l2vlan"
},
"key": "target/dell-base-if-cmn/if/interfaces/interface"
}]
cps_curr_config:
description: Returns the CPS Get output i.e. the running configuration
before CPS operation of set/delete is performed
returned: when CPS operations set, delete
type: dict
sample:
[{
"data": {
"base-if-vlan/if/interfaces/interface/id": 230,
"cps/key_data": {
"if/interfaces/interface/name": "br230"
},
"dell-base-if-cmn/if/interfaces/interface/if-index": 44,
"dell-if/if/interfaces/interface/learning-mode": 1,
"dell-if/if/interfaces/interface/mtu": 1532,
"dell-if/if/interfaces/interface/phys-address": "",
"dell-if/if/interfaces/interface/vlan-type": 1,
"if/interfaces/interface/enabled": 0,
"if/interfaces/interface/type": "ianaift:l2vlan"
},
"key": "target/dell-base-if-cmn/if/interfaces/interface"
}]
diff:
description: The actual configuration that will be pushed comparing
the running configuration and input attributes
returned: when CPS operations set, delete
type: dict
sample:
{
"cps/key_data": {
"if/interfaces/interface/name": "br230"
},
"dell-if/if/interfaces/interface/untagged-ports": [
"e101-007-0"
]
}
db:
description: Denotes if CPS DB transaction was performed
returned: when db is set to True in module options
type: bool
sample: True
commit_event:
description: Denotes if auto-commit event is set
returned: when commit_event is set to True in module options
type: bool
sample: True
( t
AnsibleModule( t iteritems( t dict_diffNc C` s‡ g } | rƒ xt | D]i } t | ƒ } | r | d } i } | | d