??????????????
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@`sddlmZmZmZeZidd6dgd6dd6ZdZd Zd Z dd l Z e Z ydd l Z eZWn#ek re jZ eZnXe ZeZy0dd lZejd d ddlmZWneefk rgyFdd lZejdd ejdd ddlmZmZWn)eefk rce jZeZnXnXddlmZmZddlm Z m!Z!de"fdYZ#dZ$e%dkre$nd S(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust communityt supported_bysO$ --- module: nmcli author: - Chris Long (@alcamie101) short_description: Manage Networking requirements: - dbus - NetworkManager-libnm (or NetworkManager-glib on older systems) - nmcli version_added: "2.0" description: - Manage the network devices. Create, modify and manage various connection and device type e.g., ethernet, teams, bonds, vlans etc. - 'On CentOS 8 and Fedora >=29 like systems, the requirements can be met by installing the following packages: NetworkManager-nmlib, libsemanage-python, policycoreutils-python.' - 'On CentOS 7 and Fedora <=28 like systems, the requirements can be met by installing the following packages: NetworkManager-glib, libnm-qt-devel.x86_64, nm-connection-editor.x86_64, libsemanage-python, policycoreutils-python.' - 'On Ubuntu and Debian like systems, the requirements can be met by installing the following packages: network-manager, python-dbus (or python3-dbus, depending on the Python version in use), libnm-dev.' - 'On older Ubuntu and Debian like systems, the requirements can be met by installing the following packages: network-manager, python-dbus (or python3-dbus, depending on the Python version in use), libnm-glib-dev.' - 'On openSUSE, the requirements can be met by installing the following packages: NetworkManager, python2-dbus-python (or python3-dbus-python), typelib-1_0-NMClient-1_0 and typelib-1_0-NetworkManager-1_0.' options: state: description: - Whether the device should exist or not, taking action if the state is different from what is stated. type: str required: true choices: [ absent, present ] autoconnect: description: - Whether the connection should start on boot. - Whether the connection profile can be automatically activated type: bool default: yes conn_name: description: - The name used to call the connection. Pattern is [-][-]. type: str required: true ifname: description: - The interface to bind the connection to. - The connection will only be applicable to this interface name. - A special value of C('*') can be used for interface-independent connections. - The ifname argument is mandatory for all connection types except bond, team, bridge and vlan. - This parameter defaults to C(conn_name) when left unset. type: str type: description: - This is the type of device or network connection that you wish to create or modify. - Type C(generic) is added in Ansible 2.5. type: str choices: [ bond, bond-slave, bridge, bridge-slave, ethernet, generic, ipip, sit, team, team-slave, vlan, vxlan ] mode: description: - This is the type of device or network connection that you wish to create for a bond, team or bridge. type: str choices: [ 802.3ad, active-backup, balance-alb, balance-rr, balance-tlb, balance-xor, broadcast ] default: balance-rr master: description: - Master ] STP forwarding delay, in seconds. type: int default: 15 hellotime: description: - This is only used with bridge - [hello-time <1-10>] STP hello time, in seconds. type: int default: 2 maxage: description: - This is only used with bridge - [max-age <6-42>] STP maximum message age, in seconds. type: int default: 20 ageingtime: description: - This is only used with bridge - [ageing-time <0-1000000>] the Ethernet MAC address aging time, in seconds. type: int default: 300 mac: description: - This is only used with bridge - MAC address of the bridge. - Note this requires a recent kernel feature, originally introduced in 3.15 upstream kernel. slavepriority: description: - This is only used with 'bridge-slave' - [<0-63>] - STP priority of this slave. type: int default: 32 path_cost: description: - This is only used with 'bridge-slave' - [<1-65535>] - STP port cost for destinations via this slave. type: int default: 100 hairpin: description: - This is only used with 'bridge-slave' - 'hairpin mode' for the slave, which allows frames to be sent back out through the slave the frame was received on. type: bool default: yes vlanid: description: - This is only used with VLAN - VLAN ID in range <0-4095>. type: int vlandev: description: - This is only used with VLAN - parent device this VLAN is on, can use ifname. type: str flags: description: - This is only used with VLAN - flags. type: str ingress: description: - This is only used with VLAN - VLAN ingress priority mapping. type: str egress: description: - This is only used with VLAN - VLAN egress priority mapping. type: str vxlan_id: description: - This is only used with VXLAN - VXLAN ID. type: int version_added: "2.8" vxlan_remote: description: - This is only used with VXLAN - VXLAN destination IP address. type: str version_added: "2.8" vxlan_local: description: - This is only used with VXLAN - VXLAN local IP address. type: str version_added: "2.8" ip_tunnel_dev: description: - This is used with IPIP/SIT - parent device this IPIP/SIT tunnel, can use ifname. type: str version_added: "2.8" ip_tunnel_remote: description: - This is used with IPIP/SIT - IPIP/SIT destination IP address. type: str version_added: "2.8" ip_tunnel_local: description: - This is used with IPIP/SIT - IPIP/SIT local IP address. type: str version_added: "2.8" s( # These examples are using the following inventory: # # ## Directory layout: # # |_/inventory/cloud-hosts # | /group_vars/openstack-stage.yml # | /host_vars/controller-01.openstack.host.com # | /host_vars/controller-02.openstack.host.com # |_/playbook/library/nmcli.py # | /playbook-add.yml # | /playbook-del.yml # ``` # # ## inventory examples # ### groups_vars # ```yml # --- # #devops_os_define_network # storage_gw: "192.0.2.254" # external_gw: "198.51.100.254" # tenant_gw: "203.0.113.254" # # #Team vars # nmcli_team: # - conn_name: tenant # ip4: '{{ tenant_ip }}' # gw4: '{{ tenant_gw }}' # - conn_name: external # ip4: '{{ external_ip }}' # gw4: '{{ external_gw }}' # - conn_name: storage # ip4: '{{ storage_ip }}' # gw4: '{{ storage_gw }}' # nmcli_team_slave: # - conn_name: em1 # ifname: em1 # master: tenant # - conn_name: em2 # ifname: em2 # master: tenant # - conn_name: p2p1 # ifname: p2p1 # master: storage # - conn_name: p2p2 # ifname: p2p2 # master: external # # #bond vars # nmcli_bond: # - conn_name: tenant # ip4: '{{ tenant_ip }}' # gw4: '' # mode: balance-rr # - conn_name: external # ip4: '{{ external_ip }}' # gw4: '' # mode: balance-rr # - conn_name: storage # ip4: '{{ storage_ip }}' # gw4: '{{ storage_gw }}' # mode: balance-rr # nmcli_bond_slave: # - conn_name: em1 # ifname: em1 # master: tenant # - conn_name: em2 # ifname: em2 # master: tenant # - conn_name: p2p1 # ifname: p2p1 # master: storage # - conn_name: p2p2 # ifname: p2p2 # master: external # # #ethernet vars # nmcli_ethernet: # - conn_name: em1 # ifname: em1 # ip4: '{{ tenant_ip }}' # gw4: '{{ tenant_gw }}' # - conn_name: em2 # ifname: em2 # ip4: '{{ tenant_ip1 }}' # gw4: '{{ tenant_gw }}' # - conn_name: p2p1 # ifname: p2p1 # ip4: '{{ storage_ip }}' # gw4: '{{ storage_gw }}' # - conn_name: p2p2 # ifname: p2p2 # ip4: '{{ external_ip }}' # gw4: '{{ external_gw }}' # ``` # # ### host_vars # ```yml # --- # storage_ip: "192.0.2.91/23" # external_ip: "198.51.100.23/21" # tenant_ip: "203.0.113.77/23" # ``` ## playbook-add.yml example --- - hosts: openstack-stage remote_user: root tasks: - name: install needed network manager libs package: name: - NetworkManager-libnm - nm-connection-editor - libsemanage-python - policycoreutils-python state: present ##### Working with all cloud nodes - Teaming - name: Try nmcli add team - conn_name only & ip4 gw4 nmcli: type: team conn_name: '{{ item.conn_name }}' ip4: '{{ item.ip4 }}' gw4: '{{ item.gw4 }}' state: present with_items: - '{{ nmcli_team }}' - name: Try nmcli add teams-slave nmcli: type: team-slave conn_name: '{{ item.conn_name }}' ifname: '{{ item.ifname }}' master: '{{ item.master }}' state: present with_items: - '{{ nmcli_team_slave }}' ###### Working with all cloud nodes - Bonding - name: Try nmcli add bond - conn_name only & ip4 gw4 mode nmcli: type: bond conn_name: '{{ item.conn_name }}' ip4: '{{ item.ip4 }}' gw4: '{{ item.gw4 }}' mode: '{{ item.mode }}' state: present with_items: - '{{ nmcli_bond }}' - name: Try nmcli add bond-slave nmcli: type: bond-slave conn_name: '{{ item.conn_name }}' ifname: '{{ item.ifname }}' master: '{{ item.master }}' state: present with_items: - '{{ nmcli_bond_slave }}' ##### Working with all cloud nodes - Ethernet - name: Try nmcli add Ethernet - conn_name only & ip4 gw4 nmcli: type: ethernet conn_name: '{{ item.conn_name }}' ip4: '{{ item.ip4 }}' gw4: '{{ item.gw4 }}' state: present with_items: - '{{ nmcli_ethernet }}' ## playbook-del.yml example - hosts: openstack-stage remote_user: root tasks: - name: Try nmcli del team - multiple nmcli: conn_name: '{{ item.conn_name }}' state: absent with_items: - conn_name: em1 - conn_name: em2 - conn_name: p1p1 - conn_name: p1p2 - conn_name: p2p1 - conn_name: p2p2 - conn_name: tenant - conn_name: storage - conn_name: external - conn_name: team-em1 - conn_name: team-em2 - conn_name: team-p1p1 - conn_name: team-p1p2 - conn_name: team-p2p1 - conn_name: team-p2p2 - name: Add an Ethernet connection with static IP configuration nmcli: conn_name: my-eth1 ifname: eth1 type: ethernet ip4: 192.0.2.100/24 gw4: 192.0.2.1 state: present - name: Add an Team connection with static IP configuration nmcli: conn_name: my-team1 ifname: my-team1 type: team ip4: 192.0.2.100/24 gw4: 192.0.2.1 state: present autoconnect: yes - name: Optionally, at the same time specify IPv6 addresses for the device nmcli: conn_name: my-eth1 ifname: eth1 type: ethernet ip4: 192.0.2.100/24 gw4: 192.0.2.1 ip6: 2001:db8::cafe gw6: 2001:db8::1 state: present - name: Add two IPv4 DNS server addresses nmcli: conn_name: my-eth1 type: ethernet dns4: - 192.0.2.53 - 198.51.100.53 state: present - name: Make a profile usable for all compatible Ethernet interfaces nmcli: ctype: ethernet name: my-eth1 ifname: '*' state: present - name: Change the property of a setting e.g. MTU nmcli: conn_name: my-eth1 mtu: 9000 type: ethernet state: present - name: Add VxLan nmcli: type: vxlan conn_name: vxlan_test1 vxlan_id: 16 vxlan_local: 192.168.1.2 vxlan_remote: 192.168.1.5 - name: Add ipip nmcli: type: ipip conn_name: ipip_test1 ip_tunnel_dev: eth0 ip_tunnel_local: 192.168.1.2 ip_tunnel_remote: 192.168.1.5 - name: Add sit nmcli: type: sit conn_name: sit_test1 ip_tunnel_dev: eth0 ip_tunnel_local: 192.168.1.2 ip_tunnel_remote: 192.168.1.5 # nmcli exits with status 0 if it succeeds and exits with a status greater # than zero when there is a failure. The following list of status codes may be # returned: # # - 0 Success - indicates the operation succeeded # - 1 Unknown or unspecified error # - 2 Invalid user input, wrong nmcli invocation # - 3 Timeout expired (see --wait option) # - 4 Connection activation failed # - 5 Connection deactivation failed # - 6 Disconnecting device failed # - 7 Connection deletion failed # - 8 NetworkManager is not running # - 9 nmcli and NetworkManager versions mismatch # - 10 Connection, device, or access point does not exist. s# NtNMs1.0(RtNMClienttNetworkManager(R R (t AnsibleModuletmissing_required_lib(t to_nativetto_texttNmclicB`sSeZdZdZd^Zer-ejZ nidd6dd6dd6dd 6d d 6d d 6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6Z i d!d"6d#d6d$d%6d&d'6d(d)6d*d+6d,d-6d.d/6d0d16d2d36d4d56d6d76d8d96Z d:Z e d^d;Zd<Zd=Zd>Zed?Zd@ZdAZdBZdCZdDZdEZdFZdGZdHZdIZdJZdKZdLdMZ dLdNZ!dOZ"dPZ#dQZ$dRZ%dSZ&dTZ'dUZ(dVZ)dWZ*dXZ+dYZ,dZZ-d[Z.d\Z/d]Z0RS(_s This is the generic nmcli manipulation class that is subclassed based on platform. A subclass may wish to override the following action methods:- - create_connection() - delete_connection() - modify_connection() - show_connection() - up_connection() - down_connection() All subclasses MUST define platform and distribution (which may be None). tGenerictEthernetisWi-Fiit BluetoothitOLPCitWiMAXitModemit InfiniBandi tBondi tVLANi tADSLi tBridgei itTeamitVxLanitipipitsititUnknownit Unmanagedt Unavailableit DisconnecteditPreparei(tConfigi2s Need Authi<s IP ConfigiFsIP CheckiPt SecondariesiZt Activatedidt DeactivatingintFailedixcC`si||_|jd|_|jd|_|jd|_|jd|_|jd|_|jd|_|jd|_|jd|_ |jj d rd j |jd nd|_ |jj d rd j |jd nd|_|jd |_|jd |_|jj dr3d j |jdnd|_|jj drdd j |jdnd|_|jd|_|jd|_|jd|_|jd|_|jd|_|jd|_|jd|_|jd|_|jd|_|jd|_|jd|_|jd|_|jd|_|jd|_ |jd|_!|jd|_"|jd |_#|jd!|_$|jd"|_%|jd#|_&|jd$|_'|jd%|_(|jd&|_)|jd'|_*|jd(|_+|jd)|_,|jd*|_-|jd+|_.|jd,|_/|jj0d-t1|_2|jd.|_3dS(/Ntstatet autoconnectt conn_nametmastertifnamettypetip4tgw4tdns4t t dns4_searchtip6tgw6tdns6t dns6_searchtmtutstptprioritytmodetmiimontprimaryt downdelaytupdelayt arp_intervalt arp_ip_targett slavepriorityt forwarddelayt hellotimetmaxaget ageingtimethairpint path_costtmactvlanidtvlandevtflagstingresstegresstvxlan_idt vxlan_localt vxlan_remotet ip_tunnel_devtip_tunnel_localtip_tunnel_remotetnmclitdhcp_client_id(4tmoduletparamsR)R*R+R,R-R.R/R0tgettjointNoneR1R3R4R5R6R7R8R9R:R;R<R=R>R?R@RARBRCRDRERFRGRHRIRJRKRLRMRNRORPRQRRRSRTt get_bin_pathtTruet nmcli_binRV(tselfRW((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pyt__init__s\ 1111cC`sYt|tr1g|D]}t|^q}n t|}|jj|d|d|S(Ntuse_unsafe_shelltdata(t isinstancetlistRRWt run_command(R_tcmdRaRbtitem((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytexecute_commands" cC`sgyO|j|}x9|D]1}x(||D]}||||||R?s arp-intervals arp-ip-targetR=sipv4.dhcp-client-id(R^R+R[RR-R;R/R0R4R5RR*R3R7R<R>R?R@RAR=RVRR(R_RfRRpR((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytcreate_connection_bondms<                cC`s|jdd|jg}i|jd6|jd6|jd6|jd6|jd6|jd6|j|j d 6|j d 6|j d 6|j d 6|j d 6|jd6|jd6|jd6|jd6}x<|jD].\}}|dk r|j||gqqW|S(NRRs ipv4.addresss ipv4.gatewaysipv4.dnss ipv6.addresss ipv6.gatewaysipv6.dnsR*sipv4.dns-searchsipv6.dns-searchR<R>R?s arp-intervals arp-ip-targetsipv4.dhcp-client-id(R^R+R/R0R1R4R5R6RR*R3R7R<R>R?R@RARVRR[R(R_RfRRpR((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytmodify_connection_bonds*               cC`s|jdddddg}|jdk r=|j|jn"|jdk r_|j|jn|jd|jdk r|j|jn"|jdk r|j|jn|jd|jdk r|j|jn|S(NRRR.s bond-slavescon-nameR-R,(R^R+R[RR-R,(R_Rf((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytcreate_connection_bond_slaves  cC`s%|jdd|jd|jg}|S(NRRsconnection.master(R^R+R,(R_Rf((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytmodify_connection_bond_slaves!tethernetcC`s|jdddg}|dkr1|jdn|dkrM|jdn|jd|jdk r||j|jn"|jdk r|j|jn|jd|jdk r|j|jn"|jdk r|j|jni|jd6|jd 6|jd 6|jd 6|j |j d 6|j d 6|j d6|j d6}x<|jD].\}}|dk r[|j||gq[q[W|S(NRRR.Rtgenericscon-nameR-R/R0R4R5R*sipv4.dns-searchsipv6.dns-searchsipv4.dhcp-client-id(R^RR+R[R-R/R0R4R5RR*R3R7RVRR(R_t conn_typeRfRRpR((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytcreate_connection_ethernets8            cC`s|jdd|jg}i |jd6|jd6|jd6|jd6|jd6|jd6|j|j d 6|j d 6|j d 6|j d 6|j d 6}xZ|jD]L\}}|dk r|d kr|dkrqn|j||gqqW|S(NRRs ipv4.addresss ipv4.gatewaysipv4.dnss ipv6.addresss ipv6.gatewaysipv6.dnsR*sipv4.dns-searchsipv6.dns-searchs802-3-ethernet.mtusipv4.dhcp-client-idR(R^R+R/R0R1R4R5R6RR*R3R7R8RVRR[R(R_RRfRRpR((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytmodify_connection_ethernets&           cC`s|jdddddg}|jdk r=|j|jn"|jdk r_|j|jn|jd|jdk r|j|jn"|jdk r|j|jni |jd6|jd6|jd 6|jd 6|j |j d 6|j d 6|j d 6|j d6|jd6|jd6|jd6|j |jd6}x<|jD].\}}|dk rM|j||gqMqMW|S(NRRR.tbridgescon-nameR-R/R0R4R5R*sbridge.ageing-timesbridge.forward-delaysbridge.hello-timesbridge.mac-addresssbridge.max-agesbridge.prioritys bridge.stp(R^R+R[RR-R/R0R4R5RR*RFRCRDRIRER:R9RR(R_RfRRpR((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytcreate_connection_bridges6            cC`s|jdd|jg}i |jd6|jd6|jd6|jd6|j|jd6|jd6|j d 6|j d 6|j d 6|j d 6|j d 6|j|jd6}x<|jD].\}}|dk r|j||gqqW|S(NRRs ipv4.addresss ipv4.gateways ipv6.addresss ipv6.gatewayR*sbridge.ageing-timesbridge.forward-delaysbridge.hello-timesbridge.mac-addresssbridge.max-agesbridge.prioritys bridge.stp(R^R+R/R0R4R5RR*RFRCRDRIRER:R9RR[R(R_RfRRpR((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytmodify_connection_bridge)s$           cC`sH|jdddddg}|jdk r=|j|jn"|jdk r_|j|jn|jd|jdk r|j|jn"|jdk r|j|jn|jdk r|jd|jgni|jd6|j|j d 6|j d 6}x<|j D].\}}|dk r|j||gqqW|S( NRRR.s bridge-slavescon-nameR-R,sbridge-port.path-costsbridge-port.hairpinsbridge-port.priority( R^R+R[RR-R,RRHRRGRBR(R_RfRRpR((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytcreate_connection_bridge_slaveEs(    cC`s|jdd|jg}|jdk r@|jd|jgni|jd6|j|jd6|jd6}x<|j D].\}}|dk rz|j||gqzqzW|S(NRRR,sbridge-port.path-costsbridge-port.hairpinsbridge-port.priority( R^R+R,R[RRHRRGRBR(R_RfRRpR((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytmodify_connection_bridge_slave`s   cC`s|jg}|jd|jd|jd|jd|jd|jdk ro|j|jn<|jdk r|j|jn|jdt|j|jd|jdk r|j|jn<|jdk r|j|jn|jdt|ji|jd6|jd 6|jp9d d 6|j pId d 6|j pYd d 6|j pid d6|j |j d6}x-|jD]\}}|j||gqW|S(NRRR.tvlanscon-namesvlan%sR-tdevRRrR/R0R4R5R*(R^RR+R[R-RRJRKR/R0R4R5RR*RR(R_RfRXtktv((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytcreate_connection_vlanqs6         c C`sE|jg}|jd|jd|jdk rH|j|jn<|jdk rj|j|jn|jdt|ji |jd6|jd6|jpdd6|j pdd6|j pdd 6|j pdd 6|j pdd 6|j pdd 6|j|jd 6}x-|jD]\}}|j||gqW|S(NRRsvlan%ss vlan.parentsvlan.idRrs ipv4.addresss ipv4.gatewaysipv4.dnss ipv6.addresss ipv6.gatewaysipv6.dnsR*(R^RR+R[R-RRJRKR/R0R1R4R5R6RR*RR(R_RfRXRR((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytmodify_connection_vlans(     cC`sO|jdddddg}|jdk r=|j|jn<|jdk r_|j|jn|jdt|j|jd|jdk r|j|jn<|jdk r|j|jn|jdt|ji|jd 6|jd 6|jd 6|j |j d 6}x-|j D]\}}|j ||gq(W|S( NRRR.tvxlanscon-namesvxlan%sR-svxan%ssvxlan.ids vxlan.locals vxlan.remoteR*( R^R+R[RR-RRORPRQRR*RR(R_RfRXRR((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytcreate_connection_vxlans&    cC`s|jddg}|jdk r4|j|jn<|jdk rV|j|jn|jdt|ji|jd6|jd6|jd6|j |j d6}x-|j D]\}}|j ||gqW|S(NRRsvxlan%ssvxlan.ids vxlan.locals vxlan.remoteR*( R^R+R[RR-RRORPRQRR*RR(R_RfRXRR((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytmodify_connection_vxlans   cC`s|jdddddddg}|jdk rC|j|jnN|jdk re|j|jn,|jdk r|jdt|jn|jd |jdk r|j|jn<|jdk r|j|jn|jdt|j|jdk r$|jd |jgni|jd 6|j d 6|j |j d 6}x-|j D]\}}|j||gq^W|S(NRRR.s ip-tunnelR;Rscon-namesipip%sR-Rsip-tunnel.localsip-tunnel.remoteR*( R^R+R[RR-RRRRRSRTRR*R(R_RfRXRR((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytcreate_connection_ipips*!   cC`s|jddg}|jdk r4|j|jnN|jdk rV|j|jn,|jdk r|jdt|jni|jd6|j d6|j |j d6}x-|j D]\}}|j ||gqW|S(NRRsipip%ssip-tunnel.localsip-tunnel.remoteR*(R^R+R[RR-RRRtipip_devRSRTRR*RR(R_RfRXRR((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytmodify_connection_ipips  cC`s|jdddddddg}|jdk rC|j|jnN|jdk re|j|jn,|jdk r|jdt|jn|jd |jdk r|j|jn<|jdk r|j|jn|jdt|j|jdk r$|jd |jgni|j d 6|j d 6|j |j d 6}x-|j D]\}}|j||gq^W|S(NRRR.s ip-tunnelR;Rscon-namessit%sR-Rsip-tunnel.localsip-tunnel.remoteR*(R^R+R[RR-RRRRRRSRTRR*R(R_RfRXRR((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytcreate_connection_sits*!   cC`s|jddg}|jdk r4|j|jnN|jdk rV|j|jn,|jdk r|jdt|jni|jd6|jd6|j |j d6}x-|j D]\}}|j ||gqW|S(NRRssit%ssip-tunnel.localsip-tunnel.remoteR*( R^R+R[RR-RRRRSRTRR*RR(R_RfRXRR((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytmodify_connection_sit.s  cC`s,g}|jdkr|jdk s3|jdk ro|j}|j||j}|j||jS|jdks|jdkr|j}qnc|jdkr|jdk r|j }|j||j }|j|S|j }n|jdkr|jdk s:|jdk s:|jdk rv|j }|j||j }|j||jS|j }n}|jdkr|j }n_|jdkr*|jdk s|jdk s|jdk r|j}|j||j}|j||jS|j}n|jdkrH|j}n|jdkrf|j}n|jdkr|j}n~|jd kr|j}n`|jd kr|j}nB|jd kr|j}n$|jd kr|jd d }n|r|j|S|jjdddS(NRs team-slaveRs bond-slaveRRs bridge-slaveRRRRRRRs{Type of device or network connection is required while performing 'create' operation. Please specify 'type' as an argument.(R.R1R[R6RRhRRR8RRRRRRRRRRRRRRWR(R_Rf((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytcreate_connection@sh         -     -      cC`s%|jdd|jg}|j|S(NRtdel(R^R+Rh(R_Rf((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytremove_connection|scC`sg}|jdkr$|j}nP|jdkrB|j}n2|jdkr`|j}n|jdkr~|j}n|jdkr|j}n|jdkr|j}n|jdkr|j}n|jdkr|j}n~|jd kr|j }n`|jd kr2|j }nB|jd krP|j }n$|jd krt|jd d }n|r|j |S|j jdddS(NRs team-slaveRs bond-slaveRRs bridge-slaveRRRRRRRs{Type of device or network connection is required while performing 'modify' operation. Please specify 'type' as an argument.(R.RRRRRRRRRRRRhRWR(R_Rf((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytmodify_connections8 N(1t__name__t __module__t__doc__tplatformR[t distributiont HAVE_DBUSRsRRtDEVTYPEStSTATESR`RzRhRqRyRt staticmethodRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR(((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pyRMs    0   (        #    &  %    $        < c]C`s<tdtdtdddtdtdddtd d d gd tdddtd tdddtdddtddd ddddddddddddg dtdddtdddtdddtddd tddd!tddd"tddd#tddd$tddd%tdddd&d d'd(d)d&d*d+d,gd-tdd.d/tdd.d0tdd.d1tdd.d2tddd3tddd4tdd.d5tddd6tdddtd7tdd.dd8d9tdd.dd:d;tdd.dd<d=tdd.dd>d?tdd.dd@dAtdd.ddBdCtdddtdDtdd.ddEdFtdd.dGtdddHtdddItdddJtdddKtdd.dLtdddMtdddNtdddOtdddPtdd,dQt}tsp|jdRtdSdTtnts|jdRtdUdTtnt |}de\}}}i|j d 6|j d6}|j dkr|j jdRdWn|jdkrY|jdkr*|j jdRdX|jn|jdkrY|j jdRdY|jqYn|j d kr|jr|jr|jdZtn|j\}}}|j\}}}|d[kr|jd\d]|j dR|d^|qqn|j d kr|jrKd_|d`<|jr3|jdZtn|j\}}}n|jsda|j |jf|db<|jr|jdZtn|j\}}}n|dk r|d[kr|jd\|j dR|d^|qn|dkrt|dZR?R@RAR=R8RIR9R:iRBi RCiRDiREiRFi,RGRHidRJRKRLRMRNRORPRQRRRSRTtsupports_check_modeRRst exceptionsNetworkManager glib APIRrs(Please specify a name for the connections4Please specify a name for the master when type is %ssCPlease specify an interface name for the connection when type is %stchangeditnamesNo Connection named %s existstrcs-Connections do exist so we are modifying themtExistss'Connection %s of Type %s is being addedt Connectiontstdouttstderr(NRrRr(R tdictR]RRR t DBUS_IMP_ERRtHAVE_NM_CLIENTtNM_CLIENT_IMP_ERRRR[R+R)RWR.R,R-Rt check_modet exit_jsonRRRRRz(RWRURtoutterrtresult((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytmains! -      ,     %     t__main__(&t __future__RRRR.t __metaclass__tANSIBLE_METADATAt DOCUMENTATIONtEXAMPLEStRETURNt tracebackR[RRsR]Rt ImportErrort format_excRzRRtgitrequire_versiont gi.repositoryRt ValueErrorR R tansible.module_utils.basicR R tansible.module_utils._textR RtobjectRRR(((sC/usr/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.pytsR  )         X v