mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
nmcli: Fix yaml formatting
This commit is contained in:
parent
c61581ae32
commit
7bbc0bfee7
2 changed files with 15 additions and 18 deletions
|
@ -649,7 +649,7 @@ options:
|
||||||
- Note the list of suboption attributes may vary depending on which version of NetworkManager/nmcli is installed on the host.
|
- Note the list of suboption attributes may vary depending on which version of NetworkManager/nmcli is installed on the host.
|
||||||
- 'An up-to-date list of supported attributes can be found here:
|
- 'An up-to-date list of supported attributes can be found here:
|
||||||
U(https://networkmanager.dev/docs/api/latest/settings-gsm.html)'
|
U(https://networkmanager.dev/docs/api/latest/settings-gsm.html)'
|
||||||
- 'For instance to use apn, pin, username and password:'
|
- 'For instance to use apn, pin, username and password:
|
||||||
C({apn: provider.apn, pin: 1234, username: apn.username, password: apn.password})'
|
C({apn: provider.apn, pin: 1234, username: apn.username, password: apn.password})'
|
||||||
type: dict
|
type: dict
|
||||||
suboptions:
|
suboptions:
|
||||||
|
@ -698,13 +698,13 @@ options:
|
||||||
password-flags:
|
password-flags:
|
||||||
description:
|
description:
|
||||||
- NMSettingSecretFlags indicating how to handle the I(password) property.
|
- NMSettingSecretFlags indicating how to handle the I(password) property.
|
||||||
- Following choices are allowed:
|
- 'Following choices are allowed:
|
||||||
C(0) I(NONE): The system is responsible for providing and storing this secret (default),
|
C(0) I(NONE): The system is responsible for providing and storing this secret (default),
|
||||||
C(1) I(AGENT_OWNED): A user secret agent is responsible for providing and storing this secret; when it is required agents will be
|
C(1) I(AGENT_OWNED): A user secret agent is responsible for providing and storing this secret; when it is required agents will be
|
||||||
asked to retrieve it
|
asked to retrieve it
|
||||||
C(2) I(NOT_SAVED): This secret should not be saved, but should be requested from the user each time it is needed
|
C(2) I(NOT_SAVED): This secret should not be saved, but should be requested from the user each time it is needed
|
||||||
C(4) I(NOT_REQUIRED): in situations where it cannot be automatically determined that the secret is required
|
C(4) I(NOT_REQUIRED): In situations where it cannot be automatically determined that the secret is required
|
||||||
(some VPNs and PPP providers don't require all secrets) this flag indicates that the specific secret is not required
|
(some VPNs and PPP providers don't require all secrets) this flag indicates that the specific secret is not required'
|
||||||
type: int
|
type: int
|
||||||
choices: [ 0, 1, 2 , 4 ]
|
choices: [ 0, 1, 2 , 4 ]
|
||||||
default: 0
|
default: 0
|
||||||
|
@ -728,13 +728,14 @@ options:
|
||||||
sim-operator-id:
|
sim-operator-id:
|
||||||
description:
|
description:
|
||||||
- A MCC/MNC string like I(310260) or I(21601I) identifying the specific mobile network operator which this connection applies to.
|
- A MCC/MNC string like I(310260) or I(21601I) identifying the specific mobile network operator which this connection applies to.
|
||||||
- If given, the connection will apply to any device also allowed by I(device-id) and I(sim-id) which contains a SIM card provisioned by the given operator.
|
- 'If given, the connection will apply to any device also allowed by I(device-id) and I(sim-id) which contains a SIM card provisioned by
|
||||||
|
the given operator.'
|
||||||
type: string
|
type: string
|
||||||
username:
|
username:
|
||||||
description:
|
description:
|
||||||
- The username used to authenticate with the network, if required.
|
- The username used to authenticate with the network, if required.
|
||||||
- Many providers do not require a username, or accept any username.
|
- Many providers do not require a username, or accept any username.
|
||||||
- But if a username is required, it is specified here.
|
- But if a username is required, it is specified here.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r'''
|
||||||
|
|
|
@ -2237,13 +2237,11 @@ def test_create_gsm(mocked_generic_connection_create, capfd):
|
||||||
assert args[0][6] == 'non_existent_nw_device'
|
assert args[0][6] == 'non_existent_nw_device'
|
||||||
|
|
||||||
args_text = list(map(to_text, args[0]))
|
args_text = list(map(to_text, args[0]))
|
||||||
for param in [
|
for param in ['connection.interface-name', 'gsm_non_existant',
|
||||||
'connection.interface-name', 'gsm_non_existant',
|
'gsm.apn', 'internet.telekom',
|
||||||
'gsm.apn', 'internet.telekom',
|
'gsm.username', 't-mobile',
|
||||||
'gsm.username', 't-mobile',
|
'gsm.password', 'tm',
|
||||||
'gsm.password', 'tm',
|
'gsm.pin', '1234',]:
|
||||||
'gsm.pin', '1234',
|
|
||||||
]:
|
|
||||||
assert param in args_text
|
assert param in args_text
|
||||||
|
|
||||||
out, err = capfd.readouterr()
|
out, err = capfd.readouterr()
|
||||||
|
@ -2270,10 +2268,8 @@ def test_gsm_mod(mocked_generic_connection_modify, capfd):
|
||||||
assert args[0][3] == 'non_existent_nw_device'
|
assert args[0][3] == 'non_existent_nw_device'
|
||||||
|
|
||||||
args_text = list(map(to_text, args[0]))
|
args_text = list(map(to_text, args[0]))
|
||||||
for param in [
|
for param in ['gsm.username', 't-mobile',
|
||||||
'gsm.username', 't-mobile',
|
'gsm.password', 'tm',]:
|
||||||
'gsm.password', 'tm',
|
|
||||||
]:
|
|
||||||
assert param in args_text
|
assert param in args_text
|
||||||
|
|
||||||
out, err = capfd.readouterr()
|
out, err = capfd.readouterr()
|
||||||
|
@ -2293,4 +2289,4 @@ def test_gsm_connection_unchanged(mocked_gsm_connection_unchanged, capfd):
|
||||||
out, err = capfd.readouterr()
|
out, err = capfd.readouterr()
|
||||||
results = json.loads(out)
|
results = json.loads(out)
|
||||||
assert not results.get('failed')
|
assert not results.get('failed')
|
||||||
assert not results['changed']
|
assert not results['changed']
|
||||||
|
|
Loading…
Reference in a new issue