diff --git a/lib/ansible/modules/network/files/network_get.py b/lib/ansible/modules/network/files/net_get.py similarity index 98% rename from lib/ansible/modules/network/files/network_get.py rename to lib/ansible/modules/network/files/net_get.py index 14162fbdb22..0352e825355 100644 --- a/lib/ansible/modules/network/files/network_get.py +++ b/lib/ansible/modules/network/files/net_get.py @@ -15,7 +15,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = """ --- -module: network_get +module: net_get version_added: "2.6" author: "Deepak Agrawal (@dagrawal)" short_description: Copy files from a network device to Ansible Controller @@ -57,7 +57,7 @@ notes: EXAMPLES = """ - name: copy file from the network device to ansible controller - network_get: + net_get: src: running_cfg_ios1.txt - name: copy file from ios to common location at /tmp diff --git a/lib/ansible/modules/network/files/network_put.py b/lib/ansible/modules/network/files/net_put.py similarity index 97% rename from lib/ansible/modules/network/files/network_put.py rename to lib/ansible/modules/network/files/net_put.py index cf7fb09cebc..6333e3cd6f9 100644 --- a/lib/ansible/modules/network/files/network_put.py +++ b/lib/ansible/modules/network/files/net_put.py @@ -15,7 +15,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = """ --- -module: network_put +module: net_put version_added: "2.6" author: "Deepak Agrawal (@dagrawal)" short_description: Copy files from Ansibe controller to a network device @@ -57,11 +57,11 @@ notes: EXAMPLES = """ - name: copy file from ansible controller to a network device - network_put: + net_put: src: running_cfg_ios1.txt - name: copy file at root dir of flash in slot 3 of sw1(ios) - network_put: + net_put: src: running_cfg_sw1.txt protocol: sftp dest : flash3:/running_cfg_sw1.txt diff --git a/lib/ansible/plugins/action/network_get.py b/lib/ansible/plugins/action/net_get.py similarity index 99% rename from lib/ansible/plugins/action/network_get.py rename to lib/ansible/plugins/action/net_get.py index 28ae183ca89..8f4e74a3f84 100644 --- a/lib/ansible/plugins/action/network_get.py +++ b/lib/ansible/plugins/action/net_get.py @@ -47,7 +47,7 @@ class ActionModule(ActionBase): if play_context.connection != 'network_cli': # It is supported only with network_cli result['failed'] = True - result['msg'] = ('please use network_cli connection type for network_get module') + result['msg'] = ('please use network_cli connection type for net_get module') return result try: diff --git a/lib/ansible/plugins/action/network_put.py b/lib/ansible/plugins/action/net_put.py similarity index 99% rename from lib/ansible/plugins/action/network_put.py rename to lib/ansible/plugins/action/net_put.py index fc6678c6475..0706a251dcb 100644 --- a/lib/ansible/plugins/action/network_put.py +++ b/lib/ansible/plugins/action/net_put.py @@ -47,7 +47,7 @@ class ActionModule(ActionBase): if play_context.connection != 'network_cli': # It is supported only with network_cli result['failed'] = True - result['msg'] = ('please use network_cli connection type for network_put module') + result['msg'] = ('please use network_cli connection type for net_put module') return result src_file_path_name = self._task.args.get('src') diff --git a/test/integration/targets/ios_file/tests/cli/network_get.yaml b/test/integration/targets/ios_file/tests/cli/net_get.yaml similarity index 78% rename from test/integration/targets/ios_file/tests/cli/network_get.yaml rename to test/integration/targets/ios_file/tests/cli/net_get.yaml index 34991ebebce..049a3699774 100644 --- a/test/integration/targets/ios_file/tests/cli/network_get.yaml +++ b/test/integration/targets/ios_file/tests/cli/net_get.yaml @@ -1,5 +1,5 @@ --- -- debug: msg="START ios cli/network_get.yaml on connection={{ ansible_connection }}" +- debug: msg="START ios cli/net_get.yaml on connection={{ ansible_connection }}" # Add minimal testcase to check args are passed correctly to # implementation module and module run is successful. @@ -13,7 +13,7 @@ match: none - name: setup (copy file to be fetched from device) - network_put: + net_put: src: ios1.cfg register: result @@ -22,7 +22,7 @@ - result.changed == true - name: get the file from device with dest unspecified - network_get: + net_get: src: ios1.cfg register: result @@ -31,7 +31,7 @@ - result.changed == true - name: get the file from device with relative destination - network_get: + net_get: src: ios1.cfg dest: 'ios_{{ ansible_host }}.cfg' register: result @@ -40,4 +40,4 @@ that: - result.changed == true -- debug: msg="END ios cli/network_get.yaml on connection={{ ansible_connection }}" +- debug: msg="END ios cli/net_get.yaml on connection={{ ansible_connection }}" diff --git a/test/integration/targets/ios_file/tests/cli/network_put.yaml b/test/integration/targets/ios_file/tests/cli/net_put.yaml similarity index 75% rename from test/integration/targets/ios_file/tests/cli/network_put.yaml rename to test/integration/targets/ios_file/tests/cli/net_put.yaml index 29e838cd4b5..b0e70f8df46 100644 --- a/test/integration/targets/ios_file/tests/cli/network_put.yaml +++ b/test/integration/targets/ios_file/tests/cli/net_put.yaml @@ -1,5 +1,5 @@ --- -- debug: msg="START ios cli/network_put.yaml on connection={{ ansible_connection }}" +- debug: msg="START ios cli/net_put.yaml on connection={{ ansible_connection }}" # Add minimal testcase to check args are passed correctly to # implementation module and module run is successful. @@ -13,7 +13,7 @@ match: none - name: copy file from controller to ios + scp (Default) - network_put: + net_put: src: ios1.cfg register: result @@ -22,7 +22,7 @@ - result.changed == true - name: copy file from controller to ios + dest specified - network_put: + net_put: src: ios1.cfg dest: ios.cfg register: result @@ -31,4 +31,4 @@ that: - result.changed == true -- debug: msg="END ios cli/network_put.yaml on connection={{ ansible_connection }}" +- debug: msg="END ios cli/net_put.yaml on connection={{ ansible_connection }}"