repo
stringlengths
7
54
path
stringlengths
4
223
func_name
stringlengths
1
134
original_string
stringlengths
75
104k
language
stringclasses
1 value
code
stringlengths
75
104k
code_tokens
listlengths
20
28.4k
docstring
stringlengths
1
46.3k
docstring_tokens
listlengths
1
1.66k
sha
stringlengths
40
40
url
stringlengths
87
315
partition
stringclasses
1 value
summary
stringlengths
4
350
obf_code
stringlengths
7.85k
764k
saltstack/salt
salt/utils/verify.py
verify_socket
def verify_socket(interface, pub_port, ret_port): ''' Attempt to bind to the sockets to verify that they are available ''' addr_family = lookup_family(interface) for port in pub_port, ret_port: sock = socket.socket(addr_family, socket.SOCK_STREAM) try: sock.setsockopt(so...
python
def verify_socket(interface, pub_port, ret_port): ''' Attempt to bind to the sockets to verify that they are available ''' addr_family = lookup_family(interface) for port in pub_port, ret_port: sock = socket.socket(addr_family, socket.SOCK_STREAM) try: sock.setsockopt(so...
[ "def", "verify_socket", "(", "interface", ",", "pub_port", ",", "ret_port", ")", ":", "addr_family", "=", "lookup_family", "(", "interface", ")", "for", "port", "in", "pub_port", ",", "ret_port", ":", "sock", "=", "socket", ".", "socket", "(", "addr_family",...
Attempt to bind to the sockets to verify that they are available
[ "Attempt", "to", "bind", "to", "the", "sockets", "to", "verify", "that", "they", "are", "available" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/verify.py#L120-L146
train
Verify that the socket is available on the salt - master.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/verify.py
verify_files
def verify_files(files, user): ''' Verify that the named files exist and are owned by the named user ''' if salt.utils.platform.is_windows(): return True import pwd # after confirming not running Windows try: pwnam = pwd.getpwnam(user) uid = pwnam[2] except KeyError:...
python
def verify_files(files, user): ''' Verify that the named files exist and are owned by the named user ''' if salt.utils.platform.is_windows(): return True import pwd # after confirming not running Windows try: pwnam = pwd.getpwnam(user) uid = pwnam[2] except KeyError:...
[ "def", "verify_files", "(", "files", ",", "user", ")", ":", "if", "salt", ".", "utils", ".", "platform", ".", "is_windows", "(", ")", ":", "return", "True", "import", "pwd", "# after confirming not running Windows", "try", ":", "pwnam", "=", "pwd", ".", "g...
Verify that the named files exist and are owned by the named user
[ "Verify", "that", "the", "named", "files", "exist", "and", "are", "owned", "by", "the", "named", "user" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/verify.py#L149-L197
train
Verify that the named files exist and are owned by the named user.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/verify.py
verify_env
def verify_env( dirs, user, permissive=False, pki_dir='', skip_extra=False, root_dir=ROOT_DIR): ''' Verify that the named directories are in place and that the environment can shake the salt ''' if salt.utils.platform.is_windows(): return win_v...
python
def verify_env( dirs, user, permissive=False, pki_dir='', skip_extra=False, root_dir=ROOT_DIR): ''' Verify that the named directories are in place and that the environment can shake the salt ''' if salt.utils.platform.is_windows(): return win_v...
[ "def", "verify_env", "(", "dirs", ",", "user", ",", "permissive", "=", "False", ",", "pki_dir", "=", "''", ",", "skip_extra", "=", "False", ",", "root_dir", "=", "ROOT_DIR", ")", ":", "if", "salt", ".", "utils", ".", "platform", ".", "is_windows", "(",...
Verify that the named directories are in place and that the environment can shake the salt
[ "Verify", "that", "the", "named", "directories", "are", "in", "place", "and", "that", "the", "environment", "can", "shake", "the", "salt" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/verify.py#L200-L307
train
Verify that the named directories are in place and that the environment can shake the salt
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/verify.py
check_user
def check_user(user): ''' Check user and assign process uid/gid. ''' if salt.utils.platform.is_windows(): return True if user == salt.utils.user.get_user(): return True import pwd # after confirming not running Windows try: pwuser = pwd.getpwnam(user) try: ...
python
def check_user(user): ''' Check user and assign process uid/gid. ''' if salt.utils.platform.is_windows(): return True if user == salt.utils.user.get_user(): return True import pwd # after confirming not running Windows try: pwuser = pwd.getpwnam(user) try: ...
[ "def", "check_user", "(", "user", ")", ":", "if", "salt", ".", "utils", ".", "platform", ".", "is_windows", "(", ")", ":", "return", "True", "if", "user", "==", "salt", ".", "utils", ".", "user", ".", "get_user", "(", ")", ":", "return", "True", "i...
Check user and assign process uid/gid.
[ "Check", "user", "and", "assign", "process", "uid", "/", "gid", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/verify.py#L310-L356
train
Check if a user is available and assign process uid and gid.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/verify.py
list_path_traversal
def list_path_traversal(path): ''' Returns a full list of directories leading up to, and including, a path. So list_path_traversal('/path/to/salt') would return: ['/', '/path', '/path/to', '/path/to/salt'] in that order. This routine has been tested on Windows systems as well. list_pat...
python
def list_path_traversal(path): ''' Returns a full list of directories leading up to, and including, a path. So list_path_traversal('/path/to/salt') would return: ['/', '/path', '/path/to', '/path/to/salt'] in that order. This routine has been tested on Windows systems as well. list_pat...
[ "def", "list_path_traversal", "(", "path", ")", ":", "out", "=", "[", "path", "]", "(", "head", ",", "tail", ")", "=", "os", ".", "path", ".", "split", "(", "path", ")", "if", "tail", "==", "''", ":", "# paths with trailing separators will return an empty ...
Returns a full list of directories leading up to, and including, a path. So list_path_traversal('/path/to/salt') would return: ['/', '/path', '/path/to', '/path/to/salt'] in that order. This routine has been tested on Windows systems as well. list_path_traversal('c:\\path\\to\\salt') on Window...
[ "Returns", "a", "full", "list", "of", "directories", "leading", "up", "to", "and", "including", "a", "path", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/verify.py#L359-L381
train
Returns a full list of directories leading up to and including a path.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/verify.py
check_path_traversal
def check_path_traversal(path, user='root', skip_perm_errors=False): ''' Walk from the root up to a directory and verify that the current user has access to read each directory. This is used for making sure a user can read all parent directories of the minion's key before trying to go and generate...
python
def check_path_traversal(path, user='root', skip_perm_errors=False): ''' Walk from the root up to a directory and verify that the current user has access to read each directory. This is used for making sure a user can read all parent directories of the minion's key before trying to go and generate...
[ "def", "check_path_traversal", "(", "path", ",", "user", "=", "'root'", ",", "skip_perm_errors", "=", "False", ")", ":", "for", "tpath", "in", "list_path_traversal", "(", "path", ")", ":", "if", "not", "os", ".", "access", "(", "tpath", ",", "os", ".", ...
Walk from the root up to a directory and verify that the current user has access to read each directory. This is used for making sure a user can read all parent directories of the minion's key before trying to go and generate a new key and raising an IOError
[ "Walk", "from", "the", "root", "up", "to", "a", "directory", "and", "verify", "that", "the", "current", "user", "has", "access", "to", "read", "each", "directory", ".", "This", "is", "used", "for", "making", "sure", "a", "user", "can", "read", "all", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/verify.py#L384-L412
train
Walks the path and checks that all of the directories in the path are read.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/verify.py
check_max_open_files
def check_max_open_files(opts): ''' Check the number of max allowed open files and adjust if needed ''' mof_c = opts.get('max_open_files', 100000) if sys.platform.startswith('win'): # Check the Windows API for more detail on this # http://msdn.microsoft.com/en-us/library/xt874334(v=v...
python
def check_max_open_files(opts): ''' Check the number of max allowed open files and adjust if needed ''' mof_c = opts.get('max_open_files', 100000) if sys.platform.startswith('win'): # Check the Windows API for more detail on this # http://msdn.microsoft.com/en-us/library/xt874334(v=v...
[ "def", "check_max_open_files", "(", "opts", ")", ":", "mof_c", "=", "opts", ".", "get", "(", "'max_open_files'", ",", "100000", ")", "if", "sys", ".", "platform", ".", "startswith", "(", "'win'", ")", ":", "# Check the Windows API for more detail on this", "# ht...
Check the number of max allowed open files and adjust if needed
[ "Check", "the", "number", "of", "max", "allowed", "open", "files", "and", "adjust", "if", "needed" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/verify.py#L415-L472
train
Check the number of max open files and adjust if needed
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/verify.py
clean_path
def clean_path(root, path, subdir=False): ''' Accepts the root the path needs to be under and verifies that the path is under said root. Pass in subdir=True if the path can result in a subdirectory of the root instead of having to reside directly in the root ''' if not os.path.isabs(root): ...
python
def clean_path(root, path, subdir=False): ''' Accepts the root the path needs to be under and verifies that the path is under said root. Pass in subdir=True if the path can result in a subdirectory of the root instead of having to reside directly in the root ''' if not os.path.isabs(root): ...
[ "def", "clean_path", "(", "root", ",", "path", ",", "subdir", "=", "False", ")", ":", "if", "not", "os", ".", "path", ".", "isabs", "(", "root", ")", ":", "return", "''", "if", "not", "os", ".", "path", ".", "isabs", "(", "path", ")", ":", "pat...
Accepts the root the path needs to be under and verifies that the path is under said root. Pass in subdir=True if the path can result in a subdirectory of the root instead of having to reside directly in the root
[ "Accepts", "the", "root", "the", "path", "needs", "to", "be", "under", "and", "verifies", "that", "the", "path", "is", "under", "said", "root", ".", "Pass", "in", "subdir", "=", "True", "if", "the", "path", "can", "result", "in", "a", "subdirectory", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/verify.py#L475-L492
train
Takes a root and a path and returns a clean path
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/verify.py
valid_id
def valid_id(opts, id_): ''' Returns if the passed id is valid ''' try: if any(x in id_ for x in ('/', '\\', str('\0'))): return False return bool(clean_path(opts['pki_dir'], id_)) except (AttributeError, KeyError, TypeError, UnicodeDecodeError): return False
python
def valid_id(opts, id_): ''' Returns if the passed id is valid ''' try: if any(x in id_ for x in ('/', '\\', str('\0'))): return False return bool(clean_path(opts['pki_dir'], id_)) except (AttributeError, KeyError, TypeError, UnicodeDecodeError): return False
[ "def", "valid_id", "(", "opts", ",", "id_", ")", ":", "try", ":", "if", "any", "(", "x", "in", "id_", "for", "x", "in", "(", "'/'", ",", "'\\\\'", ",", "str", "(", "'\\0'", ")", ")", ")", ":", "return", "False", "return", "bool", "(", "clean_pa...
Returns if the passed id is valid
[ "Returns", "if", "the", "passed", "id", "is", "valid" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/verify.py#L495-L504
train
Returns if the passed id is valid Returns if the passed id is valid Returns False otherwise
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/verify.py
safe_py_code
def safe_py_code(code): ''' Check a string to see if it has any potentially unsafe routines which could be executed via python, this routine is used to improve the safety of modules suct as virtualenv ''' bads = ( 'import', ';', 'subprocess', 'eval...
python
def safe_py_code(code): ''' Check a string to see if it has any potentially unsafe routines which could be executed via python, this routine is used to improve the safety of modules suct as virtualenv ''' bads = ( 'import', ';', 'subprocess', 'eval...
[ "def", "safe_py_code", "(", "code", ")", ":", "bads", "=", "(", "'import'", ",", "';'", ",", "'subprocess'", ",", "'eval'", ",", "'open'", ",", "'file'", ",", "'exec'", ",", "'input'", ")", "for", "bad", "in", "bads", ":", "if", "code", ".", "count",...
Check a string to see if it has any potentially unsafe routines which could be executed via python, this routine is used to improve the safety of modules suct as virtualenv
[ "Check", "a", "string", "to", "see", "if", "it", "has", "any", "potentially", "unsafe", "routines", "which", "could", "be", "executed", "via", "python", "this", "routine", "is", "used", "to", "improve", "the", "safety", "of", "modules", "suct", "as", "virt...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/verify.py#L507-L525
train
Check a string to see if it contains potentially unsafe python code.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/verify.py
verify_log
def verify_log(opts): ''' If an insecre logging configuration is found, show a warning ''' level = LOG_LEVELS.get(str(opts.get('log_level')).lower(), logging.NOTSET) if level < logging.INFO: log.warning('Insecure logging configuration detected! Sensitive data may be logged.')
python
def verify_log(opts): ''' If an insecre logging configuration is found, show a warning ''' level = LOG_LEVELS.get(str(opts.get('log_level')).lower(), logging.NOTSET) if level < logging.INFO: log.warning('Insecure logging configuration detected! Sensitive data may be logged.')
[ "def", "verify_log", "(", "opts", ")", ":", "level", "=", "LOG_LEVELS", ".", "get", "(", "str", "(", "opts", ".", "get", "(", "'log_level'", ")", ")", ".", "lower", "(", ")", ",", "logging", ".", "NOTSET", ")", "if", "level", "<", "logging", ".", ...
If an insecre logging configuration is found, show a warning
[ "If", "an", "insecre", "logging", "configuration", "is", "found", "show", "a", "warning" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/verify.py#L528-L535
train
Verify that the log level is in the correct level.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/verify.py
win_verify_env
def win_verify_env( path, dirs, permissive=False, pki_dir='', skip_extra=False): ''' Verify that the named directories are in place and that the environment can shake the salt ''' import salt.utils.win_functions import salt.utils.win_dacl import salt.u...
python
def win_verify_env( path, dirs, permissive=False, pki_dir='', skip_extra=False): ''' Verify that the named directories are in place and that the environment can shake the salt ''' import salt.utils.win_functions import salt.utils.win_dacl import salt.u...
[ "def", "win_verify_env", "(", "path", ",", "dirs", ",", "permissive", "=", "False", ",", "pki_dir", "=", "''", ",", "skip_extra", "=", "False", ")", ":", "import", "salt", ".", "utils", ".", "win_functions", "import", "salt", ".", "utils", ".", "win_dacl...
Verify that the named directories are in place and that the environment can shake the salt
[ "Verify", "that", "the", "named", "directories", "are", "in", "place", "and", "that", "the", "environment", "can", "shake", "the", "salt" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/verify.py#L538-L658
train
Verify that the named directories are in place and that the environment can shake the salt
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/pacmanpkg.py
list_upgrades
def list_upgrades(refresh=False, root=None, **kwargs): # pylint: disable=W0613 ''' List all available package upgrades on this system CLI Example: .. code-block:: bash salt '*' pkg.list_upgrades ''' upgrades = {} cmd = ['pacman', '-S', '-p', '-u', '--print-format', '%n %v'] ...
python
def list_upgrades(refresh=False, root=None, **kwargs): # pylint: disable=W0613 ''' List all available package upgrades on this system CLI Example: .. code-block:: bash salt '*' pkg.list_upgrades ''' upgrades = {} cmd = ['pacman', '-S', '-p', '-u', '--print-format', '%n %v'] ...
[ "def", "list_upgrades", "(", "refresh", "=", "False", ",", "root", "=", "None", ",", "*", "*", "kwargs", ")", ":", "# pylint: disable=W0613", "upgrades", "=", "{", "}", "cmd", "=", "[", "'pacman'", ",", "'-S'", ",", "'-p'", ",", "'-u'", ",", "'--print-...
List all available package upgrades on this system CLI Example: .. code-block:: bash salt '*' pkg.list_upgrades
[ "List", "all", "available", "package", "upgrades", "on", "this", "system" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pacmanpkg.py#L127-L174
train
List all available package upgrades on this system
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/pacmanpkg.py
list_pkgs
def list_pkgs(versions_as_list=False, **kwargs): ''' List the packages currently installed as a dict:: {'<package_name>': '<version>'} CLI Example: .. code-block:: bash salt '*' pkg.list_pkgs ''' versions_as_list = salt.utils.data.is_true(versions_as_list) # not yet imple...
python
def list_pkgs(versions_as_list=False, **kwargs): ''' List the packages currently installed as a dict:: {'<package_name>': '<version>'} CLI Example: .. code-block:: bash salt '*' pkg.list_pkgs ''' versions_as_list = salt.utils.data.is_true(versions_as_list) # not yet imple...
[ "def", "list_pkgs", "(", "versions_as_list", "=", "False", ",", "*", "*", "kwargs", ")", ":", "versions_as_list", "=", "salt", ".", "utils", ".", "data", ".", "is_true", "(", "versions_as_list", ")", "# not yet implemented or not applicable", "if", "any", "(", ...
List the packages currently installed as a dict:: {'<package_name>': '<version>'} CLI Example: .. code-block:: bash salt '*' pkg.list_pkgs
[ "List", "the", "packages", "currently", "installed", "as", "a", "dict", "::" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pacmanpkg.py#L193-L241
train
List the packages currently installed as a dict
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/pacmanpkg.py
group_list
def group_list(): ''' .. versionadded:: 2016.11.0 Lists all groups known by pacman on this system CLI Example: .. code-block:: bash salt '*' pkg.group_list ''' ret = {'installed': [], 'partially_installed': [], 'available': []} # find out what's available ...
python
def group_list(): ''' .. versionadded:: 2016.11.0 Lists all groups known by pacman on this system CLI Example: .. code-block:: bash salt '*' pkg.group_list ''' ret = {'installed': [], 'partially_installed': [], 'available': []} # find out what's available ...
[ "def", "group_list", "(", ")", ":", "ret", "=", "{", "'installed'", ":", "[", "]", ",", "'partially_installed'", ":", "[", "]", ",", "'available'", ":", "[", "]", "}", "# find out what's available", "cmd", "=", "[", "'pacman'", ",", "'-Sgg'", "]", "out",...
.. versionadded:: 2016.11.0 Lists all groups known by pacman on this system CLI Example: .. code-block:: bash salt '*' pkg.group_list
[ "..", "versionadded", "::", "2016", ".", "11", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pacmanpkg.py#L244-L318
train
List all groups known by pacman on this system
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/pacmanpkg.py
group_info
def group_info(name): ''' .. versionadded:: 2016.11.0 Lists all packages in the specified group CLI Example: .. code-block:: bash salt '*' pkg.group_info 'xorg' ''' pkgtypes = ('mandatory', 'optional', 'default', 'conditional') ret = {} for pkgtype in pkgtypes: r...
python
def group_info(name): ''' .. versionadded:: 2016.11.0 Lists all packages in the specified group CLI Example: .. code-block:: bash salt '*' pkg.group_info 'xorg' ''' pkgtypes = ('mandatory', 'optional', 'default', 'conditional') ret = {} for pkgtype in pkgtypes: r...
[ "def", "group_info", "(", "name", ")", ":", "pkgtypes", "=", "(", "'mandatory'", ",", "'optional'", ",", "'default'", ",", "'conditional'", ")", "ret", "=", "{", "}", "for", "pkgtype", "in", "pkgtypes", ":", "ret", "[", "pkgtype", "]", "=", "set", "(",...
.. versionadded:: 2016.11.0 Lists all packages in the specified group CLI Example: .. code-block:: bash salt '*' pkg.group_info 'xorg'
[ "..", "versionadded", "::", "2016", ".", "11", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pacmanpkg.py#L321-L356
train
List all packages in a group
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/pacmanpkg.py
group_diff
def group_diff(name): ''' .. versionadded:: 2016.11.0 Lists which of a group's packages are installed and which are not installed Compatible with yumpkg.group_diff for easy support of state.pkg.group_installed CLI Example: .. code-block:: bash salt '*' pkg.group_diff 'xorg' ...
python
def group_diff(name): ''' .. versionadded:: 2016.11.0 Lists which of a group's packages are installed and which are not installed Compatible with yumpkg.group_diff for easy support of state.pkg.group_installed CLI Example: .. code-block:: bash salt '*' pkg.group_diff 'xorg' ...
[ "def", "group_diff", "(", "name", ")", ":", "# Use a compatible structure with yum, so we can leverage the existing state.group_installed", "# In pacmanworld, everything is the default, but nothing is mandatory", "pkgtypes", "=", "(", "'mandatory'", ",", "'optional'", ",", "'default'",...
.. versionadded:: 2016.11.0 Lists which of a group's packages are installed and which are not installed Compatible with yumpkg.group_diff for easy support of state.pkg.group_installed CLI Example: .. code-block:: bash salt '*' pkg.group_diff 'xorg'
[ "..", "versionadded", "::", "2016", ".", "11", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pacmanpkg.py#L359-L393
train
Return a dict of the group s packages installed and not installed and which are not installed.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/pacmanpkg.py
refresh_db
def refresh_db(root=None, **kwargs): ''' Just run a ``pacman -Sy``, return a dict:: {'<database name>': Bool} CLI Example: .. code-block:: bash salt '*' pkg.refresh_db ''' # Remove rtag file to keep multiple refreshes from happening in pkg states salt.utils.pkg.clear_rtag...
python
def refresh_db(root=None, **kwargs): ''' Just run a ``pacman -Sy``, return a dict:: {'<database name>': Bool} CLI Example: .. code-block:: bash salt '*' pkg.refresh_db ''' # Remove rtag file to keep multiple refreshes from happening in pkg states salt.utils.pkg.clear_rtag...
[ "def", "refresh_db", "(", "root", "=", "None", ",", "*", "*", "kwargs", ")", ":", "# Remove rtag file to keep multiple refreshes from happening in pkg states", "salt", ".", "utils", ".", "pkg", ".", "clear_rtag", "(", "__opts__", ")", "cmd", "=", "[", "'pacman'", ...
Just run a ``pacman -Sy``, return a dict:: {'<database name>': Bool} CLI Example: .. code-block:: bash salt '*' pkg.refresh_db
[ "Just", "run", "a", "pacman", "-", "Sy", "return", "a", "dict", "::" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pacmanpkg.py#L396-L441
train
Refreshes the package database
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/pacmanpkg.py
install
def install(name=None, refresh=False, sysupgrade=None, pkgs=None, sources=None, **kwargs): ''' .. versionchanged:: 2015.8.12,2016.3.3,2016.11.0 On minions running systemd>=205, `systemd-run(1)`_ is now used to isolate commands which mod...
python
def install(name=None, refresh=False, sysupgrade=None, pkgs=None, sources=None, **kwargs): ''' .. versionchanged:: 2015.8.12,2016.3.3,2016.11.0 On minions running systemd>=205, `systemd-run(1)`_ is now used to isolate commands which mod...
[ "def", "install", "(", "name", "=", "None", ",", "refresh", "=", "False", ",", "sysupgrade", "=", "None", ",", "pkgs", "=", "None", ",", "sources", "=", "None", ",", "*", "*", "kwargs", ")", ":", "try", ":", "pkg_params", ",", "pkg_type", "=", "__s...
.. versionchanged:: 2015.8.12,2016.3.3,2016.11.0 On minions running systemd>=205, `systemd-run(1)`_ is now used to isolate commands which modify installed packages from the ``salt-minion`` daemon's control group. This is done to keep systemd from killing any pacman commands spawned by Sa...
[ "..", "versionchanged", "::", "2015", ".", "8", ".", "12", "2016", ".", "3", ".", "3", "2016", ".", "11", ".", "0", "On", "minions", "running", "systemd", ">", "=", "205", "systemd", "-", "run", "(", "1", ")", "_", "is", "now", "used", "to", "i...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pacmanpkg.py#L444-L635
train
Installs packages from the specified packages.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/pacmanpkg.py
upgrade
def upgrade(refresh=False, root=None, **kwargs): ''' .. versionchanged:: 2015.8.12,2016.3.3,2016.11.0 On minions running systemd>=205, `systemd-run(1)`_ is now used to isolate commands which modify installed packages from the ``salt-minion`` daemon's control group. This is done to keep s...
python
def upgrade(refresh=False, root=None, **kwargs): ''' .. versionchanged:: 2015.8.12,2016.3.3,2016.11.0 On minions running systemd>=205, `systemd-run(1)`_ is now used to isolate commands which modify installed packages from the ``salt-minion`` daemon's control group. This is done to keep s...
[ "def", "upgrade", "(", "refresh", "=", "False", ",", "root", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'changes'", ":", "{", "}", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", "}", "old", "=", "list_pkgs", "("...
.. versionchanged:: 2015.8.12,2016.3.3,2016.11.0 On minions running systemd>=205, `systemd-run(1)`_ is now used to isolate commands which modify installed packages from the ``salt-minion`` daemon's control group. This is done to keep systemd from killing any pacman commands spawned by Sa...
[ "..", "versionchanged", "::", "2015", ".", "8", ".", "12", "2016", ".", "3", ".", "3", "2016", ".", "11", ".", "0", "On", "minions", "running", "systemd", ">", "=", "205", "systemd", "-", "run", "(", "1", ")", "_", "is", "now", "used", "to", "i...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pacmanpkg.py#L638-L703
train
Upgrade the package database to the latest version of systemd packages.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/pacmanpkg.py
_uninstall
def _uninstall(action='remove', name=None, pkgs=None, **kwargs): ''' remove and purge do identical things but with different pacman commands, this function performs the common logic. ''' try: pkg_params = __salt__['pkg_resource.parse_targets'](name, pkgs)[0] except MinionError as exc: ...
python
def _uninstall(action='remove', name=None, pkgs=None, **kwargs): ''' remove and purge do identical things but with different pacman commands, this function performs the common logic. ''' try: pkg_params = __salt__['pkg_resource.parse_targets'](name, pkgs)[0] except MinionError as exc: ...
[ "def", "_uninstall", "(", "action", "=", "'remove'", ",", "name", "=", "None", ",", "pkgs", "=", "None", ",", "*", "*", "kwargs", ")", ":", "try", ":", "pkg_params", "=", "__salt__", "[", "'pkg_resource.parse_targets'", "]", "(", "name", ",", "pkgs", "...
remove and purge do identical things but with different pacman commands, this function performs the common logic.
[ "remove", "and", "purge", "do", "identical", "things", "but", "with", "different", "pacman", "commands", "this", "function", "performs", "the", "common", "logic", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pacmanpkg.py#L706-L754
train
Remove and purge a single package from the system.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/pacmanpkg.py
file_list
def file_list(*packages, **kwargs): ''' List the files that belong to a package. Not specifying any packages will return a list of _every_ file on the system's package database (not generally recommended). CLI Examples: .. code-block:: bash salt '*' pkg.file_list httpd salt '*...
python
def file_list(*packages, **kwargs): ''' List the files that belong to a package. Not specifying any packages will return a list of _every_ file on the system's package database (not generally recommended). CLI Examples: .. code-block:: bash salt '*' pkg.file_list httpd salt '*...
[ "def", "file_list", "(", "*", "packages", ",", "*", "*", "kwargs", ")", ":", "errors", "=", "[", "]", "ret", "=", "[", "]", "cmd", "=", "[", "'pacman'", ",", "'-Ql'", "]", "if", "packages", "and", "os", ".", "path", ".", "exists", "(", "packages"...
List the files that belong to a package. Not specifying any packages will return a list of _every_ file on the system's package database (not generally recommended). CLI Examples: .. code-block:: bash salt '*' pkg.file_list httpd salt '*' pkg.file_list httpd postfix salt '*' p...
[ "List", "the", "files", "that", "belong", "to", "a", "package", ".", "Not", "specifying", "any", "packages", "will", "return", "a", "list", "of", "_every_", "file", "on", "the", "system", "s", "package", "database", "(", "not", "generally", "recommended", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pacmanpkg.py#L846-L877
train
List the files that belong to a package on the system.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/pacmanpkg.py
list_repo_pkgs
def list_repo_pkgs(*args, **kwargs): ''' Returns all available packages. Optionally, package names (and name globs) can be passed and the results will be filtered to packages matching those names. This function can be helpful in discovering the version or repo to specify in a :mod:`pkg.installe...
python
def list_repo_pkgs(*args, **kwargs): ''' Returns all available packages. Optionally, package names (and name globs) can be passed and the results will be filtered to packages matching those names. This function can be helpful in discovering the version or repo to specify in a :mod:`pkg.installe...
[ "def", "list_repo_pkgs", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "kwargs", "=", "salt", ".", "utils", ".", "args", ".", "clean_kwargs", "(", "*", "*", "kwargs", ")", "fromrepo", "=", "kwargs", ".", "pop", "(", "'fromrepo'", ",", "''", ...
Returns all available packages. Optionally, package names (and name globs) can be passed and the results will be filtered to packages matching those names. This function can be helpful in discovering the version or repo to specify in a :mod:`pkg.installed <salt.states.pkg.installed>` state. The re...
[ "Returns", "all", "available", "packages", ".", "Optionally", "package", "names", "(", "and", "name", "globs", ")", "can", "be", "passed", "and", "the", "results", "will", "be", "filtered", "to", "packages", "matching", "those", "names", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pacmanpkg.py#L946-L1066
train
List available packages in a repository.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cli/spm.py
SPM.run
def run(self): ''' Run the api ''' ui = salt.spm.SPMCmdlineInterface() self.parse_args() self.setup_logfile_logger() v_dirs = [ self.config['spm_cache_dir'], ] verify_env(v_dirs, self.config['user'], ...
python
def run(self): ''' Run the api ''' ui = salt.spm.SPMCmdlineInterface() self.parse_args() self.setup_logfile_logger() v_dirs = [ self.config['spm_cache_dir'], ] verify_env(v_dirs, self.config['user'], ...
[ "def", "run", "(", "self", ")", ":", "ui", "=", "salt", ".", "spm", ".", "SPMCmdlineInterface", "(", ")", "self", ".", "parse_args", "(", ")", "self", ".", "setup_logfile_logger", "(", ")", "v_dirs", "=", "[", "self", ".", "config", "[", "'spm_cache_di...
Run the api
[ "Run", "the", "api" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/spm.py#L25-L41
train
Run the api
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/sql_base.py
SqlBaseExtPillar.extract_queries
def extract_queries(self, args, kwargs): ''' This function normalizes the config block into a set of queries we can use. The return is a list of consistently laid out dicts. ''' # Please note the function signature is NOT an error. Neither args, nor # kwargs should have...
python
def extract_queries(self, args, kwargs): ''' This function normalizes the config block into a set of queries we can use. The return is a list of consistently laid out dicts. ''' # Please note the function signature is NOT an error. Neither args, nor # kwargs should have...
[ "def", "extract_queries", "(", "self", ",", "args", ",", "kwargs", ")", ":", "# Please note the function signature is NOT an error. Neither args, nor", "# kwargs should have asterisks. We are passing in a list and dict,", "# rather than receiving variable args. Adding asterisks WILL BREAK...
This function normalizes the config block into a set of queries we can use. The return is a list of consistently laid out dicts.
[ "This", "function", "normalizes", "the", "config", "block", "into", "a", "set", "of", "queries", "we", "can", "use", ".", "The", "return", "is", "a", "list", "of", "consistently", "laid", "out", "dicts", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/sql_base.py#L230-L284
train
This function normalizes the config block into a set of queries that can be used to create a new entry in the database.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/sql_base.py
SqlBaseExtPillar.enter_root
def enter_root(self, root): ''' Set self.focus for kwarg queries ''' # There is no collision protection on root name isolation if root: self.result[root] = self.focus = {} else: self.focus = self.result
python
def enter_root(self, root): ''' Set self.focus for kwarg queries ''' # There is no collision protection on root name isolation if root: self.result[root] = self.focus = {} else: self.focus = self.result
[ "def", "enter_root", "(", "self", ",", "root", ")", ":", "# There is no collision protection on root name isolation", "if", "root", ":", "self", ".", "result", "[", "root", "]", "=", "self", ".", "focus", "=", "{", "}", "else", ":", "self", ".", "focus", "...
Set self.focus for kwarg queries
[ "Set", "self", ".", "focus", "for", "kwarg", "queries" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/sql_base.py#L286-L294
train
Enter a root entry in the result dict.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/sql_base.py
SqlBaseExtPillar.process_fields
def process_fields(self, field_names, depth): ''' The primary purpose of this function is to store the sql field list and the depth to which we process. ''' # List of field names in correct order. self.field_names = field_names # number of fields. self.num...
python
def process_fields(self, field_names, depth): ''' The primary purpose of this function is to store the sql field list and the depth to which we process. ''' # List of field names in correct order. self.field_names = field_names # number of fields. self.num...
[ "def", "process_fields", "(", "self", ",", "field_names", ",", "depth", ")", ":", "# List of field names in correct order.", "self", ".", "field_names", "=", "field_names", "# number of fields.", "self", ".", "num_fields", "=", "len", "(", "field_names", ")", "# Con...
The primary purpose of this function is to store the sql field list and the depth to which we process.
[ "The", "primary", "purpose", "of", "this", "function", "is", "to", "store", "the", "sql", "field", "list", "and", "the", "depth", "to", "which", "we", "process", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/sql_base.py#L296-L309
train
This function is used to store the sql field list and the depth to which we process.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/sql_base.py
SqlBaseExtPillar.process_results
def process_results(self, rows): ''' This function takes a list of database results and iterates over, merging them into a dict form. ''' listify = OrderedDict() listify_dicts = OrderedDict() for ret in rows: # crd is the Current Return Data level, to ...
python
def process_results(self, rows): ''' This function takes a list of database results and iterates over, merging them into a dict form. ''' listify = OrderedDict() listify_dicts = OrderedDict() for ret in rows: # crd is the Current Return Data level, to ...
[ "def", "process_results", "(", "self", ",", "rows", ")", ":", "listify", "=", "OrderedDict", "(", ")", "listify_dicts", "=", "OrderedDict", "(", ")", "for", "ret", "in", "rows", ":", "# crd is the Current Return Data level, to make this non-recursive.", "crd", "=", ...
This function takes a list of database results and iterates over, merging them into a dict form.
[ "This", "function", "takes", "a", "list", "of", "database", "results", "and", "iterates", "over", "merging", "them", "into", "a", "dict", "form", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/sql_base.py#L311-L416
train
This function takes a list of database results and iterates over them and creates a dict form of the key - value pairs that are used to create the key - value pairs.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/sql_base.py
SqlBaseExtPillar.fetch
def fetch(self, minion_id, pillar, # pylint: disable=W0613 *args, **kwargs): ''' Execute queries, merge and return as a dict. ''' db_name = self._db_name() log.info('Querying %s for information for %s', db_name, minion_id) ...
python
def fetch(self, minion_id, pillar, # pylint: disable=W0613 *args, **kwargs): ''' Execute queries, merge and return as a dict. ''' db_name = self._db_name() log.info('Querying %s for information for %s', db_name, minion_id) ...
[ "def", "fetch", "(", "self", ",", "minion_id", ",", "pillar", ",", "# pylint: disable=W0613", "*", "args", ",", "*", "*", "kwargs", ")", ":", "db_name", "=", "self", ".", "_db_name", "(", ")", "log", ".", "info", "(", "'Querying %s for information for %s'", ...
Execute queries, merge and return as a dict.
[ "Execute", "queries", "merge", "and", "return", "as", "a", "dict", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/sql_base.py#L418-L451
train
Execute the query and return the result as a dict.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/bridge.py
_linux_brshow
def _linux_brshow(br=None): ''' Internal, returns bridges and enslaved interfaces (GNU/Linux - brctl) ''' brctl = _tool_path('brctl') if br: cmd = '{0} show {1}'.format(brctl, br) else: cmd = '{0} show'.format(brctl) brs = {} for line in __salt__['cmd.run'](cmd, python...
python
def _linux_brshow(br=None): ''' Internal, returns bridges and enslaved interfaces (GNU/Linux - brctl) ''' brctl = _tool_path('brctl') if br: cmd = '{0} show {1}'.format(brctl, br) else: cmd = '{0} show'.format(brctl) brs = {} for line in __salt__['cmd.run'](cmd, python...
[ "def", "_linux_brshow", "(", "br", "=", "None", ")", ":", "brctl", "=", "_tool_path", "(", "'brctl'", ")", "if", "br", ":", "cmd", "=", "'{0} show {1}'", ".", "format", "(", "brctl", ",", "br", ")", "else", ":", "cmd", "=", "'{0} show'", ".", "format...
Internal, returns bridges and enslaved interfaces (GNU/Linux - brctl)
[ "Internal", "returns", "bridges", "and", "enslaved", "interfaces", "(", "GNU", "/", "Linux", "-", "brctl", ")" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bridge.py#L47-L91
train
Internal function returns bridges and enslaved interfaces
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/bridge.py
_linux_bradd
def _linux_bradd(br): ''' Internal, creates the bridge ''' brctl = _tool_path('brctl') return __salt__['cmd.run']('{0} addbr {1}'.format(brctl, br), python_shell=False)
python
def _linux_bradd(br): ''' Internal, creates the bridge ''' brctl = _tool_path('brctl') return __salt__['cmd.run']('{0} addbr {1}'.format(brctl, br), python_shell=False)
[ "def", "_linux_bradd", "(", "br", ")", ":", "brctl", "=", "_tool_path", "(", "'brctl'", ")", "return", "__salt__", "[", "'cmd.run'", "]", "(", "'{0} addbr {1}'", ".", "format", "(", "brctl", ",", "br", ")", ",", "python_shell", "=", "False", ")" ]
Internal, creates the bridge
[ "Internal", "creates", "the", "bridge" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bridge.py#L94-L100
train
Internal creates the bridge
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/bridge.py
_linux_brdel
def _linux_brdel(br): ''' Internal, deletes the bridge ''' brctl = _tool_path('brctl') return __salt__['cmd.run']('{0} delbr {1}'.format(brctl, br), python_shell=False)
python
def _linux_brdel(br): ''' Internal, deletes the bridge ''' brctl = _tool_path('brctl') return __salt__['cmd.run']('{0} delbr {1}'.format(brctl, br), python_shell=False)
[ "def", "_linux_brdel", "(", "br", ")", ":", "brctl", "=", "_tool_path", "(", "'brctl'", ")", "return", "__salt__", "[", "'cmd.run'", "]", "(", "'{0} delbr {1}'", ".", "format", "(", "brctl", ",", "br", ")", ",", "python_shell", "=", "False", ")" ]
Internal, deletes the bridge
[ "Internal", "deletes", "the", "bridge" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bridge.py#L103-L109
train
Internal deletes the bridge
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/bridge.py
_linux_delif
def _linux_delif(br, iface): ''' Internal, removes an interface from a bridge ''' brctl = _tool_path('brctl') return __salt__['cmd.run']('{0} delif {1} {2}'.format(brctl, br, iface), python_shell=False)
python
def _linux_delif(br, iface): ''' Internal, removes an interface from a bridge ''' brctl = _tool_path('brctl') return __salt__['cmd.run']('{0} delif {1} {2}'.format(brctl, br, iface), python_shell=False)
[ "def", "_linux_delif", "(", "br", ",", "iface", ")", ":", "brctl", "=", "_tool_path", "(", "'brctl'", ")", "return", "__salt__", "[", "'cmd.run'", "]", "(", "'{0} delif {1} {2}'", ".", "format", "(", "brctl", ",", "br", ",", "iface", ")", ",", "python_sh...
Internal, removes an interface from a bridge
[ "Internal", "removes", "an", "interface", "from", "a", "bridge" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bridge.py#L121-L127
train
Internal removes an interface from a bridge
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/bridge.py
_linux_stp
def _linux_stp(br, state): ''' Internal, sets STP state ''' brctl = _tool_path('brctl') return __salt__['cmd.run']('{0} stp {1} {2}'.format(brctl, br, state), python_shell=False)
python
def _linux_stp(br, state): ''' Internal, sets STP state ''' brctl = _tool_path('brctl') return __salt__['cmd.run']('{0} stp {1} {2}'.format(brctl, br, state), python_shell=False)
[ "def", "_linux_stp", "(", "br", ",", "state", ")", ":", "brctl", "=", "_tool_path", "(", "'brctl'", ")", "return", "__salt__", "[", "'cmd.run'", "]", "(", "'{0} stp {1} {2}'", ".", "format", "(", "brctl", ",", "br", ",", "state", ")", ",", "python_shell"...
Internal, sets STP state
[ "Internal", "sets", "STP", "state" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bridge.py#L130-L136
train
Internal sets STP state on Linux bridge
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/bridge.py
_bsd_brshow
def _bsd_brshow(br=None): ''' Internal, returns bridges and member interfaces (BSD-like: ifconfig) ''' if __grains__['kernel'] == 'NetBSD': return _netbsd_brshow(br) ifconfig = _tool_path('ifconfig') ifaces = {} if br: ifaces[br] = br else: cmd = '{0} -g bridge...
python
def _bsd_brshow(br=None): ''' Internal, returns bridges and member interfaces (BSD-like: ifconfig) ''' if __grains__['kernel'] == 'NetBSD': return _netbsd_brshow(br) ifconfig = _tool_path('ifconfig') ifaces = {} if br: ifaces[br] = br else: cmd = '{0} -g bridge...
[ "def", "_bsd_brshow", "(", "br", "=", "None", ")", ":", "if", "__grains__", "[", "'kernel'", "]", "==", "'NetBSD'", ":", "return", "_netbsd_brshow", "(", "br", ")", "ifconfig", "=", "_tool_path", "(", "'ifconfig'", ")", "ifaces", "=", "{", "}", "if", "...
Internal, returns bridges and member interfaces (BSD-like: ifconfig)
[ "Internal", "returns", "bridges", "and", "member", "interfaces", "(", "BSD", "-", "like", ":", "ifconfig", ")" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bridge.py#L139-L174
train
Internal function that returns bridges and member interfaces
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/bridge.py
_netbsd_brshow
def _netbsd_brshow(br=None): ''' Internal, returns bridges and enslaved interfaces (NetBSD - brconfig) ''' brconfig = _tool_path('brconfig') if br: cmd = '{0} {1}'.format(brconfig, br) else: cmd = '{0} -a'.format(brconfig) brs = {} start_int = False for line in __s...
python
def _netbsd_brshow(br=None): ''' Internal, returns bridges and enslaved interfaces (NetBSD - brconfig) ''' brconfig = _tool_path('brconfig') if br: cmd = '{0} {1}'.format(brconfig, br) else: cmd = '{0} -a'.format(brconfig) brs = {} start_int = False for line in __s...
[ "def", "_netbsd_brshow", "(", "br", "=", "None", ")", ":", "brconfig", "=", "_tool_path", "(", "'brconfig'", ")", "if", "br", ":", "cmd", "=", "'{0} {1}'", ".", "format", "(", "brconfig", ",", "br", ")", "else", ":", "cmd", "=", "'{0} -a'", ".", "for...
Internal, returns bridges and enslaved interfaces (NetBSD - brconfig)
[ "Internal", "returns", "bridges", "and", "enslaved", "interfaces", "(", "NetBSD", "-", "brconfig", ")" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bridge.py#L177-L214
train
Internal returns bridges and enslaved interfaces
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/bridge.py
_bsd_bradd
def _bsd_bradd(br): ''' Internal, creates the bridge ''' kernel = __grains__['kernel'] ifconfig = _tool_path('ifconfig') if not br: return False if __salt__['cmd.retcode']('{0} {1} create up'.format(ifconfig, br), python_shell=False) != 0: ret...
python
def _bsd_bradd(br): ''' Internal, creates the bridge ''' kernel = __grains__['kernel'] ifconfig = _tool_path('ifconfig') if not br: return False if __salt__['cmd.retcode']('{0} {1} create up'.format(ifconfig, br), python_shell=False) != 0: ret...
[ "def", "_bsd_bradd", "(", "br", ")", ":", "kernel", "=", "__grains__", "[", "'kernel'", "]", "ifconfig", "=", "_tool_path", "(", "'ifconfig'", ")", "if", "not", "br", ":", "return", "False", "if", "__salt__", "[", "'cmd.retcode'", "]", "(", "'{0} {1} creat...
Internal, creates the bridge
[ "Internal", "creates", "the", "bridge" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bridge.py#L217-L238
train
Internal creates the bridge
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/bridge.py
_bsd_brdel
def _bsd_brdel(br): ''' Internal, deletes the bridge ''' ifconfig = _tool_path('ifconfig') if not br: return False return __salt__['cmd.run']('{0} {1} destroy'.format(ifconfig, br), python_shell=False)
python
def _bsd_brdel(br): ''' Internal, deletes the bridge ''' ifconfig = _tool_path('ifconfig') if not br: return False return __salt__['cmd.run']('{0} {1} destroy'.format(ifconfig, br), python_shell=False)
[ "def", "_bsd_brdel", "(", "br", ")", ":", "ifconfig", "=", "_tool_path", "(", "'ifconfig'", ")", "if", "not", "br", ":", "return", "False", "return", "__salt__", "[", "'cmd.run'", "]", "(", "'{0} {1} destroy'", ".", "format", "(", "ifconfig", ",", "br", ...
Internal, deletes the bridge
[ "Internal", "deletes", "the", "bridge" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bridge.py#L241-L249
train
Internal deletes the bridge
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/bridge.py
_bsd_addif
def _bsd_addif(br, iface): ''' Internal, adds an interface to a bridge ''' kernel = __grains__['kernel'] if kernel == 'NetBSD': cmd = _tool_path('brconfig') brcmd = 'add' else: cmd = _tool_path('ifconfig') brcmd = 'addem' if not br or not iface: retur...
python
def _bsd_addif(br, iface): ''' Internal, adds an interface to a bridge ''' kernel = __grains__['kernel'] if kernel == 'NetBSD': cmd = _tool_path('brconfig') brcmd = 'add' else: cmd = _tool_path('ifconfig') brcmd = 'addem' if not br or not iface: retur...
[ "def", "_bsd_addif", "(", "br", ",", "iface", ")", ":", "kernel", "=", "__grains__", "[", "'kernel'", "]", "if", "kernel", "==", "'NetBSD'", ":", "cmd", "=", "_tool_path", "(", "'brconfig'", ")", "brcmd", "=", "'add'", "else", ":", "cmd", "=", "_tool_p...
Internal, adds an interface to a bridge
[ "Internal", "adds", "an", "interface", "to", "a", "bridge" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bridge.py#L252-L268
train
Internal add an interface to a bridge
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/bridge.py
_bsd_stp
def _bsd_stp(br, state, iface): ''' Internal, sets STP state. On BSD-like, it is required to specify the STP physical interface ''' kernel = __grains__['kernel'] if kernel == 'NetBSD': cmd = _tool_path('brconfig') else: cmd = _tool_path('ifconfig') if not br or not iface...
python
def _bsd_stp(br, state, iface): ''' Internal, sets STP state. On BSD-like, it is required to specify the STP physical interface ''' kernel = __grains__['kernel'] if kernel == 'NetBSD': cmd = _tool_path('brconfig') else: cmd = _tool_path('ifconfig') if not br or not iface...
[ "def", "_bsd_stp", "(", "br", ",", "state", ",", "iface", ")", ":", "kernel", "=", "__grains__", "[", "'kernel'", "]", "if", "kernel", "==", "'NetBSD'", ":", "cmd", "=", "_tool_path", "(", "'brconfig'", ")", "else", ":", "cmd", "=", "_tool_path", "(", ...
Internal, sets STP state. On BSD-like, it is required to specify the STP physical interface
[ "Internal", "sets", "STP", "state", ".", "On", "BSD", "-", "like", "it", "is", "required", "to", "specify", "the", "STP", "physical", "interface" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bridge.py#L290-L305
train
Internal sets the STP state on BSD - like systems
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/bridge.py
_os_dispatch
def _os_dispatch(func, *args, **kwargs): ''' Internal, dispatches functions by operating system ''' if __grains__['kernel'] in SUPPORTED_BSD_LIKE: kernel = 'bsd' else: kernel = __grains__['kernel'].lower() _os_func = getattr(sys.modules[__name__], '_{0}_{1}'.format(kernel, func)...
python
def _os_dispatch(func, *args, **kwargs): ''' Internal, dispatches functions by operating system ''' if __grains__['kernel'] in SUPPORTED_BSD_LIKE: kernel = 'bsd' else: kernel = __grains__['kernel'].lower() _os_func = getattr(sys.modules[__name__], '_{0}_{1}'.format(kernel, func)...
[ "def", "_os_dispatch", "(", "func", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "__grains__", "[", "'kernel'", "]", "in", "SUPPORTED_BSD_LIKE", ":", "kernel", "=", "'bsd'", "else", ":", "kernel", "=", "__grains__", "[", "'kernel'", "]", ...
Internal, dispatches functions by operating system
[ "Internal", "dispatches", "functions", "by", "operating", "system" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bridge.py#L308-L320
train
Internal dispatches functions by operating system
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/bridge.py
list_
def list_(): ''' Returns the machine's bridges list CLI Example: .. code-block:: bash salt '*' bridge.list ''' brs = _os_dispatch('brshow') if not brs: return None brlist = [] for br in brs: brlist.append(br) return brlist
python
def list_(): ''' Returns the machine's bridges list CLI Example: .. code-block:: bash salt '*' bridge.list ''' brs = _os_dispatch('brshow') if not brs: return None brlist = [] for br in brs: brlist.append(br) return brlist
[ "def", "list_", "(", ")", ":", "brs", "=", "_os_dispatch", "(", "'brshow'", ")", "if", "not", "brs", ":", "return", "None", "brlist", "=", "[", "]", "for", "br", "in", "brs", ":", "brlist", ".", "append", "(", "br", ")", "return", "brlist" ]
Returns the machine's bridges list CLI Example: .. code-block:: bash salt '*' bridge.list
[ "Returns", "the", "machine", "s", "bridges", "list" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bridge.py#L342-L359
train
Returns the machine s bridges list
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/bridge.py
find_interfaces
def find_interfaces(*args): ''' Returns the bridge to which the interfaces are bond to CLI Example: .. code-block:: bash salt '*' bridge.find_interfaces eth0 [eth1...] ''' brs = _os_dispatch('brshow') if not brs: return None iflist = {} for iface in args: ...
python
def find_interfaces(*args): ''' Returns the bridge to which the interfaces are bond to CLI Example: .. code-block:: bash salt '*' bridge.find_interfaces eth0 [eth1...] ''' brs = _os_dispatch('brshow') if not brs: return None iflist = {} for iface in args: ...
[ "def", "find_interfaces", "(", "*", "args", ")", ":", "brs", "=", "_os_dispatch", "(", "'brshow'", ")", "if", "not", "brs", ":", "return", "None", "iflist", "=", "{", "}", "for", "iface", "in", "args", ":", "for", "br", "in", "brs", ":", "try", ":"...
Returns the bridge to which the interfaces are bond to CLI Example: .. code-block:: bash salt '*' bridge.find_interfaces eth0 [eth1...]
[ "Returns", "the", "bridge", "to", "which", "the", "interfaces", "are", "bond", "to" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bridge.py#L380-L404
train
Returns the bridge to which the interfaces are bond to CLI Example : bash aptcha eth0 eth1...
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/bridge.py
stp
def stp(br=None, state='disable', iface=None): ''' Sets Spanning Tree Protocol state for a bridge CLI Example: .. code-block:: bash salt '*' bridge.stp br0 enable salt '*' bridge.stp br0 disable For BSD-like operating systems, it is required to add the interface on which to e...
python
def stp(br=None, state='disable', iface=None): ''' Sets Spanning Tree Protocol state for a bridge CLI Example: .. code-block:: bash salt '*' bridge.stp br0 enable salt '*' bridge.stp br0 disable For BSD-like operating systems, it is required to add the interface on which to e...
[ "def", "stp", "(", "br", "=", "None", ",", "state", "=", "'disable'", ",", "iface", "=", "None", ")", ":", "kernel", "=", "__grains__", "[", "'kernel'", "]", "if", "kernel", "==", "'Linux'", ":", "states", "=", "{", "'enable'", ":", "'on'", ",", "'...
Sets Spanning Tree Protocol state for a bridge CLI Example: .. code-block:: bash salt '*' bridge.stp br0 enable salt '*' bridge.stp br0 disable For BSD-like operating systems, it is required to add the interface on which to enable the STP. CLI Example: .. code-block:: bash ...
[ "Sets", "Spanning", "Tree", "Protocol", "state", "for", "a", "bridge" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bridge.py#L459-L488
train
Sets the Spanning Tree Protocol state for a bridge
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/decorators/state.py
OutputUnifier.content_check
def content_check(self, result): ''' Checks for specific types in the state output. Raises an Exception in case particular rule is broken. :param result: :return: ''' if not isinstance(result, dict): err_msg = 'Malformed state return. Data must be a d...
python
def content_check(self, result): ''' Checks for specific types in the state output. Raises an Exception in case particular rule is broken. :param result: :return: ''' if not isinstance(result, dict): err_msg = 'Malformed state return. Data must be a d...
[ "def", "content_check", "(", "self", ",", "result", ")", ":", "if", "not", "isinstance", "(", "result", ",", "dict", ")", ":", "err_msg", "=", "'Malformed state return. Data must be a dictionary type.'", "elif", "not", "isinstance", "(", "result", ".", "get", "(...
Checks for specific types in the state output. Raises an Exception in case particular rule is broken. :param result: :return:
[ "Checks", "for", "specific", "types", "in", "the", "state", "output", ".", "Raises", "an", "Exception", "in", "case", "particular", "rule", "is", "broken", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/decorators/state.py#L48-L73
train
Checks for specific types in the state output. Raises an Exception in case particular rule is broken.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/decorators/state.py
OutputUnifier.unify
def unify(self, result): ''' While comments as a list are allowed, comments needs to be strings for backward compatibility. See such claim here: https://github.com/saltstack/salt/pull/43070 Rules applied: - 'comment' is joined into a multi-line string, in case the valu...
python
def unify(self, result): ''' While comments as a list are allowed, comments needs to be strings for backward compatibility. See such claim here: https://github.com/saltstack/salt/pull/43070 Rules applied: - 'comment' is joined into a multi-line string, in case the valu...
[ "def", "unify", "(", "self", ",", "result", ")", ":", "if", "isinstance", "(", "result", ".", "get", "(", "'comment'", ")", ",", "list", ")", ":", "result", "[", "'comment'", "]", "=", "u'\\n'", ".", "join", "(", "[", "salt", ".", "utils", ".", "...
While comments as a list are allowed, comments needs to be strings for backward compatibility. See such claim here: https://github.com/saltstack/salt/pull/43070 Rules applied: - 'comment' is joined into a multi-line string, in case the value is a list. - 'result' should be a...
[ "While", "comments", "as", "a", "list", "are", "allowed", "comments", "needs", "to", "be", "strings", "for", "backward", "compatibility", ".", "See", "such", "claim", "here", ":", "https", ":", "//", "github", ".", "com", "/", "saltstack", "/", "salt", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/decorators/state.py#L75-L95
train
Unify the result of a get_cache_entry call.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/mac_xattr.py
list_
def list_(path, **kwargs): ''' List all of the extended attributes on the given file/directory :param str path: The file(s) to get attributes from :param bool hex: Return the values with forced hexadecimal values :return: A dictionary containing extended attributes and values for the give...
python
def list_(path, **kwargs): ''' List all of the extended attributes on the given file/directory :param str path: The file(s) to get attributes from :param bool hex: Return the values with forced hexadecimal values :return: A dictionary containing extended attributes and values for the give...
[ "def", "list_", "(", "path", ",", "*", "*", "kwargs", ")", ":", "kwargs", "=", "salt", ".", "utils", ".", "args", ".", "clean_kwargs", "(", "*", "*", "kwargs", ")", "hex_", "=", "kwargs", ".", "pop", "(", "'hex'", ",", "False", ")", "if", "kwargs...
List all of the extended attributes on the given file/directory :param str path: The file(s) to get attributes from :param bool hex: Return the values with forced hexadecimal values :return: A dictionary containing extended attributes and values for the given file :rtype: dict :raises: C...
[ "List", "all", "of", "the", "extended", "attributes", "on", "the", "given", "file", "/", "directory" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mac_xattr.py#L36-L79
train
List all of the extended attributes on the given file
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/mac_xattr.py
read
def read(path, attribute, **kwargs): ''' Read the given attributes on the given file/directory :param str path: The file to get attributes from :param str attribute: The attribute to read :param bool hex: Return the values with forced hexadecimal values :return: A string containing the value...
python
def read(path, attribute, **kwargs): ''' Read the given attributes on the given file/directory :param str path: The file to get attributes from :param str attribute: The attribute to read :param bool hex: Return the values with forced hexadecimal values :return: A string containing the value...
[ "def", "read", "(", "path", ",", "attribute", ",", "*", "*", "kwargs", ")", ":", "kwargs", "=", "salt", ".", "utils", ".", "args", ".", "clean_kwargs", "(", "*", "*", "kwargs", ")", "hex_", "=", "kwargs", ".", "pop", "(", "'hex'", ",", "False", "...
Read the given attributes on the given file/directory :param str path: The file to get attributes from :param str attribute: The attribute to read :param bool hex: Return the values with forced hexadecimal values :return: A string containing the value of the named attribute :rtype: str :rai...
[ "Read", "the", "given", "attributes", "on", "the", "given", "file", "/", "directory" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mac_xattr.py#L82-L124
train
Reads the given attributes on the given file and returns the value of the named attribute
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/mac_xattr.py
delete
def delete(path, attribute): ''' Removes the given attribute from the file :param str path: The file(s) to get attributes from :param str attribute: The attribute name to be deleted from the file/directory :return: True if successful, otherwise False :rtype: bool :raises: Command...
python
def delete(path, attribute): ''' Removes the given attribute from the file :param str path: The file(s) to get attributes from :param str attribute: The attribute name to be deleted from the file/directory :return: True if successful, otherwise False :rtype: bool :raises: Command...
[ "def", "delete", "(", "path", ",", "attribute", ")", ":", "cmd", "=", "'xattr -d \"{0}\" \"{1}\"'", ".", "format", "(", "attribute", ",", "path", ")", "try", ":", "salt", ".", "utils", ".", "mac_utils", ".", "execute_return_success", "(", "cmd", ")", "exce...
Removes the given attribute from the file :param str path: The file(s) to get attributes from :param str attribute: The attribute name to be deleted from the file/directory :return: True if successful, otherwise False :rtype: bool :raises: CommandExecutionError on file not found, attribu...
[ "Removes", "the", "given", "attribute", "from", "the", "file" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mac_xattr.py#L171-L202
train
Removes the given attribute from the file system
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/mac_xattr.py
clear
def clear(path): ''' Causes the all attributes on the file/directory to be removed :param str path: The file(s) to get attributes from :return: True if successful, otherwise False :raises: CommandExecutionError on file not found or any other unknown error CLI Example: .. code-block:: ba...
python
def clear(path): ''' Causes the all attributes on the file/directory to be removed :param str path: The file(s) to get attributes from :return: True if successful, otherwise False :raises: CommandExecutionError on file not found or any other unknown error CLI Example: .. code-block:: ba...
[ "def", "clear", "(", "path", ")", ":", "cmd", "=", "'xattr -c \"{0}\"'", ".", "format", "(", "path", ")", "try", ":", "salt", ".", "utils", ".", "mac_utils", ".", "execute_return_success", "(", "cmd", ")", "except", "CommandExecutionError", "as", "exc", ":...
Causes the all attributes on the file/directory to be removed :param str path: The file(s) to get attributes from :return: True if successful, otherwise False :raises: CommandExecutionError on file not found or any other unknown error CLI Example: .. code-block:: bash salt '*' xattr.de...
[ "Causes", "the", "all", "attributes", "on", "the", "file", "/", "directory", "to", "be", "removed" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mac_xattr.py#L205-L229
train
Clears all attributes on the file or directory
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/rallydev.py
_get_token
def _get_token(): ''' Get an auth token ''' username = __opts__.get('rallydev', {}).get('username', None) password = __opts__.get('rallydev', {}).get('password', None) path = 'https://rally1.rallydev.com/slm/webservice/v2.0/security/authorize' result = salt.utils.http.query( path, ...
python
def _get_token(): ''' Get an auth token ''' username = __opts__.get('rallydev', {}).get('username', None) password = __opts__.get('rallydev', {}).get('password', None) path = 'https://rally1.rallydev.com/slm/webservice/v2.0/security/authorize' result = salt.utils.http.query( path, ...
[ "def", "_get_token", "(", ")", ":", "username", "=", "__opts__", ".", "get", "(", "'rallydev'", ",", "{", "}", ")", ".", "get", "(", "'username'", ",", "None", ")", "password", "=", "__opts__", ".", "get", "(", "'rallydev'", ",", "{", "}", ")", "."...
Get an auth token
[ "Get", "an", "auth", "token" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rallydev.py#L39-L61
train
Get an auth token
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/rallydev.py
_query
def _query(action=None, command=None, args=None, method='GET', header_dict=None, data=None): ''' Make a web call to RallyDev. ''' token = _get_token() username = __opts__.get('rallydev', {}).get('username', None) password = __opts__.get('ral...
python
def _query(action=None, command=None, args=None, method='GET', header_dict=None, data=None): ''' Make a web call to RallyDev. ''' token = _get_token() username = __opts__.get('rallydev', {}).get('username', None) password = __opts__.get('ral...
[ "def", "_query", "(", "action", "=", "None", ",", "command", "=", "None", ",", "args", "=", "None", ",", "method", "=", "'GET'", ",", "header_dict", "=", "None", ",", "data", "=", "None", ")", ":", "token", "=", "_get_token", "(", ")", "username", ...
Make a web call to RallyDev.
[ "Make", "a", "web", "call", "to", "RallyDev", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rallydev.py#L64-L123
train
Query the RallyDev API.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/rallydev.py
query_item
def query_item(name, query_string, order='Rank'): ''' Query a type of record for one or more items. Requires a valid query string. See https://rally1.rallydev.com/slm/doc/webservice/introduction.jsp for information on query syntax. CLI Example: .. code-block:: bash salt myminion rally...
python
def query_item(name, query_string, order='Rank'): ''' Query a type of record for one or more items. Requires a valid query string. See https://rally1.rallydev.com/slm/doc/webservice/introduction.jsp for information on query syntax. CLI Example: .. code-block:: bash salt myminion rally...
[ "def", "query_item", "(", "name", ",", "query_string", ",", "order", "=", "'Rank'", ")", ":", "status", ",", "result", "=", "_query", "(", "action", "=", "name", ",", "args", "=", "{", "'query'", ":", "query_string", ",", "'order'", ":", "order", "}", ...
Query a type of record for one or more items. Requires a valid query string. See https://rally1.rallydev.com/slm/doc/webservice/introduction.jsp for information on query syntax. CLI Example: .. code-block:: bash salt myminion rallydev.query_<item name> <query string> [<order>] salt my...
[ "Query", "a", "type", "of", "record", "for", "one", "or", "more", "items", ".", "Requires", "a", "valid", "query", "string", ".", "See", "https", ":", "//", "rally1", ".", "rallydev", ".", "com", "/", "slm", "/", "doc", "/", "webservice", "/", "intro...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rallydev.py#L142-L161
train
Query a type of record for one or more items. Requires a valid query string.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/rallydev.py
show_item
def show_item(name, id_): ''' Show an item CLI Example: .. code-block:: bash salt myminion rallydev.show_<item name> <item id> ''' status, result = _query(action=name, command=id_) return result
python
def show_item(name, id_): ''' Show an item CLI Example: .. code-block:: bash salt myminion rallydev.show_<item name> <item id> ''' status, result = _query(action=name, command=id_) return result
[ "def", "show_item", "(", "name", ",", "id_", ")", ":", "status", ",", "result", "=", "_query", "(", "action", "=", "name", ",", "command", "=", "id_", ")", "return", "result" ]
Show an item CLI Example: .. code-block:: bash salt myminion rallydev.show_<item name> <item id>
[ "Show", "an", "item" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rallydev.py#L164-L175
train
Show an item in the
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/rallydev.py
update_item
def update_item(name, id_, field=None, value=None, postdata=None): ''' Update an item. Either a field and a value, or a chunk of POST data, may be used, but not both. CLI Example: .. code-block:: bash salt myminion rallydev.update_<item name> <item id> field=<field> value=<value> ...
python
def update_item(name, id_, field=None, value=None, postdata=None): ''' Update an item. Either a field and a value, or a chunk of POST data, may be used, but not both. CLI Example: .. code-block:: bash salt myminion rallydev.update_<item name> <item id> field=<field> value=<value> ...
[ "def", "update_item", "(", "name", ",", "id_", ",", "field", "=", "None", ",", "value", "=", "None", ",", "postdata", "=", "None", ")", ":", "if", "field", "and", "value", ":", "if", "postdata", ":", "raise", "SaltInvocationError", "(", "'Either a field ...
Update an item. Either a field and a value, or a chunk of POST data, may be used, but not both. CLI Example: .. code-block:: bash salt myminion rallydev.update_<item name> <item id> field=<field> value=<value> salt myminion rallydev.update_<item name> <item id> postdata=<post data>
[ "Update", "an", "item", ".", "Either", "a", "field", "and", "a", "value", "or", "a", "chunk", "of", "POST", "data", "may", "be", "used", "but", "not", "both", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rallydev.py#L178-L207
train
Update an item in the nation.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/_compat.py
text_
def text_(s, encoding='latin-1', errors='strict'): ''' If ``s`` is an instance of ``binary_type``, return ``s.decode(encoding, errors)``, otherwise return ``s`` ''' return s.decode(encoding, errors) if isinstance(s, binary_type) else s
python
def text_(s, encoding='latin-1', errors='strict'): ''' If ``s`` is an instance of ``binary_type``, return ``s.decode(encoding, errors)``, otherwise return ``s`` ''' return s.decode(encoding, errors) if isinstance(s, binary_type) else s
[ "def", "text_", "(", "s", ",", "encoding", "=", "'latin-1'", ",", "errors", "=", "'strict'", ")", ":", "return", "s", ".", "decode", "(", "encoding", ",", "errors", ")", "if", "isinstance", "(", "s", ",", "binary_type", ")", "else", "s" ]
If ``s`` is an instance of ``binary_type``, return ``s.decode(encoding, errors)``, otherwise return ``s``
[ "If", "s", "is", "an", "instance", "of", "binary_type", "return", "s", ".", "decode", "(", "encoding", "errors", ")", "otherwise", "return", "s" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/_compat.py#L60-L65
train
Decode a string into a sequence of bytes.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/_compat.py
ascii_native_
def ascii_native_(s): ''' Python 3: If ``s`` is an instance of ``text_type``, return ``s.encode('ascii')``, otherwise return ``str(s, 'ascii', 'strict')`` Python 2: If ``s`` is an instance of ``text_type``, return ``s.encode('ascii')``, otherwise return ``str(s)`` ''' if isinstance(s, text_...
python
def ascii_native_(s): ''' Python 3: If ``s`` is an instance of ``text_type``, return ``s.encode('ascii')``, otherwise return ``str(s, 'ascii', 'strict')`` Python 2: If ``s`` is an instance of ``text_type``, return ``s.encode('ascii')``, otherwise return ``str(s)`` ''' if isinstance(s, text_...
[ "def", "ascii_native_", "(", "s", ")", ":", "if", "isinstance", "(", "s", ",", "text_type", ")", ":", "s", "=", "s", ".", "encode", "(", "'ascii'", ")", "return", "str", "(", "s", ",", "'ascii'", ",", "'strict'", ")", "if", "PY3", "else", "s" ]
Python 3: If ``s`` is an instance of ``text_type``, return ``s.encode('ascii')``, otherwise return ``str(s, 'ascii', 'strict')`` Python 2: If ``s`` is an instance of ``text_type``, return ``s.encode('ascii')``, otherwise return ``str(s)``
[ "Python", "3", ":", "If", "s", "is", "an", "instance", "of", "text_type", "return", "s", ".", "encode", "(", "ascii", ")", "otherwise", "return", "str", "(", "s", "ascii", "strict", ")" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/_compat.py#L76-L87
train
Convert a string to ascii if possible.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/_compat.py
native_
def native_(s, encoding='latin-1', errors='strict'): ''' Python 3: If ``s`` is an instance of ``text_type``, return ``s``, otherwise return ``str(s, encoding, errors)`` Python 2: If ``s`` is an instance of ``text_type``, return ``s.encode(encoding, errors)``, otherwise return ``str(s)`` ''' ...
python
def native_(s, encoding='latin-1', errors='strict'): ''' Python 3: If ``s`` is an instance of ``text_type``, return ``s``, otherwise return ``str(s, encoding, errors)`` Python 2: If ``s`` is an instance of ``text_type``, return ``s.encode(encoding, errors)``, otherwise return ``str(s)`` ''' ...
[ "def", "native_", "(", "s", ",", "encoding", "=", "'latin-1'", ",", "errors", "=", "'strict'", ")", ":", "if", "PY3", ":", "out", "=", "s", "if", "isinstance", "(", "s", ",", "text_type", ")", "else", "str", "(", "s", ",", "encoding", ",", "errors"...
Python 3: If ``s`` is an instance of ``text_type``, return ``s``, otherwise return ``str(s, encoding, errors)`` Python 2: If ``s`` is an instance of ``text_type``, return ``s.encode(encoding, errors)``, otherwise return ``str(s)``
[ "Python", "3", ":", "If", "s", "is", "an", "instance", "of", "text_type", "return", "s", "otherwise", "return", "str", "(", "s", "encoding", "errors", ")" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/_compat.py#L90-L103
train
Convert a string into a unicode object.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/_compat.py
IPv6AddressScoped._is_packed_binary
def _is_packed_binary(self, data): ''' Check if data is hexadecimal packed :param data: :return: ''' packed = False if isinstance(data, bytes) and len(data) == 16 and b':' not in data: try: packed = bool(int(binascii.hexlify(data), 16)...
python
def _is_packed_binary(self, data): ''' Check if data is hexadecimal packed :param data: :return: ''' packed = False if isinstance(data, bytes) and len(data) == 16 and b':' not in data: try: packed = bool(int(binascii.hexlify(data), 16)...
[ "def", "_is_packed_binary", "(", "self", ",", "data", ")", ":", "packed", "=", "False", "if", "isinstance", "(", "data", ",", "bytes", ")", "and", "len", "(", "data", ")", "==", "16", "and", "b':'", "not", "in", "data", ":", "try", ":", "packed", "...
Check if data is hexadecimal packed :param data: :return:
[ "Check", "if", "data", "is", "hexadecimal", "packed" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/_compat.py#L183-L197
train
Check if data is hexadecimal packed packed
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
_get_binding_info
def _get_binding_info(host_header='', ip_address='*', port=80): ''' Combine the host header, IP address, and TCP port into bindingInformation format. Binding Information specifies information to communicate with a site. It includes the IP address, the port number, and an optional host header (usuall...
python
def _get_binding_info(host_header='', ip_address='*', port=80): ''' Combine the host header, IP address, and TCP port into bindingInformation format. Binding Information specifies information to communicate with a site. It includes the IP address, the port number, and an optional host header (usuall...
[ "def", "_get_binding_info", "(", "host_header", "=", "''", ",", "ip_address", "=", "'*'", ",", "port", "=", "80", ")", ":", "return", "':'", ".", "join", "(", "[", "ip_address", ",", "six", ".", "text_type", "(", "port", ")", ",", "host_header", ".", ...
Combine the host header, IP address, and TCP port into bindingInformation format. Binding Information specifies information to communicate with a site. It includes the IP address, the port number, and an optional host header (usually a host name) to communicate with the site. Args: host_header ...
[ "Combine", "the", "host", "header", "IP", "address", "and", "TCP", "port", "into", "bindingInformation", "format", ".", "Binding", "Information", "specifies", "information", "to", "communicate", "with", "a", "site", ".", "It", "includes", "the", "IP", "address",...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L56-L73
train
Combine the host header IP address and TCP port into bindingInformation format.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
_list_certs
def _list_certs(certificate_store='My'): ''' List details of available certificates in the LocalMachine certificate store. Args: certificate_store (str): The name of the certificate store on the local machine. Returns: dict: A dictionary of certificates found in the sto...
python
def _list_certs(certificate_store='My'): ''' List details of available certificates in the LocalMachine certificate store. Args: certificate_store (str): The name of the certificate store on the local machine. Returns: dict: A dictionary of certificates found in the sto...
[ "def", "_list_certs", "(", "certificate_store", "=", "'My'", ")", ":", "ret", "=", "dict", "(", ")", "blacklist_keys", "=", "[", "'DnsNameList'", ",", "'Thumbprint'", "]", "ps_cmd", "=", "[", "'Get-ChildItem'", ",", "'-Path'", ",", "r\"'Cert:\\LocalMachine\\{0}'...
List details of available certificates in the LocalMachine certificate store. Args: certificate_store (str): The name of the certificate store on the local machine. Returns: dict: A dictionary of certificates found in the store
[ "List", "details", "of", "available", "certificates", "in", "the", "LocalMachine", "certificate", "store", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L76-L116
train
List the available certificates in the local store.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
_srvmgr
def _srvmgr(cmd, return_json=False): ''' Execute a powershell command from the WebAdministration PS module. Args: cmd (list): The command to execute in a list return_json (bool): True formats the return in JSON, False just returns the output of the command. Returns: ...
python
def _srvmgr(cmd, return_json=False): ''' Execute a powershell command from the WebAdministration PS module. Args: cmd (list): The command to execute in a list return_json (bool): True formats the return in JSON, False just returns the output of the command. Returns: ...
[ "def", "_srvmgr", "(", "cmd", ",", "return_json", "=", "False", ")", ":", "if", "isinstance", "(", "cmd", ",", "list", ")", ":", "cmd", "=", "' '", ".", "join", "(", "cmd", ")", "if", "return_json", ":", "cmd", "=", "'ConvertTo-Json -Compress -Depth 4 -I...
Execute a powershell command from the WebAdministration PS module. Args: cmd (list): The command to execute in a list return_json (bool): True formats the return in JSON, False just returns the output of the command. Returns: str: The output from the command
[ "Execute", "a", "powershell", "command", "from", "the", "WebAdministration", "PS", "module", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L135-L163
train
Execute a powershell command from the WebAdministration PS module.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
_collection_match_to_index
def _collection_match_to_index(pspath, colfilter, name, match): ''' Returns index of collection item matching the match dictionary. ''' collection = get_webconfiguration_settings(pspath, [{'name': name, 'filter': colfilter}])[0]['value'] for idx, collect_dict in enumerate(collection): if all...
python
def _collection_match_to_index(pspath, colfilter, name, match): ''' Returns index of collection item matching the match dictionary. ''' collection = get_webconfiguration_settings(pspath, [{'name': name, 'filter': colfilter}])[0]['value'] for idx, collect_dict in enumerate(collection): if all...
[ "def", "_collection_match_to_index", "(", "pspath", ",", "colfilter", ",", "name", ",", "match", ")", ":", "collection", "=", "get_webconfiguration_settings", "(", "pspath", ",", "[", "{", "'name'", ":", "name", ",", "'filter'", ":", "colfilter", "}", "]", "...
Returns index of collection item matching the match dictionary.
[ "Returns", "index", "of", "collection", "item", "matching", "the", "match", "dictionary", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L166-L174
train
Returns index of collection item matching the match dictionary.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
_prepare_settings
def _prepare_settings(pspath, settings): ''' Prepare settings before execution with get or set functions. Removes settings with a match parameter when index is not found. ''' prepared_settings = [] for setting in settings: match = re.search(r'Collection\[(\{.*\})\]', setting['name']) ...
python
def _prepare_settings(pspath, settings): ''' Prepare settings before execution with get or set functions. Removes settings with a match parameter when index is not found. ''' prepared_settings = [] for setting in settings: match = re.search(r'Collection\[(\{.*\})\]', setting['name']) ...
[ "def", "_prepare_settings", "(", "pspath", ",", "settings", ")", ":", "prepared_settings", "=", "[", "]", "for", "setting", "in", "settings", ":", "match", "=", "re", ".", "search", "(", "r'Collection\\[(\\{.*\\})\\]'", ",", "setting", "[", "'name'", "]", ")...
Prepare settings before execution with get or set functions. Removes settings with a match parameter when index is not found.
[ "Prepare", "settings", "before", "execution", "with", "get", "or", "set", "functions", ".", "Removes", "settings", "with", "a", "match", "parameter", "when", "index", "is", "not", "found", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L177-L194
train
Prepare settings before execution with get or set functions.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
list_sites
def list_sites(): ''' List all the currently deployed websites. Returns: dict: A dictionary of the IIS sites and their properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_sites ''' ret = dict() ps_cmd = ['Get-ChildItem', '-Path', r"'IIS:\...
python
def list_sites(): ''' List all the currently deployed websites. Returns: dict: A dictionary of the IIS sites and their properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_sites ''' ret = dict() ps_cmd = ['Get-ChildItem', '-Path', r"'IIS:\...
[ "def", "list_sites", "(", ")", ":", "ret", "=", "dict", "(", ")", "ps_cmd", "=", "[", "'Get-ChildItem'", ",", "'-Path'", ",", "r\"'IIS:\\Sites'\"", ",", "'|'", ",", "'Select-Object applicationPool, applicationDefaults, Bindings, ID, Name, PhysicalPath, State'", "]", "ke...
List all the currently deployed websites. Returns: dict: A dictionary of the IIS sites and their properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_sites
[ "List", "all", "the", "currently", "deployed", "websites", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L197-L264
train
List all currently deployed websites.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
create_site
def create_site(name, sourcepath, apppool='', hostheader='', ipaddress='*', port=80, protocol='http', preload=''): ''' Create a basic website in IIS. .. note:: This function only validates against the site name, and will return True even if the site already exists with a di...
python
def create_site(name, sourcepath, apppool='', hostheader='', ipaddress='*', port=80, protocol='http', preload=''): ''' Create a basic website in IIS. .. note:: This function only validates against the site name, and will return True even if the site already exists with a di...
[ "def", "create_site", "(", "name", ",", "sourcepath", ",", "apppool", "=", "''", ",", "hostheader", "=", "''", ",", "ipaddress", "=", "'*'", ",", "port", "=", "80", ",", "protocol", "=", "'http'", ",", "preload", "=", "''", ")", ":", "protocol", "=",...
Create a basic website in IIS. .. note:: This function only validates against the site name, and will return True even if the site already exists with a different configuration. It will not modify the configuration of an existing site. Args: name (str): The IIS site name. ...
[ "Create", "a", "basic", "website", "in", "IIS", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L267-L351
train
Create a basic website in IIS.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
modify_site
def modify_site(name, sourcepath=None, apppool=None, preload=None): ''' Modify a basic website in IIS. .. versionadded:: 2017.7.0 Args: name (str): The IIS site name. sourcepath (str): The physical path of the IIS site. apppool (str): The name of the IIS application pool. ...
python
def modify_site(name, sourcepath=None, apppool=None, preload=None): ''' Modify a basic website in IIS. .. versionadded:: 2017.7.0 Args: name (str): The IIS site name. sourcepath (str): The physical path of the IIS site. apppool (str): The name of the IIS application pool. ...
[ "def", "modify_site", "(", "name", ",", "sourcepath", "=", "None", ",", "apppool", "=", "None", ",", "preload", "=", "None", ")", ":", "site_path", "=", "r'IIS:\\Sites\\{0}'", ".", "format", "(", "name", ")", "current_sites", "=", "list_sites", "(", ")", ...
Modify a basic website in IIS. .. versionadded:: 2017.7.0 Args: name (str): The IIS site name. sourcepath (str): The physical path of the IIS site. apppool (str): The name of the IIS application pool. preload (bool): Whether preloading should be enabled Returns: bo...
[ "Modify", "a", "basic", "website", "in", "IIS", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L354-L426
train
Modify a basic website in IIS.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
remove_site
def remove_site(name): ''' Delete a website from IIS. Args: name (str): The IIS site name. Returns: bool: True if successful, otherwise False .. note:: This will not remove the application pool used by the site. CLI Example: .. code-block:: bash salt '*...
python
def remove_site(name): ''' Delete a website from IIS. Args: name (str): The IIS site name. Returns: bool: True if successful, otherwise False .. note:: This will not remove the application pool used by the site. CLI Example: .. code-block:: bash salt '*...
[ "def", "remove_site", "(", "name", ")", ":", "current_sites", "=", "list_sites", "(", ")", "if", "name", "not", "in", "current_sites", ":", "log", ".", "debug", "(", "'Site already absent: %s'", ",", "name", ")", "return", "True", "ps_cmd", "=", "[", "'Rem...
Delete a website from IIS. Args: name (str): The IIS site name. Returns: bool: True if successful, otherwise False .. note:: This will not remove the application pool used by the site. CLI Example: .. code-block:: bash salt '*' win_iis.remove_site name='My Test...
[ "Delete", "a", "website", "from", "IIS", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L429-L466
train
Remove a website from IIS.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
stop_site
def stop_site(name): ''' Stop a Web Site in IIS. .. versionadded:: 2017.7.0 Args: name (str): The name of the website to stop. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.stop_site name='My Test Site' ...
python
def stop_site(name): ''' Stop a Web Site in IIS. .. versionadded:: 2017.7.0 Args: name (str): The name of the website to stop. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.stop_site name='My Test Site' ...
[ "def", "stop_site", "(", "name", ")", ":", "ps_cmd", "=", "[", "'Stop-WebSite'", ",", "r\"'{0}'\"", ".", "format", "(", "name", ")", "]", "cmd_ret", "=", "_srvmgr", "(", "ps_cmd", ")", "return", "cmd_ret", "[", "'retcode'", "]", "==", "0" ]
Stop a Web Site in IIS. .. versionadded:: 2017.7.0 Args: name (str): The name of the website to stop. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.stop_site name='My Test Site'
[ "Stop", "a", "Web", "Site", "in", "IIS", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L469-L491
train
Stop a website in IIS.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
start_site
def start_site(name): ''' Start a Web Site in IIS. .. versionadded:: 2017.7.0 Args: name (str): The name of the website to start. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.start_site name='My Test Site'...
python
def start_site(name): ''' Start a Web Site in IIS. .. versionadded:: 2017.7.0 Args: name (str): The name of the website to start. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.start_site name='My Test Site'...
[ "def", "start_site", "(", "name", ")", ":", "ps_cmd", "=", "[", "'Start-WebSite'", ",", "r\"'{0}'\"", ".", "format", "(", "name", ")", "]", "cmd_ret", "=", "_srvmgr", "(", "ps_cmd", ")", "return", "cmd_ret", "[", "'retcode'", "]", "==", "0" ]
Start a Web Site in IIS. .. versionadded:: 2017.7.0 Args: name (str): The name of the website to start. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.start_site name='My Test Site'
[ "Start", "a", "Web", "Site", "in", "IIS", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L494-L516
train
Start a website in IIS.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
list_bindings
def list_bindings(site): ''' Get all configured IIS bindings for the specified site. Args: site (str): The name if the IIS Site Returns: dict: A dictionary of the binding names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_bindings site ...
python
def list_bindings(site): ''' Get all configured IIS bindings for the specified site. Args: site (str): The name if the IIS Site Returns: dict: A dictionary of the binding names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_bindings site ...
[ "def", "list_bindings", "(", "site", ")", ":", "ret", "=", "dict", "(", ")", "sites", "=", "list_sites", "(", ")", "if", "site", "not", "in", "sites", ":", "log", ".", "warning", "(", "'Site not found: %s'", ",", "site", ")", "return", "ret", "ret", ...
Get all configured IIS bindings for the specified site. Args: site (str): The name if the IIS Site Returns: dict: A dictionary of the binding names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_bindings site
[ "Get", "all", "configured", "IIS", "bindings", "for", "the", "specified", "site", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L540-L568
train
Get all configured IIS bindings for the specified site.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
create_binding
def create_binding(site, hostheader='', ipaddress='*', port=80, protocol='http', sslflags=None): ''' Create an IIS Web Binding. .. note:: This function only validates against the binding ipaddress:port:hostheader combination, and will return True even if the bind...
python
def create_binding(site, hostheader='', ipaddress='*', port=80, protocol='http', sslflags=None): ''' Create an IIS Web Binding. .. note:: This function only validates against the binding ipaddress:port:hostheader combination, and will return True even if the bind...
[ "def", "create_binding", "(", "site", ",", "hostheader", "=", "''", ",", "ipaddress", "=", "'*'", ",", "port", "=", "80", ",", "protocol", "=", "'http'", ",", "sslflags", "=", "None", ")", ":", "protocol", "=", "six", ".", "text_type", "(", "protocol",...
Create an IIS Web Binding. .. note:: This function only validates against the binding ipaddress:port:hostheader combination, and will return True even if the binding already exists with a different configuration. It will not modify the configuration of an existing binding. Arg...
[ "Create", "an", "IIS", "Web", "Binding", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L571-L650
train
Create an IIS Web Binding.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
modify_binding
def modify_binding(site, binding, hostheader=None, ipaddress=None, port=None, sslflags=None): ''' Modify an IIS Web Binding. Use ``site`` and ``binding`` to target the binding. .. versionadded:: 2017.7.0 Args: site (str): The IIS site name. binding (str): The bin...
python
def modify_binding(site, binding, hostheader=None, ipaddress=None, port=None, sslflags=None): ''' Modify an IIS Web Binding. Use ``site`` and ``binding`` to target the binding. .. versionadded:: 2017.7.0 Args: site (str): The IIS site name. binding (str): The bin...
[ "def", "modify_binding", "(", "site", ",", "binding", ",", "hostheader", "=", "None", ",", "ipaddress", "=", "None", ",", "port", "=", "None", ",", "sslflags", "=", "None", ")", ":", "if", "sslflags", "is", "not", "None", "and", "sslflags", "not", "in"...
Modify an IIS Web Binding. Use ``site`` and ``binding`` to target the binding. .. versionadded:: 2017.7.0 Args: site (str): The IIS site name. binding (str): The binding to edit. This is a combination of the IP address, port, and hostheader. It is in the following format: ...
[ "Modify", "an", "IIS", "Web", "Binding", ".", "Use", "site", "and", "binding", "to", "target", "the", "binding", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L653-L739
train
Modify an IIS Web Binding.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
remove_binding
def remove_binding(site, hostheader='', ipaddress='*', port=80): ''' Remove an IIS binding. Args: site (str): The IIS site name. hostheader (str): The host header of the binding. ipaddress (str): The IP address of the binding. port (int): The TCP port of the binding. Re...
python
def remove_binding(site, hostheader='', ipaddress='*', port=80): ''' Remove an IIS binding. Args: site (str): The IIS site name. hostheader (str): The host header of the binding. ipaddress (str): The IP address of the binding. port (int): The TCP port of the binding. Re...
[ "def", "remove_binding", "(", "site", ",", "hostheader", "=", "''", ",", "ipaddress", "=", "'*'", ",", "port", "=", "80", ")", ":", "name", "=", "_get_binding_info", "(", "hostheader", ",", "ipaddress", ",", "port", ")", "current_bindings", "=", "list_bind...
Remove an IIS binding. Args: site (str): The IIS site name. hostheader (str): The host header of the binding. ipaddress (str): The IP address of the binding. port (int): The TCP port of the binding. Returns: bool: True if successful, otherwise False CLI Example: ...
[ "Remove", "an", "IIS", "binding", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L742-L784
train
Remove an IIS binding from the current IIS site.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
list_cert_bindings
def list_cert_bindings(site): ''' List certificate bindings for an IIS site. .. versionadded:: 2016.11.0 Args: site (str): The IIS site name. Returns: dict: A dictionary of the binding names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list...
python
def list_cert_bindings(site): ''' List certificate bindings for an IIS site. .. versionadded:: 2016.11.0 Args: site (str): The IIS site name. Returns: dict: A dictionary of the binding names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list...
[ "def", "list_cert_bindings", "(", "site", ")", ":", "ret", "=", "dict", "(", ")", "sites", "=", "list_sites", "(", ")", "if", "site", "not", "in", "sites", ":", "log", ".", "warning", "(", "'Site not found: %s'", ",", "site", ")", "return", "ret", "for...
List certificate bindings for an IIS site. .. versionadded:: 2016.11.0 Args: site (str): The IIS site name. Returns: dict: A dictionary of the binding names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_bindings site
[ "List", "certificate", "bindings", "for", "an", "IIS", "site", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L787-L819
train
List certificate bindings for an IIS site.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
create_cert_binding
def create_cert_binding(name, site, hostheader='', ipaddress='*', port=443, sslflags=0): ''' Assign a certificate to an IIS Web Binding. .. versionadded:: 2016.11.0 .. note:: The web binding that the certificate is being assigned to must already exist. Arg...
python
def create_cert_binding(name, site, hostheader='', ipaddress='*', port=443, sslflags=0): ''' Assign a certificate to an IIS Web Binding. .. versionadded:: 2016.11.0 .. note:: The web binding that the certificate is being assigned to must already exist. Arg...
[ "def", "create_cert_binding", "(", "name", ",", "site", ",", "hostheader", "=", "''", ",", "ipaddress", "=", "'*'", ",", "port", "=", "443", ",", "sslflags", "=", "0", ")", ":", "name", "=", "six", ".", "text_type", "(", "name", ")", ".", "upper", ...
Assign a certificate to an IIS Web Binding. .. versionadded:: 2016.11.0 .. note:: The web binding that the certificate is being assigned to must already exist. Args: name (str): The thumbprint of the certificate. site (str): The IIS site name. hostheader (str): Th...
[ "Assign", "a", "certificate", "to", "an", "IIS", "Web", "Binding", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L822-L930
train
Create a certificate binding for a given IIS site.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
remove_cert_binding
def remove_cert_binding(name, site, hostheader='', ipaddress='*', port=443): ''' Remove a certificate from an IIS Web Binding. .. versionadded:: 2016.11.0 .. note:: This function only removes the certificate from the web binding. It does not remove the web binding itself. Args: ...
python
def remove_cert_binding(name, site, hostheader='', ipaddress='*', port=443): ''' Remove a certificate from an IIS Web Binding. .. versionadded:: 2016.11.0 .. note:: This function only removes the certificate from the web binding. It does not remove the web binding itself. Args: ...
[ "def", "remove_cert_binding", "(", "name", ",", "site", ",", "hostheader", "=", "''", ",", "ipaddress", "=", "'*'", ",", "port", "=", "443", ")", ":", "name", "=", "six", ".", "text_type", "(", "name", ")", ".", "upper", "(", ")", "binding_info", "="...
Remove a certificate from an IIS Web Binding. .. versionadded:: 2016.11.0 .. note:: This function only removes the certificate from the web binding. It does not remove the web binding itself. Args: name (str): The thumbprint of the certificate. site (str): The IIS site na...
[ "Remove", "a", "certificate", "from", "an", "IIS", "Web", "Binding", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L933-L1002
train
This function removes a certificate from an IIS Web Binding.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
list_apppools
def list_apppools(): ''' List all configured IIS application pools. Returns: dict: A dictionary of IIS application pools and their details. CLI Example: .. code-block:: bash salt '*' win_iis.list_apppools ''' ret = dict() ps_cmd = [] ps_cmd.append(r"Get-ChildItem ...
python
def list_apppools(): ''' List all configured IIS application pools. Returns: dict: A dictionary of IIS application pools and their details. CLI Example: .. code-block:: bash salt '*' win_iis.list_apppools ''' ret = dict() ps_cmd = [] ps_cmd.append(r"Get-ChildItem ...
[ "def", "list_apppools", "(", ")", ":", "ret", "=", "dict", "(", ")", "ps_cmd", "=", "[", "]", "ps_cmd", ".", "append", "(", "r\"Get-ChildItem -Path 'IIS:\\AppPools' | Select-Object Name, State\"", ")", "# Include the equivalent of output from the Applications column, since th...
List all configured IIS application pools. Returns: dict: A dictionary of IIS application pools and their details. CLI Example: .. code-block:: bash salt '*' win_iis.list_apppools
[ "List", "all", "configured", "IIS", "application", "pools", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1005-L1063
train
List all configured IIS application pools.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
create_apppool
def create_apppool(name): ''' Create an IIS application pool. .. note:: This function only validates against the application pool name, and will return True even if the application pool already exists with a different configuration. It will not modify the configuration of an existi...
python
def create_apppool(name): ''' Create an IIS application pool. .. note:: This function only validates against the application pool name, and will return True even if the application pool already exists with a different configuration. It will not modify the configuration of an existi...
[ "def", "create_apppool", "(", "name", ")", ":", "current_apppools", "=", "list_apppools", "(", ")", "apppool_path", "=", "r'IIS:\\AppPools\\{0}'", ".", "format", "(", "name", ")", "if", "name", "in", "current_apppools", ":", "log", ".", "debug", "(", "\"Applic...
Create an IIS application pool. .. note:: This function only validates against the application pool name, and will return True even if the application pool already exists with a different configuration. It will not modify the configuration of an existing application pool. Args...
[ "Create", "an", "IIS", "application", "pool", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1066-L1106
train
Create an IIS application pool.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
stop_apppool
def stop_apppool(name): ''' Stop an IIS application pool. .. versionadded:: 2017.7.0 Args: name (str): The name of the App Pool to stop. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.stop_apppool name='MyTe...
python
def stop_apppool(name): ''' Stop an IIS application pool. .. versionadded:: 2017.7.0 Args: name (str): The name of the App Pool to stop. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.stop_apppool name='MyTe...
[ "def", "stop_apppool", "(", "name", ")", ":", "ps_cmd", "=", "[", "'Stop-WebAppPool'", ",", "r\"'{0}'\"", ".", "format", "(", "name", ")", "]", "cmd_ret", "=", "_srvmgr", "(", "ps_cmd", ")", "return", "cmd_ret", "[", "'retcode'", "]", "==", "0" ]
Stop an IIS application pool. .. versionadded:: 2017.7.0 Args: name (str): The name of the App Pool to stop. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.stop_apppool name='MyTestPool'
[ "Stop", "an", "IIS", "application", "pool", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1145-L1167
train
Stop an IIS application pool.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
start_apppool
def start_apppool(name): ''' Start an IIS application pool. .. versionadded:: 2017.7.0 Args: name (str): The name of the App Pool to start. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.start_apppool name='...
python
def start_apppool(name): ''' Start an IIS application pool. .. versionadded:: 2017.7.0 Args: name (str): The name of the App Pool to start. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.start_apppool name='...
[ "def", "start_apppool", "(", "name", ")", ":", "ps_cmd", "=", "[", "'Start-WebAppPool'", ",", "r\"'{0}'\"", ".", "format", "(", "name", ")", "]", "cmd_ret", "=", "_srvmgr", "(", "ps_cmd", ")", "return", "cmd_ret", "[", "'retcode'", "]", "==", "0" ]
Start an IIS application pool. .. versionadded:: 2017.7.0 Args: name (str): The name of the App Pool to start. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.start_apppool name='MyTestPool'
[ "Start", "an", "IIS", "application", "pool", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1170-L1192
train
Start an IIS application pool.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
restart_apppool
def restart_apppool(name): ''' Restart an IIS application pool. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS application pool. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.restart_appp...
python
def restart_apppool(name): ''' Restart an IIS application pool. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS application pool. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.restart_appp...
[ "def", "restart_apppool", "(", "name", ")", ":", "ps_cmd", "=", "[", "'Restart-WebAppPool'", ",", "r\"'{0}'\"", ".", "format", "(", "name", ")", "]", "cmd_ret", "=", "_srvmgr", "(", "ps_cmd", ")", "return", "cmd_ret", "[", "'retcode'", "]", "==", "0" ]
Restart an IIS application pool. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS application pool. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.restart_apppool name='MyTestPool'
[ "Restart", "an", "IIS", "application", "pool", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1195-L1217
train
Restart an IIS application pool.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
get_container_setting
def get_container_setting(name, container, settings): ''' Get the value of the setting for the IIS container. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS container. container (str): The type of IIS container. The container types are: AppPools, Sites, S...
python
def get_container_setting(name, container, settings): ''' Get the value of the setting for the IIS container. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS container. container (str): The type of IIS container. The container types are: AppPools, Sites, S...
[ "def", "get_container_setting", "(", "name", ",", "container", ",", "settings", ")", ":", "ret", "=", "dict", "(", ")", "ps_cmd", "=", "list", "(", ")", "ps_cmd_validate", "=", "list", "(", ")", "container_path", "=", "r\"IIS:\\{0}\\{1}\"", ".", "format", ...
Get the value of the setting for the IIS container. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS container. container (str): The type of IIS container. The container types are: AppPools, Sites, SslBindings settings (dict): A dictionary of the setting na...
[ "Get", "the", "value", "of", "the", "setting", "for", "the", "IIS", "container", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1220-L1294
train
Get the value of the setting for the specified container.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
set_container_setting
def set_container_setting(name, container, settings): ''' Set the value of the setting for an IIS container. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS container. container (str): The type of IIS container. The container types are: AppPools, Sites, Ss...
python
def set_container_setting(name, container, settings): ''' Set the value of the setting for an IIS container. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS container. container (str): The type of IIS container. The container types are: AppPools, Sites, Ss...
[ "def", "set_container_setting", "(", "name", ",", "container", ",", "settings", ")", ":", "identityType_map2string", "=", "{", "'0'", ":", "'LocalSystem'", ",", "'1'", ":", "'LocalService'", ",", "'2'", ":", "'NetworkService'", ",", "'3'", ":", "'SpecificUser'",...
Set the value of the setting for an IIS container. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS container. container (str): The type of IIS container. The container types are: AppPools, Sites, SslBindings settings (dict): A dictionary of the setting nam...
[ "Set", "the", "value", "of", "the", "setting", "for", "an", "IIS", "container", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1297-L1383
train
Set the value of the setting for an IIS container.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
list_apps
def list_apps(site): ''' Get all configured IIS applications for the specified site. Args: site (str): The IIS site name. Returns: A dictionary of the application names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_apps site ''' ret = dict()...
python
def list_apps(site): ''' Get all configured IIS applications for the specified site. Args: site (str): The IIS site name. Returns: A dictionary of the application names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_apps site ''' ret = dict()...
[ "def", "list_apps", "(", "site", ")", ":", "ret", "=", "dict", "(", ")", "ps_cmd", "=", "list", "(", ")", "ps_cmd", ".", "append", "(", "\"Get-WebApplication -Site '{0}'\"", ".", "format", "(", "site", ")", ")", "ps_cmd", ".", "append", "(", "r\"| Select...
Get all configured IIS applications for the specified site. Args: site (str): The IIS site name. Returns: A dictionary of the application names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_apps site
[ "Get", "all", "configured", "IIS", "applications", "for", "the", "specified", "site", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1386-L1438
train
List all IIS applications for the specified IIS site.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
create_app
def create_app(name, site, sourcepath, apppool=None): ''' Create an IIS application. .. note:: This function only validates against the application name, and will return True even if the application already exists with a different configuration. It will not modify the configuration...
python
def create_app(name, site, sourcepath, apppool=None): ''' Create an IIS application. .. note:: This function only validates against the application name, and will return True even if the application already exists with a different configuration. It will not modify the configuration...
[ "def", "create_app", "(", "name", ",", "site", ",", "sourcepath", ",", "apppool", "=", "None", ")", ":", "current_apps", "=", "list_apps", "(", "site", ")", "if", "name", "in", "current_apps", ":", "log", ".", "debug", "(", "'Application already present: %s'...
Create an IIS application. .. note:: This function only validates against the application name, and will return True even if the application already exists with a different configuration. It will not modify the configuration of an existing application. Args: name (str)...
[ "Create", "an", "IIS", "application", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1441-L1500
train
Create an IIS application.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
remove_app
def remove_app(name, site): ''' Remove an IIS application. Args: name (str): The application name. site (str): The IIS site name. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.remove_app name='app0' site...
python
def remove_app(name, site): ''' Remove an IIS application. Args: name (str): The application name. site (str): The IIS site name. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.remove_app name='app0' site...
[ "def", "remove_app", "(", "name", ",", "site", ")", ":", "current_apps", "=", "list_apps", "(", "site", ")", "if", "name", "not", "in", "current_apps", ":", "log", ".", "debug", "(", "'Application already absent: %s'", ",", "name", ")", "return", "True", "...
Remove an IIS application. Args: name (str): The application name. site (str): The IIS site name. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.remove_app name='app0' site='site0'
[ "Remove", "an", "IIS", "application", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1503-L1544
train
Remove an IIS application from the IIS system.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
list_vdirs
def list_vdirs(site, app=_DEFAULT_APP): ''' Get all configured IIS virtual directories for the specified site, or for the combination of site and application. Args: site (str): The IIS site name. app (str): The IIS application. Returns: dict: A dictionary of the virtual dir...
python
def list_vdirs(site, app=_DEFAULT_APP): ''' Get all configured IIS virtual directories for the specified site, or for the combination of site and application. Args: site (str): The IIS site name. app (str): The IIS application. Returns: dict: A dictionary of the virtual dir...
[ "def", "list_vdirs", "(", "site", ",", "app", "=", "_DEFAULT_APP", ")", ":", "ret", "=", "dict", "(", ")", "ps_cmd", "=", "[", "'Get-WebVirtualDirectory'", ",", "'-Site'", ",", "r\"'{0}'\"", ".", "format", "(", "site", ")", ",", "'-Application'", ",", "r...
Get all configured IIS virtual directories for the specified site, or for the combination of site and application. Args: site (str): The IIS site name. app (str): The IIS application. Returns: dict: A dictionary of the virtual directory names and properties. CLI Example: ...
[ "Get", "all", "configured", "IIS", "virtual", "directories", "for", "the", "specified", "site", "or", "for", "the", "combination", "of", "site", "and", "application", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1547-L1586
train
Get all configured IIS virtual directories for the specified site or for the specified application.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
create_vdir
def create_vdir(name, site, sourcepath, app=_DEFAULT_APP): ''' Create an IIS virtual directory. .. note:: This function only validates against the virtual directory name, and will return True even if the virtual directory already exists with a different configuration. It will not m...
python
def create_vdir(name, site, sourcepath, app=_DEFAULT_APP): ''' Create an IIS virtual directory. .. note:: This function only validates against the virtual directory name, and will return True even if the virtual directory already exists with a different configuration. It will not m...
[ "def", "create_vdir", "(", "name", ",", "site", ",", "sourcepath", ",", "app", "=", "_DEFAULT_APP", ")", ":", "current_vdirs", "=", "list_vdirs", "(", "site", ",", "app", ")", "if", "name", "in", "current_vdirs", ":", "log", ".", "debug", "(", "'Virtual ...
Create an IIS virtual directory. .. note:: This function only validates against the virtual directory name, and will return True even if the virtual directory already exists with a different configuration. It will not modify the configuration of an existing virtual directory. ...
[ "Create", "an", "IIS", "virtual", "directory", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1589-L1648
train
Create an IIS virtual directory.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
remove_vdir
def remove_vdir(name, site, app=_DEFAULT_APP): ''' Remove an IIS virtual directory. Args: name (str): The virtual directory name. site (str): The IIS site name. app (str): The IIS application. Returns: bool: True if successful, otherwise False CLI Example: .. ...
python
def remove_vdir(name, site, app=_DEFAULT_APP): ''' Remove an IIS virtual directory. Args: name (str): The virtual directory name. site (str): The IIS site name. app (str): The IIS application. Returns: bool: True if successful, otherwise False CLI Example: .. ...
[ "def", "remove_vdir", "(", "name", ",", "site", ",", "app", "=", "_DEFAULT_APP", ")", ":", "current_vdirs", "=", "list_vdirs", "(", "site", ",", "app", ")", "app_path", "=", "os", ".", "path", ".", "join", "(", "*", "app", ".", "rstrip", "(", "'/'", ...
Remove an IIS virtual directory. Args: name (str): The virtual directory name. site (str): The IIS site name. app (str): The IIS application. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.remove_vdir nam...
[ "Remove", "an", "IIS", "virtual", "directory", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1651-L1701
train
Remove an IIS virtual directory.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
create_backup
def create_backup(name): r''' Backup an IIS Configuration on the System. .. versionadded:: 2017.7.0 .. note:: Backups are stored in the ``$env:Windir\System32\inetsrv\backup`` folder. Args: name (str): The name to give the backup Returns: bool: True if success...
python
def create_backup(name): r''' Backup an IIS Configuration on the System. .. versionadded:: 2017.7.0 .. note:: Backups are stored in the ``$env:Windir\System32\inetsrv\backup`` folder. Args: name (str): The name to give the backup Returns: bool: True if success...
[ "def", "create_backup", "(", "name", ")", ":", "if", "name", "in", "list_backups", "(", ")", ":", "raise", "CommandExecutionError", "(", "'Backup already present: {0}'", ".", "format", "(", "name", ")", ")", "ps_cmd", "=", "[", "'Backup-WebConfiguration'", ",", ...
r''' Backup an IIS Configuration on the System. .. versionadded:: 2017.7.0 .. note:: Backups are stored in the ``$env:Windir\System32\inetsrv\backup`` folder. Args: name (str): The name to give the backup Returns: bool: True if successful, otherwise False CLI...
[ "r", "Backup", "an", "IIS", "Configuration", "on", "the", "System", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1749-L1784
train
r Creates a backup of an IIS Configuration on the System.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
remove_backup
def remove_backup(name): ''' Remove an IIS Configuration backup from the System. .. versionadded:: 2017.7.0 Args: name (str): The name of the backup to remove Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.r...
python
def remove_backup(name): ''' Remove an IIS Configuration backup from the System. .. versionadded:: 2017.7.0 Args: name (str): The name of the backup to remove Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.r...
[ "def", "remove_backup", "(", "name", ")", ":", "if", "name", "not", "in", "list_backups", "(", ")", ":", "log", ".", "debug", "(", "'Backup already removed: %s'", ",", "name", ")", "return", "True", "ps_cmd", "=", "[", "'Remove-WebConfigurationBackup'", ",", ...
Remove an IIS Configuration backup from the System. .. versionadded:: 2017.7.0 Args: name (str): The name of the backup to remove Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.remove_backup backup_20170209
[ "Remove", "an", "IIS", "Configuration", "backup", "from", "the", "System", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1787-L1819
train
Remove an IIS Configuration backup from the System.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
list_worker_processes
def list_worker_processes(apppool): ''' Returns a list of worker processes that correspond to the passed application pool. .. versionadded:: 2017.7.0 Args: apppool (str): The application pool to query Returns: dict: A dictionary of worker processes with their process IDs ...
python
def list_worker_processes(apppool): ''' Returns a list of worker processes that correspond to the passed application pool. .. versionadded:: 2017.7.0 Args: apppool (str): The application pool to query Returns: dict: A dictionary of worker processes with their process IDs ...
[ "def", "list_worker_processes", "(", "apppool", ")", ":", "ps_cmd", "=", "[", "'Get-ChildItem'", ",", "r\"'IIS:\\AppPools\\{0}\\WorkerProcesses'\"", ".", "format", "(", "apppool", ")", "]", "cmd_ret", "=", "_srvmgr", "(", "cmd", "=", "ps_cmd", ",", "return_json", ...
Returns a list of worker processes that correspond to the passed application pool. .. versionadded:: 2017.7.0 Args: apppool (str): The application pool to query Returns: dict: A dictionary of worker processes with their process IDs CLI Example: .. code-block:: bash ...
[ "Returns", "a", "list", "of", "worker", "processes", "that", "correspond", "to", "the", "passed", "application", "pool", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1822-L1858
train
Return a list of worker processes that correspond to the passed application pool.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
get_webapp_settings
def get_webapp_settings(name, site, settings): r''' .. versionadded:: 2017.7.0 Get the value of the setting for the IIS web application. .. note:: Params are case sensitive :param str name: The name of the IIS web application. :param str site: The site name contains the web applicatio...
python
def get_webapp_settings(name, site, settings): r''' .. versionadded:: 2017.7.0 Get the value of the setting for the IIS web application. .. note:: Params are case sensitive :param str name: The name of the IIS web application. :param str site: The site name contains the web applicatio...
[ "def", "get_webapp_settings", "(", "name", ",", "site", ",", "settings", ")", ":", "ret", "=", "dict", "(", ")", "pscmd", "=", "list", "(", ")", "availableSettings", "=", "(", "'physicalPath'", ",", "'applicationPool'", ",", "'userName'", ",", "'password'", ...
r''' .. versionadded:: 2017.7.0 Get the value of the setting for the IIS web application. .. note:: Params are case sensitive :param str name: The name of the IIS web application. :param str site: The site name contains the web application. Example: Default Web Site :param str...
[ "r", "..", "versionadded", "::", "2017", ".", "7", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1861-L1934
train
r Get the value of the setting for the specified IIS web application.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
set_webapp_settings
def set_webapp_settings(name, site, settings): r''' .. versionadded:: 2017.7.0 Configure an IIS application. .. note:: This function only configures an existing app. Params are case sensitive. :param str name: The IIS application. :param str site: The IIS site name. :param...
python
def set_webapp_settings(name, site, settings): r''' .. versionadded:: 2017.7.0 Configure an IIS application. .. note:: This function only configures an existing app. Params are case sensitive. :param str name: The IIS application. :param str site: The IIS site name. :param...
[ "def", "set_webapp_settings", "(", "name", ",", "site", ",", "settings", ")", ":", "pscmd", "=", "list", "(", ")", "current_apps", "=", "list_apps", "(", "site", ")", "current_sites", "=", "list_sites", "(", ")", "availableSettings", "=", "(", "'physicalPath...
r''' .. versionadded:: 2017.7.0 Configure an IIS application. .. note:: This function only configures an existing app. Params are case sensitive. :param str name: The IIS application. :param str site: The IIS site name. :param str settings: A dictionary of the setting names an...
[ "r", "..", "versionadded", "::", "2017", ".", "7", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1937-L2042
train
r Configure an IIS application for a particular site.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
get_webconfiguration_settings
def get_webconfiguration_settings(name, settings, location=''): r''' Get the webconfiguration settings for the IIS PSPath. Args: name (str): The PSPath of the IIS webconfiguration settings. settings (list): A list of dictionaries containing setting name and filter. location (str): T...
python
def get_webconfiguration_settings(name, settings, location=''): r''' Get the webconfiguration settings for the IIS PSPath. Args: name (str): The PSPath of the IIS webconfiguration settings. settings (list): A list of dictionaries containing setting name and filter. location (str): T...
[ "def", "get_webconfiguration_settings", "(", "name", ",", "settings", ",", "location", "=", "''", ")", ":", "ret", "=", "{", "}", "ps_cmd", "=", "[", "]", "ps_cmd_validate", "=", "[", "]", "if", "not", "settings", ":", "log", ".", "warning", "(", "'No ...
r''' Get the webconfiguration settings for the IIS PSPath. Args: name (str): The PSPath of the IIS webconfiguration settings. settings (list): A list of dictionaries containing setting name and filter. location (str): The location of the settings (optional) Returns: dict: A...
[ "r", "Get", "the", "webconfiguration", "settings", "for", "the", "IIS", "PSPath", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L2045-L2122
train
r Returns the webconfiguration settings for the IIS PSPath.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_iis.py
set_webconfiguration_settings
def set_webconfiguration_settings(name, settings, location=''): r''' Set the value of the setting for an IIS container. Args: name (str): The PSPath of the IIS webconfiguration settings. settings (list): A list of dictionaries containing setting name, filter and value. location (str...
python
def set_webconfiguration_settings(name, settings, location=''): r''' Set the value of the setting for an IIS container. Args: name (str): The PSPath of the IIS webconfiguration settings. settings (list): A list of dictionaries containing setting name, filter and value. location (str...
[ "def", "set_webconfiguration_settings", "(", "name", ",", "settings", ",", "location", "=", "''", ")", ":", "ps_cmd", "=", "[", "]", "if", "not", "settings", ":", "log", ".", "warning", "(", "'No settings provided'", ")", "return", "False", "settings", "=", ...
r''' Set the value of the setting for an IIS container. Args: name (str): The PSPath of the IIS webconfiguration settings. settings (list): A list of dictionaries containing setting name, filter and value. location (str): The location of the settings (optional) Returns: boo...
[ "r", "Set", "the", "value", "of", "the", "setting", "for", "an", "IIS", "container", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L2125-L2214
train
r Sets the value of the webconfiguration settings for an IIS container.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/ddns.py
create
def create(zone, name, ttl, rdtype, data, keyname, keyfile, nameserver, timeout, port=53, keyalgorithm='hmac-md5'): ''' Create a DNS record. The nameserver must be an IP address and the master running this runner must have create privileges on that server. CLI Example: .. code-block:: b...
python
def create(zone, name, ttl, rdtype, data, keyname, keyfile, nameserver, timeout, port=53, keyalgorithm='hmac-md5'): ''' Create a DNS record. The nameserver must be an IP address and the master running this runner must have create privileges on that server. CLI Example: .. code-block:: b...
[ "def", "create", "(", "zone", ",", "name", ",", "ttl", ",", "rdtype", ",", "data", ",", "keyname", ",", "keyfile", ",", "nameserver", ",", "timeout", ",", "port", "=", "53", ",", "keyalgorithm", "=", "'hmac-md5'", ")", ":", "if", "zone", "in", "name"...
Create a DNS record. The nameserver must be an IP address and the master running this runner must have create privileges on that server. CLI Example: .. code-block:: bash salt-run ddns.create domain.com my-test-vm 3600 A 10.20.30.40 my-tsig-key /etc/salt/tsig.keyring 10.0.0.1 5
[ "Create", "a", "DNS", "record", ".", "The", "nameserver", "must", "be", "an", "IP", "address", "and", "the", "master", "running", "this", "runner", "must", "have", "create", "privileges", "on", "that", "server", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/ddns.py#L56-L91
train
Create a DNS record.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/ddns.py
add_host
def add_host(zone, name, ttl, ip, keyname, keyfile, nameserver, timeout, port=53, keyalgorithm='hmac-md5'): ''' Create both A and PTR (reverse) records for a host. CLI Example: .. code-block:: bash salt-run ddns.add_host domain.com my-test-vm 3600 10.20.30.40 my-tsig-key /etc/sal...
python
def add_host(zone, name, ttl, ip, keyname, keyfile, nameserver, timeout, port=53, keyalgorithm='hmac-md5'): ''' Create both A and PTR (reverse) records for a host. CLI Example: .. code-block:: bash salt-run ddns.add_host domain.com my-test-vm 3600 10.20.30.40 my-tsig-key /etc/sal...
[ "def", "add_host", "(", "zone", ",", "name", ",", "ttl", ",", "ip", ",", "keyname", ",", "keyfile", ",", "nameserver", ",", "timeout", ",", "port", "=", "53", ",", "keyalgorithm", "=", "'hmac-md5'", ")", ":", "res", "=", "[", "]", "if", "zone", "in...
Create both A and PTR (reverse) records for a host. CLI Example: .. code-block:: bash salt-run ddns.add_host domain.com my-test-vm 3600 10.20.30.40 my-tsig-key /etc/salt/tsig.keyring 10.0.0.1 5
[ "Create", "both", "A", "and", "PTR", "(", "reverse", ")", "records", "for", "a", "host", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/ddns.py#L187-L229
train
Create both A and PTR records for a host.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/ddns.py
delete_host
def delete_host(zone, name, keyname, keyfile, nameserver, timeout, port=53, keyalgorithm='hmac-md5'): ''' Delete both forward (A) and reverse (PTR) records for a host only if the forward (A) record exists. CLI Example: .. code-block:: bash salt-run ddns.delete_host domain....
python
def delete_host(zone, name, keyname, keyfile, nameserver, timeout, port=53, keyalgorithm='hmac-md5'): ''' Delete both forward (A) and reverse (PTR) records for a host only if the forward (A) record exists. CLI Example: .. code-block:: bash salt-run ddns.delete_host domain....
[ "def", "delete_host", "(", "zone", ",", "name", ",", "keyname", ",", "keyfile", ",", "nameserver", ",", "timeout", ",", "port", "=", "53", ",", "keyalgorithm", "=", "'hmac-md5'", ")", ":", "res", "=", "[", "]", "if", "zone", "in", "name", ":", "name"...
Delete both forward (A) and reverse (PTR) records for a host only if the forward (A) record exists. CLI Example: .. code-block:: bash salt-run ddns.delete_host domain.com my-test-vm my-tsig-key /etc/salt/tsig.keyring 10.0.0.1 5
[ "Delete", "both", "forward", "(", "A", ")", "and", "reverse", "(", "PTR", ")", "records", "for", "a", "host", "only", "if", "the", "forward", "(", "A", ")", "record", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/ddns.py#L232-L282
train
Delete a host from the specified DNS server.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...