-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
290 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,32 @@ | ||
#!/usr/bin/python3 | ||
# -*- coding: utf-8 -*- | ||
"""Wrapper to Action Module | ||
Copyright: Contributors to the SENSE Project | ||
GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
Title : sdn-sense/sonic | ||
Author : Justas Balcas | ||
Email : juztas (at) gmail.com | ||
@Copyright : General Public License v3.0+ | ||
Date : 2023/12/11 | ||
""" | ||
# Copyright: Contributors to the Ansible project | ||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
import sys | ||
import copy | ||
|
||
from ansible_collections.ansible.netcommon.plugins.action.network import ActionModule as ActionNetworkModule | ||
from ansible_collections.sense.sonic.plugins.module_utils.runwrapper import classwrapper | ||
from ansible_collections.ansible.netcommon.plugins.action.network import \ | ||
ActionModule as ActionNetworkModule | ||
from ansible_collections.sense.sonic.plugins.module_utils.runwrapper import \ | ||
classwrapper | ||
|
||
|
||
@classwrapper | ||
class ActionModule(ActionNetworkModule): | ||
""" Ansible Action Module""" | ||
"""Ansible Action Module""" | ||
|
||
def run(self, tmp=None, task_vars=None): | ||
"""SONiC Ansible Run""" | ||
|
||
self._config_module = self._task.action.split('.')[-1] == 'sonic_config' | ||
self._config_module = self._task.action.split(".")[-1] == "sonic_config" | ||
|
||
result = super(ActionModule, self).run(task_vars=task_vars) | ||
result = super().run(task_vars=task_vars) | ||
return result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
#!/usr/bin/python | ||
# -*- coding: utf-8 -*- | ||
"""Wrapper to Documentation Module | ||
Copyright: Contributors to the SENSE Project | ||
GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
Title : sdn-sense/sonic | ||
Author : Justas Balcas | ||
Email : juztas (at) gmail.com | ||
@Copyright : General Public License v3.0+ | ||
Date : 2023/12/11 | ||
""" | ||
# Copyright: Contributors to the Ansible project | ||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
from ansible_collections.sense.sonic.plugins.module_utils.runwrapper import classwrapper | ||
from ansible_collections.sense.sonic.plugins.module_utils.runwrapper import \ | ||
classwrapper | ||
|
||
|
||
@classwrapper | ||
class ModuleDocFragment(object): | ||
class ModuleDocFragment: | ||
"""Module Documentation Fragment""" | ||
|
||
DOCUMENTATION = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.