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/modules/system.py
set_system_date_time
def set_system_date_time(years=None, months=None, days=None, hours=None, minutes=None, seconds=None, utc_offset=None): ''' Set the system date and time. Each argu...
python
def set_system_date_time(years=None, months=None, days=None, hours=None, minutes=None, seconds=None, utc_offset=None): ''' Set the system date and time. Each argu...
[ "def", "set_system_date_time", "(", "years", "=", "None", ",", "months", "=", "None", ",", "days", "=", "None", ",", "hours", "=", "None", ",", "minutes", "=", "None", ",", "seconds", "=", "None", ",", "utc_offset", "=", "None", ")", ":", "# Get the cu...
Set the system date and time. Each argument is an element of the date, but not required. If an element is not passed, the current system value for that element will be used. For example, if you don't pass the year, the current system year will be used. (Used by set_system_date and set_system_time) ...
[ "Set", "the", "system", "date", "and", "time", ".", "Each", "argument", "is", "an", "element", "of", "the", "date", "but", "not", "required", ".", "If", "an", "element", "is", "not", "passed", "the", "current", "system", "value", "for", "that", "element"...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/system.py#L337-L405
train
Sets the system date and time for the given set of values.
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/system.py
get_computer_desc
def get_computer_desc(): ''' Get PRETTY_HOSTNAME value stored in /etc/machine-info If this file doesn't exist or the variable doesn't exist return False. :return: Value of PRETTY_HOSTNAME if this does not exist False. :rtype: str CLI Example: .. code-block:: bash salt '*' sys...
python
def get_computer_desc(): ''' Get PRETTY_HOSTNAME value stored in /etc/machine-info If this file doesn't exist or the variable doesn't exist return False. :return: Value of PRETTY_HOSTNAME if this does not exist False. :rtype: str CLI Example: .. code-block:: bash salt '*' sys...
[ "def", "get_computer_desc", "(", ")", ":", "hostname_cmd", "=", "salt", ".", "utils", ".", "path", ".", "which", "(", "'hostnamectl'", ")", "if", "hostname_cmd", ":", "desc", "=", "__salt__", "[", "'cmd.run'", "]", "(", "[", "hostname_cmd", ",", "'status'"...
Get PRETTY_HOSTNAME value stored in /etc/machine-info If this file doesn't exist or the variable doesn't exist return False. :return: Value of PRETTY_HOSTNAME if this does not exist False. :rtype: str CLI Example: .. code-block:: bash salt '*' system.get_computer_desc
[ "Get", "PRETTY_HOSTNAME", "value", "stored", "in", "/", "etc", "/", "machine", "-", "info", "If", "this", "file", "doesn", "t", "exist", "or", "the", "variable", "doesn", "t", "exist", "return", "False", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/system.py#L496-L535
train
Return the value stored in the NIC_NAME 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/system.py
set_computer_desc
def set_computer_desc(desc): ''' Set PRETTY_HOSTNAME value stored in /etc/machine-info This will create the file if it does not exist. If it is unable to create or modify this file returns False. :param str desc: The computer description :return: False on failure. True if successful. CLI E...
python
def set_computer_desc(desc): ''' Set PRETTY_HOSTNAME value stored in /etc/machine-info This will create the file if it does not exist. If it is unable to create or modify this file returns False. :param str desc: The computer description :return: False on failure. True if successful. CLI E...
[ "def", "set_computer_desc", "(", "desc", ")", ":", "desc", "=", "salt", ".", "utils", ".", "stringutils", ".", "to_unicode", "(", "desc", ")", ".", "replace", "(", "'\"'", ",", "r'\\\"'", ")", ".", "replace", "(", "'\\n'", ",", "r'\\n'", ")", ".", "r...
Set PRETTY_HOSTNAME value stored in /etc/machine-info This will create the file if it does not exist. If it is unable to create or modify this file returns False. :param str desc: The computer description :return: False on failure. True if successful. CLI Example: .. code-block:: bash ...
[ "Set", "PRETTY_HOSTNAME", "value", "stored", "in", "/", "etc", "/", "machine", "-", "info", "This", "will", "create", "the", "file", "if", "it", "does", "not", "exist", ".", "If", "it", "is", "unable", "to", "create", "or", "modify", "this", "file", "r...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/system.py#L538-L586
train
Sets the computer description in the neccesary way.
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/system.py
set_reboot_required_witnessed
def set_reboot_required_witnessed(): ''' This function is used to remember that an event indicating that a reboot is required was witnessed. This function writes to a temporary filesystem so the event gets cleared upon reboot. Returns: bool: ``True`` if successful, otherwise ``False`` ...
python
def set_reboot_required_witnessed(): ''' This function is used to remember that an event indicating that a reboot is required was witnessed. This function writes to a temporary filesystem so the event gets cleared upon reboot. Returns: bool: ``True`` if successful, otherwise ``False`` ...
[ "def", "set_reboot_required_witnessed", "(", ")", ":", "errcode", "=", "-", "1", "dir_path", "=", "os", ".", "path", ".", "dirname", "(", "NILRT_REBOOT_WITNESS_PATH", ")", "if", "not", "os", ".", "path", ".", "exists", "(", "dir_path", ")", ":", "try", "...
This function is used to remember that an event indicating that a reboot is required was witnessed. This function writes to a temporary filesystem so the event gets cleared upon reboot. Returns: bool: ``True`` if successful, otherwise ``False`` .. code-block:: bash salt '*' system.set...
[ "This", "function", "is", "used", "to", "remember", "that", "an", "event", "indicating", "that", "a", "reboot", "is", "required", "was", "witnessed", ".", "This", "function", "writes", "to", "a", "temporary", "filesystem", "so", "the", "event", "gets", "clea...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/system.py#L626-L651
train
This function sets the reboot required to witnessed state.
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/transport/ipc.py
IPCServer.handle_stream
def handle_stream(self, stream): ''' Override this to handle the streams as they arrive :param IOStream stream: An IOStream for processing See https://tornado.readthedocs.io/en/latest/iostream.html#tornado.iostream.IOStream for additional details. ''' @tornado.g...
python
def handle_stream(self, stream): ''' Override this to handle the streams as they arrive :param IOStream stream: An IOStream for processing See https://tornado.readthedocs.io/en/latest/iostream.html#tornado.iostream.IOStream for additional details. ''' @tornado.g...
[ "def", "handle_stream", "(", "self", ",", "stream", ")", ":", "@", "tornado", ".", "gen", ".", "coroutine", "def", "_null", "(", "msg", ")", ":", "raise", "tornado", ".", "gen", ".", "Return", "(", "None", ")", "def", "write_callback", "(", "stream", ...
Override this to handle the streams as they arrive :param IOStream stream: An IOStream for processing See https://tornado.readthedocs.io/en/latest/iostream.html#tornado.iostream.IOStream for additional details.
[ "Override", "this", "to", "handle", "the", "streams", "as", "they", "arrive" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/transport/ipc.py#L150-L202
train
Handle the given stream and yield the messages that are available to the 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/transport/ipc.py
IPCServer.close
def close(self): ''' Routines to handle any cleanup before the instance shuts down. Sockets and filehandles should be closed explicitly, to prevent leaks. ''' if self._closing: return self._closing = True if hasattr(self.sock, 'close'): ...
python
def close(self): ''' Routines to handle any cleanup before the instance shuts down. Sockets and filehandles should be closed explicitly, to prevent leaks. ''' if self._closing: return self._closing = True if hasattr(self.sock, 'close'): ...
[ "def", "close", "(", "self", ")", ":", "if", "self", ".", "_closing", ":", "return", "self", ".", "_closing", "=", "True", "if", "hasattr", "(", "self", ".", "sock", ",", "'close'", ")", ":", "self", ".", "sock", ".", "close", "(", ")" ]
Routines to handle any cleanup before the instance shuts down. Sockets and filehandles should be closed explicitly, to prevent leaks.
[ "Routines", "to", "handle", "any", "cleanup", "before", "the", "instance", "shuts", "down", ".", "Sockets", "and", "filehandles", "should", "be", "closed", "explicitly", "to", "prevent", "leaks", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/transport/ipc.py#L216-L226
train
Closes the underlying socket and filehandles.
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/transport/ipc.py
IPCClient.connect
def connect(self, callback=None, timeout=None): ''' Connect to the IPC socket ''' if hasattr(self, '_connecting_future') and not self._connecting_future.done(): # pylint: disable=E0203 future = self._connecting_future # pylint: disable=E0203 else: if has...
python
def connect(self, callback=None, timeout=None): ''' Connect to the IPC socket ''' if hasattr(self, '_connecting_future') and not self._connecting_future.done(): # pylint: disable=E0203 future = self._connecting_future # pylint: disable=E0203 else: if has...
[ "def", "connect", "(", "self", ",", "callback", "=", "None", ",", "timeout", "=", "None", ")", ":", "if", "hasattr", "(", "self", ",", "'_connecting_future'", ")", "and", "not", "self", ".", "_connecting_future", ".", "done", "(", ")", ":", "# pylint: di...
Connect to the IPC socket
[ "Connect", "to", "the", "IPC", "socket" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/transport/ipc.py#L308-L328
train
Connect to the IPC socket and return a future that will be returned when the socket is ready.
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/transport/ipc.py
IPCClient._connect
def _connect(self, timeout=None): ''' Connect to a running IPCServer ''' if isinstance(self.socket_path, int): sock_type = socket.AF_INET sock_addr = ('127.0.0.1', self.socket_path) else: sock_type = socket.AF_UNIX sock_addr = self....
python
def _connect(self, timeout=None): ''' Connect to a running IPCServer ''' if isinstance(self.socket_path, int): sock_type = socket.AF_INET sock_addr = ('127.0.0.1', self.socket_path) else: sock_type = socket.AF_UNIX sock_addr = self....
[ "def", "_connect", "(", "self", ",", "timeout", "=", "None", ")", ":", "if", "isinstance", "(", "self", ".", "socket_path", ",", "int", ")", ":", "sock_type", "=", "socket", ".", "AF_INET", "sock_addr", "=", "(", "'127.0.0.1'", ",", "self", ".", "socke...
Connect to a running IPCServer
[ "Connect", "to", "a", "running", "IPCServer" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/transport/ipc.py#L331-L372
train
Connect to a running IPCServer and return a tornado. Future that fires when the connection is complete.
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/transport/ipc.py
IPCClient.close
def close(self): ''' Routines to handle any cleanup before the instance shuts down. Sockets and filehandles should be closed explicitly, to prevent leaks. ''' if self._closing: return if self._refcount > 1: # Decrease refcount ...
python
def close(self): ''' Routines to handle any cleanup before the instance shuts down. Sockets and filehandles should be closed explicitly, to prevent leaks. ''' if self._closing: return if self._refcount > 1: # Decrease refcount ...
[ "def", "close", "(", "self", ")", ":", "if", "self", ".", "_closing", ":", "return", "if", "self", ".", "_refcount", ">", "1", ":", "# Decrease refcount", "with", "self", ".", "_refcount_lock", ":", "self", ".", "_refcount", "-=", "1", "log", ".", "deb...
Routines to handle any cleanup before the instance shuts down. Sockets and filehandles should be closed explicitly, to prevent leaks.
[ "Routines", "to", "handle", "any", "cleanup", "before", "the", "instance", "shuts", "down", ".", "Sockets", "and", "filehandles", "should", "be", "closed", "explicitly", "to", "prevent", "leaks", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/transport/ipc.py#L391-L426
train
Closes the current instance.
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/transport/ipc.py
IPCMessageClient.send
def send(self, msg, timeout=None, tries=None): ''' Send a message to an IPC socket If the socket is not currently connected, a connection will be established. :param dict msg: The message to be sent :param int timeout: Timeout when sending message (Currently unimplemented) ...
python
def send(self, msg, timeout=None, tries=None): ''' Send a message to an IPC socket If the socket is not currently connected, a connection will be established. :param dict msg: The message to be sent :param int timeout: Timeout when sending message (Currently unimplemented) ...
[ "def", "send", "(", "self", ",", "msg", ",", "timeout", "=", "None", ",", "tries", "=", "None", ")", ":", "if", "not", "self", ".", "connected", "(", ")", ":", "yield", "self", ".", "connect", "(", ")", "pack", "=", "salt", ".", "transport", ".",...
Send a message to an IPC socket If the socket is not currently connected, a connection will be established. :param dict msg: The message to be sent :param int timeout: Timeout when sending message (Currently unimplemented)
[ "Send", "a", "message", "to", "an", "IPC", "socket" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/transport/ipc.py#L462-L474
train
Send a message to an IPC socket.
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/transport/ipc.py
IPCMessagePublisher.start
def start(self): ''' Perform the work necessary to start up a Tornado IPC server Blocks until socket is established ''' # Start up the ioloop log.trace('IPCMessagePublisher: binding to socket: %s', self.socket_path) if isinstance(self.socket_path, int): ...
python
def start(self): ''' Perform the work necessary to start up a Tornado IPC server Blocks until socket is established ''' # Start up the ioloop log.trace('IPCMessagePublisher: binding to socket: %s', self.socket_path) if isinstance(self.socket_path, int): ...
[ "def", "start", "(", "self", ")", ":", "# Start up the ioloop", "log", ".", "trace", "(", "'IPCMessagePublisher: binding to socket: %s'", ",", "self", ".", "socket_path", ")", "if", "isinstance", "(", "self", ".", "socket_path", ",", "int", ")", ":", "self", "...
Perform the work necessary to start up a Tornado IPC server Blocks until socket is established
[ "Perform", "the", "work", "necessary", "to", "start", "up", "a", "Tornado", "IPC", "server" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/transport/ipc.py#L540-L568
train
Start up the Tornado IPC 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...
saltstack/salt
salt/transport/ipc.py
IPCMessagePublisher.publish
def publish(self, msg): ''' Send message to all connected sockets ''' if not self.streams: return pack = salt.transport.frame.frame_msg_ipc(msg, raw_body=True) for stream in self.streams: self.io_loop.spawn_callback(self._write, stream, pack)
python
def publish(self, msg): ''' Send message to all connected sockets ''' if not self.streams: return pack = salt.transport.frame.frame_msg_ipc(msg, raw_body=True) for stream in self.streams: self.io_loop.spawn_callback(self._write, stream, pack)
[ "def", "publish", "(", "self", ",", "msg", ")", ":", "if", "not", "self", ".", "streams", ":", "return", "pack", "=", "salt", ".", "transport", ".", "frame", ".", "frame_msg_ipc", "(", "msg", ",", "raw_body", "=", "True", ")", "for", "stream", "in", ...
Send message to all connected sockets
[ "Send", "message", "to", "all", "connected", "sockets" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/transport/ipc.py#L583-L593
train
Send message to all connected sockets
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/transport/ipc.py
IPCMessagePublisher.close
def close(self): ''' Routines to handle any cleanup before the instance shuts down. Sockets and filehandles should be closed explicitly, to prevent leaks. ''' if self._closing: return self._closing = True for stream in self.streams: ...
python
def close(self): ''' Routines to handle any cleanup before the instance shuts down. Sockets and filehandles should be closed explicitly, to prevent leaks. ''' if self._closing: return self._closing = True for stream in self.streams: ...
[ "def", "close", "(", "self", ")", ":", "if", "self", ".", "_closing", ":", "return", "self", ".", "_closing", "=", "True", "for", "stream", "in", "self", ".", "streams", ":", "stream", ".", "close", "(", ")", "self", ".", "streams", ".", "clear", "...
Routines to handle any cleanup before the instance shuts down. Sockets and filehandles should be closed explicitly, to prevent leaks.
[ "Routines", "to", "handle", "any", "cleanup", "before", "the", "instance", "shuts", "down", ".", "Sockets", "and", "filehandles", "should", "be", "closed", "explicitly", "to", "prevent", "leaks", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/transport/ipc.py#L616-L629
train
Closes the underlying socket and filehandles.
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/transport/ipc.py
IPCMessageSubscriber.read_sync
def read_sync(self, timeout=None): ''' Read a message from an IPC socket The socket must already be connected. The associated IO Loop must NOT be running. :param int timeout: Timeout when receiving message :return: message data if successful. None if timed out. Will rais...
python
def read_sync(self, timeout=None): ''' Read a message from an IPC socket The socket must already be connected. The associated IO Loop must NOT be running. :param int timeout: Timeout when receiving message :return: message data if successful. None if timed out. Will rais...
[ "def", "read_sync", "(", "self", ",", "timeout", "=", "None", ")", ":", "if", "self", ".", "saved_data", ":", "return", "self", ".", "saved_data", ".", "pop", "(", "0", ")", "self", ".", "_sync_ioloop_running", "=", "True", "self", ".", "_read_sync_futur...
Read a message from an IPC socket The socket must already be connected. The associated IO Loop must NOT be running. :param int timeout: Timeout when receiving message :return: message data if successful. None if timed out. Will raise an exception for all other error con...
[ "Read", "a", "message", "from", "an", "IPC", "socket" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/transport/ipc.py#L743-L763
train
Read a message from an IPC socket and return it.
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/transport/ipc.py
IPCMessageSubscriber.read_async
def read_async(self): ''' Asynchronously read messages and invoke a callback when they are ready. :param callback: A callback with the received data ''' while not self.connected(): try: yield self.connect(timeout=5) except tornado.iostream...
python
def read_async(self): ''' Asynchronously read messages and invoke a callback when they are ready. :param callback: A callback with the received data ''' while not self.connected(): try: yield self.connect(timeout=5) except tornado.iostream...
[ "def", "read_async", "(", "self", ")", ":", "while", "not", "self", ".", "connected", "(", ")", ":", "try", ":", "yield", "self", ".", "connect", "(", "timeout", "=", "5", ")", "except", "tornado", ".", "iostream", ".", "StreamClosedError", ":", "log",...
Asynchronously read messages and invoke a callback when they are ready. :param callback: A callback with the received data
[ "Asynchronously", "read", "messages", "and", "invoke", "a", "callback", "when", "they", "are", "ready", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/transport/ipc.py#L788-L803
train
Asynchronously read messages and invoke a callback when they are ready.
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/transport/ipc.py
IPCMessageSubscriber.close
def close(self): ''' Routines to handle any cleanup before the instance shuts down. Sockets and filehandles should be closed explicitly, to prevent leaks. ''' if not self._closing: IPCClient.close(self) if self._closing: # This will...
python
def close(self): ''' Routines to handle any cleanup before the instance shuts down. Sockets and filehandles should be closed explicitly, to prevent leaks. ''' if not self._closing: IPCClient.close(self) if self._closing: # This will...
[ "def", "close", "(", "self", ")", ":", "if", "not", "self", ".", "_closing", ":", "IPCClient", ".", "close", "(", "self", ")", "if", "self", ".", "_closing", ":", "# This will prevent this message from showing up:", "# '[ERROR ] Future exception was never retrieved:...
Routines to handle any cleanup before the instance shuts down. Sockets and filehandles should be closed explicitly, to prevent leaks.
[ "Routines", "to", "handle", "any", "cleanup", "before", "the", "instance", "shuts", "down", ".", "Sockets", "and", "filehandles", "should", "be", "closed", "explicitly", "to", "prevent", "leaks", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/transport/ipc.py#L805-L820
train
Closes the instance.
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/schedule.py
list_
def list_(show_all=False, show_disabled=True, where=None, return_yaml=True): ''' List the jobs currently scheduled on the minion CLI Example: .. code-block:: bash salt '*' schedule.list # Show all jobs including hidden internal jobs salt '*' sche...
python
def list_(show_all=False, show_disabled=True, where=None, return_yaml=True): ''' List the jobs currently scheduled on the minion CLI Example: .. code-block:: bash salt '*' schedule.list # Show all jobs including hidden internal jobs salt '*' sche...
[ "def", "list_", "(", "show_all", "=", "False", ",", "show_disabled", "=", "True", ",", "where", "=", "None", ",", "return_yaml", "=", "True", ")", ":", "schedule", "=", "{", "}", "try", ":", "eventer", "=", "salt", ".", "utils", ".", "event", ".", ...
List the jobs currently scheduled on the minion CLI Example: .. code-block:: bash salt '*' schedule.list # Show all jobs including hidden internal jobs salt '*' schedule.list show_all=True # Hide disabled jobs from list of jobs salt '*' schedule.list show_disabled=Fa...
[ "List", "the", "jobs", "currently", "scheduled", "on", "the", "minion" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/schedule.py#L75-L159
train
List the currently scheduled jobs on the minion
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/schedule.py
is_enabled
def is_enabled(name): ''' List a Job only if its enabled .. versionadded:: 2015.5.3 CLI Example: .. code-block:: bash salt '*' schedule.is_enabled name=job_name ''' current_schedule = __salt__['schedule.list'](show_all=False, return_yaml=False) if name in current_schedule: ...
python
def is_enabled(name): ''' List a Job only if its enabled .. versionadded:: 2015.5.3 CLI Example: .. code-block:: bash salt '*' schedule.is_enabled name=job_name ''' current_schedule = __salt__['schedule.list'](show_all=False, return_yaml=False) if name in current_schedule: ...
[ "def", "is_enabled", "(", "name", ")", ":", "current_schedule", "=", "__salt__", "[", "'schedule.list'", "]", "(", "show_all", "=", "False", ",", "return_yaml", "=", "False", ")", "if", "name", "in", "current_schedule", ":", "return", "current_schedule", "[", ...
List a Job only if its enabled .. versionadded:: 2015.5.3 CLI Example: .. code-block:: bash salt '*' schedule.is_enabled name=job_name
[ "List", "a", "Job", "only", "if", "its", "enabled" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/schedule.py#L162-L179
train
Return a Job only if its enabled
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/schedule.py
purge
def purge(**kwargs): ''' Purge all the jobs currently scheduled on the minion CLI Example: .. code-block:: bash salt '*' schedule.purge ''' ret = {'comment': [], 'result': True} for name in list_(show_all=True, return_yaml=False): if name == 'enabled': ...
python
def purge(**kwargs): ''' Purge all the jobs currently scheduled on the minion CLI Example: .. code-block:: bash salt '*' schedule.purge ''' ret = {'comment': [], 'result': True} for name in list_(show_all=True, return_yaml=False): if name == 'enabled': ...
[ "def", "purge", "(", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'comment'", ":", "[", "]", ",", "'result'", ":", "True", "}", "for", "name", "in", "list_", "(", "show_all", "=", "True", ",", "return_yaml", "=", "False", ")", ":", "if", "name...
Purge all the jobs currently scheduled on the minion CLI Example: .. code-block:: bash salt '*' schedule.purge
[ "Purge", "all", "the", "jobs", "currently", "scheduled", "on", "the", "minion" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/schedule.py#L182-L231
train
Purge all the jobs currently scheduled on the minion
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/schedule.py
build_schedule_item
def build_schedule_item(name, **kwargs): ''' Build a schedule job CLI Example: .. code-block:: bash salt '*' schedule.build_schedule_item job1 function='test.ping' seconds=3600 ''' ret = {'comment': [], 'result': True} if not name: ret['comment'] = 'Job name i...
python
def build_schedule_item(name, **kwargs): ''' Build a schedule job CLI Example: .. code-block:: bash salt '*' schedule.build_schedule_item job1 function='test.ping' seconds=3600 ''' ret = {'comment': [], 'result': True} if not name: ret['comment'] = 'Job name i...
[ "def", "build_schedule_item", "(", "name", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'comment'", ":", "[", "]", ",", "'result'", ":", "True", "}", "if", "not", "name", ":", "ret", "[", "'comment'", "]", "=", "'Job name is required.'", "ret",...
Build a schedule job CLI Example: .. code-block:: bash salt '*' schedule.build_schedule_item job1 function='test.ping' seconds=3600
[ "Build", "a", "schedule", "job" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/schedule.py#L286-L393
train
Build a schedule item
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/schedule.py
add
def add(name, **kwargs): ''' Add a job to the schedule CLI Example: .. code-block:: bash salt '*' schedule.add job1 function='test.ping' seconds=3600 # If function have some arguments, use job_args salt '*' schedule.add job2 function='cmd.run' job_args="['date >> /tmp/date.log...
python
def add(name, **kwargs): ''' Add a job to the schedule CLI Example: .. code-block:: bash salt '*' schedule.add job1 function='test.ping' seconds=3600 # If function have some arguments, use job_args salt '*' schedule.add job2 function='cmd.run' job_args="['date >> /tmp/date.log...
[ "def", "add", "(", "name", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'comment'", ":", "'Failed to add job {0} to schedule.'", ".", "format", "(", "name", ")", ",", "'result'", ":", "False", "}", "if", "name", "in", "list_", "(", "show_all", ...
Add a job to the schedule CLI Example: .. code-block:: bash salt '*' schedule.add job1 function='test.ping' seconds=3600 # If function have some arguments, use job_args salt '*' schedule.add job2 function='cmd.run' job_args="['date >> /tmp/date.log']" seconds=60
[ "Add", "a", "job", "to", "the", "schedule" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/schedule.py#L396-L468
train
Add a job to the schedule.
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/schedule.py
modify
def modify(name, **kwargs): ''' Modify an existing job in the schedule CLI Example: .. code-block:: bash salt '*' schedule.modify job1 function='test.ping' seconds=3600 ''' ret = {'comment': '', 'changes': {}, 'result': True} time_conflict = False for i...
python
def modify(name, **kwargs): ''' Modify an existing job in the schedule CLI Example: .. code-block:: bash salt '*' schedule.modify job1 function='test.ping' seconds=3600 ''' ret = {'comment': '', 'changes': {}, 'result': True} time_conflict = False for i...
[ "def", "modify", "(", "name", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'comment'", ":", "''", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "True", "}", "time_conflict", "=", "False", "for", "item", "in", "[", "'seconds'", ",",...
Modify an existing job in the schedule CLI Example: .. code-block:: bash salt '*' schedule.modify job1 function='test.ping' seconds=3600
[ "Modify", "an", "existing", "job", "in", "the", "schedule" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/schedule.py#L471-L556
train
Modify an existing job in the schedule
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/schedule.py
run_job
def run_job(name, force=False): ''' Run a scheduled job on the minion immediately CLI Example: .. code-block:: bash salt '*' schedule.run_job job1 salt '*' schedule.run_job job1 force=True Force the job to run even if it is disabled. ''' ret = {'comment': [], ...
python
def run_job(name, force=False): ''' Run a scheduled job on the minion immediately CLI Example: .. code-block:: bash salt '*' schedule.run_job job1 salt '*' schedule.run_job job1 force=True Force the job to run even if it is disabled. ''' ret = {'comment': [], ...
[ "def", "run_job", "(", "name", ",", "force", "=", "False", ")", ":", "ret", "=", "{", "'comment'", ":", "[", "]", ",", "'result'", ":", "True", "}", "if", "not", "name", ":", "ret", "[", "'comment'", "]", "=", "'Job name is required.'", "ret", "[", ...
Run a scheduled job on the minion immediately CLI Example: .. code-block:: bash salt '*' schedule.run_job job1 salt '*' schedule.run_job job1 force=True Force the job to run even if it is disabled.
[ "Run", "a", "scheduled", "job", "on", "the", "minion", "immediately" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/schedule.py#L559-L595
train
Run a scheduled job on the minion immediately archive.
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/schedule.py
enable_job
def enable_job(name, **kwargs): ''' Enable a job in the minion's schedule CLI Example: .. code-block:: bash salt '*' schedule.enable_job job1 ''' ret = {'comment': [], 'result': True} if not name: ret['comment'] = 'Job name is required.' ret['result'] ...
python
def enable_job(name, **kwargs): ''' Enable a job in the minion's schedule CLI Example: .. code-block:: bash salt '*' schedule.enable_job job1 ''' ret = {'comment': [], 'result': True} if not name: ret['comment'] = 'Job name is required.' ret['result'] ...
[ "def", "enable_job", "(", "name", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'comment'", ":", "[", "]", ",", "'result'", ":", "True", "}", "if", "not", "name", ":", "ret", "[", "'comment'", "]", "=", "'Job name is required.'", "ret", "[", ...
Enable a job in the minion's schedule CLI Example: .. code-block:: bash salt '*' schedule.enable_job job1
[ "Enable", "a", "job", "in", "the", "minion", "s", "schedule" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/schedule.py#L598-L650
train
Enable a job in the salt s schedule
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/schedule.py
save
def save(**kwargs): ''' Save all scheduled jobs on the minion CLI Example: .. code-block:: bash salt '*' schedule.save ''' ret = {'comment': [], 'result': True} if 'test' in kwargs and kwargs['test']: ret['comment'] = 'Schedule would be saved.' else: ...
python
def save(**kwargs): ''' Save all scheduled jobs on the minion CLI Example: .. code-block:: bash salt '*' schedule.save ''' ret = {'comment': [], 'result': True} if 'test' in kwargs and kwargs['test']: ret['comment'] = 'Schedule would be saved.' else: ...
[ "def", "save", "(", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'comment'", ":", "[", "]", ",", "'result'", ":", "True", "}", "if", "'test'", "in", "kwargs", "and", "kwargs", "[", "'test'", "]", ":", "ret", "[", "'comment'", "]", "=", "'Sched...
Save all scheduled jobs on the minion CLI Example: .. code-block:: bash salt '*' schedule.save
[ "Save", "all", "scheduled", "jobs", "on", "the", "minion" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/schedule.py#L708-L739
train
Save all scheduled jobs on the minion
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/schedule.py
reload_
def reload_(): ''' Reload saved scheduled jobs on the minion CLI Example: .. code-block:: bash salt '*' schedule.reload ''' ret = {'comment': [], 'result': True} # If there a schedule defined in pillar, refresh it. if 'schedule' in __pillar__: out = __salt...
python
def reload_(): ''' Reload saved scheduled jobs on the minion CLI Example: .. code-block:: bash salt '*' schedule.reload ''' ret = {'comment': [], 'result': True} # If there a schedule defined in pillar, refresh it. if 'schedule' in __pillar__: out = __salt...
[ "def", "reload_", "(", ")", ":", "ret", "=", "{", "'comment'", ":", "[", "]", ",", "'result'", ":", "True", "}", "# If there a schedule defined in pillar, refresh it.", "if", "'schedule'", "in", "__pillar__", ":", "out", "=", "__salt__", "[", "'event.fire'", "...
Reload saved scheduled jobs on the minion CLI Example: .. code-block:: bash salt '*' schedule.reload
[ "Reload", "saved", "scheduled", "jobs", "on", "the", "minion" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/schedule.py#L816-L862
train
Reload the current scheduler on the minion
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/schedule.py
move
def move(name, target, **kwargs): ''' Move scheduled job to another minion or minions. CLI Example: .. code-block:: bash salt '*' schedule.move jobname target ''' ret = {'comment': [], 'result': True} if not name: ret['comment'] = 'Job name is required.' ...
python
def move(name, target, **kwargs): ''' Move scheduled job to another minion or minions. CLI Example: .. code-block:: bash salt '*' schedule.move jobname target ''' ret = {'comment': [], 'result': True} if not name: ret['comment'] = 'Job name is required.' ...
[ "def", "move", "(", "name", ",", "target", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'comment'", ":", "[", "]", ",", "'result'", ":", "True", "}", "if", "not", "name", ":", "ret", "[", "'comment'", "]", "=", "'Job name is required.'", "r...
Move scheduled job to another minion or minions. CLI Example: .. code-block:: bash salt '*' schedule.move jobname target
[ "Move", "scheduled", "job", "to", "another", "minion", "or", "minions", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/schedule.py#L865-L928
train
Move a scheduled job to another minion or minions.
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/schedule.py
postpone_job
def postpone_job(name, current_time, new_time, **kwargs): ''' Postpone a job in the minion's schedule Current time and new time should be in date string format, default value is %Y-%m-%dT%H:%M:%S. .. versionadded:: 2018.3.0 CLI Example: ...
python
def postpone_job(name, current_time, new_time, **kwargs): ''' Postpone a job in the minion's schedule Current time and new time should be in date string format, default value is %Y-%m-%dT%H:%M:%S. .. versionadded:: 2018.3.0 CLI Example: ...
[ "def", "postpone_job", "(", "name", ",", "current_time", ",", "new_time", ",", "*", "*", "kwargs", ")", ":", "time_fmt", "=", "kwargs", ".", "get", "(", "'time_fmt'", ")", "or", "'%Y-%m-%dT%H:%M:%S'", "ret", "=", "{", "'comment'", ":", "[", "]", ",", "...
Postpone a job in the minion's schedule Current time and new time should be in date string format, default value is %Y-%m-%dT%H:%M:%S. .. versionadded:: 2018.3.0 CLI Example: .. code-block:: bash salt '*' schedule.postpone_job job current_time new_time salt '*' schedule.postpon...
[ "Postpone", "a", "job", "in", "the", "minion", "s", "schedule" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/schedule.py#L994-L1096
train
Postpone a job in the schedule
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/platform.py
is_proxy
def is_proxy(): ''' Return True if this minion is a proxy minion. Leverages the fact that is_linux() and is_windows both return False for proxies. TODO: Need to extend this for proxies that might run on other Unices ''' import __main__ as main # This is a hack. If a proxy minion is ...
python
def is_proxy(): ''' Return True if this minion is a proxy minion. Leverages the fact that is_linux() and is_windows both return False for proxies. TODO: Need to extend this for proxies that might run on other Unices ''' import __main__ as main # This is a hack. If a proxy minion is ...
[ "def", "is_proxy", "(", ")", ":", "import", "__main__", "as", "main", "# This is a hack. If a proxy minion is started by other", "# means, e.g. a custom script that creates the minion objects", "# then this will fail.", "ret", "=", "False", "try", ":", "# Changed this from 'salt-p...
Return True if this minion is a proxy minion. Leverages the fact that is_linux() and is_windows both return False for proxies. TODO: Need to extend this for proxies that might run on other Unices
[ "Return", "True", "if", "this", "minion", "is", "a", "proxy", "minion", ".", "Leverages", "the", "fact", "that", "is_linux", "()", "and", "is_windows", "both", "return", "False", "for", "proxies", ".", "TODO", ":", "Need", "to", "extend", "this", "for", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/platform.py#L24-L47
train
Return True if this minion is a proxy minion.
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/platform.py
is_smartos_globalzone
def is_smartos_globalzone(): ''' Function to return if host is SmartOS (Illumos) global zone or not ''' if not is_smartos(): return False else: cmd = ['zonename'] try: zonename = subprocess.Popen( cmd, shell=False, stdout=subprocess...
python
def is_smartos_globalzone(): ''' Function to return if host is SmartOS (Illumos) global zone or not ''' if not is_smartos(): return False else: cmd = ['zonename'] try: zonename = subprocess.Popen( cmd, shell=False, stdout=subprocess...
[ "def", "is_smartos_globalzone", "(", ")", ":", "if", "not", "is_smartos", "(", ")", ":", "return", "False", "else", ":", "cmd", "=", "[", "'zonename'", "]", "try", ":", "zonename", "=", "subprocess", ".", "Popen", "(", "cmd", ",", "shell", "=", "False"...
Function to return if host is SmartOS (Illumos) global zone or not
[ "Function", "to", "return", "if", "host", "is", "SmartOS", "(", "Illumos", ")", "global", "zone", "or", "not" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/platform.py#L87-L106
train
Function to return if host is SmartOS global zone or not
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/genesis.py
bootstrap
def bootstrap( platform, root, img_format='dir', fs_format='ext2', fs_opts=None, arch=None, flavor=None, repo_url=None, static_qemu=None, img_size=None, mount_dir=None, pkg_cache=None, pkgs=None, exclude_pkgs...
python
def bootstrap( platform, root, img_format='dir', fs_format='ext2', fs_opts=None, arch=None, flavor=None, repo_url=None, static_qemu=None, img_size=None, mount_dir=None, pkg_cache=None, pkgs=None, exclude_pkgs...
[ "def", "bootstrap", "(", "platform", ",", "root", ",", "img_format", "=", "'dir'", ",", "fs_format", "=", "'ext2'", ",", "fs_opts", "=", "None", ",", "arch", "=", "None", ",", "flavor", "=", "None", ",", "repo_url", "=", "None", ",", "static_qemu", "="...
Create an image for a specific platform. Please note that this function *MUST* be run as root, as images that are created make files belonging to root. platform Which platform to use to create the image. Currently supported platforms are rpm, deb and pacman. root Local path to...
[ "Create", "an", "image", "for", "a", "specific", "platform", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/genesis.py#L51-L224
train
Create a new image for a specific platform and root.
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/genesis.py
_mkpart
def _mkpart(root, fs_format, fs_opts, mount_dir): ''' Make a partition, and make it bootable .. versionadded:: Beryllium ''' __salt__['partition.mklabel'](root, 'msdos') loop1 = __salt__['cmd.run']('losetup -f') log.debug('First loop device is %s', loop1) __salt__['cmd.run']('losetup {0...
python
def _mkpart(root, fs_format, fs_opts, mount_dir): ''' Make a partition, and make it bootable .. versionadded:: Beryllium ''' __salt__['partition.mklabel'](root, 'msdos') loop1 = __salt__['cmd.run']('losetup -f') log.debug('First loop device is %s', loop1) __salt__['cmd.run']('losetup {0...
[ "def", "_mkpart", "(", "root", ",", "fs_format", ",", "fs_opts", ",", "mount_dir", ")", ":", "__salt__", "[", "'partition.mklabel'", "]", "(", "root", ",", "'msdos'", ")", "loop1", "=", "__salt__", "[", "'cmd.run'", "]", "(", "'losetup -f'", ")", "log", ...
Make a partition, and make it bootable .. versionadded:: Beryllium
[ "Make", "a", "partition", "and", "make", "it", "bootable" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/genesis.py#L227-L261
train
Make a partition and make it bootable
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/genesis.py
_mkfs
def _mkfs(root, fs_format, fs_opts=None): ''' Make a filesystem using the appropriate module .. versionadded:: Beryllium ''' if fs_opts is None: fs_opts = {} if fs_format in ('ext2', 'ext3', 'ext4'): __salt__['extfs.mkfs'](root, fs_format, **fs_opts) elif fs_format in ('btr...
python
def _mkfs(root, fs_format, fs_opts=None): ''' Make a filesystem using the appropriate module .. versionadded:: Beryllium ''' if fs_opts is None: fs_opts = {} if fs_format in ('ext2', 'ext3', 'ext4'): __salt__['extfs.mkfs'](root, fs_format, **fs_opts) elif fs_format in ('btr...
[ "def", "_mkfs", "(", "root", ",", "fs_format", ",", "fs_opts", "=", "None", ")", ":", "if", "fs_opts", "is", "None", ":", "fs_opts", "=", "{", "}", "if", "fs_format", "in", "(", "'ext2'", ",", "'ext3'", ",", "'ext4'", ")", ":", "__salt__", "[", "'e...
Make a filesystem using the appropriate module .. versionadded:: Beryllium
[ "Make", "a", "filesystem", "using", "the", "appropriate", "module" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/genesis.py#L264-L278
train
Make a filesystem using the appropriate 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/genesis.py
_populate_cache
def _populate_cache(platform, pkg_cache, mount_dir): ''' If a ``pkg_cache`` directory is specified, then use it to populate the disk image. ''' if not pkg_cache: return if not os.path.isdir(pkg_cache): return if platform == 'pacman': cache_dir = '{0}/var/cache/pacman...
python
def _populate_cache(platform, pkg_cache, mount_dir): ''' If a ``pkg_cache`` directory is specified, then use it to populate the disk image. ''' if not pkg_cache: return if not os.path.isdir(pkg_cache): return if platform == 'pacman': cache_dir = '{0}/var/cache/pacman...
[ "def", "_populate_cache", "(", "platform", ",", "pkg_cache", ",", "mount_dir", ")", ":", "if", "not", "pkg_cache", ":", "return", "if", "not", "os", ".", "path", ".", "isdir", "(", "pkg_cache", ")", ":", "return", "if", "platform", "==", "'pacman'", ":",...
If a ``pkg_cache`` directory is specified, then use it to populate the disk image.
[ "If", "a", "pkg_cache", "directory", "is", "specified", "then", "use", "it", "to", "populate", "the", "disk", "image", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/genesis.py#L281-L295
train
Populate the cache with the contents of pkg_cache.
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/genesis.py
_bootstrap_yum
def _bootstrap_yum( root, pkg_confs='/etc/yum*', pkgs=None, exclude_pkgs=None, epel_url=EPEL_URL, ): ''' Bootstrap an image using the yum tools root The root of the image to install to. Will be created as a directory if it does not exist. (e.x.: /...
python
def _bootstrap_yum( root, pkg_confs='/etc/yum*', pkgs=None, exclude_pkgs=None, epel_url=EPEL_URL, ): ''' Bootstrap an image using the yum tools root The root of the image to install to. Will be created as a directory if it does not exist. (e.x.: /...
[ "def", "_bootstrap_yum", "(", "root", ",", "pkg_confs", "=", "'/etc/yum*'", ",", "pkgs", "=", "None", ",", "exclude_pkgs", "=", "None", ",", "epel_url", "=", "EPEL_URL", ",", ")", ":", "if", "pkgs", "is", "None", ":", "pkgs", "=", "[", "]", "elif", "...
Bootstrap an image using the yum tools root The root of the image to install to. Will be created as a directory if it does not exist. (e.x.: /root/arch) pkg_confs The location of the conf files to copy into the image, to point yum to the right repos and configuration. pkgs...
[ "Bootstrap", "an", "image", "using", "the", "yum", "tools" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/genesis.py#L298-L361
train
Bootstrap an image using the yum tools
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/genesis.py
_bootstrap_deb
def _bootstrap_deb( root, arch, flavor, repo_url=None, static_qemu=None, pkgs=None, exclude_pkgs=None, ): ''' Bootstrap an image using the Debian tools root The root of the image to install to. Will be created as a directory if it ...
python
def _bootstrap_deb( root, arch, flavor, repo_url=None, static_qemu=None, pkgs=None, exclude_pkgs=None, ): ''' Bootstrap an image using the Debian tools root The root of the image to install to. Will be created as a directory if it ...
[ "def", "_bootstrap_deb", "(", "root", ",", "arch", ",", "flavor", ",", "repo_url", "=", "None", ",", "static_qemu", "=", "None", ",", "pkgs", "=", "None", ",", "exclude_pkgs", "=", "None", ",", ")", ":", "if", "repo_url", "is", "None", ":", "repo_url",...
Bootstrap an image using the Debian tools root The root of the image to install to. Will be created as a directory if it does not exist. (e.x.: /root/wheezy) arch Architecture of the target image. (e.x.: amd64) flavor Flavor of Debian to install. (e.x.: wheezy) repo_u...
[ "Bootstrap", "an", "image", "using", "the", "Debian", "tools" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/genesis.py#L364-L460
train
Bootstrap an image using the Debian tools.
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/genesis.py
_bootstrap_pacman
def _bootstrap_pacman( root, pkg_confs='/etc/pacman*', img_format='dir', pkgs=None, exclude_pkgs=None, ): ''' Bootstrap an image using the pacman tools root The root of the image to install to. Will be created as a directory if it does not exist. ...
python
def _bootstrap_pacman( root, pkg_confs='/etc/pacman*', img_format='dir', pkgs=None, exclude_pkgs=None, ): ''' Bootstrap an image using the pacman tools root The root of the image to install to. Will be created as a directory if it does not exist. ...
[ "def", "_bootstrap_pacman", "(", "root", ",", "pkg_confs", "=", "'/etc/pacman*'", ",", "img_format", "=", "'dir'", ",", "pkgs", "=", "None", ",", "exclude_pkgs", "=", "None", ",", ")", ":", "_make_nodes", "(", "root", ")", "if", "pkgs", "is", "None", ":"...
Bootstrap an image using the pacman tools root The root of the image to install to. Will be created as a directory if it does not exist. (e.x.: /root/arch) pkg_confs The location of the conf files to copy into the image, to point pacman to the right repos and configuration. ...
[ "Bootstrap", "an", "image", "using", "the", "pacman", "tools" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/genesis.py#L463-L531
train
Bootstrap an image using pacman tools
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/genesis.py
_make_nodes
def _make_nodes(root): ''' Make the minimum number of nodes inside of /dev/. Based on: https://wiki.archlinux.org/index.php/Linux_Containers ''' dirs = ( ('{0}/etc'.format(root), 'root', 'root', '755'), ('{0}/dev'.format(root), 'root', 'root', '755'), ('{0}/proc'.format(root...
python
def _make_nodes(root): ''' Make the minimum number of nodes inside of /dev/. Based on: https://wiki.archlinux.org/index.php/Linux_Containers ''' dirs = ( ('{0}/etc'.format(root), 'root', 'root', '755'), ('{0}/dev'.format(root), 'root', 'root', '755'), ('{0}/proc'.format(root...
[ "def", "_make_nodes", "(", "root", ")", ":", "dirs", "=", "(", "(", "'{0}/etc'", ".", "format", "(", "root", ")", ",", "'root'", ",", "'root'", ",", "'755'", ")", ",", "(", "'{0}/dev'", ".", "format", "(", "root", ")", ",", "'root'", ",", "'root'",...
Make the minimum number of nodes inside of /dev/. Based on: https://wiki.archlinux.org/index.php/Linux_Containers
[ "Make", "the", "minimum", "number", "of", "nodes", "inside", "of", "/", "dev", "/", ".", "Based", "on", ":" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/genesis.py#L534-L565
train
Make the minimum number of nodes inside of the Linux containers.
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/genesis.py
avail_platforms
def avail_platforms(): ''' Return which platforms are available CLI Example: .. code-block:: bash salt myminion genesis.avail_platforms ''' ret = {} for platform in CMD_MAP: ret[platform] = True for cmd in CMD_MAP[platform]: if not salt.utils.path.which...
python
def avail_platforms(): ''' Return which platforms are available CLI Example: .. code-block:: bash salt myminion genesis.avail_platforms ''' ret = {} for platform in CMD_MAP: ret[platform] = True for cmd in CMD_MAP[platform]: if not salt.utils.path.which...
[ "def", "avail_platforms", "(", ")", ":", "ret", "=", "{", "}", "for", "platform", "in", "CMD_MAP", ":", "ret", "[", "platform", "]", "=", "True", "for", "cmd", "in", "CMD_MAP", "[", "platform", "]", ":", "if", "not", "salt", ".", "utils", ".", "pat...
Return which platforms are available CLI Example: .. code-block:: bash salt myminion genesis.avail_platforms
[ "Return", "which", "platforms", "are", "available" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/genesis.py#L568-L584
train
Return which platforms are available
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/genesis.py
pack
def pack(name, root, path=None, pack_format='tar', compress='bzip2'): ''' Pack up a directory structure, into a specific format CLI Examples: .. code-block:: bash salt myminion genesis.pack centos /root/centos salt myminion genesis.pack centos /root/centos pack_format='tar' ''' ...
python
def pack(name, root, path=None, pack_format='tar', compress='bzip2'): ''' Pack up a directory structure, into a specific format CLI Examples: .. code-block:: bash salt myminion genesis.pack centos /root/centos salt myminion genesis.pack centos /root/centos pack_format='tar' ''' ...
[ "def", "pack", "(", "name", ",", "root", ",", "path", "=", "None", ",", "pack_format", "=", "'tar'", ",", "compress", "=", "'bzip2'", ")", ":", "if", "pack_format", "==", "'tar'", ":", "_tar", "(", "name", ",", "root", ",", "path", ",", "compress", ...
Pack up a directory structure, into a specific format CLI Examples: .. code-block:: bash salt myminion genesis.pack centos /root/centos salt myminion genesis.pack centos /root/centos pack_format='tar'
[ "Pack", "up", "a", "directory", "structure", "into", "a", "specific", "format" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/genesis.py#L587-L599
train
Pack up a directory structure into a specific 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/genesis.py
unpack
def unpack(name, dest=None, path=None, pack_format='tar', compress='bz2'): ''' Unpack an image into a directory structure CLI Example: .. code-block:: bash salt myminion genesis.unpack centos /root/centos ''' if pack_format == 'tar': _untar(name, dest, path, compress)
python
def unpack(name, dest=None, path=None, pack_format='tar', compress='bz2'): ''' Unpack an image into a directory structure CLI Example: .. code-block:: bash salt myminion genesis.unpack centos /root/centos ''' if pack_format == 'tar': _untar(name, dest, path, compress)
[ "def", "unpack", "(", "name", ",", "dest", "=", "None", ",", "path", "=", "None", ",", "pack_format", "=", "'tar'", ",", "compress", "=", "'bz2'", ")", ":", "if", "pack_format", "==", "'tar'", ":", "_untar", "(", "name", ",", "dest", ",", "path", "...
Unpack an image into a directory structure CLI Example: .. code-block:: bash salt myminion genesis.unpack centos /root/centos
[ "Unpack", "an", "image", "into", "a", "directory", "structure" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/genesis.py#L602-L613
train
Unpack an image into a directory structure
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/genesis.py
_tar
def _tar(name, root, path=None, compress='bzip2'): ''' Pack up image in a tar format ''' if path is None: path = os.path.join(salt.syspaths.BASE_FILE_ROOTS_DIR, 'img') if not __salt__['file.directory_exists'](path): try: __salt__['file.mkdir'](path) except Excepti...
python
def _tar(name, root, path=None, compress='bzip2'): ''' Pack up image in a tar format ''' if path is None: path = os.path.join(salt.syspaths.BASE_FILE_ROOTS_DIR, 'img') if not __salt__['file.directory_exists'](path): try: __salt__['file.mkdir'](path) except Excepti...
[ "def", "_tar", "(", "name", ",", "root", ",", "path", "=", "None", ",", "compress", "=", "'bzip2'", ")", ":", "if", "path", "is", "None", ":", "path", "=", "os", ".", "path", ".", "join", "(", "salt", ".", "syspaths", ".", "BASE_FILE_ROOTS_DIR", ",...
Pack up image in a tar format
[ "Pack", "up", "image", "in", "a", "tar", "format" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/genesis.py#L616-L636
train
Pack up a single image in a tar 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/genesis.py
ldd_deps
def ldd_deps(filename, ret=None): ''' Recurse through a set of dependencies reported by ``ldd``, to find associated dependencies. Please note that this does not necessarily resolve all (non-package) dependencies for a file; but it does help. CLI Example: salt myminion genesis.ldd_deps...
python
def ldd_deps(filename, ret=None): ''' Recurse through a set of dependencies reported by ``ldd``, to find associated dependencies. Please note that this does not necessarily resolve all (non-package) dependencies for a file; but it does help. CLI Example: salt myminion genesis.ldd_deps...
[ "def", "ldd_deps", "(", "filename", ",", "ret", "=", "None", ")", ":", "if", "not", "os", ".", "path", ".", "exists", "(", "filename", ")", ":", "filename", "=", "salt", ".", "utils", ".", "path", ".", "which", "(", "filename", ")", "if", "ret", ...
Recurse through a set of dependencies reported by ``ldd``, to find associated dependencies. Please note that this does not necessarily resolve all (non-package) dependencies for a file; but it does help. CLI Example: salt myminion genesis.ldd_deps bash salt myminion genesis.ldd_deps /...
[ "Recurse", "through", "a", "set", "of", "dependencies", "reported", "by", "ldd", "to", "find", "associated", "dependencies", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/genesis.py#L682-L724
train
Recursively find all of the dependencies reported by ldd and return a list of the names of the associated dependencies.
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/genesis.py
mksls
def mksls(fmt, src, dst=None): ''' Convert an installation file/script to an SLS file. Currently supports ``kickstart``, ``preseed``, and ``autoyast``. CLI Examples: salt <minion> genesis.mksls kickstart /path/to/kickstart.cfg salt <minion> genesis.mksls kickstart /path/to/kickstart.cf...
python
def mksls(fmt, src, dst=None): ''' Convert an installation file/script to an SLS file. Currently supports ``kickstart``, ``preseed``, and ``autoyast``. CLI Examples: salt <minion> genesis.mksls kickstart /path/to/kickstart.cfg salt <minion> genesis.mksls kickstart /path/to/kickstart.cf...
[ "def", "mksls", "(", "fmt", ",", "src", ",", "dst", "=", "None", ")", ":", "if", "fmt", "==", "'kickstart'", ":", "return", "salt", ".", "utils", ".", "kickstart", ".", "mksls", "(", "src", ",", "dst", ")", "elif", "fmt", "==", "'preseed'", ":", ...
Convert an installation file/script to an SLS file. Currently supports ``kickstart``, ``preseed``, and ``autoyast``. CLI Examples: salt <minion> genesis.mksls kickstart /path/to/kickstart.cfg salt <minion> genesis.mksls kickstart /path/to/kickstart.cfg /path/to/dest.sls .. versionadded:: ...
[ "Convert", "an", "installation", "file", "/", "script", "to", "an", "SLS", "file", ".", "Currently", "supports", "kickstart", "preseed", "and", "autoyast", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/genesis.py#L727-L744
train
Convert an installation file or script to an SLS file. Currently supports kickstart preseed and autoyast.
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_psget.py
_pshell
def _pshell(cmd, cwd=None, json_depth=2): ''' Execute the desired powershell command and ensure that it returns data in json format and load that into python ''' if 'convertto-json' not in cmd.lower(): cmd = '{0} | ConvertTo-Json -Depth {1}'.format(cmd, json_depth) log.debug('DSC: %s', c...
python
def _pshell(cmd, cwd=None, json_depth=2): ''' Execute the desired powershell command and ensure that it returns data in json format and load that into python ''' if 'convertto-json' not in cmd.lower(): cmd = '{0} | ConvertTo-Json -Depth {1}'.format(cmd, json_depth) log.debug('DSC: %s', c...
[ "def", "_pshell", "(", "cmd", ",", "cwd", "=", "None", ",", "json_depth", "=", "2", ")", ":", "if", "'convertto-json'", "not", "in", "cmd", ".", "lower", "(", ")", ":", "cmd", "=", "'{0} | ConvertTo-Json -Depth {1}'", ".", "format", "(", "cmd", ",", "j...
Execute the desired powershell command and ensure that it returns data in json format and load that into python
[ "Execute", "the", "desired", "powershell", "command", "and", "ensure", "that", "it", "returns", "data", "in", "json", "format", "and", "load", "that", "into", "python" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_psget.py#L53-L75
train
Execute the desired powershell command and ensure that it returns data in json format and load that into python
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_psget.py
avail_modules
def avail_modules(desc=False): ''' List available modules in registered Powershell module repositories. :param desc: If ``True``, the verbose description will be returned. :type desc: ``bool`` CLI Example: .. code-block:: bash salt 'win01' psget.avail_modules salt 'win01' ps...
python
def avail_modules(desc=False): ''' List available modules in registered Powershell module repositories. :param desc: If ``True``, the verbose description will be returned. :type desc: ``bool`` CLI Example: .. code-block:: bash salt 'win01' psget.avail_modules salt 'win01' ps...
[ "def", "avail_modules", "(", "desc", "=", "False", ")", ":", "cmd", "=", "'Find-Module'", "modules", "=", "_pshell", "(", "cmd", ")", "names", "=", "[", "]", "if", "desc", ":", "names", "=", "{", "}", "for", "module", "in", "modules", ":", "if", "d...
List available modules in registered Powershell module repositories. :param desc: If ``True``, the verbose description will be returned. :type desc: ``bool`` CLI Example: .. code-block:: bash salt 'win01' psget.avail_modules salt 'win01' psget.avail_modules desc=True
[ "List", "available", "modules", "in", "registered", "Powershell", "module", "repositories", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_psget.py#L94-L118
train
Return a list of available Powershell modules.
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_psget.py
list_modules
def list_modules(desc=False): ''' List currently installed PSGet Modules on the system. :param desc: If ``True``, the verbose description will be returned. :type desc: ``bool`` CLI Example: .. code-block:: bash salt 'win01' psget.list_modules salt 'win01' psget.list_modules ...
python
def list_modules(desc=False): ''' List currently installed PSGet Modules on the system. :param desc: If ``True``, the verbose description will be returned. :type desc: ``bool`` CLI Example: .. code-block:: bash salt 'win01' psget.list_modules salt 'win01' psget.list_modules ...
[ "def", "list_modules", "(", "desc", "=", "False", ")", ":", "cmd", "=", "'Get-InstalledModule'", "modules", "=", "_pshell", "(", "cmd", ")", "if", "isinstance", "(", "modules", ",", "dict", ")", ":", "ret", "=", "[", "]", "if", "desc", ":", "modules_re...
List currently installed PSGet Modules on the system. :param desc: If ``True``, the verbose description will be returned. :type desc: ``bool`` CLI Example: .. code-block:: bash salt 'win01' psget.list_modules salt 'win01' psget.list_modules desc=True
[ "List", "currently", "installed", "PSGet", "Modules", "on", "the", "system", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_psget.py#L121-L154
train
List currently installed PSGet Modules 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_psget.py
install
def install(name, minimum_version=None, required_version=None, scope=None, repository=None): ''' Install a Powershell module from powershell gallery on the system. :param name: Name of a Powershell module :type name: ``str`` :param minimum_version: The maximum version to install, e.g....
python
def install(name, minimum_version=None, required_version=None, scope=None, repository=None): ''' Install a Powershell module from powershell gallery on the system. :param name: Name of a Powershell module :type name: ``str`` :param minimum_version: The maximum version to install, e.g....
[ "def", "install", "(", "name", ",", "minimum_version", "=", "None", ",", "required_version", "=", "None", ",", "scope", "=", "None", ",", "repository", "=", "None", ")", ":", "# Putting quotes around the parameter protects against command injection", "flags", "=", "...
Install a Powershell module from powershell gallery on the system. :param name: Name of a Powershell module :type name: ``str`` :param minimum_version: The maximum version to install, e.g. 1.23.2 :type minimum_version: ``str`` :param required_version: Install a specific version :type requi...
[ "Install", "a", "Powershell", "module", "from", "powershell", "gallery", "on", "the", "system", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_psget.py#L157-L199
train
Install a Powershell module from powershell gallery 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_psget.py
update
def update(name, maximum_version=None, required_version=None): ''' Update a PowerShell module to a specific version, or the newest :param name: Name of a Powershell module :type name: ``str`` :param maximum_version: The maximum version to install, e.g. 1.23.2 :type maximum_version: ``str`` ...
python
def update(name, maximum_version=None, required_version=None): ''' Update a PowerShell module to a specific version, or the newest :param name: Name of a Powershell module :type name: ``str`` :param maximum_version: The maximum version to install, e.g. 1.23.2 :type maximum_version: ``str`` ...
[ "def", "update", "(", "name", ",", "maximum_version", "=", "None", ",", "required_version", "=", "None", ")", ":", "# Putting quotes around the parameter protects against command injection", "flags", "=", "[", "(", "'Name'", ",", "name", ")", "]", "if", "maximum_ver...
Update a PowerShell module to a specific version, or the newest :param name: Name of a Powershell module :type name: ``str`` :param maximum_version: The maximum version to install, e.g. 1.23.2 :type maximum_version: ``str`` :param required_version: Install a specific version :type required...
[ "Update", "a", "PowerShell", "module", "to", "a", "specific", "version", "or", "the", "newest" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_psget.py#L202-L234
train
Update a Powershell module with a specific version or the newest one.
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_psget.py
remove
def remove(name): ''' Remove a Powershell DSC module from the system. :param name: Name of a Powershell DSC module :type name: ``str`` CLI Example: .. code-block:: bash salt 'win01' psget.remove PowerPlan ''' # Putting quotes around the parameter protects against command i...
python
def remove(name): ''' Remove a Powershell DSC module from the system. :param name: Name of a Powershell DSC module :type name: ``str`` CLI Example: .. code-block:: bash salt 'win01' psget.remove PowerPlan ''' # Putting quotes around the parameter protects against command i...
[ "def", "remove", "(", "name", ")", ":", "# Putting quotes around the parameter protects against command injection", "cmd", "=", "'Uninstall-Module \"{0}\"'", ".", "format", "(", "name", ")", "no_ret", "=", "_pshell", "(", "cmd", ")", "return", "name", "not", "in", "...
Remove a Powershell DSC module from the system. :param name: Name of a Powershell DSC module :type name: ``str`` CLI Example: .. code-block:: bash salt 'win01' psget.remove PowerPlan
[ "Remove", "a", "Powershell", "DSC", "module", "from", "the", "system", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_psget.py#L237-L253
train
Remove a Powershell DSC module 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_psget.py
register_repository
def register_repository(name, location, installation_policy=None): ''' Register a PSGet repository on the local machine :param name: The name for the repository :type name: ``str`` :param location: The URI for the repository :type location: ``str`` :param installation_policy: The instal...
python
def register_repository(name, location, installation_policy=None): ''' Register a PSGet repository on the local machine :param name: The name for the repository :type name: ``str`` :param location: The URI for the repository :type location: ``str`` :param installation_policy: The instal...
[ "def", "register_repository", "(", "name", ",", "location", ",", "installation_policy", "=", "None", ")", ":", "# Putting quotes around the parameter protects against command injection", "flags", "=", "[", "(", "'Name'", ",", "name", ")", "]", "flags", ".", "append", ...
Register a PSGet repository on the local machine :param name: The name for the repository :type name: ``str`` :param location: The URI for the repository :type location: ``str`` :param installation_policy: The installation policy for packages, e.g. Trusted, Untrusted :type installa...
[ "Register", "a", "PSGet", "repository", "on", "the", "local", "machine" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_psget.py#L256-L288
train
Registers a PSGet repository on the local machine
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_psget.py
get_repository
def get_repository(name): ''' Get the details of a local PSGet repository :param name: Name of the repository :type name: ``str`` CLI Example: .. code-block:: bash salt 'win01' psget.get_repository MyRepo ''' # Putting quotes around the parameter protects against command i...
python
def get_repository(name): ''' Get the details of a local PSGet repository :param name: Name of the repository :type name: ``str`` CLI Example: .. code-block:: bash salt 'win01' psget.get_repository MyRepo ''' # Putting quotes around the parameter protects against command i...
[ "def", "get_repository", "(", "name", ")", ":", "# Putting quotes around the parameter protects against command injection", "cmd", "=", "'Get-PSRepository \"{0}\"'", ".", "format", "(", "name", ")", "no_ret", "=", "_pshell", "(", "cmd", ")", "return", "name", "not", "...
Get the details of a local PSGet repository :param name: Name of the repository :type name: ``str`` CLI Example: .. code-block:: bash salt 'win01' psget.get_repository MyRepo
[ "Get", "the", "details", "of", "a", "local", "PSGet", "repository" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_psget.py#L291-L307
train
Get the details of a local PSGet 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/states/lxc.py
present
def present(name, running=None, clone_from=None, snapshot=False, profile=None, network_profile=None, template=None, options=None, image=None, config=None, fstype=None, size=None, ...
python
def present(name, running=None, clone_from=None, snapshot=False, profile=None, network_profile=None, template=None, options=None, image=None, config=None, fstype=None, size=None, ...
[ "def", "present", "(", "name", ",", "running", "=", "None", ",", "clone_from", "=", "None", ",", "snapshot", "=", "False", ",", "profile", "=", "None", ",", "network_profile", "=", "None", ",", "template", "=", "None", ",", "options", "=", "None", ",",...
.. versionchanged:: 2015.8.0 The :mod:`lxc.created <salt.states.lxc.created>` state has been renamed to ``lxc.present``, and the :mod:`lxc.cloned <salt.states.lxc.cloned>` state has been merged into this state. Create the named container if it does not exist name The name of t...
[ "..", "versionchanged", "::", "2015", ".", "8", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/lxc.py#L15-L330
train
Create a new container with the specified parameters.
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/states/lxc.py
absent
def absent(name, stop=False, path=None): ''' Ensure a container is not present, destroying it if present name Name of the container to destroy stop stop before destroying default: false .. versionadded:: 2015.5.2 path path to the container parent d...
python
def absent(name, stop=False, path=None): ''' Ensure a container is not present, destroying it if present name Name of the container to destroy stop stop before destroying default: false .. versionadded:: 2015.5.2 path path to the container parent d...
[ "def", "absent", "(", "name", ",", "stop", "=", "False", ",", "path", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "True", ",", "'comment'", ":", "'Container \\'{0}\\' does not ex...
Ensure a container is not present, destroying it if present name Name of the container to destroy stop stop before destroying default: false .. versionadded:: 2015.5.2 path path to the container parent default: /var/lib/lxc (system default) .. ver...
[ "Ensure", "a", "container", "is", "not", "present", "destroying", "it", "if", "present" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/lxc.py#L333-L379
train
Ensure a container is absent destroying it if present
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/states/lxc.py
running
def running(name, restart=False, path=None): ''' .. versionchanged:: 2015.5.0 The :mod:`lxc.started <salt.states.lxc.started>` state has been renamed to ``lxc.running`` Ensure that a container is running .. note:: This state does not enforce the existence of the named containe...
python
def running(name, restart=False, path=None): ''' .. versionchanged:: 2015.5.0 The :mod:`lxc.started <salt.states.lxc.started>` state has been renamed to ``lxc.running`` Ensure that a container is running .. note:: This state does not enforce the existence of the named containe...
[ "def", "running", "(", "name", ",", "restart", "=", "False", ",", "path", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "True", ",", "'comment'", ":", "'Container \\'{0}\\' is already running'", ".", "format", "(", ...
.. versionchanged:: 2015.5.0 The :mod:`lxc.started <salt.states.lxc.started>` state has been renamed to ``lxc.running`` Ensure that a container is running .. note:: This state does not enforce the existence of the named container, it just starts the container if it is not runn...
[ "..", "versionchanged", "::", "2015", ".", "5", ".", "0", "The", ":", "mod", ":", "lxc", ".", "started", "<salt", ".", "states", ".", "lxc", ".", "started", ">", "state", "has", "been", "renamed", "to", "lxc", ".", "running" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/lxc.py#L383-L480
train
Ensure that a named container is running.
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/states/lxc.py
stopped
def stopped(name, kill=False, path=None): ''' Ensure that a container is stopped .. note:: This state does not enforce the existence of the named container, it just stops the container if it running or frozen. To ensure that the named container exists, use :mod:`lxc.present ...
python
def stopped(name, kill=False, path=None): ''' Ensure that a container is stopped .. note:: This state does not enforce the existence of the named container, it just stops the container if it running or frozen. To ensure that the named container exists, use :mod:`lxc.present ...
[ "def", "stopped", "(", "name", ",", "kill", "=", "False", ",", "path", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "True", ",", "'comment'", ":", "'Container \\'{0}\\' is already stopped'", ".", "format", "(", "na...
Ensure that a container is stopped .. note:: This state does not enforce the existence of the named container, it just stops the container if it running or frozen. To ensure that the named container exists, use :mod:`lxc.present <salt.states.lxc.present>`, or use the :mod:`lxc.abse...
[ "Ensure", "that", "a", "container", "is", "stopped" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/lxc.py#L570-L646
train
Ensure that a named container is stopped.
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/states/lxc.py
edited_conf
def edited_conf(name, lxc_conf=None, lxc_conf_unset=None): ''' .. warning:: This state is unsuitable for setting parameters that appear more than once in an LXC config file, or parameters which must appear in a certain order (such as when configuring more than one network interf...
python
def edited_conf(name, lxc_conf=None, lxc_conf_unset=None): ''' .. warning:: This state is unsuitable for setting parameters that appear more than once in an LXC config file, or parameters which must appear in a certain order (such as when configuring more than one network interf...
[ "def", "edited_conf", "(", "name", ",", "lxc_conf", "=", "None", ",", "lxc_conf_unset", "=", "None", ")", ":", "if", "__opts__", "[", "'test'", "]", ":", "return", "{", "'name'", ":", "name", ",", "'comment'", ":", "'{0} lxc.conf will be edited'", ".", "fo...
.. warning:: This state is unsuitable for setting parameters that appear more than once in an LXC config file, or parameters which must appear in a certain order (such as when configuring more than one network interface). `Issue #35523`_ was opened to track the addition of a su...
[ "..", "warning", "::" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/lxc.py#L676-L725
train
Edit the LXC configuration file for a specific entry in a specific LXC 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/thin.py
generate
def generate(extra_mods='', overwrite=False, so_mods='', python2_bin='python2', python3_bin='python3', absonly=True, compress='gzip'): ''' Generate the salt-thin tarball and print the location of the tarball Optional additional mods to include (e.g. mako) can be supplied as a comma...
python
def generate(extra_mods='', overwrite=False, so_mods='', python2_bin='python2', python3_bin='python3', absonly=True, compress='gzip'): ''' Generate the salt-thin tarball and print the location of the tarball Optional additional mods to include (e.g. mako) can be supplied as a comma...
[ "def", "generate", "(", "extra_mods", "=", "''", ",", "overwrite", "=", "False", ",", "so_mods", "=", "''", ",", "python2_bin", "=", "'python2'", ",", "python3_bin", "=", "'python3'", ",", "absonly", "=", "True", ",", "compress", "=", "'gzip'", ")", ":",...
Generate the salt-thin tarball and print the location of the tarball Optional additional mods to include (e.g. mako) can be supplied as a comma delimited string. Permits forcing an overwrite of the output file as well. CLI Example: .. code-block:: bash salt-run thin.generate salt-run...
[ "Generate", "the", "salt", "-", "thin", "tarball", "and", "print", "the", "location", "of", "the", "tarball", "Optional", "additional", "mods", "to", "include", "(", "e", ".", "g", ".", "mako", ")", "can", "be", "supplied", "as", "a", "comma", "delimited...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/thin.py#L17-L45
train
Generate a salt - thin tarball and print the location of the tarball.
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/thin.py
generate_min
def generate_min(extra_mods='', overwrite=False, so_mods='', python2_bin='python2', python3_bin='python3'): ''' Generate the salt-thin tarball and print the location of the tarball Optional additional mods to include (e.g. mako) can be supplied as a comma delimited string. Permits forcing ...
python
def generate_min(extra_mods='', overwrite=False, so_mods='', python2_bin='python2', python3_bin='python3'): ''' Generate the salt-thin tarball and print the location of the tarball Optional additional mods to include (e.g. mako) can be supplied as a comma delimited string. Permits forcing ...
[ "def", "generate_min", "(", "extra_mods", "=", "''", ",", "overwrite", "=", "False", ",", "so_mods", "=", "''", ",", "python2_bin", "=", "'python2'", ",", "python3_bin", "=", "'python3'", ")", ":", "conf_mods", "=", "__opts__", ".", "get", "(", "'min_extra...
Generate the salt-thin tarball and print the location of the tarball Optional additional mods to include (e.g. mako) can be supplied as a comma delimited string. Permits forcing an overwrite of the output file as well. CLI Example: .. code-block:: bash salt-run thin.generate_min
[ "Generate", "the", "salt", "-", "thin", "tarball", "and", "print", "the", "location", "of", "the", "tarball", "Optional", "additional", "mods", "to", "include", "(", "e", ".", "g", ".", "mako", ")", "can", "be", "supplied", "as", "a", "comma", "delimited...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/thin.py#L48-L70
train
Generate the salt - thin tarball and print the location of the tarball.
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/auth/rest.py
auth
def auth(username, password): ''' REST authentication ''' url = rest_auth_setup() data = {'username': username, 'password': password} # Post to the API endpoint. If 200 is returned then the result will be the ACLs # for this user result = salt.utils.http.query(url, method='POST', data...
python
def auth(username, password): ''' REST authentication ''' url = rest_auth_setup() data = {'username': username, 'password': password} # Post to the API endpoint. If 200 is returned then the result will be the ACLs # for this user result = salt.utils.http.query(url, method='POST', data...
[ "def", "auth", "(", "username", ",", "password", ")", ":", "url", "=", "rest_auth_setup", "(", ")", "data", "=", "{", "'username'", ":", "username", ",", "'password'", ":", "password", "}", "# Post to the API endpoint. If 200 is returned then the result will be the AC...
REST authentication
[ "REST", "authentication" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/rest.py#L50-L70
train
This function is used to authenticate a user with the ACLs.
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/states/github.py
present
def present(name, profile="github", **kwargs): ''' Ensure a user is present .. code-block:: yaml ensure user test is present in github: github.present: - name: 'gitexample' The following parameters are required: name This is the github handle of the us...
python
def present(name, profile="github", **kwargs): ''' Ensure a user is present .. code-block:: yaml ensure user test is present in github: github.present: - name: 'gitexample' The following parameters are required: name This is the github handle of the us...
[ "def", "present", "(", "name", ",", "profile", "=", "\"github\"", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "None", ",", "'comment'", ":", "''", "}", "target", ...
Ensure a user is present .. code-block:: yaml ensure user test is present in github: github.present: - name: 'gitexample' The following parameters are required: name This is the github handle of the user in the organization
[ "Ensure", "a", "user", "is", "present" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/github.py#L40-L93
train
Ensure a user is present in github
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/states/github.py
absent
def absent(name, profile="github", **kwargs): ''' Ensure a github user is absent .. code-block:: yaml ensure user test is absent in github: github.absent: - name: 'Example TestUser1' - email: example@domain.com - username: 'gitexample' ...
python
def absent(name, profile="github", **kwargs): ''' Ensure a github user is absent .. code-block:: yaml ensure user test is absent in github: github.absent: - name: 'Example TestUser1' - email: example@domain.com - username: 'gitexample' ...
[ "def", "absent", "(", "name", ",", "profile", "=", "\"github\"", ",", "*", "*", "kwargs", ")", ":", "email", "=", "kwargs", ".", "get", "(", "'email'", ")", "full_name", "=", "kwargs", ".", "get", "(", "'fullname'", ")", "ret", "=", "{", "'name'", ...
Ensure a github user is absent .. code-block:: yaml ensure user test is absent in github: github.absent: - name: 'Example TestUser1' - email: example@domain.com - username: 'gitexample' The following parameters are required: name ...
[ "Ensure", "a", "github", "user", "is", "absent" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/github.py#L96-L151
train
Ensure a github user is absent in github
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/states/github.py
team_present
def team_present( name, description=None, repo_names=None, privacy='secret', permission='pull', members=None, enforce_mfa=False, no_mfa_grace_seconds=0, profile="github", **kwargs): ''' Ensure a team is present name Thi...
python
def team_present( name, description=None, repo_names=None, privacy='secret', permission='pull', members=None, enforce_mfa=False, no_mfa_grace_seconds=0, profile="github", **kwargs): ''' Ensure a team is present name Thi...
[ "def", "team_present", "(", "name", ",", "description", "=", "None", ",", "repo_names", "=", "None", ",", "privacy", "=", "'secret'", ",", "permission", "=", "'pull'", ",", "members", "=", "None", ",", "enforce_mfa", "=", "False", ",", "no_mfa_grace_seconds"...
Ensure a team is present name This is the name of the team in the organization. description The description of the team. repo_names The names of repositories to add the team to. privacy The level of privacy for the team, can be 'secret' or 'closed'. Defaults t...
[ "Ensure", "a", "team", "is", "present" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/github.py#L154-L413
train
Ensure a team is present in the github.
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/states/github.py
team_absent
def team_absent(name, profile="github", **kwargs): ''' Ensure a team is absent. Example: .. code-block:: yaml ensure team test is present in github: github.team_absent: - name: 'test' The following parameters are required: name This is the name o...
python
def team_absent(name, profile="github", **kwargs): ''' Ensure a team is absent. Example: .. code-block:: yaml ensure team test is present in github: github.team_absent: - name: 'test' The following parameters are required: name This is the name o...
[ "def", "team_absent", "(", "name", ",", "profile", "=", "\"github\"", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "None", ",", "'comment'", ":", "''", "}", "targe...
Ensure a team is absent. Example: .. code-block:: yaml ensure team test is present in github: github.team_absent: - name: 'test' The following parameters are required: name This is the name of the team in the organization. .. versionadded:: 2016.11....
[ "Ensure", "a", "team", "is", "absent", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/github.py#L424-L473
train
Ensure a team is absent in github.
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/states/github.py
repo_present
def repo_present( name, description=None, homepage=None, private=None, has_issues=None, has_wiki=None, has_downloads=None, auto_init=False, gitignore_template=None, license_template=None, teams=None, profile="github", ...
python
def repo_present( name, description=None, homepage=None, private=None, has_issues=None, has_wiki=None, has_downloads=None, auto_init=False, gitignore_template=None, license_template=None, teams=None, profile="github", ...
[ "def", "repo_present", "(", "name", ",", "description", "=", "None", ",", "homepage", "=", "None", ",", "private", "=", "None", ",", "has_issues", "=", "None", ",", "has_wiki", "=", "None", ",", "has_downloads", "=", "None", ",", "auto_init", "=", "False...
Ensure a repository is present name This is the name of the repository. description The description of the repository. homepage The URL with more information about the repository. private The visiblity of the repository. Note that private repositories require ...
[ "Ensure", "a", "repository", "is", "present" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/github.py#L476-L728
train
Ensure a repository is present in github.
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/roster/dir.py
targets
def targets(tgt, tgt_type='glob', **kwargs): ''' Return the targets from the directory of flat yaml files, checks opts for location. ''' roster_dir = __opts__.get('roster_dir', '/etc/salt/roster.d') # Match the targets before rendering to avoid opening files unnecessarily. raw = dict.fromkey...
python
def targets(tgt, tgt_type='glob', **kwargs): ''' Return the targets from the directory of flat yaml files, checks opts for location. ''' roster_dir = __opts__.get('roster_dir', '/etc/salt/roster.d') # Match the targets before rendering to avoid opening files unnecessarily. raw = dict.fromkey...
[ "def", "targets", "(", "tgt", ",", "tgt_type", "=", "'glob'", ",", "*", "*", "kwargs", ")", ":", "roster_dir", "=", "__opts__", ".", "get", "(", "'roster_dir'", ",", "'/etc/salt/roster.d'", ")", "# Match the targets before rendering to avoid opening files unnecessaril...
Return the targets from the directory of flat yaml files, checks opts for location.
[ "Return", "the", "targets", "from", "the", "directory", "of", "flat", "yaml", "files", "checks", "opts", "for", "location", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/roster/dir.py#L63-L79
train
Return the targets from the directory of flat yaml files
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/roster/dir.py
_render
def _render(roster_file, **kwargs): """ Render the roster file """ renderers = salt.loader.render(__opts__, {}) domain = __opts__.get('roster_domain', '') try: result = salt.template.compile_template(roster_file, renderers, ...
python
def _render(roster_file, **kwargs): """ Render the roster file """ renderers = salt.loader.render(__opts__, {}) domain = __opts__.get('roster_domain', '') try: result = salt.template.compile_template(roster_file, renderers, ...
[ "def", "_render", "(", "roster_file", ",", "*", "*", "kwargs", ")", ":", "renderers", "=", "salt", ".", "loader", ".", "render", "(", "__opts__", ",", "{", "}", ")", "domain", "=", "__opts__", ".", "get", "(", "'roster_domain'", ",", "''", ")", "try"...
Render the roster file
[ "Render", "the", "roster", "file" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/roster/dir.py#L82-L100
train
Render the roster file and return the result
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/disk.py
_parse_numbers
def _parse_numbers(text): ''' Convert a string to a number, allowing for a K|M|G|T postfix, 32.8K. Returns a decimal number if the string is a real number, or the string unchanged otherwise. ''' if text.isdigit(): return decimal.Decimal(text) try: postPrefixes = {'K': '10E3'...
python
def _parse_numbers(text): ''' Convert a string to a number, allowing for a K|M|G|T postfix, 32.8K. Returns a decimal number if the string is a real number, or the string unchanged otherwise. ''' if text.isdigit(): return decimal.Decimal(text) try: postPrefixes = {'K': '10E3'...
[ "def", "_parse_numbers", "(", "text", ")", ":", "if", "text", ".", "isdigit", "(", ")", ":", "return", "decimal", ".", "Decimal", "(", "text", ")", "try", ":", "postPrefixes", "=", "{", "'K'", ":", "'10E3'", ",", "'M'", ":", "'10E6'", ",", "'G'", "...
Convert a string to a number, allowing for a K|M|G|T postfix, 32.8K. Returns a decimal number if the string is a real number, or the string unchanged otherwise.
[ "Convert", "a", "string", "to", "a", "number", "allowing", "for", "a", "K|M|G|T", "postfix", "32", ".", "8K", ".", "Returns", "a", "decimal", "number", "if", "the", "string", "is", "a", "real", "number", "or", "the", "string", "unchanged", "otherwise", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/disk.py#L45-L63
train
Convert a string to a number allowing for a K M G T postfix 32. 8K.
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/disk.py
_clean_flags
def _clean_flags(args, caller): ''' Sanitize flags passed into df ''' flags = '' if args is None: return flags allowed = ('a', 'B', 'h', 'H', 'i', 'k', 'l', 'P', 't', 'T', 'x', 'v') for flag in args: if flag in allowed: flags += flag else: rais...
python
def _clean_flags(args, caller): ''' Sanitize flags passed into df ''' flags = '' if args is None: return flags allowed = ('a', 'B', 'h', 'H', 'i', 'k', 'l', 'P', 't', 'T', 'x', 'v') for flag in args: if flag in allowed: flags += flag else: rais...
[ "def", "_clean_flags", "(", "args", ",", "caller", ")", ":", "flags", "=", "''", "if", "args", "is", "None", ":", "return", "flags", "allowed", "=", "(", "'a'", ",", "'B'", ",", "'h'", ",", "'H'", ",", "'i'", ",", "'k'", ",", "'l'", ",", "'P'", ...
Sanitize flags passed into df
[ "Sanitize", "flags", "passed", "into", "df" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/disk.py#L66-L81
train
Clean the flags passed into df
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/disk.py
usage
def usage(args=None): ''' Return usage information for volumes mounted on this minion .. versionchanged:: 2019.2.0 Default for SunOS changed to 1 kilobyte blocks CLI Example: .. code-block:: bash salt '*' disk.usage ''' flags = _clean_flags(args, 'disk.usage') if not...
python
def usage(args=None): ''' Return usage information for volumes mounted on this minion .. versionchanged:: 2019.2.0 Default for SunOS changed to 1 kilobyte blocks CLI Example: .. code-block:: bash salt '*' disk.usage ''' flags = _clean_flags(args, 'disk.usage') if not...
[ "def", "usage", "(", "args", "=", "None", ")", ":", "flags", "=", "_clean_flags", "(", "args", ",", "'disk.usage'", ")", "if", "not", "os", ".", "path", ".", "isfile", "(", "'/etc/mtab'", ")", "and", "__grains__", "[", "'kernel'", "]", "==", "'Linux'",...
Return usage information for volumes mounted on this minion .. versionchanged:: 2019.2.0 Default for SunOS changed to 1 kilobyte blocks CLI Example: .. code-block:: bash salt '*' disk.usage
[ "Return", "usage", "information", "for", "volumes", "mounted", "on", "this", "minion" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/disk.py#L84-L160
train
Return usage information for volumes mounted on this minion
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/disk.py
inodeusage
def inodeusage(args=None): ''' Return inode usage information for volumes mounted on this minion CLI Example: .. code-block:: bash salt '*' disk.inodeusage ''' flags = _clean_flags(args, 'disk.inodeusage') if __grains__['kernel'] == 'AIX': cmd = 'df -i' else: c...
python
def inodeusage(args=None): ''' Return inode usage information for volumes mounted on this minion CLI Example: .. code-block:: bash salt '*' disk.inodeusage ''' flags = _clean_flags(args, 'disk.inodeusage') if __grains__['kernel'] == 'AIX': cmd = 'df -i' else: c...
[ "def", "inodeusage", "(", "args", "=", "None", ")", ":", "flags", "=", "_clean_flags", "(", "args", ",", "'disk.inodeusage'", ")", "if", "__grains__", "[", "'kernel'", "]", "==", "'AIX'", ":", "cmd", "=", "'df -i'", "else", ":", "cmd", "=", "'df -iP'", ...
Return inode usage information for volumes mounted on this minion CLI Example: .. code-block:: bash salt '*' disk.inodeusage
[ "Return", "inode", "usage", "information", "for", "volumes", "mounted", "on", "this", "minion" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/disk.py#L163-L218
train
Return inode usage information for volumes mounted on this minion
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/disk.py
percent
def percent(args=None): ''' Return partition information for volumes mounted on this minion CLI Example: .. code-block:: bash salt '*' disk.percent /var ''' if __grains__['kernel'] == 'Linux': cmd = 'df -P' elif __grains__['kernel'] == 'OpenBSD' or __grains__['kernel'] == ...
python
def percent(args=None): ''' Return partition information for volumes mounted on this minion CLI Example: .. code-block:: bash salt '*' disk.percent /var ''' if __grains__['kernel'] == 'Linux': cmd = 'df -P' elif __grains__['kernel'] == 'OpenBSD' or __grains__['kernel'] == ...
[ "def", "percent", "(", "args", "=", "None", ")", ":", "if", "__grains__", "[", "'kernel'", "]", "==", "'Linux'", ":", "cmd", "=", "'df -P'", "elif", "__grains__", "[", "'kernel'", "]", "==", "'OpenBSD'", "or", "__grains__", "[", "'kernel'", "]", "==", ...
Return partition information for volumes mounted on this minion CLI Example: .. code-block:: bash salt '*' disk.percent /var
[ "Return", "partition", "information", "for", "volumes", "mounted", "on", "this", "minion" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/disk.py#L221-L267
train
Return partition information for volumes mounted on this minion
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/disk.py
blkid
def blkid(device=None, token=None): ''' Return block device attributes: UUID, LABEL, etc. This function only works on systems where blkid is available. device Device name from the system token Any valid token used for the search CLI Example: .. code-block:: bash ...
python
def blkid(device=None, token=None): ''' Return block device attributes: UUID, LABEL, etc. This function only works on systems where blkid is available. device Device name from the system token Any valid token used for the search CLI Example: .. code-block:: bash ...
[ "def", "blkid", "(", "device", "=", "None", ",", "token", "=", "None", ")", ":", "cmd", "=", "[", "'blkid'", "]", "if", "device", ":", "cmd", ".", "append", "(", "device", ")", "elif", "token", ":", "cmd", ".", "extend", "(", "[", "'-t'", ",", ...
Return block device attributes: UUID, LABEL, etc. This function only works on systems where blkid is available. device Device name from the system token Any valid token used for the search CLI Example: .. code-block:: bash salt '*' disk.blkid salt '*' disk.blkid ...
[ "Return", "block", "device", "attributes", ":", "UUID", "LABEL", "etc", ".", "This", "function", "only", "works", "on", "systems", "where", "blkid", "is", "available", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/disk.py#L271-L315
train
Return a dict of all available block devices and attributes.
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/disk.py
tune
def tune(device, **kwargs): ''' Set attributes for the specified device CLI Example: .. code-block:: bash salt '*' disk.tune /dev/sda1 read-ahead=1024 read-write=True Valid options are: ``read-ahead``, ``filesystem-read-ahead``, ``read-only``, ``read-write``. See the ``blockdev(...
python
def tune(device, **kwargs): ''' Set attributes for the specified device CLI Example: .. code-block:: bash salt '*' disk.tune /dev/sda1 read-ahead=1024 read-write=True Valid options are: ``read-ahead``, ``filesystem-read-ahead``, ``read-only``, ``read-write``. See the ``blockdev(...
[ "def", "tune", "(", "device", ",", "*", "*", "kwargs", ")", ":", "kwarg_map", "=", "{", "'read-ahead'", ":", "'setra'", ",", "'filesystem-read-ahead'", ":", "'setfra'", ",", "'read-only'", ":", "'setro'", ",", "'read-write'", ":", "'setrw'", "}", "opts", "...
Set attributes for the specified device CLI Example: .. code-block:: bash salt '*' disk.tune /dev/sda1 read-ahead=1024 read-write=True Valid options are: ``read-ahead``, ``filesystem-read-ahead``, ``read-only``, ``read-write``. See the ``blockdev(8)`` manpage for a more complete descrip...
[ "Set", "attributes", "for", "the", "specified", "device" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/disk.py#L318-L354
train
Tune the specified device
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/disk.py
wipe
def wipe(device): ''' Remove the filesystem information CLI Example: .. code-block:: bash salt '*' disk.wipe /dev/sda1 ''' cmd = 'wipefs -a {0}'.format(device) try: out = __salt__['cmd.run_all'](cmd, python_shell=False) except subprocess.CalledProcessError as err: ...
python
def wipe(device): ''' Remove the filesystem information CLI Example: .. code-block:: bash salt '*' disk.wipe /dev/sda1 ''' cmd = 'wipefs -a {0}'.format(device) try: out = __salt__['cmd.run_all'](cmd, python_shell=False) except subprocess.CalledProcessError as err: ...
[ "def", "wipe", "(", "device", ")", ":", "cmd", "=", "'wipefs -a {0}'", ".", "format", "(", "device", ")", "try", ":", "out", "=", "__salt__", "[", "'cmd.run_all'", "]", "(", "cmd", ",", "python_shell", "=", "False", ")", "except", "subprocess", ".", "C...
Remove the filesystem information CLI Example: .. code-block:: bash salt '*' disk.wipe /dev/sda1
[ "Remove", "the", "filesystem", "information" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/disk.py#L357-L377
train
Remove the filesystem information of a specific device
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/disk.py
dump
def dump(device, args=None): ''' Return all contents of dumpe2fs for a specified device CLI Example: .. code-block:: bash salt '*' disk.dump /dev/sda1 ''' cmd = 'blockdev --getro --getsz --getss --getpbsz --getiomin --getioopt --getalignoff ' \ '--getmaxsect --getsize --getsi...
python
def dump(device, args=None): ''' Return all contents of dumpe2fs for a specified device CLI Example: .. code-block:: bash salt '*' disk.dump /dev/sda1 ''' cmd = 'blockdev --getro --getsz --getss --getpbsz --getiomin --getioopt --getalignoff ' \ '--getmaxsect --getsize --getsi...
[ "def", "dump", "(", "device", ",", "args", "=", "None", ")", ":", "cmd", "=", "'blockdev --getro --getsz --getss --getpbsz --getiomin --getioopt --getalignoff '", "'--getmaxsect --getsize --getsize64 --getra --getfra {0}'", ".", "format", "(", "device", ")", "ret", "=", "{"...
Return all contents of dumpe2fs for a specified device CLI Example: .. code-block:: bash salt '*' disk.dump /dev/sda1
[ "Return", "all", "contents", "of", "dumpe2fs", "for", "a", "specified", "device" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/disk.py#L380-L408
train
Return all contents of dumpe2fs for a specified device
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/disk.py
format_
def format_(device, fs_type='ext4', inode_size=None, lazy_itable_init=None, fat=None, force=False): ''' Format a filesystem onto a device .. versionadded:: 2016.11.0 device The device in which to create the new filesystem fs_type...
python
def format_(device, fs_type='ext4', inode_size=None, lazy_itable_init=None, fat=None, force=False): ''' Format a filesystem onto a device .. versionadded:: 2016.11.0 device The device in which to create the new filesystem fs_type...
[ "def", "format_", "(", "device", ",", "fs_type", "=", "'ext4'", ",", "inode_size", "=", "None", ",", "lazy_itable_init", "=", "None", ",", "fat", "=", "None", ",", "force", "=", "False", ")", ":", "cmd", "=", "[", "'mkfs'", ",", "'-t'", ",", "six", ...
Format a filesystem onto a device .. versionadded:: 2016.11.0 device The device in which to create the new filesystem fs_type The type of filesystem to create inode_size Size of the inodes This option is only enabled for ext and xfs filesystems lazy_itable_init ...
[ "Format", "a", "filesystem", "onto", "a", "device" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/disk.py#L431-L502
train
This function formats a filesystem onto a device.
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/disk.py
fstype
def fstype(device): ''' Return the filesystem name of the specified device .. versionadded:: 2016.11.0 device The name of the device CLI Example: .. code-block:: bash salt '*' disk.fstype /dev/sdX1 ''' if salt.utils.path.which('lsblk'): lsblk_out = __salt__['...
python
def fstype(device): ''' Return the filesystem name of the specified device .. versionadded:: 2016.11.0 device The name of the device CLI Example: .. code-block:: bash salt '*' disk.fstype /dev/sdX1 ''' if salt.utils.path.which('lsblk'): lsblk_out = __salt__['...
[ "def", "fstype", "(", "device", ")", ":", "if", "salt", ".", "utils", ".", "path", ".", "which", "(", "'lsblk'", ")", ":", "lsblk_out", "=", "__salt__", "[", "'cmd.run'", "]", "(", "'lsblk -o fstype {0}'", ".", "format", "(", "device", ")", ")", ".", ...
Return the filesystem name of the specified device .. versionadded:: 2016.11.0 device The name of the device CLI Example: .. code-block:: bash salt '*' disk.fstype /dev/sdX1
[ "Return", "the", "filesystem", "name", "of", "the", "specified", "device" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/disk.py#L506-L544
train
Return the filesystem name of the specified device
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/disk.py
_hdparm
def _hdparm(args, failhard=True): ''' Execute hdparm Fail hard when required return output when possible ''' cmd = 'hdparm {0}'.format(args) result = __salt__['cmd.run_all'](cmd) if result['retcode'] != 0: msg = '{0}: {1}'.format(cmd, result['stderr']) if failhard: ...
python
def _hdparm(args, failhard=True): ''' Execute hdparm Fail hard when required return output when possible ''' cmd = 'hdparm {0}'.format(args) result = __salt__['cmd.run_all'](cmd) if result['retcode'] != 0: msg = '{0}: {1}'.format(cmd, result['stderr']) if failhard: ...
[ "def", "_hdparm", "(", "args", ",", "failhard", "=", "True", ")", ":", "cmd", "=", "'hdparm {0}'", ".", "format", "(", "args", ")", "result", "=", "__salt__", "[", "'cmd.run_all'", "]", "(", "cmd", ")", "if", "result", "[", "'retcode'", "]", "!=", "0...
Execute hdparm Fail hard when required return output when possible
[ "Execute", "hdparm", "Fail", "hard", "when", "required", "return", "output", "when", "possible" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/disk.py#L548-L563
train
Execute hdparm fail hard when required return output when 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/modules/disk.py
hdparms
def hdparms(disks, args=None): ''' Retrieve all info's for all disks parse 'em into a nice dict (which, considering hdparms output, is quite a hassle) .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' disk.hdparms /dev/sda ''' all_parms = 'aAbBcCdgHiJkM...
python
def hdparms(disks, args=None): ''' Retrieve all info's for all disks parse 'em into a nice dict (which, considering hdparms output, is quite a hassle) .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' disk.hdparms /dev/sda ''' all_parms = 'aAbBcCdgHiJkM...
[ "def", "hdparms", "(", "disks", ",", "args", "=", "None", ")", ":", "all_parms", "=", "'aAbBcCdgHiJkMmNnQrRuW'", "if", "args", "is", "None", ":", "args", "=", "all_parms", "elif", "isinstance", "(", "args", ",", "(", "list", ",", "tuple", ")", ")", ":"...
Retrieve all info's for all disks parse 'em into a nice dict (which, considering hdparms output, is quite a hassle) .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' disk.hdparms /dev/sda
[ "Retrieve", "all", "info", "s", "for", "all", "disks", "parse", "em", "into", "a", "nice", "dict", "(", "which", "considering", "hdparms", "output", "is", "quite", "a", "hassle", ")" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/disk.py#L567-L640
train
Retrieve all info s for all disks and return a nice dict containing the info s for all disks.
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/disk.py
hpa
def hpa(disks, size=None): ''' Get/set Host Protected Area settings T13 INCITS 346-2001 (1367D) defines the BEER (Boot Engineering Extension Record) and PARTIES (Protected Area Run Time Interface Extension Services), allowing for a Host Protected Area on a disk. It's often used by OEMS to hide...
python
def hpa(disks, size=None): ''' Get/set Host Protected Area settings T13 INCITS 346-2001 (1367D) defines the BEER (Boot Engineering Extension Record) and PARTIES (Protected Area Run Time Interface Extension Services), allowing for a Host Protected Area on a disk. It's often used by OEMS to hide...
[ "def", "hpa", "(", "disks", ",", "size", "=", "None", ")", ":", "hpa_data", "=", "{", "}", "for", "disk", ",", "data", "in", "hdparms", "(", "disks", ",", "'N'", ")", ".", "items", "(", ")", ":", "visible", ",", "total", ",", "status", "=", "da...
Get/set Host Protected Area settings T13 INCITS 346-2001 (1367D) defines the BEER (Boot Engineering Extension Record) and PARTIES (Protected Area Run Time Interface Extension Services), allowing for a Host Protected Area on a disk. It's often used by OEMS to hide parts of a disk, and for overprovision...
[ "Get", "/", "set", "Host", "Protected", "Area", "settings" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/disk.py#L644-L696
train
Return a HPA file for the given set of disks.
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/disk.py
smart_attributes
def smart_attributes(dev, attributes=None, values=None): ''' Fetch SMART attributes Providing attributes will deliver only requested attributes Providing values will deliver only requested values for attributes Default is the Backblaze recommended set (https://www.backblaze.com/blog/hard-drive-...
python
def smart_attributes(dev, attributes=None, values=None): ''' Fetch SMART attributes Providing attributes will deliver only requested attributes Providing values will deliver only requested values for attributes Default is the Backblaze recommended set (https://www.backblaze.com/blog/hard-drive-...
[ "def", "smart_attributes", "(", "dev", ",", "attributes", "=", "None", ",", "values", "=", "None", ")", ":", "if", "not", "dev", ".", "startswith", "(", "'/dev/'", ")", ":", "dev", "=", "'/dev/'", "+", "dev", "cmd", "=", "'smartctl --attributes {0}'", "....
Fetch SMART attributes Providing attributes will deliver only requested attributes Providing values will deliver only requested values for attributes Default is the Backblaze recommended set (https://www.backblaze.com/blog/hard-drive-smart-stats/): (5,187,188,197,198) .. versionadded:: 2016.3....
[ "Fetch", "SMART", "attributes", "Providing", "attributes", "will", "deliver", "only", "requested", "attributes", "Providing", "values", "will", "deliver", "only", "requested", "values", "for", "attributes" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/disk.py#L699-L769
train
Fetches SMART attributes for a given device
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/disk.py
iostat
def iostat(interval=1, count=5, disks=None): ''' Gather and return (averaged) IO stats. .. versionadded:: 2016.3.0 .. versionchanged:: 2016.11.4 Added support for AIX CLI Example: .. code-block:: bash salt '*' disk.iostat 1 5 disks=sda ''' if salt.utils.platform.is_l...
python
def iostat(interval=1, count=5, disks=None): ''' Gather and return (averaged) IO stats. .. versionadded:: 2016.3.0 .. versionchanged:: 2016.11.4 Added support for AIX CLI Example: .. code-block:: bash salt '*' disk.iostat 1 5 disks=sda ''' if salt.utils.platform.is_l...
[ "def", "iostat", "(", "interval", "=", "1", ",", "count", "=", "5", ",", "disks", "=", "None", ")", ":", "if", "salt", ".", "utils", ".", "platform", ".", "is_linux", "(", ")", ":", "return", "_iostat_linux", "(", "interval", ",", "count", ",", "di...
Gather and return (averaged) IO stats. .. versionadded:: 2016.3.0 .. versionchanged:: 2016.11.4 Added support for AIX CLI Example: .. code-block:: bash salt '*' disk.iostat 1 5 disks=sda
[ "Gather", "and", "return", "(", "averaged", ")", "IO", "stats", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/disk.py#L773-L793
train
Gather and return IO stats.
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/disk.py
_iostats_dict
def _iostats_dict(header, stats): ''' Transpose collected data, average it, stomp it in dict using header Use Decimals so we can properly calc & round, convert to float 'caus' we can't transmit Decimals over 0mq ''' stats = [float((sum(stat) / len(stat)).quantize(decimal.Decimal('.01'))) for stat i...
python
def _iostats_dict(header, stats): ''' Transpose collected data, average it, stomp it in dict using header Use Decimals so we can properly calc & round, convert to float 'caus' we can't transmit Decimals over 0mq ''' stats = [float((sum(stat) / len(stat)).quantize(decimal.Decimal('.01'))) for stat i...
[ "def", "_iostats_dict", "(", "header", ",", "stats", ")", ":", "stats", "=", "[", "float", "(", "(", "sum", "(", "stat", ")", "/", "len", "(", "stat", ")", ")", ".", "quantize", "(", "decimal", ".", "Decimal", "(", "'.01'", ")", ")", ")", "for", ...
Transpose collected data, average it, stomp it in dict using header Use Decimals so we can properly calc & round, convert to float 'caus' we can't transmit Decimals over 0mq
[ "Transpose", "collected", "data", "average", "it", "stomp", "it", "in", "dict", "using", "header" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/disk.py#L796-L804
train
Convert stats to 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/disk.py
_iostat_fbsd
def _iostat_fbsd(interval, count, disks): ''' Tested on FreeBSD, quite likely other BSD's only need small changes in cmd syntax ''' if disks is None: iostat_cmd = 'iostat -xC -w {0} -c {1} '.format(interval, count) elif isinstance(disks, six.string_types): iostat_cmd = 'iostat -x -w ...
python
def _iostat_fbsd(interval, count, disks): ''' Tested on FreeBSD, quite likely other BSD's only need small changes in cmd syntax ''' if disks is None: iostat_cmd = 'iostat -xC -w {0} -c {1} '.format(interval, count) elif isinstance(disks, six.string_types): iostat_cmd = 'iostat -x -w ...
[ "def", "_iostat_fbsd", "(", "interval", ",", "count", ",", "disks", ")", ":", "if", "disks", "is", "None", ":", "iostat_cmd", "=", "'iostat -xC -w {0} -c {1} '", ".", "format", "(", "interval", ",", "count", ")", "elif", "isinstance", "(", "disks", ",", "s...
Tested on FreeBSD, quite likely other BSD's only need small changes in cmd syntax
[ "Tested", "on", "FreeBSD", "quite", "likely", "other", "BSD", "s", "only", "need", "small", "changes", "in", "cmd", "syntax" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/disk.py#L807-L860
train
Return a list of iostats for the given interval and disks
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/disk.py
_iostat_aix
def _iostat_aix(interval, count, disks): ''' AIX support to gather and return (averaged) IO stats. ''' log.debug('DGM disk iostat entry') if disks is None: iostat_cmd = 'iostat -dD {0} {1} '.format(interval, count) elif isinstance(disks, six.string_types): iostat_cmd = 'iostat -...
python
def _iostat_aix(interval, count, disks): ''' AIX support to gather and return (averaged) IO stats. ''' log.debug('DGM disk iostat entry') if disks is None: iostat_cmd = 'iostat -dD {0} {1} '.format(interval, count) elif isinstance(disks, six.string_types): iostat_cmd = 'iostat -...
[ "def", "_iostat_aix", "(", "interval", ",", "count", ",", "disks", ")", ":", "log", ".", "debug", "(", "'DGM disk iostat entry'", ")", "if", "disks", "is", "None", ":", "iostat_cmd", "=", "'iostat -dD {0} {1} '", ".", "format", "(", "interval", ",", "count",...
AIX support to gather and return (averaged) IO stats.
[ "AIX", "support", "to", "gather", "and", "return", "(", "averaged", ")", "IO", "stats", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/disk.py#L906-L1003
train
Return AIX IO stats for the current iostat entry.
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/beacons/http_status.py
validate
def validate(config): ''' Validate the beacon configuration ''' valid = True messages = [] if not isinstance(config, list): valid = False messages.append('[-] Configuration for %s beacon must be a list', config) else: _config = {} list(map(_config.update, con...
python
def validate(config): ''' Validate the beacon configuration ''' valid = True messages = [] if not isinstance(config, list): valid = False messages.append('[-] Configuration for %s beacon must be a list', config) else: _config = {} list(map(_config.update, con...
[ "def", "validate", "(", "config", ")", ":", "valid", "=", "True", "messages", "=", "[", "]", "if", "not", "isinstance", "(", "config", ",", "list", ")", ":", "valid", "=", "False", "messages", ".", "append", "(", "'[-] Configuration for %s beacon must be a l...
Validate the beacon configuration
[ "Validate", "the", "beacon", "configuration" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/beacons/http_status.py#L45-L85
train
Validate the beacon configuration
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/beacons/http_status.py
beacon
def beacon(config): ''' Check on different service status reported by the django-server-status library. .. code-block:: yaml beacons: http_status: - sites: example-site-1: url: "https://example.com/status" timeout: 30 ...
python
def beacon(config): ''' Check on different service status reported by the django-server-status library. .. code-block:: yaml beacons: http_status: - sites: example-site-1: url: "https://example.com/status" timeout: 30 ...
[ "def", "beacon", "(", "config", ")", ":", "ret", "=", "[", "]", "_config", "=", "{", "}", "list", "(", "map", "(", "_config", ".", "update", ",", "config", ")", ")", "for", "site", ",", "site_config", "in", "_config", ".", "get", "(", "'sites'", ...
Check on different service status reported by the django-server-status library. .. code-block:: yaml beacons: http_status: - sites: example-site-1: url: "https://example.com/status" timeout: 30 content-type: js...
[ "Check", "on", "different", "service", "status", "reported", "by", "the", "django", "-", "server", "-", "status", "library", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/beacons/http_status.py#L88-L158
train
A helper function to be used to be notified of different service status on different service status reported by django - server - status ador library.
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/http.py
query
def query(url, **kwargs): ''' Query a resource, and decode the return data Passes through all the parameters described in the :py:func:`utils.http.query function <salt.utils.http.query>`: .. autofunction:: salt.utils.http.query CLI Example: .. code-block:: bash salt '*' http.que...
python
def query(url, **kwargs): ''' Query a resource, and decode the return data Passes through all the parameters described in the :py:func:`utils.http.query function <salt.utils.http.query>`: .. autofunction:: salt.utils.http.query CLI Example: .. code-block:: bash salt '*' http.que...
[ "def", "query", "(", "url", ",", "*", "*", "kwargs", ")", ":", "opts", "=", "__opts__", ".", "copy", "(", ")", "if", "'opts'", "in", "kwargs", ":", "opts", ".", "update", "(", "kwargs", "[", "'opts'", "]", ")", "del", "kwargs", "[", "'opts'", "]"...
Query a resource, and decode the return data Passes through all the parameters described in the :py:func:`utils.http.query function <salt.utils.http.query>`: .. autofunction:: salt.utils.http.query CLI Example: .. code-block:: bash salt '*' http.query http://somelink.com/ salt '...
[ "Query", "a", "resource", "and", "decode", "the", "return", "data" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/http.py#L17-L44
train
Query a resource and decode the return data
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/http.py
wait_for_successful_query
def wait_for_successful_query(url, wait_for=300, **kwargs): ''' Query a resource until a successful response, and decode the return data CLI Example: .. code-block:: bash salt '*' http.wait_for_successful_query http://somelink.com/ wait_for=160 ''' starttime = time.time() while ...
python
def wait_for_successful_query(url, wait_for=300, **kwargs): ''' Query a resource until a successful response, and decode the return data CLI Example: .. code-block:: bash salt '*' http.wait_for_successful_query http://somelink.com/ wait_for=160 ''' starttime = time.time() while ...
[ "def", "wait_for_successful_query", "(", "url", ",", "wait_for", "=", "300", ",", "*", "*", "kwargs", ")", ":", "starttime", "=", "time", ".", "time", "(", ")", "while", "True", ":", "caught_exception", "=", "None", "result", "=", "None", "try", ":", "...
Query a resource until a successful response, and decode the return data CLI Example: .. code-block:: bash salt '*' http.wait_for_successful_query http://somelink.com/ wait_for=160
[ "Query", "a", "resource", "until", "a", "successful", "response", "and", "decode", "the", "return", "data" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/http.py#L47-L75
train
Query a resource until a successful response and decode the return data AttributeNames CLI Example : bash AttributeNames salt '*' http. wait_for_successful_query http://somelink. com
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/http.py
update_ca_bundle
def update_ca_bundle(target=None, source=None, merge_files=None): ''' Update the local CA bundle file from a URL .. versionadded:: 2015.5.0 CLI Example: .. code-block:: bash salt '*' http.update_ca_bundle salt '*' http.update_ca_bundle target=/path/to/cacerts.pem salt '*'...
python
def update_ca_bundle(target=None, source=None, merge_files=None): ''' Update the local CA bundle file from a URL .. versionadded:: 2015.5.0 CLI Example: .. code-block:: bash salt '*' http.update_ca_bundle salt '*' http.update_ca_bundle target=/path/to/cacerts.pem salt '*'...
[ "def", "update_ca_bundle", "(", "target", "=", "None", ",", "source", "=", "None", ",", "merge_files", "=", "None", ")", ":", "if", "target", "is", "None", ":", "target", "=", "__salt__", "[", "'config.get'", "]", "(", "'ca_bundle'", ",", "None", ")", ...
Update the local CA bundle file from a URL .. versionadded:: 2015.5.0 CLI Example: .. code-block:: bash salt '*' http.update_ca_bundle salt '*' http.update_ca_bundle target=/path/to/cacerts.pem salt '*' http.update_ca_bundle source=https://example.com/cacerts.pem If the ``ta...
[ "Update", "the", "local", "CA", "bundle", "file", "from", "a", "URL" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/http.py#L78-L119
train
Update the local CA bundle file from a URL
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/boto_secgroup.py
exists
def exists(name=None, region=None, key=None, keyid=None, profile=None, vpc_id=None, vpc_name=None, group_id=None): ''' Check to see if a security group exists. CLI example:: salt myminion boto_secgroup.exists mysecgroup ''' conn = _get_conn(region=region, key=key, keyid=keyid, p...
python
def exists(name=None, region=None, key=None, keyid=None, profile=None, vpc_id=None, vpc_name=None, group_id=None): ''' Check to see if a security group exists. CLI example:: salt myminion boto_secgroup.exists mysecgroup ''' conn = _get_conn(region=region, key=key, keyid=keyid, p...
[ "def", "exists", "(", "name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "group_id", "=", "None", ")", "...
Check to see if a security group exists. CLI example:: salt myminion boto_secgroup.exists mysecgroup
[ "Check", "to", "see", "if", "a", "security", "group", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_secgroup.py#L91-L108
train
Check to see if a security group exists.
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/boto_secgroup.py
_split_rules
def _split_rules(rules): ''' Split rules with combined grants into individual rules. Amazon returns a set of rules with the same protocol, from and to ports together as a single rule with a set of grants. Authorizing and revoking rules, however, is done as a split set of rules. This function splits...
python
def _split_rules(rules): ''' Split rules with combined grants into individual rules. Amazon returns a set of rules with the same protocol, from and to ports together as a single rule with a set of grants. Authorizing and revoking rules, however, is done as a split set of rules. This function splits...
[ "def", "_split_rules", "(", "rules", ")", ":", "split", "=", "[", "]", "for", "rule", "in", "rules", ":", "ip_protocol", "=", "rule", ".", "get", "(", "'ip_protocol'", ")", "to_port", "=", "rule", ".", "get", "(", "'to_port'", ")", "from_port", "=", ...
Split rules with combined grants into individual rules. Amazon returns a set of rules with the same protocol, from and to ports together as a single rule with a set of grants. Authorizing and revoking rules, however, is done as a split set of rules. This function splits the rules up.
[ "Split", "rules", "with", "combined", "grants", "into", "individual", "rules", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_secgroup.py#L118-L140
train
Splits the rules with combined grants into individual rules.
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/boto_secgroup.py
_get_group
def _get_group(conn=None, name=None, vpc_id=None, vpc_name=None, group_id=None, region=None, key=None, keyid=None, profile=None): # pylint: disable=W0613 ''' Get a group object given a name, name and vpc_id/vpc_name or group_id. Return a boto.ec2.securitygroup.SecurityGroup object if the gro...
python
def _get_group(conn=None, name=None, vpc_id=None, vpc_name=None, group_id=None, region=None, key=None, keyid=None, profile=None): # pylint: disable=W0613 ''' Get a group object given a name, name and vpc_id/vpc_name or group_id. Return a boto.ec2.securitygroup.SecurityGroup object if the gro...
[ "def", "_get_group", "(", "conn", "=", "None", ",", "name", "=", "None", ",", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "group_id", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", ...
Get a group object given a name, name and vpc_id/vpc_name or group_id. Return a boto.ec2.securitygroup.SecurityGroup object if the group is found, else return None.
[ "Get", "a", "group", "object", "given", "a", "name", "name", "and", "vpc_id", "/", "vpc_name", "or", "group_id", ".", "Return", "a", "boto", ".", "ec2", ".", "securitygroup", ".", "SecurityGroup", "object", "if", "the", "group", "is", "found", "else", "r...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_secgroup.py#L143-L200
train
Get a security group object given a name and vpc_id or group_id.
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/boto_secgroup.py
get_all_security_groups
def get_all_security_groups(groupnames=None, group_ids=None, filters=None, region=None, key=None, keyid=None, profile=None): ''' Return a list of all Security Groups matching the given criteria and filters. Note that the 'groupnames' argument only functions correctly for EC2 Cla...
python
def get_all_security_groups(groupnames=None, group_ids=None, filters=None, region=None, key=None, keyid=None, profile=None): ''' Return a list of all Security Groups matching the given criteria and filters. Note that the 'groupnames' argument only functions correctly for EC2 Cla...
[ "def", "get_all_security_groups", "(", "groupnames", "=", "None", ",", "group_ids", "=", "None", ",", "filters", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn",...
Return a list of all Security Groups matching the given criteria and filters. Note that the 'groupnames' argument only functions correctly for EC2 Classic and default VPC Security Groups. To find groups by name in other VPCs you'll want to use the 'group-name' filter instead. Valid keys for the filte...
[ "Return", "a", "list", "of", "all", "Security", "Groups", "matching", "the", "given", "criteria", "and", "filters", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_secgroup.py#L239-L298
train
Get all security groups in the current VPC.
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/boto_secgroup.py
get_group_id
def get_group_id(name, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Get a Group ID given a Group Name or Group Name and VPC ID CLI example:: salt myminion boto_secgroup.get_group_id mysecgroup ''' conn = _get_conn(region=region, key=key...
python
def get_group_id(name, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Get a Group ID given a Group Name or Group Name and VPC ID CLI example:: salt myminion boto_secgroup.get_group_id mysecgroup ''' conn = _get_conn(region=region, key=key...
[ "def", "get_group_id", "(", "name", ",", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "reg...
Get a Group ID given a Group Name or Group Name and VPC ID CLI example:: salt myminion boto_secgroup.get_group_id mysecgroup
[ "Get", "a", "Group", "ID", "given", "a", "Group", "Name", "or", "Group", "Name", "and", "VPC", "ID" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_secgroup.py#L301-L316
train
Get a Group ID given a Group Name or Group Name and VPC ID
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/boto_secgroup.py
convert_to_group_ids
def convert_to_group_ids(groups, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a list of security groups and a vpc_id, convert_to_group_ids will convert all list items in the given list to security group ids. CLI example:: salt...
python
def convert_to_group_ids(groups, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a list of security groups and a vpc_id, convert_to_group_ids will convert all list items in the given list to security group ids. CLI example:: salt...
[ "def", "convert_to_group_ids", "(", "groups", ",", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "log", ".", "debug", "(", ...
Given a list of security groups and a vpc_id, convert_to_group_ids will convert all list items in the given list to security group ids. CLI example:: salt myminion boto_secgroup.convert_to_group_ids mysecgroup vpc-89yhh7h
[ "Given", "a", "list", "of", "security", "groups", "and", "a", "vpc_id", "convert_to_group_ids", "will", "convert", "all", "list", "items", "in", "the", "given", "list", "to", "security", "group", "ids", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_secgroup.py#L319-L342
train
Given a list of security groups and a vpc_id convert all list items in the given list to security group ids.
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/boto_secgroup.py
get_config
def get_config(name=None, group_id=None, region=None, key=None, keyid=None, profile=None, vpc_id=None, vpc_name=None): ''' Get the configuration for a security group. CLI example:: salt myminion boto_secgroup.get_config mysecgroup ''' conn = _get_conn(region=region, key=key,...
python
def get_config(name=None, group_id=None, region=None, key=None, keyid=None, profile=None, vpc_id=None, vpc_name=None): ''' Get the configuration for a security group. CLI example:: salt myminion boto_secgroup.get_config mysecgroup ''' conn = _get_conn(region=region, key=key,...
[ "def", "get_config", "(", "name", "=", "None", ",", "group_id", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ")",...
Get the configuration for a security group. CLI example:: salt myminion boto_secgroup.get_config mysecgroup
[ "Get", "the", "configuration", "for", "a", "security", "group", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_secgroup.py#L345-L374
train
Get the configuration for a security 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/boto_secgroup.py
create
def create(name, description, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Create a security group. CLI example:: salt myminion boto_secgroup.create mysecgroup 'My Security Group' ''' conn = _get_conn(region=region, key=key, keyid=keyid, prof...
python
def create(name, description, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Create a security group. CLI example:: salt myminion boto_secgroup.create mysecgroup 'My Security Group' ''' conn = _get_conn(region=region, key=key, keyid=keyid, prof...
[ "def", "create", "(", "name", ",", "description", ",", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_co...
Create a security group. CLI example:: salt myminion boto_secgroup.create mysecgroup 'My Security Group'
[ "Create", "a", "security", "group", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_secgroup.py#L377-L403
train
Create a security 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/boto_secgroup.py
delete
def delete(name=None, group_id=None, region=None, key=None, keyid=None, profile=None, vpc_id=None, vpc_name=None): ''' Delete a security group. CLI example:: salt myminion boto_secgroup.delete mysecgroup ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) ...
python
def delete(name=None, group_id=None, region=None, key=None, keyid=None, profile=None, vpc_id=None, vpc_name=None): ''' Delete a security group. CLI example:: salt myminion boto_secgroup.delete mysecgroup ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) ...
[ "def", "delete", "(", "name", "=", "None", ",", "group_id", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ")", "...
Delete a security group. CLI example:: salt myminion boto_secgroup.delete mysecgroup
[ "Delete", "a", "security", "group", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_secgroup.py#L406-L431
train
Delete a security 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...