mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Remove __virtual__ and __hostname__
This commit is contained in:
parent
344a3d8c2f
commit
974dacc5bb
2 changed files with 0 additions and 29 deletions
|
@ -74,8 +74,6 @@ Usage:
|
|||
store='lgpo')
|
||||
"""
|
||||
|
||||
import socket
|
||||
|
||||
import salt.utils.platform
|
||||
import salt.utils.win_pwsh
|
||||
from salt.exceptions import CommandExecutionError
|
||||
|
@ -106,21 +104,6 @@ OUTBOUND = {
|
|||
"blockoutbound": "Block",
|
||||
}
|
||||
|
||||
__virtualname__ = "netsh"
|
||||
__hostname__ = socket.gethostname()
|
||||
|
||||
|
||||
# Although utils are often directly imported, it is also possible to use the
|
||||
# loader.
|
||||
def __virtual__():
|
||||
"""
|
||||
Only load if on a Windows system
|
||||
"""
|
||||
if not salt.utils.platform.is_windows():
|
||||
return False, "This utility only available on Windows"
|
||||
|
||||
return __virtualname__
|
||||
|
||||
|
||||
def _get_inbound_text(rule, action):
|
||||
"""
|
||||
|
|
|
@ -3,18 +3,6 @@ import salt.utils.json
|
|||
import salt.utils.platform
|
||||
from salt.exceptions import CommandExecutionError
|
||||
|
||||
__virtualname__ = "win_pwsh"
|
||||
|
||||
|
||||
def __virtual__():
|
||||
"""
|
||||
Only load if windows
|
||||
"""
|
||||
if not salt.utils.platform.is_windows():
|
||||
return False, "This utility will only run on Windows"
|
||||
|
||||
return __virtualname__
|
||||
|
||||
|
||||
def run_dict(cmd, cwd=None):
|
||||
"""
|
||||
|
|
Loading…
Add table
Reference in a new issue