connection.feature 56.2 KB
Newer Older
Vladimír Beneš's avatar
Vladimír Beneš committed
1 2 3 4
Feature: nmcli: connection

    # Please do use tags as follows:
    # @bugzilla_link (rhbz123456)
5
    # @version_control (ver+=1.10,rhelver-=8,fedoraver+30,[not_with_]rhel_pkg,[not_with_]fedora_pkg) - see version_control.py
Vladimír Beneš's avatar
Vladimír Beneš committed
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
    # @other_tags (see environment.py)
    # @test_name (compiled from scenario name)
    # Scenario:

    @connection_help
    Scenario: nmcli - connection - help and autocompletion
    Then "COMMAND :=  { show | up | down | add | modify | edit | delete | reload | load }\s+show\s+up\s+down\s+add\s+modify\s+edit\s+edit\s+delete\s+reload\s+load" is visible with command "nmcli connection help"
    Then "--active" is visible with tab after "nmcli connection show "
    Then "autoconnect" is visible with tab after "nmcli connection add "
    Then "con-name" is visible with tab after "nmcli connection add "
    Then "help" is visible with tab after "nmcli connection add "
    Then "ifname" is visible with tab after "nmcli connection add "
    Then "type" is visible with tab after "nmcli connection add "
    Then "add" is visible with tab after "nmcli connection "
    Then "down" is visible with tab after "nmcli connection "
    Then "help" is visible with tab after "nmcli connection "
    Then "modify" is visible with tab after "nmcli connection "
    Then "show" is visible with tab after "nmcli connection "
    Then "delete" is visible with tab after "nmcli connection "
    Then "edit" is visible with tab after "nmcli connection "
    Then "load" is visible with tab after "nmcli connection "
    Then "reload" is visible with tab after "nmcli connection "
    Then "up" is visible with tab after "nmcli connection "
    Then "Usage: nmcli connection add { OPTIONS | help }\s+OPTIONS \:= COMMON_OPTIONS TYPE_SPECIFIC_OPTIONS IP_OPTIONS\s+COMMON_OPTIONS:\s+type <type>\s+ifname <interface name> |\s+ethernet\:\s+wifi:\s+ssid <SSID>\s+gsm:\s+apn <APN>\s+cdma:\s+infiniband:\s+bluetooth:\s+vlan:\s+dev <parent device \(connection  UUID, ifname, or MAC\)>\s+bond:\s+bond-slave:\s+master <master \(ifname or connection UUID\)>\s+team:\s+team-slave:\s+master <master \(ifname or connection UUID\)>\s+bridge:\s+bridge-slave:\s+master <master \(ifname or connection UUID\)>\svpn:\s+vpn-type vpnc|openvpn|pptp|openconnect|openswan\s+olpc-mesh:\s+ssid" is visible with command "nmcli connection add help"


32
    @con_con_remove
Vladimír Beneš's avatar
Vladimír Beneš committed
33 34 35 36
    @connection_names_autocompletion
    Scenario: nmcli - connection - names autocompletion
    Then "testeth0" is visible with tab after "nmcli connection edit id "
    Then "testeth6" is visible with tab after "nmcli connection edit id "
37 38 39 40
    Then "con_con" is not visible with tab after "nmcli connection edit id "
    * Add connection type "ethernet" named "con_con" for device "eth5"
    Then "con_con" is visible with tab after "nmcli connection edit "
    Then "con_con" is visible with tab after "nmcli connection edit id "
Vladimír Beneš's avatar
Vladimír Beneš committed
41 42 43


    @rhbz1375933
44
    @con_con_remove
Vladimír Beneš's avatar
Vladimír Beneš committed
45 46 47 48 49 50
    @device_autocompletion
    Scenario: nmcli - connection - device autocompletion
    Then "eth0|eth1|eth10" is visible with tab after "nmcli connection add type ethernet ifname "


    @rhbz1367736
51
    @con_con_remove
Vladimír Beneš's avatar
Vladimír Beneš committed
52 53 54 55 56 57 58
    @connection_objects_autocompletion
    Scenario: nmcli - connection - objects autocompletion
    Then "ipv4.dad-timeout" is visible with tab after "nmcli  connection add type bond -- ipv4.method manual ipv4.addresses 1.1.1.1/24 ip"


    @rhbz1301226
    @ver+=1.4.0
59
    @con_con_remove
Vladimír Beneš's avatar
Vladimír Beneš committed
60 61
    @802_1x_objects_autocompletion
    Scenario: nmcli - connection - 802_1x objects autocompletion
62 63 64
    * "802.1x" is visible with tab after "nmcli  connection add type ethernet ifname eth5 con-name con_con2 802-"
    * Add a new connection of type "ethernet" and options "ifname eth5 con-name con_con 802-1x.identity jdoe 802-1x.eap leap"
    Then "802-1x.eap:\s+leap\s+802-1x.identity:\s+jdoe" is visible with command "nmcli con show con_con"
Vladimír Beneš's avatar
Vladimír Beneš committed
65 66


67 68 69 70 71
    @rhbz1391170
    @ver+=1.8.0
    @connection_get_value
    Scenario: nmcli - connection - get value
    Then "testeth0\s+eth0" is visible with command "nmcli -g connection.id,connection.interface-name connection show testeth0"
72 73
     And "--" is visible with command "nmcli connection show testeth0 |grep connection.master"
     And "--" is not visible with command "nmcli -t connection show testeth0 |grep connection.master"
74 75


Vladimír Beneš's avatar
Vladimír Beneš committed
76 77 78 79 80 81 82 83
    @rhbz842975
    @connection_no_error
    Scenario: nmcli - connection - no error shown
    Then "error" is not visible with command "nmcli -f DEVICE connection"
    Then "error" is not visible with command "nmcli -f DEVICE dev"
    Then "error" is not visible with command "nmcli -f DEVICE nm"


84
    @con_con_remove
Vladimír Beneš's avatar
Vladimír Beneš committed
85 86
    @connection_delete_while_editing
    Scenario: nmcli - connection - delete opened connection
87 88 89
     * Add connection type "ethernet" named "con_con" for device "eth5"
     * Open editor for "con_con" with timeout
     * Delete connection "con_con" and hit Enter
Vladimír Beneš's avatar
Vladimír Beneš committed
90 91 92


    @rhbz1168657
93
    @con_con_remove
Vladimír Beneš's avatar
Vladimír Beneš committed
94 95
    @connection_double_delete
    Scenario: nmcli - connection - double delete
96 97
     * Add connection type "ethernet" named "con_con" for device "*"
     * Delete connection "con_con con_con"
Vladimír Beneš's avatar
Vladimír Beneš committed
98 99 100


    @rhbz1171751
101
    @ver+=1.18
102
    @teardown_testveth @con_con_remove @ifcfg-rh
Vladimír Beneš's avatar
Vladimír Beneš committed
103 104
    @connection_profile_duplication
    Scenario: nmcli - connection - profile duplication
105 106
     * Prepare simulated test "testXc" device
     * Add a new connection of type "ethernet" and options "ifname testXc con-name con_con autoconnect no"
107
     * Execute "echo 'NM_CONTROLLED=no' >> /etc/sysconfig/network-scripts/ifcfg-con_con"
108
     * Reload connections
109 110
     * Execute "rm -f /etc/sysconfig/network-scripts/ifcfg-con_con"
     * Add a new connection of type "ethernet" and options "ifname eth5 con-name con_con autoconnect no"
111
     * Reload connections
112 113
     Then "1" is visible with command "nmcli c |grep con_con |wc -l"
     * Bring "up" connection "con_con"
Vladimír Beneš's avatar
Vladimír Beneš committed
114 115 116


    @rhbz1174164
117
    @add_testeth5
Vladimír Beneš's avatar
Vladimír Beneš committed
118 119
    @connection_veth_profile_duplication
    Scenario: nmcli - connection - veth - profile duplication
120 121 122 123 124 125 126 127
    * Connect device "eth5"
    * Connect device "eth5"
    * Connect device "eth5"
    * Delete connection "testeth5"
    * Connect device "eth5"
    * Connect device "eth5"
    * Connect device "eth5"
    Then "1" is visible with command "nmcli connection |grep ^eth5 |wc -l"
Vladimír Beneš's avatar
Vladimír Beneš committed
128 129


130 131
    @rhbz1498943
    @ver+=1.10
132
    @con_con_remove
133 134
    @double_connection_warning
    Scenario: nmcli - connection - warn about the same name
135 136
    * Add connection type "ethernet" named "con_con2" for device "eth5"
    Then "Warning: There is another connection with the name 'con_con2'. Reference the connection by its uuid" is visible with command "nmcli con add type ethernet ifname eth con-name con_con2"
137 138


Vladimír Beneš's avatar
Vladimír Beneš committed
139
    @rhbz997998
140
    @con_con_remove
Vladimír Beneš's avatar
Vladimír Beneš committed
141 142
    @connection_restricted_to_single_device
    Scenario: nmcli - connection - restriction to single device
143 144 145 146 147
     * Add connection type "ethernet" named "con_con" for device "*"
     * Start generic connection "con_con" for "eth5"
     * Start generic connection "con_con" for "eth6"
    Then "eth6" is visible with command "nmcli -f GENERAL.DEVICES connection show con_con"
    Then "eth5" is not visible with command "nmcli -f GENERAL.DEVICES connection show con_con"
Vladimír Beneš's avatar
Vladimír Beneš committed
148 149 150


    @rhbz1094296
151
    @con_con_remove
Vladimír Beneš's avatar
Vladimír Beneš committed
152 153
    @connection_secondaries_restricted_to_vpn
    Scenario: nmcli - connection - restriction to single device
154
     * Add connection type "ethernet" named "con_con" for device "*"
155
     * Add connection type "ethernet" named "con_con2" for device "eth5"
156
     * Open editor for connection "con_con"
157
     * Submit "set connection.secondaries con_con2" in editor
Vladimír Beneš's avatar
Vladimír Beneš committed
158 159 160 161
    Then Error type "is not a VPN connection profile" shown in editor


    @rhbz1108167
162
    @dummy
Vladimír Beneš's avatar
Vladimír Beneš committed
163 164
    @connection_removal_of_disapperared_device
    Scenario: nmcli - connection - remove connection of nonexisting device
165 166 167 168 169 170
     * Finish "sudo ip link add name br0 type bridge"
     * Finish "ip link set dev br0 up"
     * Finish "ip addr add 192.168.201.3/24 dev br0"
     When "br0" is visible with command "nmcli -f NAME connection show --active" in "5" seconds
     * Finish "sudo ip link del br0"
     Then "br0" is not visible with command "nmcli -f NAME connection show --active" in "5" seconds
Vladimír Beneš's avatar
Vladimír Beneš committed
171 172


173
    @con_con_remove
Vladimír Beneš's avatar
Vladimír Beneš committed
174 175
    @connection_down
    Scenario: nmcli - connection - down
176 177 178
     * Add connection type "ethernet" named "con_con" for device "eth5"
     * Bring "down" connection "con_con"
     Then "con_con" is not visible with command "nmcli -f NAME connection show --active"
Vladimír Beneš's avatar
Vladimír Beneš committed
179 180


181
    @con_con_remove
Vladimír Beneš's avatar
Vladimír Beneš committed
182 183
    @connection_set_id
    Scenario: nmcli - connection - set id
184 185
     * Add connection type "ethernet" named "con_con" for device "blah"
     * Open editor for connection "con_con"
186
     * Submit "set connection.id con_con2" in editor
Vladimír Beneš's avatar
Vladimír Beneš committed
187 188
     * Save in editor
     * Quit editor
189
     Then "con_con2" is visible with command "nmcli -f NAME con show"
Vladimír Beneš's avatar
Vladimír Beneš committed
190 191


192
    @ver-=1.17.90
193
    @con_con_remove
Vladimír Beneš's avatar
Vladimír Beneš committed
194 195
    @connection_set_uuid_error
    Scenario: nmcli - connection - set uuid
196 197
     * Add connection type "ethernet" named "con_con" for device "blah"
     * Open editor for connection "con_con"
Vladimír Beneš's avatar
Vladimír Beneš committed
198 199 200 201
     * Submit "set connection.uuid 00000000-0000-0000-0000-000000000000" in editor
     Then Error type "uuid" shown in editor


202 203 204 205 206 207 208 209
    @ver+=1.18.0
    @con_con_remove
    @connection_set_uuid_error
    Scenario: nmcli - connection - set uuid
    * Add connection type "ethernet" named "con_con" for device "blah"
    * Open editor for connection "con_con"
    * Submit "set connection.uuid 00000000-0000-0000-0000-000000000000" in editor
    Then Error type "uuid" shown in editor
210
    * Execute "/usr/bin/python tmp/repro_1707261.py"
211 212


213
    @con_con_remove
Vladimír Beneš's avatar
Vladimír Beneš committed
214 215
    @connection_set_interface-name
    Scenario: nmcli - connection - set interface-name
216
     * Add connection type "ethernet" named "con_con" for device "blah"
217
     * Modify connection "con_con" changing options "connection.interface-name eth6"
218
     * Bring "up" connection "con_con"
219
     Then "con_con" is visible with command "nmcli -t -f NAME  connection show -a" in "3" seconds
Vladimír Beneš's avatar
Vladimír Beneš committed
220 221


222
    @veth @con_con_remove @restart
223
    @ver-=1.18.3
Vladimír Beneš's avatar
Vladimír Beneš committed
224 225
    @connection_autoconnect_yes
    Scenario: nmcli - connection - set autoconnect on
226 227 228 229 230 231 232 233 234 235 236 237 238
    * Add a new connection of type "ethernet" and options "con-name con_con ifname eth6 connection.autoconnect no"
    * Modify connection "con_con" changing options "connection.autoconnect yes"
    * Reboot
    Then "con_con" is visible with command "nmcli -t -f NAME  connection show -a" in "3" seconds


    @rhbz1715887
    @ver+=1.18.4
    @veth @con_con_remove @restart
    @connection_autoconnect_yes
    Scenario: nmcli - connection - set autoconnect on
     * Add a new connection of type "ethernet" and options "con-name con_con ifname eth6 connection.autoconnect no connection.autoconnect-retries 3"
     * Modify connection "con_con" changing options "connection.autoconnect '' connection.autoconnect-retries ''"
Vladimír Beneš's avatar
Vladimír Beneš committed
239
     * Reboot
240
     Then "con_con" is visible with command "nmcli -t -f NAME  connection show -a" in "3" seconds
241
     Then "-1 \(default\)" is visible with command "nmcli -f connection.autoconnect-retries con show con_con" in "3" seconds
Vladimír Beneš's avatar
Vladimír Beneš committed
242 243


244 245
    @rhbz1401515
    @ver+=1.10
246
    @con_con_remove
247 248
    @connection_autoconnect_yes_without_immediate_effects
    Scenario: nmcli - connection - set autoconnect on without autoconnecting
249
     * Add a new connection of type "ethernet" and options "con-name con_con2 ifname eth5 autoconnect no"
250
     When "con_con2" is visible with command "nmcli con"
251
     * Execute "/usr/bin/python tmp/repro_1401515.py" without waiting for process to finish
252
     Then "yes" is visible with command "nmcli connection show con_con2 |grep autoconnect:" in "5" seconds
253
     Then "con_con" is not visible with command "nmcli -t -f NAME  connection show -a" in "3" seconds
254 255


256
    @con_con_remove
Vladimír Beneš's avatar
Vladimír Beneš committed
257 258
    @connection_autoconnect_warning
    Scenario: nmcli - connection - autoconnect warning while saving new
259
     * Open editor for new connection "con_con" type "ethernet"
Vladimír Beneš's avatar
Vladimír Beneš committed
260 261 262 263 264 265
     * Save in editor
     Then autoconnect warning is shown
     * Enter in editor
     * Quit editor


266
    @con_con_remove @restart
Vladimír Beneš's avatar
Vladimír Beneš committed
267 268
    @connection_autoconnect_no
    Scenario: nmcli - connection - set autoconnect off
269
     * Add connection type "ethernet" named "con_con" for device "eth6"
270
     * Modify connection "con_con" changing options "connection.autoconnect no"
Vladimír Beneš's avatar
Vladimír Beneš committed
271
     * Reboot
272
     Then "con_con" is not visible with command "nmcli -t -f NAME  connection show -a" in "3" seconds
273 274 275


    @ver+=1.7.1
276
    @con_con_remove @restart
277 278
    @ifcfg_parse_options_with_comment
    Scenario: ifcfg - connection - parse options with comments
279 280 281 282
     * Execute "echo 'DEVICE=eth5' >> /etc/sysconfig/network-scripts/ifcfg-con_con"
     * Execute "echo 'NAME=con_con' >> /etc/sysconfig/network-scripts/ifcfg-con_con"
     * Execute "echo 'BOOTPROTO=dhcp' >> /etc/sysconfig/network-scripts/ifcfg-con_con"
     * Execute "echo 'ONBOOT=no  # foo' >> /etc/sysconfig/network-scripts/ifcfg-con_con"
283
     * Reload connections
284
     * Restart NM
285
     Then "con_con" is not visible with command "nmcli -t -f NAME  connection show -a" in "3" seconds
Vladimír Beneš's avatar
Vladimír Beneš committed
286 287


288
    @ver+=1.8.0
289
    @con_con_remove @con_con_remove @restart
290 291
    @ifcfg_compliant_with_kickstart
    Scenario: ifcfg - connection - pykickstart compliance
292 293 294 295 296 297 298 299 300
    * Append "UUID='8b4753fb-c562-4784-bfa7-f44dc6581e73'" to ifcfg file "con_con2"
    * Append "DNS1='192.0.2.1'" to ifcfg file "con_con2"
    * Append "IPADDR='192.0.2.2'" to ifcfg file "con_con2"
    * Append "GATEWAY='192.0.2.1'" to ifcfg file "con_con2"
    * Append "NETMASK='255.255.255.0'" to ifcfg file "con_con2"
    * Append "BOOTPROTO='static'" to ifcfg file "con_con2"
    * Append "DEVICE='eth5'" to ifcfg file "con_con2"
    * Append "ONBOOT='yes'" to ifcfg file "con_con2"
    * Append "IPV6INIT='yes'" to ifcfg file "con_con2"
301
    * Reload connections
302
    * Execute "nmcli con modify uuid 8b4753fb-c562-4784-bfa7-f44dc6581e73 connection.id con_con"
303
    * Restart NM
304
    When "activated" is visible with command "nmcli -g GENERAL.STATE con show con_con" in "45" seconds
305 306 307 308 309 310 311 312 313
    Then "192.0.2.2" is visible with command "ip a s eth5"
     And "UUID=8b4753fb-c562-4784-bfa7-f44dc6581e73" is visible with command "cat /etc/sysconfig/network-scripts/ifcfg-con_con2"
     And "DNS1=192.0.2.1" is visible with command "cat /etc/sysconfig/network-scripts/ifcfg-con_con2"
     And "IPADDR=192.0.2.2" is visible with command "cat /etc/sysconfig/network-scripts/ifcfg-con_con2"
     And "GATEWAY=192.0.2.1" is visible with command "cat /etc/sysconfig/network-scripts/ifcfg-con_con2"
     And "NETMASK=255.255.255.0" is visible with command "cat /etc/sysconfig/network-scripts/ifcfg-con_con2"
     And "DEVICE=eth5" is visible with command "cat /etc/sysconfig/network-scripts/ifcfg-con_con2"
     And "ONBOOT=yes" is visible with command "cat /etc/sysconfig/network-scripts/ifcfg-con_con2"
     And "IPV6INIT=yes" is visible with command "cat /etc/sysconfig/network-scripts/ifcfg-con_con2"
314 315


Vladimír Beneš's avatar
Vladimír Beneš committed
316 317
     @rhbz1367737
     @ver+=1.4.0
318
     @con_con_remove
Vladimír Beneš's avatar
Vladimír Beneš committed
319 320
     @manual_connection_with_both_ips
     Scenario: nmcli - connection - add ipv4 ipv6 manual connection
321 322
     * Execute "nmcli connection add type ethernet con-name con_con ifname eth5 ipv4.method manual ipv4.addresses 1.1.1.1/24 ipv6.method manual ipv6.addresses 1::2/128"
     Then "con_con" is visible with command "nmcli con"
Vladimír Beneš's avatar
Vladimír Beneš committed
323 324


325
    @con_con_remove
Vladimír Beneš's avatar
Vladimír Beneš committed
326 327
    @connection_timestamp
    Scenario: nmcli - connection - timestamp
328
     * Add a new connection of type "ethernet" and options "con-name con_con ifname eth6 autoconnect no"
329
     * Open editor for connection "con_con"
Vladimír Beneš's avatar
Vladimír Beneš committed
330 331
     When Check if object item "connection.timestamp:" has value "0" via print
     * Quit editor
332 333 334
     * Bring "up" connection "con_con"
     * Bring "down" connection "con_con"
     * Open editor for connection "con_con"
Vladimír Beneš's avatar
Vladimír Beneš committed
335 336 337 338
     Then Check if object item "connection.timestamp:" has value "current_time" via print
     * Quit editor


339
    @con_con_remove
Vladimír Beneš's avatar
Vladimír Beneš committed
340 341
    @connection_readonly_timestamp
    Scenario: nmcli - connection - readonly timestamp
342 343
     * Add connection type "ethernet" named "con_con" for device "eth6"
     * Open editor for connection "con_con"
Vladimír Beneš's avatar
Vladimír Beneš committed
344 345 346 347 348
     * Submit "set connection.timestamp 1372338021" in editor
     Then Error type "timestamp" shown in editor
     When Quit editor


349
    @con_con_remove
Vladimír Beneš's avatar
Vladimír Beneš committed
350 351
    @connection_readonly_yes
    Scenario: nmcli - connection - readonly read-only
352 353
     * Add connection type "ethernet" named "con_con" for device "eth6"
     * Open editor for connection "con_con"
Vladimír Beneš's avatar
Vladimír Beneš committed
354 355 356 357
     * Submit "set connection.read-only yes" in editor
     Then Error type "read-only" shown in editor


358
    @con_con_remove
Vladimír Beneš's avatar
Vladimír Beneš committed
359 360
    @connection_readonly_type
    Scenario: nmcli - connection - readonly type
361 362
     * Add connection type "ethernet" named "con_con" for device "eth6"
     * Open editor for connection "con_con"
Vladimír Beneš's avatar
Vladimír Beneš committed
363 364 365 366
     * Submit "set connection.type 802-3-ethernet" in editor
     Then Error type "type" shown in editor


367
    @con_con_remove @ifcfg-rh @eth6_disconnect
Vladimír Beneš's avatar
Vladimír Beneš committed
368 369
    @connection_permission_to_user
    Scenario: nmcli - connection - permissions to user
370 371
     * Add connection type "ethernet" named "con_con" for device "eth6"
     * Open editor for connection "con_con"
Vladimír Beneš's avatar
Vladimír Beneš committed
372 373 374 375
     * Submit "set connection.permissions test" in editor
     * Save in editor
     * Check if object item "connection.permissions:" has value "user:test" via print
     * Quit editor
376
     #* Prompt is not running
377 378
     * Bring "up" connection "con_con"
     * Open editor for connection "con_con"
Vladimír Beneš's avatar
Vladimír Beneš committed
379 380
    Then Check if object item "connection.permissions:" has value "user:test" via print
     * Quit editor
381
    Then "test" is visible with command "grep test /etc/sysconfig/network-scripts/ifcfg-con_con"
Vladimír Beneš's avatar
Vladimír Beneš committed
382 383


384
    @con_con_remove @firewall
Vladimír Beneš's avatar
Vladimír Beneš committed
385 386
    @connection_zone_drop_to_public
    Scenario: nmcli - connection - zone to drop and public
387
     * Add a new connection of type "ethernet" and options "con-name con_con ifname eth6 ipv4.method manual ipv4.addresses 192.168.122.253 connection.zone drop"
388
     * Bring "up" connection "con_con"
Vladimír Beneš's avatar
Vladimír Beneš committed
389
     When "eth6" is visible with command "firewall-cmd --zone=drop --list-all"
390
     * Modify connection "con_con" changing options "connection.zone ''"
391
     * Bring "up" connection "con_con"
Vladimír Beneš's avatar
Vladimír Beneš committed
392 393 394 395 396
     Then "eth6" is visible with command "firewall-cmd --zone=public --list-all"


     @rhbz1366288
     @ver+=1.4.0
397
     @con_con_remove @firewall @restart
Vladimír Beneš's avatar
Vladimír Beneš committed
398 399
     @firewall_zones_restart_persistence
     Scenario: nmcli - connection - zone to drop and public
400 401 402 403
      * Add connection type "ethernet" named "con_con" for device "eth5"
      When "public\s+interfaces: eth0 eth5" is visible with command "firewall-cmd --get-active-zones"
      * Execute "nmcli c modify con_con connection.zone internal"
      When "internal\s+interfaces: eth5" is visible with command "firewall-cmd --get-active-zones"
Vladimír Beneš's avatar
Vladimír Beneš committed
404 405
       And "public\s+interfaces: eth0" is visible with command "firewall-cmd --get-active-zones"
      * Execute "systemctl restart firewalld"
406
      When "internal\s+interfaces: eth5" is visible with command "firewall-cmd --get-active-zones"
Vladimír Beneš's avatar
Vladimír Beneš committed
407
       And "public\s+interfaces: eth0" is visible with command "firewall-cmd --get-active-zones"
408 409
      * Restart NM
      When "internal\s+interfaces: eth5" is visible with command "firewall-cmd --get-active-zones"
Vladimír Beneš's avatar
Vladimír Beneš committed
410
       And "public\s+interfaces: eth0" is visible with command "firewall-cmd --get-active-zones"
411 412
      * Execute "nmcli c modify con_con connection.zone trusted"
      When "trusted\s+interfaces: eth5" is visible with command "firewall-cmd --get-active-zones"
Vladimír Beneš's avatar
Vladimír Beneš committed
413 414
       And "public\s+interfaces: eth0" is visible with command "firewall-cmd --get-active-zones"
      * Execute "systemctl restart firewalld"
415
      When "trusted\s+interfaces: eth5" is visible with command "firewall-cmd --get-active-zones"
Vladimír Beneš's avatar
Vladimír Beneš committed
416
       And "public\s+interfaces: eth0" is visible with command "firewall-cmd --get-active-zones"
417 418
      * Execute "nmcli c modify con_con connection.zone work"
      Then "work\s+interfaces: eth5" is visible with command "firewall-cmd --get-active-zones"
Vladimír Beneš's avatar
Vladimír Beneš committed
419 420 421 422
       And "public\s+interfaces: eth0" is visible with command "firewall-cmd --get-active-zones"


    @rhbz663730
423
    @veth @con_con_remove @con_con_remove @restart
Vladimír Beneš's avatar
Vladimír Beneš committed
424 425
    @profile_priorities
    Scenario: nmcli - connection - profile priorities
426 427
     * Add a new connection of type "ethernet" and options "con-name con_con2 ifname eth6 connection.autoconnect-priority 2"
     * Add a new connection of type "ethernet" and options "con-name con_con ifname eth6 connection.autoconnect-priority 1"
428
     * Disconnect device "eth6"
Vladimír Beneš's avatar
Vladimír Beneš committed
429
     * Restart NM
430
     Then "con_con2" is visible with command "nmcli con show -a"
Vladimír Beneš's avatar
Vladimír Beneš committed
431 432 433 434 435 436 437 438 439 440


    # NM_METERED_UNKNOWN    = 0,
    # NM_METERED_YES        = 1,
    # NM_METERED_NO         = 2,
    # NM_METERED_GUESS_YES  = 3,
    # NM_METERED_GUESS_NO   = 4,


    @rhbz1200452
441
    @con_con_remove @eth0
Vladimír Beneš's avatar
Vladimír Beneš committed
442 443
    @connection_metered_manual_yes
    Scenario: nmcli - connection - metered manual yes
444
     * Add a new connection of type "ethernet" and options "con-name con_con ifname eth5 connection.metered true"
445
     Then "eth5:connected:con_con" is visible with command "nmcli -t -f DEVICE,STATE,CONNECTION device" in "20" seconds
Vladimír Beneš's avatar
Vladimír Beneš committed
446 447 448 449
     Then Metered status is "1"


    @rhbz1200452
450
    @con_con_remove @eth0
Vladimír Beneš's avatar
Vladimír Beneš committed
451 452
    @connection_metered_manual_no
    Scenario: nmcli - connection - metered manual no
453
     * Add a new connection of type "ethernet" and options "con-name con_con ifname eth5 connection.metered false"
454
     Then "eth5:connected:con_con" is visible with command "nmcli -t -f DEVICE,STATE,CONNECTION device" in "20" seconds
Vladimír Beneš's avatar
Vladimír Beneš committed
455 456 457 458
     Then Metered status is "2"


    @rhbz1200452
459
    @con_con_remove @eth0
Vladimír Beneš's avatar
Vladimír Beneš committed
460 461
    @connection_metered_guess_no
    Scenario: NM - connection - metered guess no
462
     * Add a new connection of type "ethernet" and options "con-name con_con ifname eth5 connection.metered unknown"
463
     Then "eth5:connected:con_con" is visible with command "nmcli -t -f DEVICE,STATE,CONNECTION device" in "20" seconds
Vladimír Beneš's avatar
Vladimír Beneš committed
464 465 466 467
     Then Metered status is "4"


    @rhbz1200452
468
    @con_con_remove @eth0
Vladimír Beneš's avatar
Vladimír Beneš committed
469 470 471
    @teardown_testveth
    @connection_metered_guess_yes
    Scenario: NM - connection - metered guess yes
472 473
     * Prepare simulated test "testXc" device with "192.168.99" ipv4 and "2620:52:0:dead" ipv6 dhcp address prefix and dhcp option "43,ANDROID_METERED"
     * Add a new connection of type "ethernet" and options "ifname testXc con-name con_con autoconnect off"
474
     * Modify connection "con_con" changing options "connection.metered unknown"
475
     * Bring "up" connection "con_con"
Vladimír Beneš's avatar
Vladimír Beneš committed
476 477 478
     Then Metered status is "3"


479
     @con_con_remove @long
Vladimír Beneš's avatar
Vladimír Beneš committed
480 481
     @display_allowed_values
     Scenario: nmcli - connection - showing allowed values
482
     * Add connection type "ethernet" named "con_con" for device "testXc"
483
     * Open editor for connection "con_con"
Vladimír Beneš's avatar
Vladimír Beneš committed
484 485 486 487 488 489 490 491 492
     * Check "fast|leap|md5|peap|pwd|sim|tls|ttls" are shown for object "802-1x.eap"
     * Check "0|1" are shown for object "802-1x.phase1-peapver"
     * Check "0|1" are shown for object "802-1x.phase1-peaplabel"
     * Check "0|1|2|3" are shown for object "802-1x.phase1-fast-provisioning"
     * Check "chap|gtc|md5|mschap|mschapv2|otp|pap|tls" are shown for object "802-1x.phase2-auth"
     * Check "gtc|md5|mschapv2|otp|tls" are shown for object "802-1x.phase2-autheap"
     * Check "fabric|vn2vn" are shown for object "dcb.app-fcoe-mode"
     * Check "auto|disabled|link-local|manual|shared" are shown for object "ipv4.method"
     * Check "auto|dhcp|ignore|link-local|manual|shared" are shown for object "ipv6.method"
493 494 495 496 497 498
     * Check "nmcli|nmtui|README|prepare" are shown for object "802-1x.ca-cert"
     * Check "nmcli|nmtui|README|prepare" are shown for object "802-1x.ca-path"
     * Check "nmcli|nmtui|README|prepare" are shown for object "802-1x.private-key"
     * Check "nmcli|nmtui|README|prepare" are shown for object "802-1x.phase2-ca-cert"
     * Check "nmcli|nmtui|README|prepare" are shown for object "802-1x.phase2-ca-path"
     * Check "nmcli|nmtui|README|prepare" are shown for object "802-1x.phase2-private-key"
Vladimír Beneš's avatar
Vladimír Beneš committed
499 500 501 502
     * Check "broadcast_mode|ctcprot|ipato_add4|ipato_invert6|layer2|protocol|rxip_add6|vipa_add6|buffer_count|fake_broadcast|ipato_add6|isolation|portname|route4|sniffer|canonical_macaddr|inter|ipato_enable|lancmd_timeout|portno|route6|total|checksumming|inter_jumbo|ipato_invert4|large_send|priority_queueing|rxip_add4|vipa_add4" are shown for object "ethernet.s390-options"
     * Check "ctc|lcs|qeth" are shown for object "ethernet.s390-nettype"
     * Check "bond|bridge|team" are shown for object "connection.slave-type"
     * Quit editor
503 504
     * Add connection type "bond" named "con-bond" for device "con-bond0"
     * Open editor for connection "con-bond"
Vladimír Beneš's avatar
Vladimír Beneš committed
505 506
     * Check "ad_select|arp_ip_target|downdelay|lacp_rate|mode|primary_reselect|updelay|xmit_hash_policy|arp_interval|arp_validate|fail_over_mac|miimon|primary|resend_igmp|use_carrier|" are shown for object "bond.options"
     * Quit editor
507 508
     * Add connection type "team" named "con-team" for device "con-team0"
     * Open editor for connection "con-team"
509 510
     * Check "nmcli|nmtui|README|prepare" are shown for object "team.config"
     * Check "nmcli|nmtui|README|prepare" are shown for object "team-port.config"
Vladimír Beneš's avatar
Vladimír Beneš committed
511
     * Quit editor
512 513
     * Add a new connection of type "wifi" and options "ifname wifi con-name con-wifi autoconnect off ssid con-wifi"
     * Open editor for connection "con-wifi"
Vladimír Beneš's avatar
Vladimír Beneš committed
514 515
     * Check "adhoc|ap|infrastructure" are shown for object "wifi.mode"
     * Check "a|bg" are shown for object "wifi.band"
516
     * Check "ieee8021x|none|wpa-eap|wpa-psk\s+" are shown for object "wifi-sec.key-mgmt"
Vladimír Beneš's avatar
Vladimír Beneš committed
517 518 519 520 521
     * Check "leap|open|shared" are shown for object "wifi-sec.auth-alg"
     * Check "rsn|wpa" are shown for object "wifi-sec.proto"
     * Check "ccmp|tkip" are shown for object "wifi-sec.pairwise"
     * Check "ccmp|tkip|wep104|wep40" are shown for object "wifi-sec.group"
     * Quit editor
522 523
     * Add connection type "infiniband" named "con_con2" for device "mlx4_ib1"
     * Open editor for connection "con_con2"
Vladimír Beneš's avatar
Vladimír Beneš committed
524 525 526 527 528 529
     * Check "connected|datagram" are shown for object "infiniband.transport-mode"
     * Quit editor


    @rhbz1142898
    @ver+=1.4.0
530
    @con_con_remove @teardown_testveth @tcpreplay
Vladimír Beneš's avatar
Vladimír Beneš committed
531 532
    @lldp
    Scenario: nmcli - connection - lldp
533 534 535 536 537
     * Prepare simulated test "testXc" device
     * Add a new connection of type "ethernet" and options "ifname testXc con-name con_con ipv4.method manual ipv4.addresses 1.2.3.4/24 connection.lldp enable"
     When "testXc\s+ethernet\s+connected" is visible with command "nmcli device" in "5" seconds
     * Execute "ip netns exec testXc_ns tcpreplay --intf1=testXcp tmp/lldp.detailed.pcap"
     Then "NEIGHBOR\[0\].DEVICE:\s+testXc" is visible with command "nmcli device lldp" in "5" seconds
Vladimír Beneš's avatar
Vladimír Beneš committed
538 539 540 541 542 543 544 545
      And "NEIGHBOR\[0\].CHASSIS-ID:\s+00:01:30:F9:AD:A0" is visible with command "nmcli device lldp"
      And "NEIGHBOR\[0\].PORT-ID:\s+1\/1" is visible with command "nmcli device lldp"
      And "NEIGHBOR\[0\].PORT-DESCRIPTION:\s+Summit300-48-Port 1001" is visible with command "nmcli device lldp"
      And "NEIGHBOR\[0\].SYSTEM-NAME:\s+Summit300-48" is visible with command "nmcli device lldp"
      And "NEIGHBOR\[0\].SYSTEM-DESCRIPTION:\s+Summit300-48 - Version 7.4e.1 \(Build 5\) by Release_Master 05\/27\/05 04:53:11" is visible with command "nmcli device lldp"
      And "NEIGHBOR\[0\].SYSTEM-CAPABILITIES:\s+20 \(mac-bridge,router\)" is visible with command "nmcli device lldp"


546 547 548 549 550
    @rhbz1652210
    @ver+=1.16.0
    @con_con_remove @teardown_testveth @tcpreplay
    @lldp_vlan_name_overflow
    Scenario: nmcli - connection - lldp vlan name overflow
551 552 553 554
    * Prepare simulated test "testXc" device
    * Add a new connection of type "ethernet" and options "ifname testXc con-name con_con ipv4.method manual ipv4.addresses 1.2.3.4/24 connection.lldp enable"
    When "testXc\s+ethernet\s+connected" is visible with command "nmcli device" in "5" seconds
    * Execute "ip netns exec testXc_ns tcpreplay --intf1=testXcp tmp/lldp.vlan.pcap"
555 556 557
    Then "NEIGHBOR\[0\].IEEE-802-1-VLAN-NAME:\s+default\s" is visible with command "nmcli --fields all device lldp" in "5" seconds


Filip Pokryvka's avatar
Filip Pokryvka committed
558 559 560 561 562
    @rhbz1652211
    @ver+=1.18.0
    @con_con_remove @teardown_testveth @tcpreplay
    @lldp_vlan_tlv
    Scenario: NM - connection - lldp check vlan tvl values via DBus
563 564 565 566
    * Prepare simulated test "testXc" device
    * Add a new connection of type "ethernet" and options "ifname testXc con-name con_con ipv4.method manual ipv4.addresses 1.2.3.4/24 connection.lldp enable"
    When "testXc\s+ethernet\s+connected" is visible with command "nmcli device" in "5" seconds
    * Execute "ip netns exec testXc_ns tcpreplay --intf1=testXcp tmp/lldp.vlan.pcap"
Filip Pokryvka's avatar
Filip Pokryvka committed
567
    # check the deffinition of the step for more details about syntax
568 569 570
    Then Check ":ieee-802-1-vid=0,:ieee-802-3-max-frame-size=1514,:ieee-802-1-vlan-name='default',:ieee-802-1-pvid=0" in LldpNeighbors via DBus for device "testXc"
     And Check ":ieee-802-1-vlans::name='default',:ieee-802-1-vlans::vid=0,:ieee-802-1-vlans::name='jbenc',:ieee-802-1-vlans::vid=99" in LldpNeighbors via DBus for device "testXc"
     And Check ":ieee-802-3-mac-phy-conf:pmd-autoneg-cap=32768,:ieee-802-3-mac-phy-conf:autoneg=0,:ieee-802-3-mac-phy-conf:operational-mau-type=0" in LldpNeighbors via DBus for device "testXc"
Filip Pokryvka's avatar
Filip Pokryvka committed
571 572


573
    @rhbz1417292
574
    @eth5_disconnect
575 576
    @introspection_active_connection
    Scenario: introspection - check active connections
577
     * Execute "/usr/bin/python tmp/network_test.py testeth5 > /tmp/test"
578
     When "testeth5" is visible with command "nmcli con s -a"
579 580 581 582
     Then "Active connections before: 1" is visible with command "cat /tmp/test"
      And "Active connections after: 2.*Active connections after: 2" is visible with command "cat /tmp/test"


583 584
    @rhbz1421429
    @ver+=1.8.0
585
    @con_con_remove
586 587
    @connection_user_settings_data
    Scenario: NM - connection - user settings data
588
    * Add a new connection of type "ethernet" and options "ifname testXc con-name con_con autoconnect no"
589 590 591 592 593 594 595 596
    * Execute "/usr/bin/python tmp/setting-user-data.py set id con_con my.own.data good_morning_starshine"
    * Execute "/usr/bin/python tmp/setting-user-data.py set id con_con my.own.data.two the_moon_says_hello"
    When "good_morning_starshine" is visible with command "/usr/bin/python tmp/setting-user-data.py get id con_con my.own.data"
     And "the_moon_says_hello" is visible with command "/usr/bin/python tmp/setting-user-data.py get id con_con my.own.data.two"
    * Execute "/usr/bin/python tmp/setting-user-data.py set id con_con -d my.own.data"
    * Execute "/usr/bin/python tmp/setting-user-data.py set id con_con -d my.own.data.two"
    Then "[none]|[0]" is visible with command "/usr/bin/python tmp/setting-user-data.py id con_con"
     And "\"my.own.data\" = \"good_morning_starshine\"|\"my.own.data.two\" = \"the_moon_says_hello\"" is not visible with command "/usr/bin/python tmp/setting-user-data.py id con_con" in "5" seconds
597 598


599
    @rhbz1448165
600
    @eth5_disconnect
601 602
    @connection_track_external_changes
    Scenario: NM - connection - track external changes
603 604
     * Execute "ip add add 192.168.1.2/24 dev eth5"
    Then "192.168.1.2/24" is visible with command "nmcli con sh eth5 |grep IP4" in "2" seconds
605 606


607
    @con_con_remove
Vladimír Beneš's avatar
Vladimír Beneš committed
608 609
    @connection_describe
    Scenario: nmcli - connection - describe
610 611
     * Add connection type "ethernet" named "con_con" for device "eth6"
     * Open editor for connection "con_con"
612
     Then Check "\[id\]|\[uuid\]|\[interface-name\]|\[type\]" are present in describe output for object "connection"
Vladimír Beneš's avatar
Vladimír Beneš committed
613 614 615 616 617 618
     * Submit "goto connection" in editor

     Then Check "=== \[id\] ===\s+\[NM property description\]\s+A human readable unique identifier for the connection, like \"Work Wi-Fi\" or \"T-Mobile 3G\"." are present in describe output for object "id"

     Then Check "=== \[uuid\] ===\s+\[NM property description\]\s+A universally unique identifier for the connection, for example generated with libuuid.  It should be assigned when the connection is created, and never changed as long as the connection still applies to the same network.  For example, it should not be changed when the \"id\" property or NMSettingIP4Config changes, but might need to be re-created when the Wi-Fi SSID, mobile broadband network provider, or \"type\" property changes. The UUID must be in the format \"2815492f-7e56-435e-b2e9-246bd7cdc664\" \(ie, contains only hexadecimal characters and \"-\"\)." are present in describe output for object "uuid"

619
     Then Check "=== \[interface-name\] ===\s+\[NM property description\]\s+The name of the network interface this connection is bound to. If not set, then the connection can be attached to any interface of the appropriate type \(subject to restrictions imposed by other settings\). For software devices this specifies the name of the created device. For connection types where interface names cannot easily be made persistent \(e.g. mobile broadband or USB Ethernet\), this property should not be used. Setting this property restricts the interfaces a connection can be used with, and if interface names change or are reordered the connection may be applied to the wrong interface." are present in describe output for object "interface-name"
Vladimír Beneš's avatar
Vladimír Beneš committed
620 621 622 623 624 625 626 627 628 629 630 631 632 633 634

     Then Check "=== \[type\] ===\s+\[NM property description\]\s+Base type of the connection. For hardware-dependent connections, should contain the setting name of the hardware-type specific setting \(ie, \"802\-3\-ethernet\" or \"802\-11\-wireless\" or \"bluetooth\", etc\), and for non-hardware dependent connections like VPN or otherwise, should contain the setting name of that setting type \(ie, \"vpn\" or \"bridge\", etc\)." are present in describe output for object "type"

     Then Check "=== \[autoconnect\] ===\s+\[NM property description\]\s+Whether or not the connection should be automatically connected by NetworkManager when the resources for the connection are available. TRUE to automatically activate the connection, FALSE to require manual intervention to activate the connection." are present in describe output for object "autoconnect"

     Then Check "=== \[timestamp\] ===\s+\[NM property description\]\s+The time, in seconds since the Unix Epoch, that the connection was last _successfully_ fully activated. NetworkManager updates the connection timestamp periodically when the connection is active to ensure that an active connection has the latest timestamp. The property is only meant for reading \(changes to this property will not be preserved\)." are present in describe output for object "timestamp"

     Then Check "=== \[read-only\] ===\s+\[NM property description\]\s+FALSE if the connection can be modified using the provided settings service's D-Bus interface with the right privileges, or TRUE if the connection is read-only and cannot be modified." are present in describe output for object "read-only"

     Then Check "=== \[zone\] ===\s+\[NM property description\]\s+The trust level of a the connection.  Free form case-insensitive string \(for example \"Home\", \"Work\", \"Public\"\).  NULL or unspecified zone means the connection will be placed in the default zone as defined by the firewall." are present in describe output for object "zone"

     Then Check "=== \[master\] ===\s+\[NM property description\]\s+Interface name of the master device or UUID of the master connection" are present in describe output for object "master"

     Then Check "=== \[slave-type\] ===\s+\[NM property description\]\s+Setting name of the device type of this slave's master connection \(eg, \"bond\"\), or NULL if this connection is not a slave." are present in describe output for object "slave-type"

635
     Then Check "=== \[secondaries\] ===\s+\[NM property description\]\s+List of connection UUIDs that should be activated when the base connection itself is activated. Currently.* only VPN connections are supported." are present in describe output for object "secondaries"
Vladimír Beneš's avatar
Vladimír Beneš committed
636 637

     Then Check "=== \[gateway-ping-timeout\] ===\s+\[NM property description]\s+If greater than zero, delay success of IP addressing until either the timeout is reached, or an IP gateway replies to a ping." are present in describe output for object "gateway-ping-timeout"
638 639 640 641 642 643 644 645


    @ver+=1.14
    @con_con_remove
    @connection_multiconnect_default_single
    Scenario: nmcli - connection - multi-connect default or single
    * Add a new connection of type "ethernet" and options "con-name con_con autoconnect no ifname '' connection.multi-connect default"
    * Bring up connection "con_con" for "eth5" device
646
    When "eth5" is visible with command "nmcli device | grep con_con"
647
    * Bring up connection "con_con" for "eth6" device
648 649
    When "eth6" is visible with command "nmcli device | grep con_con"
     And "eth5" is not visible with command "nmcli device | grep con_con"
650 651 652
    * Bring "down" connection "con_con"
    * Modify connection "con_con" changing options "connection.multi-connect single"
    * Bring up connection "con_con" for "eth5" device
653
    When "eth5" is visible with command "nmcli device | grep con_con"
654
    * Bring up connection "con_con" for "eth6" device
655 656
    Then "eth6" is visible with command "nmcli device | grep con_con"
     And "eth5" is not visible with command "nmcli device | grep con_con"
657 658 659 660 661 662 663 664


    @ver+=1.14
    @con_con_remove
    @connection_multiconnect_manual
    Scenario: nmcli - connection - multi-connect manual up down
    * Add a new connection of type "ethernet" and options "con-name con_con autoconnect no ifname '' connection.multi-connect manual-multiple"
    * Bring up connection "con_con" for "eth5" device
665 666
    When "eth5" is visible with command "nmcli device | grep con_con"
     And "eth6" is not visible with command "nmcli device | grep con_con"
667
    * Bring up connection "con_con" for "eth6" device
668 669
    When "eth6" is visible with command "nmcli device | grep con_con"
     And "eth5" is visible with command "nmcli device | grep con_con"
670
    * Bring "down" connection "con_con"
671
    When "eth6" is not visible with command "nmcli device | grep con_con"
672 673 674
     And "eth5" is not visible with command "nmcli device | grep con_con"
    * Modify connection "con_con" changing options "connection.multi-connect multiple"
    * Bring up connection "con_con" for "eth5" device
675 676
    When "eth5" is visible with command "nmcli device | grep con_con"
     And "eth6" is not visible with command "nmcli device | grep con_con"
677
    * Bring up connection "con_con" for "eth6" device
678 679
    When "eth6" is visible with command "nmcli device | grep con_con"
     And "eth5" is visible with command "nmcli device | grep con_con"
680
    * Bring "down" connection "con_con"
681 682 683 684
    Then "eth6" is not visible with command "nmcli device | grep con_con"
     And "eth5" is not visible with command "nmcli device | grep con_con"


685 686 687 688 689
    @ver+=1.14
    @con_con_remove @restart
    @connection_multiconnect_autoconnect
    Scenario: nmcli - connection - multi-connect with autoconnect
    * Add a new connection of type "ethernet" and options "con-name con_con connection.autoconnect yes connection.autoconnect-priority 0 ifname '' connection.multi-connect manual-multiple"
690 691
    When "eth5" is not visible with command "nmcli device | grep con_con"
     And "eth6" is not visible with command "nmcli device | grep con_con"
692 693 694 695 696 697
    * Add a new connection of type "ethernet" and options "con-name con_con2 connection.autoconnect yes connection.autoconnect-priority 0 ifname '' connection.multi-connect multiple"
    When "eth5" is visible with command "nmcli device | grep con_con2"
     And "eth6" is visible with command "nmcli device | grep con_con2"
    * Bring "down" connection "con_con2"
    Then "eth6" is not visible with command "nmcli device | grep con_con2"
     And "eth5" is not visible with command "nmcli device | grep con_con2"
698 699


700 701 702 703
    @ver+=1.14
    @con_con_remove @restart
    @connection_multiconnect_reboot
    Scenario: nmcli - connection - multi-connect reboot
704
    * Add a new connection of type "ethernet" and options "con-name con_con connection.autoconnect yes connection.autoconnect-priority 0 ifname '' connection.multi-connect multiple match.interface-name '!eth0'"
705
    * Reboot
706
    Then "eth0" is not visible with command "nmcli device | grep ethernet | grep con_con"
707 708 709 710 711 712 713 714 715 716
     And "eth1" is visible with command "nmcli device | grep ethernet | grep con_con"
     And "eth2" is visible with command "nmcli device | grep ethernet | grep con_con"
     And "eth3" is visible with command "nmcli device | grep ethernet | grep con_con"
     And "eth4" is visible with command "nmcli device | grep ethernet | grep con_con"
     And "eth5" is visible with command "nmcli device | grep ethernet | grep con_con"
     And "eth6" is visible with command "nmcli device | grep ethernet | grep con_con"
     And "eth7" is visible with command "nmcli device | grep ethernet | grep con_con"
     And "eth8" is visible with command "nmcli device | grep ethernet | grep con_con"
     And "eth9" is visible with command "nmcli device | grep ethernet | grep con_con"
     And "eth10" is visible with command "nmcli device | grep ethernet | grep con_con"
717 718


719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751
    @rhbz1639254
    @ver+=1.14
    @con_con_remove @unmanage_eth @skip_str
    @connection_prefers_managed_devices
    Scenario: nmcli - connection - connection activates preferably on managed devices
    * Execute "nmcli device set eth10 managed yes"
    * Add a new connection of type "ethernet" and options "ifname \* con-name con_con autoconnect no"
    * Bring up connection "con_con"
    Then "eth10" is visible with command "nmcli device | grep con_con"


    @rhbz1639254
    @ver+=1.14
    @con_con_remove @unmanage_eth @skip_str
    @connection_no_managed_device
    Scenario: nmcli - connection - connection activates even on unmanaged device
    * Add a new connection of type "ethernet" and options "ifname \* con-name con_con autoconnect no"
    * Bring up connection "con_con"
    Then "con_con" is visible with command "nmcli device"


    @rhbz1434527
    @ver+=1.14
    @con_con_remove
    @connection_short_info
    Scenario: nmcli - connection - connection short info
    * Add a new connection of type "ethernet" and options "ifname \* con-name con_con autoconnect no"
    * Note the output of "nmcli -o con show con_con"
    Then Check noted output contains "connection.id"
    Then Check noted output does not contain "connection.zone"
    * Note the output of "nmcli con show con_con"
    Then Check noted output contains "connection.id"
    Then Check noted output contains "connection.zone"
752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790


    @ver+=1.19.5
    @con_con_remove @restart
    @in_memory_connection_delete_on_reboot
    Scenario: nmcli - connection - in-memory connection delete on reboot
    * Add a new connection of type "ethernet" and options "ifname eth5 con-name con_con autoconnect yes save no"
    Then "con_con" is visible with command "nmcli -g name connection show --active"
    * Reboot
    Then "con_con" is not visible with command "nmcli -g name connection show" in "5" seconds


    @ver+=1.19.5
    @con_con_remove @restart
    @in_memory_connection_restart_persistency
    Scenario: nmcli - connection - in-memory connection restart persistency
    * Add a new connection of type "ethernet" and options "ifname eth5 con-name con_con autoconnect yes save no"
    Then "con_con" is visible with command "nmcli -g name connection show --active"
    * Restart NM
    Then "con_con" is visible with command "nmcli -g name connection show --active"


    @ver+=1.19.5
    @con_con_remove @restart
    @in_memory_connection_reload_persistency
    Scenario: nmcli - connection - in-memory connection reload persistency
    * Add a new connection of type "ethernet" and options "ifname eth5 con-name con_con autoconnect yes save no"
    Then "con_con" is visible with command "nmcli -g name connection show --active"
    * Reload connections
    Then "con_con" is visible with command "nmcli -g name connection show --active"


    @ver+=1.19.5
    @con_con_remove
    @all_to_in_memory_move
    Scenario: nmcli - connection - in-memory move
    * Add a new connection of type "ethernet" and options "ifname eth5 con-name con_con autoconnect yes"
    Then "con_con" is not visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
791
    * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "IN_MEMORY"
792 793
    Then "con_con" is visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
794
    * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "IN_MEMORY_DETACHED"
795 796
    Then "con_con" is visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
797
    * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "IN_MEMORY"
798 799
    Then "con_con" is visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
800
    * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "IN_MEMORY_ONLY"
801 802
    Then "con_con" is visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is not visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
803
    * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "IN_MEMORY"
804 805
    Then "con_con" is visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is not visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
806
    * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "TO_DISK"
807 808
    Then "con_con" is not visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
809
    * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "IN_MEMORY"
810 811 812 813 814 815 816 817 818 819 820 821 822 823
    Then "con_con" is visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
    * Delete connection "con_con"
    Then "con_con" is not visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is not visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"


    @ver+=1.19.5
    @con_con_remove
    @all_to_in_memory_only_move
    Scenario: nmcli - connection - in-memory move only to in memory
    * Add a new connection of type "ethernet" and options "ifname eth5 con-name con_con autoconnect yes"
    Then "con_con" is not visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
824
    * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "IN_MEMORY_ONLY"
825 826
    Then "con_con" is visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is not visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
827
    * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "IN_MEMORY"
828 829
    Then "con_con" is visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is not visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
830
    * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "IN_MEMORY_ONLY"
831 832
    Then "con_con" is visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is not visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
833
    * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "IN_MEMORY_DETACHED"
834 835
    Then "con_con" is visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is not visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
836
    * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "IN_MEMORY_ONLY"
837 838
    Then "con_con" is visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is not visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
839
    * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "TO_DISK"
840 841
    Then "con_con" is not visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
842
    * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "IN_MEMORY_ONLY"
843 844 845 846 847 848 849 850 851 852 853 854 855 856 857
    Then "con_con" is visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is not visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
    * Delete connection "con_con"
    Then "con_con" is not visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is not visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"


    @ver+=1.19.5
    @con_con_remove @remove_tombed_connections
    @all_to_in_memory_detached_move
    Scenario: nmcli - connection - in-memory move detached then move to disk
    * Add a new connection of type "ethernet" and options "ifname eth5 con-name con_con autoconnect yes"
    * Note the output of "nmcli -g connection.uuid con show id con_con" as value "uuid"
    Then "con_con" is not visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
858
    * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "IN_MEMORY_DETACHED"
859 860
    Then "con_con" is visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
861
    * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "IN_MEMORY"
862 863
    Then "con_con" is visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
864
    * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "IN_MEMORY_DETACHED"
865 866
    Then "con_con" is visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
867
    * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "IN_MEMORY_ONLY"
868 869
    Then "con_con" is visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is not visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
870
    * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "IN_MEMORY_DETACHED"
871 872
    Then "con_con" is visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is not visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
873
    * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "TO_DISK"
874 875
    Then "con_con" is not visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
876
     * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "IN_MEMORY_DETACHED"
877 878
    Then "con_con" is visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
879
    * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "TO_DISK"
880 881 882 883 884 885 886 887 888 889 890 891
    Then "con_con" is not visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"


    @ver+=1.19.5
    @con_con_remove @remove_tombed_connections
    @in_memory_detached_delete_nmmeta
    Scenario: nmcli - connection - in-memory move detached
    * Add a new connection of type "ethernet" and options "ifname eth5 con-name con_con autoconnect yes"
    * Note the output of "nmcli -g connection.uuid con show id con_con" as value "uuid"
    Then "con_con" is not visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
892
    * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "IN_MEMORY_DETACHED"
893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915
    Then "con_con" is visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
    * Delete connection "con_con"
    Then "con_con" is not visible with command "ls /var/run/NetworkManager/system-connections/"
     And Noted value "uuid" is visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
    * Execute "rm -f /var/run/NetworkManager/system-connections/*.nmmeta"
    * Reload connections
    Then "con_con" is visible with command "nmcli -g name con show"
    * Delete connection "con_con"
    Then "con_con" is not visible with command "ls /var/run/NetworkManager/system-connections/"
     And Noted value "uuid" is not visible with command "ls /var/run/NetworkManager/system-connections/"
     And "con_con" is not visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"


     @ver+=1.19.5
     @con_con_remove @remove_tombed_connections
     @in_memory_detached_resurrect
     Scenario: nmcli - connection - in-memory move detached and then resurrect
     * Add a new connection of type "ethernet" and options "ifname eth5 con-name con_con autoconnect yes"
     * Note the output of "nmcli -g connection.uuid con show id con_con" as value "uuid"
     Then "con_con" is not visible with command "ls /var/run/NetworkManager/system-connections/"
      And "con_con" is visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
916
     * Update connection "con_con" changing options "SETTING_CONNECTION_AUTOCONNECT:bool:True" using libnm with flags "IN_MEMORY_DETACHED"
917 918 919 920 921 922 923 924 925 926 927 928
     Then "con_con" is visible with command "ls /var/run/NetworkManager/system-connections/"
      And "con_con" is visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
     * Delete connection "con_con"
     Then "con_con" is not visible with command "ls /var/run/NetworkManager/system-connections/"
      And Noted value "uuid" is visible with command "ls /var/run/NetworkManager/system-connections/"
      And "con_con" is visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
     * Add connection with name "con_con" and uuid "noted.uuid" using libnm with flags "TO_DISK,BLOCK_AUTOCONNECT"
     * Execute "nmcli con show id con_con > /tmp/con"
     Then "con_con" is not visible with command "ls /var/run/NetworkManager/system-connections/"
      And Noted value "uuid" is not visible with command "ls /var/run/NetworkManager/system-connections/"
      And "con_con" is visible with command "ls /etc/NetworkManager/system-connections/ /etc/sysconfig/network-scripts/ifcfg-*"
     * Update connection "con_con" changing options "SETTING_CONNECTION_INTERFACE_NAME:eth5" using libnm with flags "IN_MEMORY_DETACHED"