8000 [nxos] New parameter vrf in nxos_file_copy by jjeganathan · Pull Request #57851 · ansible/ansible · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[nxos] New parameter vrf in nxos_file_copy #57851

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion lib/ansible/modules/network/nxos/nxos_file_copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@
- The remote scp server password which is used to pull the file.
This is required if file_pull is True.
version_added: "2.7"
vrf:
description:
- The VRF used to pull the file. Useful when no vrf management is defined
default: "management"
version_added: "2.9"
'''

EXAMPLES = '''
Expand All @@ -133,6 +138,7 @@
remote_scp_server: "192.168.0.1"
remote_scp_server_user: "myUser"
remote_scp_server_password: "myPassword"
vrf: "management"
'''

RETURN = '''
Expand Down Expand Up @@ -308,7 +314,7 @@ def copy_file_from_remote(module, local, local_file_directory, file_system='boot
ruser = module.params['remote_scp_server_user'] + '@'
rserver = module.params['remote_scp_server']
rfile = module.params['remote_file'] + ' '
vrf = ' vrf management'
vrf = ' vrf ' + module.params['vrf']
command = (cmdroot + ruser + rserver + rfile + file_system + ldir + local + vrf)

child.sendline(command)
Expand Down Expand Up @@ -362,6 +368,7 @@ def main():
remote_scp_server=dict(type='str'),
remote_scp_server_user=dict(type='str'),
remote_scp_server_password=dict(no_log=True),
vrf=dict(required=False, type='str', default='management'),
)

argument_spec.update(nxos_argument_spec)
Expand Down
0