partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
train
OutputUnifier.content_check
Checks for specific types in the state output. Raises an Exception in case particular rule is broken. :param result: :return:
salt/utils/decorators/state.py
def content_check(self, result): ''' Checks for specific types in the state output. Raises an Exception in case particular rule is broken. :param result: :return: ''' if not isinstance(result, dict): err_msg = 'Malformed state return. Data must be a d...
def content_check(self, result): ''' Checks for specific types in the state output. Raises an Exception in case particular rule is broken. :param result: :return: ''' if not isinstance(result, dict): err_msg = 'Malformed state return. Data must be a d...
[ "Checks", "for", "specific", "types", "in", "the", "state", "output", ".", "Raises", "an", "Exception", "in", "case", "particular", "rule", "is", "broken", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/decorators/state.py#L48-L73
[ "def", "content_check", "(", "self", ",", "result", ")", ":", "if", "not", "isinstance", "(", "result", ",", "dict", ")", ":", "err_msg", "=", "'Malformed state return. Data must be a dictionary type.'", "elif", "not", "isinstance", "(", "result", ".", "get", "(...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
OutputUnifier.unify
While comments as a list are allowed, comments needs to be strings for backward compatibility. See such claim here: https://github.com/saltstack/salt/pull/43070 Rules applied: - 'comment' is joined into a multi-line string, in case the value is a list. - 'result' should be a...
salt/utils/decorators/state.py
def unify(self, result): ''' While comments as a list are allowed, comments needs to be strings for backward compatibility. See such claim here: https://github.com/saltstack/salt/pull/43070 Rules applied: - 'comment' is joined into a multi-line string, in case the valu...
def unify(self, result): ''' While comments as a list are allowed, comments needs to be strings for backward compatibility. See such claim here: https://github.com/saltstack/salt/pull/43070 Rules applied: - 'comment' is joined into a multi-line string, in case the valu...
[ "While", "comments", "as", "a", "list", "are", "allowed", "comments", "needs", "to", "be", "strings", "for", "backward", "compatibility", ".", "See", "such", "claim", "here", ":", "https", ":", "//", "github", ".", "com", "/", "saltstack", "/", "salt", "...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/decorators/state.py#L75-L95
[ "def", "unify", "(", "self", ",", "result", ")", ":", "if", "isinstance", "(", "result", ".", "get", "(", "'comment'", ")", ",", "list", ")", ":", "result", "[", "'comment'", "]", "=", "u'\\n'", ".", "join", "(", "[", "salt", ".", "utils", ".", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_
List all of the extended attributes on the given file/directory :param str path: The file(s) to get attributes from :param bool hex: Return the values with forced hexadecimal values :return: A dictionary containing extended attributes and values for the given file :rtype: dict :raises: C...
salt/modules/mac_xattr.py
def list_(path, **kwargs): ''' List all of the extended attributes on the given file/directory :param str path: The file(s) to get attributes from :param bool hex: Return the values with forced hexadecimal values :return: A dictionary containing extended attributes and values for the give...
def list_(path, **kwargs): ''' List all of the extended attributes on the given file/directory :param str path: The file(s) to get attributes from :param bool hex: Return the values with forced hexadecimal values :return: A dictionary containing extended attributes and values for the give...
[ "List", "all", "of", "the", "extended", "attributes", "on", "the", "given", "file", "/", "directory" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mac_xattr.py#L36-L79
[ "def", "list_", "(", "path", ",", "*", "*", "kwargs", ")", ":", "kwargs", "=", "salt", ".", "utils", ".", "args", ".", "clean_kwargs", "(", "*", "*", "kwargs", ")", "hex_", "=", "kwargs", ".", "pop", "(", "'hex'", ",", "False", ")", "if", "kwargs...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
read
Read the given attributes on the given file/directory :param str path: The file to get attributes from :param str attribute: The attribute to read :param bool hex: Return the values with forced hexadecimal values :return: A string containing the value of the named attribute :rtype: str :rai...
salt/modules/mac_xattr.py
def read(path, attribute, **kwargs): ''' Read the given attributes on the given file/directory :param str path: The file to get attributes from :param str attribute: The attribute to read :param bool hex: Return the values with forced hexadecimal values :return: A string containing the value...
def read(path, attribute, **kwargs): ''' Read the given attributes on the given file/directory :param str path: The file to get attributes from :param str attribute: The attribute to read :param bool hex: Return the values with forced hexadecimal values :return: A string containing the value...
[ "Read", "the", "given", "attributes", "on", "the", "given", "file", "/", "directory" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mac_xattr.py#L82-L124
[ "def", "read", "(", "path", ",", "attribute", ",", "*", "*", "kwargs", ")", ":", "kwargs", "=", "salt", ".", "utils", ".", "args", ".", "clean_kwargs", "(", "*", "*", "kwargs", ")", "hex_", "=", "kwargs", ".", "pop", "(", "'hex'", ",", "False", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
delete
Removes the given attribute from the file :param str path: The file(s) to get attributes from :param str attribute: The attribute name to be deleted from the file/directory :return: True if successful, otherwise False :rtype: bool :raises: CommandExecutionError on file not found, attribu...
salt/modules/mac_xattr.py
def delete(path, attribute): ''' Removes the given attribute from the file :param str path: The file(s) to get attributes from :param str attribute: The attribute name to be deleted from the file/directory :return: True if successful, otherwise False :rtype: bool :raises: Command...
def delete(path, attribute): ''' Removes the given attribute from the file :param str path: The file(s) to get attributes from :param str attribute: The attribute name to be deleted from the file/directory :return: True if successful, otherwise False :rtype: bool :raises: Command...
[ "Removes", "the", "given", "attribute", "from", "the", "file" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mac_xattr.py#L171-L202
[ "def", "delete", "(", "path", ",", "attribute", ")", ":", "cmd", "=", "'xattr -d \"{0}\" \"{1}\"'", ".", "format", "(", "attribute", ",", "path", ")", "try", ":", "salt", ".", "utils", ".", "mac_utils", ".", "execute_return_success", "(", "cmd", ")", "exce...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
clear
Causes the all attributes on the file/directory to be removed :param str path: The file(s) to get attributes from :return: True if successful, otherwise False :raises: CommandExecutionError on file not found or any other unknown error CLI Example: .. code-block:: bash salt '*' xattr.de...
salt/modules/mac_xattr.py
def clear(path): ''' Causes the all attributes on the file/directory to be removed :param str path: The file(s) to get attributes from :return: True if successful, otherwise False :raises: CommandExecutionError on file not found or any other unknown error CLI Example: .. code-block:: ba...
def clear(path): ''' Causes the all attributes on the file/directory to be removed :param str path: The file(s) to get attributes from :return: True if successful, otherwise False :raises: CommandExecutionError on file not found or any other unknown error CLI Example: .. code-block:: ba...
[ "Causes", "the", "all", "attributes", "on", "the", "file", "/", "directory", "to", "be", "removed" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mac_xattr.py#L205-L229
[ "def", "clear", "(", "path", ")", ":", "cmd", "=", "'xattr -c \"{0}\"'", ".", "format", "(", "path", ")", "try", ":", "salt", ".", "utils", ".", "mac_utils", ".", "execute_return_success", "(", "cmd", ")", "except", "CommandExecutionError", "as", "exc", ":...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_get_token
Get an auth token
salt/modules/rallydev.py
def _get_token(): ''' Get an auth token ''' username = __opts__.get('rallydev', {}).get('username', None) password = __opts__.get('rallydev', {}).get('password', None) path = 'https://rally1.rallydev.com/slm/webservice/v2.0/security/authorize' result = salt.utils.http.query( path, ...
def _get_token(): ''' Get an auth token ''' username = __opts__.get('rallydev', {}).get('username', None) password = __opts__.get('rallydev', {}).get('password', None) path = 'https://rally1.rallydev.com/slm/webservice/v2.0/security/authorize' result = salt.utils.http.query( path, ...
[ "Get", "an", "auth", "token" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rallydev.py#L39-L61
[ "def", "_get_token", "(", ")", ":", "username", "=", "__opts__", ".", "get", "(", "'rallydev'", ",", "{", "}", ")", ".", "get", "(", "'username'", ",", "None", ")", "password", "=", "__opts__", ".", "get", "(", "'rallydev'", ",", "{", "}", ")", "."...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_query
Make a web call to RallyDev.
salt/modules/rallydev.py
def _query(action=None, command=None, args=None, method='GET', header_dict=None, data=None): ''' Make a web call to RallyDev. ''' token = _get_token() username = __opts__.get('rallydev', {}).get('username', None) password = __opts__.get('ral...
def _query(action=None, command=None, args=None, method='GET', header_dict=None, data=None): ''' Make a web call to RallyDev. ''' token = _get_token() username = __opts__.get('rallydev', {}).get('username', None) password = __opts__.get('ral...
[ "Make", "a", "web", "call", "to", "RallyDev", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rallydev.py#L64-L123
[ "def", "_query", "(", "action", "=", "None", ",", "command", "=", "None", ",", "args", "=", "None", ",", "method", "=", "'GET'", ",", "header_dict", "=", "None", ",", "data", "=", "None", ")", ":", "token", "=", "_get_token", "(", ")", "username", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
query_item
Query a type of record for one or more items. Requires a valid query string. See https://rally1.rallydev.com/slm/doc/webservice/introduction.jsp for information on query syntax. CLI Example: .. code-block:: bash salt myminion rallydev.query_<item name> <query string> [<order>] salt my...
salt/modules/rallydev.py
def query_item(name, query_string, order='Rank'): ''' Query a type of record for one or more items. Requires a valid query string. See https://rally1.rallydev.com/slm/doc/webservice/introduction.jsp for information on query syntax. CLI Example: .. code-block:: bash salt myminion rally...
def query_item(name, query_string, order='Rank'): ''' Query a type of record for one or more items. Requires a valid query string. See https://rally1.rallydev.com/slm/doc/webservice/introduction.jsp for information on query syntax. CLI Example: .. code-block:: bash salt myminion rally...
[ "Query", "a", "type", "of", "record", "for", "one", "or", "more", "items", ".", "Requires", "a", "valid", "query", "string", ".", "See", "https", ":", "//", "rally1", ".", "rallydev", ".", "com", "/", "slm", "/", "doc", "/", "webservice", "/", "intro...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rallydev.py#L142-L161
[ "def", "query_item", "(", "name", ",", "query_string", ",", "order", "=", "'Rank'", ")", ":", "status", ",", "result", "=", "_query", "(", "action", "=", "name", ",", "args", "=", "{", "'query'", ":", "query_string", ",", "'order'", ":", "order", "}", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
show_item
Show an item CLI Example: .. code-block:: bash salt myminion rallydev.show_<item name> <item id>
salt/modules/rallydev.py
def show_item(name, id_): ''' Show an item CLI Example: .. code-block:: bash salt myminion rallydev.show_<item name> <item id> ''' status, result = _query(action=name, command=id_) return result
def show_item(name, id_): ''' Show an item CLI Example: .. code-block:: bash salt myminion rallydev.show_<item name> <item id> ''' status, result = _query(action=name, command=id_) return result
[ "Show", "an", "item" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rallydev.py#L164-L175
[ "def", "show_item", "(", "name", ",", "id_", ")", ":", "status", ",", "result", "=", "_query", "(", "action", "=", "name", ",", "command", "=", "id_", ")", "return", "result" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
train
update_item
Update an item. Either a field and a value, or a chunk of POST data, may be used, but not both. CLI Example: .. code-block:: bash salt myminion rallydev.update_<item name> <item id> field=<field> value=<value> salt myminion rallydev.update_<item name> <item id> postdata=<post data>
salt/modules/rallydev.py
def update_item(name, id_, field=None, value=None, postdata=None): ''' Update an item. Either a field and a value, or a chunk of POST data, may be used, but not both. CLI Example: .. code-block:: bash salt myminion rallydev.update_<item name> <item id> field=<field> value=<value> ...
def update_item(name, id_, field=None, value=None, postdata=None): ''' Update an item. Either a field and a value, or a chunk of POST data, may be used, but not both. CLI Example: .. code-block:: bash salt myminion rallydev.update_<item name> <item id> field=<field> value=<value> ...
[ "Update", "an", "item", ".", "Either", "a", "field", "and", "a", "value", "or", "a", "chunk", "of", "POST", "data", "may", "be", "used", "but", "not", "both", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rallydev.py#L178-L207
[ "def", "update_item", "(", "name", ",", "id_", ",", "field", "=", "None", ",", "value", "=", "None", ",", "postdata", "=", "None", ")", ":", "if", "field", "and", "value", ":", "if", "postdata", ":", "raise", "SaltInvocationError", "(", "'Either a field ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
text_
If ``s`` is an instance of ``binary_type``, return ``s.decode(encoding, errors)``, otherwise return ``s``
salt/_compat.py
def text_(s, encoding='latin-1', errors='strict'): ''' If ``s`` is an instance of ``binary_type``, return ``s.decode(encoding, errors)``, otherwise return ``s`` ''' return s.decode(encoding, errors) if isinstance(s, binary_type) else s
def text_(s, encoding='latin-1', errors='strict'): ''' If ``s`` is an instance of ``binary_type``, return ``s.decode(encoding, errors)``, otherwise return ``s`` ''' return s.decode(encoding, errors) if isinstance(s, binary_type) else s
[ "If", "s", "is", "an", "instance", "of", "binary_type", "return", "s", ".", "decode", "(", "encoding", "errors", ")", "otherwise", "return", "s" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/_compat.py#L60-L65
[ "def", "text_", "(", "s", ",", "encoding", "=", "'latin-1'", ",", "errors", "=", "'strict'", ")", ":", "return", "s", ".", "decode", "(", "encoding", ",", "errors", ")", "if", "isinstance", "(", "s", ",", "binary_type", ")", "else", "s" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
train
ascii_native_
Python 3: If ``s`` is an instance of ``text_type``, return ``s.encode('ascii')``, otherwise return ``str(s, 'ascii', 'strict')`` Python 2: If ``s`` is an instance of ``text_type``, return ``s.encode('ascii')``, otherwise return ``str(s)``
salt/_compat.py
def ascii_native_(s): ''' Python 3: If ``s`` is an instance of ``text_type``, return ``s.encode('ascii')``, otherwise return ``str(s, 'ascii', 'strict')`` Python 2: If ``s`` is an instance of ``text_type``, return ``s.encode('ascii')``, otherwise return ``str(s)`` ''' if isinstance(s, text_...
def ascii_native_(s): ''' Python 3: If ``s`` is an instance of ``text_type``, return ``s.encode('ascii')``, otherwise return ``str(s, 'ascii', 'strict')`` Python 2: If ``s`` is an instance of ``text_type``, return ``s.encode('ascii')``, otherwise return ``str(s)`` ''' if isinstance(s, text_...
[ "Python", "3", ":", "If", "s", "is", "an", "instance", "of", "text_type", "return", "s", ".", "encode", "(", "ascii", ")", "otherwise", "return", "str", "(", "s", "ascii", "strict", ")" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/_compat.py#L76-L87
[ "def", "ascii_native_", "(", "s", ")", ":", "if", "isinstance", "(", "s", ",", "text_type", ")", ":", "s", "=", "s", ".", "encode", "(", "'ascii'", ")", "return", "str", "(", "s", ",", "'ascii'", ",", "'strict'", ")", "if", "PY3", "else", "s" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
train
native_
Python 3: If ``s`` is an instance of ``text_type``, return ``s``, otherwise return ``str(s, encoding, errors)`` Python 2: If ``s`` is an instance of ``text_type``, return ``s.encode(encoding, errors)``, otherwise return ``str(s)``
salt/_compat.py
def native_(s, encoding='latin-1', errors='strict'): ''' Python 3: If ``s`` is an instance of ``text_type``, return ``s``, otherwise return ``str(s, encoding, errors)`` Python 2: If ``s`` is an instance of ``text_type``, return ``s.encode(encoding, errors)``, otherwise return ``str(s)`` ''' ...
def native_(s, encoding='latin-1', errors='strict'): ''' Python 3: If ``s`` is an instance of ``text_type``, return ``s``, otherwise return ``str(s, encoding, errors)`` Python 2: If ``s`` is an instance of ``text_type``, return ``s.encode(encoding, errors)``, otherwise return ``str(s)`` ''' ...
[ "Python", "3", ":", "If", "s", "is", "an", "instance", "of", "text_type", "return", "s", "otherwise", "return", "str", "(", "s", "encoding", "errors", ")" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/_compat.py#L90-L103
[ "def", "native_", "(", "s", ",", "encoding", "=", "'latin-1'", ",", "errors", "=", "'strict'", ")", ":", "if", "PY3", ":", "out", "=", "s", "if", "isinstance", "(", "s", ",", "text_type", ")", "else", "str", "(", "s", ",", "encoding", ",", "errors"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
IPv6AddressScoped._is_packed_binary
Check if data is hexadecimal packed :param data: :return:
salt/_compat.py
def _is_packed_binary(self, data): ''' Check if data is hexadecimal packed :param data: :return: ''' packed = False if isinstance(data, bytes) and len(data) == 16 and b':' not in data: try: packed = bool(int(binascii.hexlify(data), 16)...
def _is_packed_binary(self, data): ''' Check if data is hexadecimal packed :param data: :return: ''' packed = False if isinstance(data, bytes) and len(data) == 16 and b':' not in data: try: packed = bool(int(binascii.hexlify(data), 16)...
[ "Check", "if", "data", "is", "hexadecimal", "packed" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/_compat.py#L183-L197
[ "def", "_is_packed_binary", "(", "self", ",", "data", ")", ":", "packed", "=", "False", "if", "isinstance", "(", "data", ",", "bytes", ")", "and", "len", "(", "data", ")", "==", "16", "and", "b':'", "not", "in", "data", ":", "try", ":", "packed", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_get_binding_info
Combine the host header, IP address, and TCP port into bindingInformation format. Binding Information specifies information to communicate with a site. It includes the IP address, the port number, and an optional host header (usually a host name) to communicate with the site. Args: host_header ...
salt/modules/win_iis.py
def _get_binding_info(host_header='', ip_address='*', port=80): ''' Combine the host header, IP address, and TCP port into bindingInformation format. Binding Information specifies information to communicate with a site. It includes the IP address, the port number, and an optional host header (usuall...
def _get_binding_info(host_header='', ip_address='*', port=80): ''' Combine the host header, IP address, and TCP port into bindingInformation format. Binding Information specifies information to communicate with a site. It includes the IP address, the port number, and an optional host header (usuall...
[ "Combine", "the", "host", "header", "IP", "address", "and", "TCP", "port", "into", "bindingInformation", "format", ".", "Binding", "Information", "specifies", "information", "to", "communicate", "with", "a", "site", ".", "It", "includes", "the", "IP", "address",...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L56-L73
[ "def", "_get_binding_info", "(", "host_header", "=", "''", ",", "ip_address", "=", "'*'", ",", "port", "=", "80", ")", ":", "return", "':'", ".", "join", "(", "[", "ip_address", ",", "six", ".", "text_type", "(", "port", ")", ",", "host_header", ".", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_list_certs
List details of available certificates in the LocalMachine certificate store. Args: certificate_store (str): The name of the certificate store on the local machine. Returns: dict: A dictionary of certificates found in the store
salt/modules/win_iis.py
def _list_certs(certificate_store='My'): ''' List details of available certificates in the LocalMachine certificate store. Args: certificate_store (str): The name of the certificate store on the local machine. Returns: dict: A dictionary of certificates found in the sto...
def _list_certs(certificate_store='My'): ''' List details of available certificates in the LocalMachine certificate store. Args: certificate_store (str): The name of the certificate store on the local machine. Returns: dict: A dictionary of certificates found in the sto...
[ "List", "details", "of", "available", "certificates", "in", "the", "LocalMachine", "certificate", "store", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L76-L116
[ "def", "_list_certs", "(", "certificate_store", "=", "'My'", ")", ":", "ret", "=", "dict", "(", ")", "blacklist_keys", "=", "[", "'DnsNameList'", ",", "'Thumbprint'", "]", "ps_cmd", "=", "[", "'Get-ChildItem'", ",", "'-Path'", ",", "r\"'Cert:\\LocalMachine\\{0}'...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_srvmgr
Execute a powershell command from the WebAdministration PS module. Args: cmd (list): The command to execute in a list return_json (bool): True formats the return in JSON, False just returns the output of the command. Returns: str: The output from the command
salt/modules/win_iis.py
def _srvmgr(cmd, return_json=False): ''' Execute a powershell command from the WebAdministration PS module. Args: cmd (list): The command to execute in a list return_json (bool): True formats the return in JSON, False just returns the output of the command. Returns: ...
def _srvmgr(cmd, return_json=False): ''' Execute a powershell command from the WebAdministration PS module. Args: cmd (list): The command to execute in a list return_json (bool): True formats the return in JSON, False just returns the output of the command. Returns: ...
[ "Execute", "a", "powershell", "command", "from", "the", "WebAdministration", "PS", "module", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L135-L163
[ "def", "_srvmgr", "(", "cmd", ",", "return_json", "=", "False", ")", ":", "if", "isinstance", "(", "cmd", ",", "list", ")", ":", "cmd", "=", "' '", ".", "join", "(", "cmd", ")", "if", "return_json", ":", "cmd", "=", "'ConvertTo-Json -Compress -Depth 4 -I...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_collection_match_to_index
Returns index of collection item matching the match dictionary.
salt/modules/win_iis.py
def _collection_match_to_index(pspath, colfilter, name, match): ''' Returns index of collection item matching the match dictionary. ''' collection = get_webconfiguration_settings(pspath, [{'name': name, 'filter': colfilter}])[0]['value'] for idx, collect_dict in enumerate(collection): if all...
def _collection_match_to_index(pspath, colfilter, name, match): ''' Returns index of collection item matching the match dictionary. ''' collection = get_webconfiguration_settings(pspath, [{'name': name, 'filter': colfilter}])[0]['value'] for idx, collect_dict in enumerate(collection): if all...
[ "Returns", "index", "of", "collection", "item", "matching", "the", "match", "dictionary", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L166-L174
[ "def", "_collection_match_to_index", "(", "pspath", ",", "colfilter", ",", "name", ",", "match", ")", ":", "collection", "=", "get_webconfiguration_settings", "(", "pspath", ",", "[", "{", "'name'", ":", "name", ",", "'filter'", ":", "colfilter", "}", "]", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_prepare_settings
Prepare settings before execution with get or set functions. Removes settings with a match parameter when index is not found.
salt/modules/win_iis.py
def _prepare_settings(pspath, settings): ''' Prepare settings before execution with get or set functions. Removes settings with a match parameter when index is not found. ''' prepared_settings = [] for setting in settings: match = re.search(r'Collection\[(\{.*\})\]', setting['name']) ...
def _prepare_settings(pspath, settings): ''' Prepare settings before execution with get or set functions. Removes settings with a match parameter when index is not found. ''' prepared_settings = [] for setting in settings: match = re.search(r'Collection\[(\{.*\})\]', setting['name']) ...
[ "Prepare", "settings", "before", "execution", "with", "get", "or", "set", "functions", ".", "Removes", "settings", "with", "a", "match", "parameter", "when", "index", "is", "not", "found", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L177-L194
[ "def", "_prepare_settings", "(", "pspath", ",", "settings", ")", ":", "prepared_settings", "=", "[", "]", "for", "setting", "in", "settings", ":", "match", "=", "re", ".", "search", "(", "r'Collection\\[(\\{.*\\})\\]'", ",", "setting", "[", "'name'", "]", ")...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_sites
List all the currently deployed websites. Returns: dict: A dictionary of the IIS sites and their properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_sites
salt/modules/win_iis.py
def list_sites(): ''' List all the currently deployed websites. Returns: dict: A dictionary of the IIS sites and their properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_sites ''' ret = dict() ps_cmd = ['Get-ChildItem', '-Path', r"'IIS:\...
def list_sites(): ''' List all the currently deployed websites. Returns: dict: A dictionary of the IIS sites and their properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_sites ''' ret = dict() ps_cmd = ['Get-ChildItem', '-Path', r"'IIS:\...
[ "List", "all", "the", "currently", "deployed", "websites", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L197-L264
[ "def", "list_sites", "(", ")", ":", "ret", "=", "dict", "(", ")", "ps_cmd", "=", "[", "'Get-ChildItem'", ",", "'-Path'", ",", "r\"'IIS:\\Sites'\"", ",", "'|'", ",", "'Select-Object applicationPool, applicationDefaults, Bindings, ID, Name, PhysicalPath, State'", "]", "ke...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_site
Create a basic website in IIS. .. note:: This function only validates against the site name, and will return True even if the site already exists with a different configuration. It will not modify the configuration of an existing site. Args: name (str): The IIS site name. ...
salt/modules/win_iis.py
def create_site(name, sourcepath, apppool='', hostheader='', ipaddress='*', port=80, protocol='http', preload=''): ''' Create a basic website in IIS. .. note:: This function only validates against the site name, and will return True even if the site already exists with a di...
def create_site(name, sourcepath, apppool='', hostheader='', ipaddress='*', port=80, protocol='http', preload=''): ''' Create a basic website in IIS. .. note:: This function only validates against the site name, and will return True even if the site already exists with a di...
[ "Create", "a", "basic", "website", "in", "IIS", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L267-L351
[ "def", "create_site", "(", "name", ",", "sourcepath", ",", "apppool", "=", "''", ",", "hostheader", "=", "''", ",", "ipaddress", "=", "'*'", ",", "port", "=", "80", ",", "protocol", "=", "'http'", ",", "preload", "=", "''", ")", ":", "protocol", "=",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
modify_site
Modify a basic website in IIS. .. versionadded:: 2017.7.0 Args: name (str): The IIS site name. sourcepath (str): The physical path of the IIS site. apppool (str): The name of the IIS application pool. preload (bool): Whether preloading should be enabled Returns: bo...
salt/modules/win_iis.py
def modify_site(name, sourcepath=None, apppool=None, preload=None): ''' Modify a basic website in IIS. .. versionadded:: 2017.7.0 Args: name (str): The IIS site name. sourcepath (str): The physical path of the IIS site. apppool (str): The name of the IIS application pool. ...
def modify_site(name, sourcepath=None, apppool=None, preload=None): ''' Modify a basic website in IIS. .. versionadded:: 2017.7.0 Args: name (str): The IIS site name. sourcepath (str): The physical path of the IIS site. apppool (str): The name of the IIS application pool. ...
[ "Modify", "a", "basic", "website", "in", "IIS", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L354-L426
[ "def", "modify_site", "(", "name", ",", "sourcepath", "=", "None", ",", "apppool", "=", "None", ",", "preload", "=", "None", ")", ":", "site_path", "=", "r'IIS:\\Sites\\{0}'", ".", "format", "(", "name", ")", "current_sites", "=", "list_sites", "(", ")", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
remove_site
Delete a website from IIS. Args: name (str): The IIS site name. Returns: bool: True if successful, otherwise False .. note:: This will not remove the application pool used by the site. CLI Example: .. code-block:: bash salt '*' win_iis.remove_site name='My Test...
salt/modules/win_iis.py
def remove_site(name): ''' Delete a website from IIS. Args: name (str): The IIS site name. Returns: bool: True if successful, otherwise False .. note:: This will not remove the application pool used by the site. CLI Example: .. code-block:: bash salt '*...
def remove_site(name): ''' Delete a website from IIS. Args: name (str): The IIS site name. Returns: bool: True if successful, otherwise False .. note:: This will not remove the application pool used by the site. CLI Example: .. code-block:: bash salt '*...
[ "Delete", "a", "website", "from", "IIS", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L429-L466
[ "def", "remove_site", "(", "name", ")", ":", "current_sites", "=", "list_sites", "(", ")", "if", "name", "not", "in", "current_sites", ":", "log", ".", "debug", "(", "'Site already absent: %s'", ",", "name", ")", "return", "True", "ps_cmd", "=", "[", "'Rem...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
stop_site
Stop a Web Site in IIS. .. versionadded:: 2017.7.0 Args: name (str): The name of the website to stop. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.stop_site name='My Test Site'
salt/modules/win_iis.py
def stop_site(name): ''' Stop a Web Site in IIS. .. versionadded:: 2017.7.0 Args: name (str): The name of the website to stop. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.stop_site name='My Test Site' ...
def stop_site(name): ''' Stop a Web Site in IIS. .. versionadded:: 2017.7.0 Args: name (str): The name of the website to stop. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.stop_site name='My Test Site' ...
[ "Stop", "a", "Web", "Site", "in", "IIS", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L469-L491
[ "def", "stop_site", "(", "name", ")", ":", "ps_cmd", "=", "[", "'Stop-WebSite'", ",", "r\"'{0}'\"", ".", "format", "(", "name", ")", "]", "cmd_ret", "=", "_srvmgr", "(", "ps_cmd", ")", "return", "cmd_ret", "[", "'retcode'", "]", "==", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
train
start_site
Start a Web Site in IIS. .. versionadded:: 2017.7.0 Args: name (str): The name of the website to start. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.start_site name='My Test Site'
salt/modules/win_iis.py
def start_site(name): ''' Start a Web Site in IIS. .. versionadded:: 2017.7.0 Args: name (str): The name of the website to start. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.start_site name='My Test Site'...
def start_site(name): ''' Start a Web Site in IIS. .. versionadded:: 2017.7.0 Args: name (str): The name of the website to start. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.start_site name='My Test Site'...
[ "Start", "a", "Web", "Site", "in", "IIS", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L494-L516
[ "def", "start_site", "(", "name", ")", ":", "ps_cmd", "=", "[", "'Start-WebSite'", ",", "r\"'{0}'\"", ".", "format", "(", "name", ")", "]", "cmd_ret", "=", "_srvmgr", "(", "ps_cmd", ")", "return", "cmd_ret", "[", "'retcode'", "]", "==", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_bindings
Get all configured IIS bindings for the specified site. Args: site (str): The name if the IIS Site Returns: dict: A dictionary of the binding names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_bindings site
salt/modules/win_iis.py
def list_bindings(site): ''' Get all configured IIS bindings for the specified site. Args: site (str): The name if the IIS Site Returns: dict: A dictionary of the binding names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_bindings site ...
def list_bindings(site): ''' Get all configured IIS bindings for the specified site. Args: site (str): The name if the IIS Site Returns: dict: A dictionary of the binding names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_bindings site ...
[ "Get", "all", "configured", "IIS", "bindings", "for", "the", "specified", "site", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L540-L568
[ "def", "list_bindings", "(", "site", ")", ":", "ret", "=", "dict", "(", ")", "sites", "=", "list_sites", "(", ")", "if", "site", "not", "in", "sites", ":", "log", ".", "warning", "(", "'Site not found: %s'", ",", "site", ")", "return", "ret", "ret", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_binding
Create an IIS Web Binding. .. note:: This function only validates against the binding ipaddress:port:hostheader combination, and will return True even if the binding already exists with a different configuration. It will not modify the configuration of an existing binding. Arg...
salt/modules/win_iis.py
def create_binding(site, hostheader='', ipaddress='*', port=80, protocol='http', sslflags=None): ''' Create an IIS Web Binding. .. note:: This function only validates against the binding ipaddress:port:hostheader combination, and will return True even if the bind...
def create_binding(site, hostheader='', ipaddress='*', port=80, protocol='http', sslflags=None): ''' Create an IIS Web Binding. .. note:: This function only validates against the binding ipaddress:port:hostheader combination, and will return True even if the bind...
[ "Create", "an", "IIS", "Web", "Binding", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L571-L650
[ "def", "create_binding", "(", "site", ",", "hostheader", "=", "''", ",", "ipaddress", "=", "'*'", ",", "port", "=", "80", ",", "protocol", "=", "'http'", ",", "sslflags", "=", "None", ")", ":", "protocol", "=", "six", ".", "text_type", "(", "protocol",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
modify_binding
Modify an IIS Web Binding. Use ``site`` and ``binding`` to target the binding. .. versionadded:: 2017.7.0 Args: site (str): The IIS site name. binding (str): The binding to edit. This is a combination of the IP address, port, and hostheader. It is in the following format: ...
salt/modules/win_iis.py
def modify_binding(site, binding, hostheader=None, ipaddress=None, port=None, sslflags=None): ''' Modify an IIS Web Binding. Use ``site`` and ``binding`` to target the binding. .. versionadded:: 2017.7.0 Args: site (str): The IIS site name. binding (str): The bin...
def modify_binding(site, binding, hostheader=None, ipaddress=None, port=None, sslflags=None): ''' Modify an IIS Web Binding. Use ``site`` and ``binding`` to target the binding. .. versionadded:: 2017.7.0 Args: site (str): The IIS site name. binding (str): The bin...
[ "Modify", "an", "IIS", "Web", "Binding", ".", "Use", "site", "and", "binding", "to", "target", "the", "binding", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L653-L739
[ "def", "modify_binding", "(", "site", ",", "binding", ",", "hostheader", "=", "None", ",", "ipaddress", "=", "None", ",", "port", "=", "None", ",", "sslflags", "=", "None", ")", ":", "if", "sslflags", "is", "not", "None", "and", "sslflags", "not", "in"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
remove_binding
Remove an IIS binding. Args: site (str): The IIS site name. hostheader (str): The host header of the binding. ipaddress (str): The IP address of the binding. port (int): The TCP port of the binding. Returns: bool: True if successful, otherwise False CLI Example: ...
salt/modules/win_iis.py
def remove_binding(site, hostheader='', ipaddress='*', port=80): ''' Remove an IIS binding. Args: site (str): The IIS site name. hostheader (str): The host header of the binding. ipaddress (str): The IP address of the binding. port (int): The TCP port of the binding. Re...
def remove_binding(site, hostheader='', ipaddress='*', port=80): ''' Remove an IIS binding. Args: site (str): The IIS site name. hostheader (str): The host header of the binding. ipaddress (str): The IP address of the binding. port (int): The TCP port of the binding. Re...
[ "Remove", "an", "IIS", "binding", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L742-L784
[ "def", "remove_binding", "(", "site", ",", "hostheader", "=", "''", ",", "ipaddress", "=", "'*'", ",", "port", "=", "80", ")", ":", "name", "=", "_get_binding_info", "(", "hostheader", ",", "ipaddress", ",", "port", ")", "current_bindings", "=", "list_bind...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_cert_bindings
List certificate bindings for an IIS site. .. versionadded:: 2016.11.0 Args: site (str): The IIS site name. Returns: dict: A dictionary of the binding names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_bindings site
salt/modules/win_iis.py
def list_cert_bindings(site): ''' List certificate bindings for an IIS site. .. versionadded:: 2016.11.0 Args: site (str): The IIS site name. Returns: dict: A dictionary of the binding names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list...
def list_cert_bindings(site): ''' List certificate bindings for an IIS site. .. versionadded:: 2016.11.0 Args: site (str): The IIS site name. Returns: dict: A dictionary of the binding names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list...
[ "List", "certificate", "bindings", "for", "an", "IIS", "site", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L787-L819
[ "def", "list_cert_bindings", "(", "site", ")", ":", "ret", "=", "dict", "(", ")", "sites", "=", "list_sites", "(", ")", "if", "site", "not", "in", "sites", ":", "log", ".", "warning", "(", "'Site not found: %s'", ",", "site", ")", "return", "ret", "for...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_cert_binding
Assign a certificate to an IIS Web Binding. .. versionadded:: 2016.11.0 .. note:: The web binding that the certificate is being assigned to must already exist. Args: name (str): The thumbprint of the certificate. site (str): The IIS site name. hostheader (str): Th...
salt/modules/win_iis.py
def create_cert_binding(name, site, hostheader='', ipaddress='*', port=443, sslflags=0): ''' Assign a certificate to an IIS Web Binding. .. versionadded:: 2016.11.0 .. note:: The web binding that the certificate is being assigned to must already exist. Arg...
def create_cert_binding(name, site, hostheader='', ipaddress='*', port=443, sslflags=0): ''' Assign a certificate to an IIS Web Binding. .. versionadded:: 2016.11.0 .. note:: The web binding that the certificate is being assigned to must already exist. Arg...
[ "Assign", "a", "certificate", "to", "an", "IIS", "Web", "Binding", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L822-L930
[ "def", "create_cert_binding", "(", "name", ",", "site", ",", "hostheader", "=", "''", ",", "ipaddress", "=", "'*'", ",", "port", "=", "443", ",", "sslflags", "=", "0", ")", ":", "name", "=", "six", ".", "text_type", "(", "name", ")", ".", "upper", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
remove_cert_binding
Remove a certificate from an IIS Web Binding. .. versionadded:: 2016.11.0 .. note:: This function only removes the certificate from the web binding. It does not remove the web binding itself. Args: name (str): The thumbprint of the certificate. site (str): The IIS site na...
salt/modules/win_iis.py
def remove_cert_binding(name, site, hostheader='', ipaddress='*', port=443): ''' Remove a certificate from an IIS Web Binding. .. versionadded:: 2016.11.0 .. note:: This function only removes the certificate from the web binding. It does not remove the web binding itself. Args: ...
def remove_cert_binding(name, site, hostheader='', ipaddress='*', port=443): ''' Remove a certificate from an IIS Web Binding. .. versionadded:: 2016.11.0 .. note:: This function only removes the certificate from the web binding. It does not remove the web binding itself. Args: ...
[ "Remove", "a", "certificate", "from", "an", "IIS", "Web", "Binding", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L933-L1002
[ "def", "remove_cert_binding", "(", "name", ",", "site", ",", "hostheader", "=", "''", ",", "ipaddress", "=", "'*'", ",", "port", "=", "443", ")", ":", "name", "=", "six", ".", "text_type", "(", "name", ")", ".", "upper", "(", ")", "binding_info", "="...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_apppools
List all configured IIS application pools. Returns: dict: A dictionary of IIS application pools and their details. CLI Example: .. code-block:: bash salt '*' win_iis.list_apppools
salt/modules/win_iis.py
def list_apppools(): ''' List all configured IIS application pools. Returns: dict: A dictionary of IIS application pools and their details. CLI Example: .. code-block:: bash salt '*' win_iis.list_apppools ''' ret = dict() ps_cmd = [] ps_cmd.append(r"Get-ChildItem ...
def list_apppools(): ''' List all configured IIS application pools. Returns: dict: A dictionary of IIS application pools and their details. CLI Example: .. code-block:: bash salt '*' win_iis.list_apppools ''' ret = dict() ps_cmd = [] ps_cmd.append(r"Get-ChildItem ...
[ "List", "all", "configured", "IIS", "application", "pools", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1005-L1063
[ "def", "list_apppools", "(", ")", ":", "ret", "=", "dict", "(", ")", "ps_cmd", "=", "[", "]", "ps_cmd", ".", "append", "(", "r\"Get-ChildItem -Path 'IIS:\\AppPools' | Select-Object Name, State\"", ")", "# Include the equivalent of output from the Applications column, since th...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_apppool
Create an IIS application pool. .. note:: This function only validates against the application pool name, and will return True even if the application pool already exists with a different configuration. It will not modify the configuration of an existing application pool. Args...
salt/modules/win_iis.py
def create_apppool(name): ''' Create an IIS application pool. .. note:: This function only validates against the application pool name, and will return True even if the application pool already exists with a different configuration. It will not modify the configuration of an existi...
def create_apppool(name): ''' Create an IIS application pool. .. note:: This function only validates against the application pool name, and will return True even if the application pool already exists with a different configuration. It will not modify the configuration of an existi...
[ "Create", "an", "IIS", "application", "pool", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1066-L1106
[ "def", "create_apppool", "(", "name", ")", ":", "current_apppools", "=", "list_apppools", "(", ")", "apppool_path", "=", "r'IIS:\\AppPools\\{0}'", ".", "format", "(", "name", ")", "if", "name", "in", "current_apppools", ":", "log", ".", "debug", "(", "\"Applic...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
stop_apppool
Stop an IIS application pool. .. versionadded:: 2017.7.0 Args: name (str): The name of the App Pool to stop. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.stop_apppool name='MyTestPool'
salt/modules/win_iis.py
def stop_apppool(name): ''' Stop an IIS application pool. .. versionadded:: 2017.7.0 Args: name (str): The name of the App Pool to stop. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.stop_apppool name='MyTe...
def stop_apppool(name): ''' Stop an IIS application pool. .. versionadded:: 2017.7.0 Args: name (str): The name of the App Pool to stop. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.stop_apppool name='MyTe...
[ "Stop", "an", "IIS", "application", "pool", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1145-L1167
[ "def", "stop_apppool", "(", "name", ")", ":", "ps_cmd", "=", "[", "'Stop-WebAppPool'", ",", "r\"'{0}'\"", ".", "format", "(", "name", ")", "]", "cmd_ret", "=", "_srvmgr", "(", "ps_cmd", ")", "return", "cmd_ret", "[", "'retcode'", "]", "==", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
train
start_apppool
Start an IIS application pool. .. versionadded:: 2017.7.0 Args: name (str): The name of the App Pool to start. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.start_apppool name='MyTestPool'
salt/modules/win_iis.py
def start_apppool(name): ''' Start an IIS application pool. .. versionadded:: 2017.7.0 Args: name (str): The name of the App Pool to start. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.start_apppool name='...
def start_apppool(name): ''' Start an IIS application pool. .. versionadded:: 2017.7.0 Args: name (str): The name of the App Pool to start. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.start_apppool name='...
[ "Start", "an", "IIS", "application", "pool", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1170-L1192
[ "def", "start_apppool", "(", "name", ")", ":", "ps_cmd", "=", "[", "'Start-WebAppPool'", ",", "r\"'{0}'\"", ".", "format", "(", "name", ")", "]", "cmd_ret", "=", "_srvmgr", "(", "ps_cmd", ")", "return", "cmd_ret", "[", "'retcode'", "]", "==", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
train
restart_apppool
Restart an IIS application pool. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS application pool. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.restart_apppool name='MyTestPool'
salt/modules/win_iis.py
def restart_apppool(name): ''' Restart an IIS application pool. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS application pool. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.restart_appp...
def restart_apppool(name): ''' Restart an IIS application pool. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS application pool. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.restart_appp...
[ "Restart", "an", "IIS", "application", "pool", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1195-L1217
[ "def", "restart_apppool", "(", "name", ")", ":", "ps_cmd", "=", "[", "'Restart-WebAppPool'", ",", "r\"'{0}'\"", ".", "format", "(", "name", ")", "]", "cmd_ret", "=", "_srvmgr", "(", "ps_cmd", ")", "return", "cmd_ret", "[", "'retcode'", "]", "==", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_container_setting
Get the value of the setting for the IIS container. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS container. container (str): The type of IIS container. The container types are: AppPools, Sites, SslBindings settings (dict): A dictionary of the setting na...
salt/modules/win_iis.py
def get_container_setting(name, container, settings): ''' Get the value of the setting for the IIS container. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS container. container (str): The type of IIS container. The container types are: AppPools, Sites, S...
def get_container_setting(name, container, settings): ''' Get the value of the setting for the IIS container. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS container. container (str): The type of IIS container. The container types are: AppPools, Sites, S...
[ "Get", "the", "value", "of", "the", "setting", "for", "the", "IIS", "container", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1220-L1294
[ "def", "get_container_setting", "(", "name", ",", "container", ",", "settings", ")", ":", "ret", "=", "dict", "(", ")", "ps_cmd", "=", "list", "(", ")", "ps_cmd_validate", "=", "list", "(", ")", "container_path", "=", "r\"IIS:\\{0}\\{1}\"", ".", "format", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
set_container_setting
Set the value of the setting for an IIS container. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS container. container (str): The type of IIS container. The container types are: AppPools, Sites, SslBindings settings (dict): A dictionary of the setting nam...
salt/modules/win_iis.py
def set_container_setting(name, container, settings): ''' Set the value of the setting for an IIS container. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS container. container (str): The type of IIS container. The container types are: AppPools, Sites, Ss...
def set_container_setting(name, container, settings): ''' Set the value of the setting for an IIS container. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS container. container (str): The type of IIS container. The container types are: AppPools, Sites, Ss...
[ "Set", "the", "value", "of", "the", "setting", "for", "an", "IIS", "container", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1297-L1383
[ "def", "set_container_setting", "(", "name", ",", "container", ",", "settings", ")", ":", "identityType_map2string", "=", "{", "'0'", ":", "'LocalSystem'", ",", "'1'", ":", "'LocalService'", ",", "'2'", ":", "'NetworkService'", ",", "'3'", ":", "'SpecificUser'",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_apps
Get all configured IIS applications for the specified site. Args: site (str): The IIS site name. Returns: A dictionary of the application names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_apps site
salt/modules/win_iis.py
def list_apps(site): ''' Get all configured IIS applications for the specified site. Args: site (str): The IIS site name. Returns: A dictionary of the application names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_apps site ''' ret = dict()...
def list_apps(site): ''' Get all configured IIS applications for the specified site. Args: site (str): The IIS site name. Returns: A dictionary of the application names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_apps site ''' ret = dict()...
[ "Get", "all", "configured", "IIS", "applications", "for", "the", "specified", "site", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1386-L1438
[ "def", "list_apps", "(", "site", ")", ":", "ret", "=", "dict", "(", ")", "ps_cmd", "=", "list", "(", ")", "ps_cmd", ".", "append", "(", "\"Get-WebApplication -Site '{0}'\"", ".", "format", "(", "site", ")", ")", "ps_cmd", ".", "append", "(", "r\"| Select...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_app
Create an IIS application. .. note:: This function only validates against the application name, and will return True even if the application already exists with a different configuration. It will not modify the configuration of an existing application. Args: name (str)...
salt/modules/win_iis.py
def create_app(name, site, sourcepath, apppool=None): ''' Create an IIS application. .. note:: This function only validates against the application name, and will return True even if the application already exists with a different configuration. It will not modify the configuration...
def create_app(name, site, sourcepath, apppool=None): ''' Create an IIS application. .. note:: This function only validates against the application name, and will return True even if the application already exists with a different configuration. It will not modify the configuration...
[ "Create", "an", "IIS", "application", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1441-L1500
[ "def", "create_app", "(", "name", ",", "site", ",", "sourcepath", ",", "apppool", "=", "None", ")", ":", "current_apps", "=", "list_apps", "(", "site", ")", "if", "name", "in", "current_apps", ":", "log", ".", "debug", "(", "'Application already present: %s'...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
remove_app
Remove an IIS application. Args: name (str): The application name. site (str): The IIS site name. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.remove_app name='app0' site='site0'
salt/modules/win_iis.py
def remove_app(name, site): ''' Remove an IIS application. Args: name (str): The application name. site (str): The IIS site name. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.remove_app name='app0' site...
def remove_app(name, site): ''' Remove an IIS application. Args: name (str): The application name. site (str): The IIS site name. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.remove_app name='app0' site...
[ "Remove", "an", "IIS", "application", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1503-L1544
[ "def", "remove_app", "(", "name", ",", "site", ")", ":", "current_apps", "=", "list_apps", "(", "site", ")", "if", "name", "not", "in", "current_apps", ":", "log", ".", "debug", "(", "'Application already absent: %s'", ",", "name", ")", "return", "True", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_vdirs
Get all configured IIS virtual directories for the specified site, or for the combination of site and application. Args: site (str): The IIS site name. app (str): The IIS application. Returns: dict: A dictionary of the virtual directory names and properties. CLI Example: ...
salt/modules/win_iis.py
def list_vdirs(site, app=_DEFAULT_APP): ''' Get all configured IIS virtual directories for the specified site, or for the combination of site and application. Args: site (str): The IIS site name. app (str): The IIS application. Returns: dict: A dictionary of the virtual dir...
def list_vdirs(site, app=_DEFAULT_APP): ''' Get all configured IIS virtual directories for the specified site, or for the combination of site and application. Args: site (str): The IIS site name. app (str): The IIS application. Returns: dict: A dictionary of the virtual dir...
[ "Get", "all", "configured", "IIS", "virtual", "directories", "for", "the", "specified", "site", "or", "for", "the", "combination", "of", "site", "and", "application", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1547-L1586
[ "def", "list_vdirs", "(", "site", ",", "app", "=", "_DEFAULT_APP", ")", ":", "ret", "=", "dict", "(", ")", "ps_cmd", "=", "[", "'Get-WebVirtualDirectory'", ",", "'-Site'", ",", "r\"'{0}'\"", ".", "format", "(", "site", ")", ",", "'-Application'", ",", "r...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_vdir
Create an IIS virtual directory. .. note:: This function only validates against the virtual directory name, and will return True even if the virtual directory already exists with a different configuration. It will not modify the configuration of an existing virtual directory. ...
salt/modules/win_iis.py
def create_vdir(name, site, sourcepath, app=_DEFAULT_APP): ''' Create an IIS virtual directory. .. note:: This function only validates against the virtual directory name, and will return True even if the virtual directory already exists with a different configuration. It will not m...
def create_vdir(name, site, sourcepath, app=_DEFAULT_APP): ''' Create an IIS virtual directory. .. note:: This function only validates against the virtual directory name, and will return True even if the virtual directory already exists with a different configuration. It will not m...
[ "Create", "an", "IIS", "virtual", "directory", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1589-L1648
[ "def", "create_vdir", "(", "name", ",", "site", ",", "sourcepath", ",", "app", "=", "_DEFAULT_APP", ")", ":", "current_vdirs", "=", "list_vdirs", "(", "site", ",", "app", ")", "if", "name", "in", "current_vdirs", ":", "log", ".", "debug", "(", "'Virtual ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
remove_vdir
Remove an IIS virtual directory. Args: name (str): The virtual directory name. site (str): The IIS site name. app (str): The IIS application. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.remove_vdir nam...
salt/modules/win_iis.py
def remove_vdir(name, site, app=_DEFAULT_APP): ''' Remove an IIS virtual directory. Args: name (str): The virtual directory name. site (str): The IIS site name. app (str): The IIS application. Returns: bool: True if successful, otherwise False CLI Example: .. ...
def remove_vdir(name, site, app=_DEFAULT_APP): ''' Remove an IIS virtual directory. Args: name (str): The virtual directory name. site (str): The IIS site name. app (str): The IIS application. Returns: bool: True if successful, otherwise False CLI Example: .. ...
[ "Remove", "an", "IIS", "virtual", "directory", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1651-L1701
[ "def", "remove_vdir", "(", "name", ",", "site", ",", "app", "=", "_DEFAULT_APP", ")", ":", "current_vdirs", "=", "list_vdirs", "(", "site", ",", "app", ")", "app_path", "=", "os", ".", "path", ".", "join", "(", "*", "app", ".", "rstrip", "(", "'/'", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_backup
r''' Backup an IIS Configuration on the System. .. versionadded:: 2017.7.0 .. note:: Backups are stored in the ``$env:Windir\System32\inetsrv\backup`` folder. Args: name (str): The name to give the backup Returns: bool: True if successful, otherwise False CLI...
salt/modules/win_iis.py
def create_backup(name): r''' Backup an IIS Configuration on the System. .. versionadded:: 2017.7.0 .. note:: Backups are stored in the ``$env:Windir\System32\inetsrv\backup`` folder. Args: name (str): The name to give the backup Returns: bool: True if success...
def create_backup(name): r''' Backup an IIS Configuration on the System. .. versionadded:: 2017.7.0 .. note:: Backups are stored in the ``$env:Windir\System32\inetsrv\backup`` folder. Args: name (str): The name to give the backup Returns: bool: True if success...
[ "r", "Backup", "an", "IIS", "Configuration", "on", "the", "System", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1749-L1784
[ "def", "create_backup", "(", "name", ")", ":", "if", "name", "in", "list_backups", "(", ")", ":", "raise", "CommandExecutionError", "(", "'Backup already present: {0}'", ".", "format", "(", "name", ")", ")", "ps_cmd", "=", "[", "'Backup-WebConfiguration'", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
remove_backup
Remove an IIS Configuration backup from the System. .. versionadded:: 2017.7.0 Args: name (str): The name of the backup to remove Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.remove_backup backup_20170209
salt/modules/win_iis.py
def remove_backup(name): ''' Remove an IIS Configuration backup from the System. .. versionadded:: 2017.7.0 Args: name (str): The name of the backup to remove Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.r...
def remove_backup(name): ''' Remove an IIS Configuration backup from the System. .. versionadded:: 2017.7.0 Args: name (str): The name of the backup to remove Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.r...
[ "Remove", "an", "IIS", "Configuration", "backup", "from", "the", "System", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1787-L1819
[ "def", "remove_backup", "(", "name", ")", ":", "if", "name", "not", "in", "list_backups", "(", ")", ":", "log", ".", "debug", "(", "'Backup already removed: %s'", ",", "name", ")", "return", "True", "ps_cmd", "=", "[", "'Remove-WebConfigurationBackup'", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_worker_processes
Returns a list of worker processes that correspond to the passed application pool. .. versionadded:: 2017.7.0 Args: apppool (str): The application pool to query Returns: dict: A dictionary of worker processes with their process IDs CLI Example: .. code-block:: bash ...
salt/modules/win_iis.py
def list_worker_processes(apppool): ''' Returns a list of worker processes that correspond to the passed application pool. .. versionadded:: 2017.7.0 Args: apppool (str): The application pool to query Returns: dict: A dictionary of worker processes with their process IDs ...
def list_worker_processes(apppool): ''' Returns a list of worker processes that correspond to the passed application pool. .. versionadded:: 2017.7.0 Args: apppool (str): The application pool to query Returns: dict: A dictionary of worker processes with their process IDs ...
[ "Returns", "a", "list", "of", "worker", "processes", "that", "correspond", "to", "the", "passed", "application", "pool", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1822-L1858
[ "def", "list_worker_processes", "(", "apppool", ")", ":", "ps_cmd", "=", "[", "'Get-ChildItem'", ",", "r\"'IIS:\\AppPools\\{0}\\WorkerProcesses'\"", ".", "format", "(", "apppool", ")", "]", "cmd_ret", "=", "_srvmgr", "(", "cmd", "=", "ps_cmd", ",", "return_json", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_webapp_settings
r''' .. versionadded:: 2017.7.0 Get the value of the setting for the IIS web application. .. note:: Params are case sensitive :param str name: The name of the IIS web application. :param str site: The site name contains the web application. Example: Default Web Site :param str...
salt/modules/win_iis.py
def get_webapp_settings(name, site, settings): r''' .. versionadded:: 2017.7.0 Get the value of the setting for the IIS web application. .. note:: Params are case sensitive :param str name: The name of the IIS web application. :param str site: The site name contains the web applicatio...
def get_webapp_settings(name, site, settings): r''' .. versionadded:: 2017.7.0 Get the value of the setting for the IIS web application. .. note:: Params are case sensitive :param str name: The name of the IIS web application. :param str site: The site name contains the web applicatio...
[ "r", "..", "versionadded", "::", "2017", ".", "7", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1861-L1934
[ "def", "get_webapp_settings", "(", "name", ",", "site", ",", "settings", ")", ":", "ret", "=", "dict", "(", ")", "pscmd", "=", "list", "(", ")", "availableSettings", "=", "(", "'physicalPath'", ",", "'applicationPool'", ",", "'userName'", ",", "'password'", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
set_webapp_settings
r''' .. versionadded:: 2017.7.0 Configure an IIS application. .. note:: This function only configures an existing app. Params are case sensitive. :param str name: The IIS application. :param str site: The IIS site name. :param str settings: A dictionary of the setting names an...
salt/modules/win_iis.py
def set_webapp_settings(name, site, settings): r''' .. versionadded:: 2017.7.0 Configure an IIS application. .. note:: This function only configures an existing app. Params are case sensitive. :param str name: The IIS application. :param str site: The IIS site name. :param...
def set_webapp_settings(name, site, settings): r''' .. versionadded:: 2017.7.0 Configure an IIS application. .. note:: This function only configures an existing app. Params are case sensitive. :param str name: The IIS application. :param str site: The IIS site name. :param...
[ "r", "..", "versionadded", "::", "2017", ".", "7", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1937-L2042
[ "def", "set_webapp_settings", "(", "name", ",", "site", ",", "settings", ")", ":", "pscmd", "=", "list", "(", ")", "current_apps", "=", "list_apps", "(", "site", ")", "current_sites", "=", "list_sites", "(", ")", "availableSettings", "=", "(", "'physicalPath...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_webconfiguration_settings
r''' Get the webconfiguration settings for the IIS PSPath. Args: name (str): The PSPath of the IIS webconfiguration settings. settings (list): A list of dictionaries containing setting name and filter. location (str): The location of the settings (optional) Returns: dict: A...
salt/modules/win_iis.py
def get_webconfiguration_settings(name, settings, location=''): r''' Get the webconfiguration settings for the IIS PSPath. Args: name (str): The PSPath of the IIS webconfiguration settings. settings (list): A list of dictionaries containing setting name and filter. location (str): T...
def get_webconfiguration_settings(name, settings, location=''): r''' Get the webconfiguration settings for the IIS PSPath. Args: name (str): The PSPath of the IIS webconfiguration settings. settings (list): A list of dictionaries containing setting name and filter. location (str): T...
[ "r", "Get", "the", "webconfiguration", "settings", "for", "the", "IIS", "PSPath", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L2045-L2122
[ "def", "get_webconfiguration_settings", "(", "name", ",", "settings", ",", "location", "=", "''", ")", ":", "ret", "=", "{", "}", "ps_cmd", "=", "[", "]", "ps_cmd_validate", "=", "[", "]", "if", "not", "settings", ":", "log", ".", "warning", "(", "'No ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
set_webconfiguration_settings
r''' Set the value of the setting for an IIS container. Args: name (str): The PSPath of the IIS webconfiguration settings. settings (list): A list of dictionaries containing setting name, filter and value. location (str): The location of the settings (optional) Returns: boo...
salt/modules/win_iis.py
def set_webconfiguration_settings(name, settings, location=''): r''' Set the value of the setting for an IIS container. Args: name (str): The PSPath of the IIS webconfiguration settings. settings (list): A list of dictionaries containing setting name, filter and value. location (str...
def set_webconfiguration_settings(name, settings, location=''): r''' Set the value of the setting for an IIS container. Args: name (str): The PSPath of the IIS webconfiguration settings. settings (list): A list of dictionaries containing setting name, filter and value. location (str...
[ "r", "Set", "the", "value", "of", "the", "setting", "for", "an", "IIS", "container", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L2125-L2214
[ "def", "set_webconfiguration_settings", "(", "name", ",", "settings", ",", "location", "=", "''", ")", ":", "ps_cmd", "=", "[", "]", "if", "not", "settings", ":", "log", ".", "warning", "(", "'No settings provided'", ")", "return", "False", "settings", "=", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create
Create a DNS record. The nameserver must be an IP address and the master running this runner must have create privileges on that server. CLI Example: .. code-block:: bash salt-run ddns.create domain.com my-test-vm 3600 A 10.20.30.40 my-tsig-key /etc/salt/tsig.keyring 10.0.0.1 5
salt/runners/ddns.py
def create(zone, name, ttl, rdtype, data, keyname, keyfile, nameserver, timeout, port=53, keyalgorithm='hmac-md5'): ''' Create a DNS record. The nameserver must be an IP address and the master running this runner must have create privileges on that server. CLI Example: .. code-block:: b...
def create(zone, name, ttl, rdtype, data, keyname, keyfile, nameserver, timeout, port=53, keyalgorithm='hmac-md5'): ''' Create a DNS record. The nameserver must be an IP address and the master running this runner must have create privileges on that server. CLI Example: .. code-block:: b...
[ "Create", "a", "DNS", "record", ".", "The", "nameserver", "must", "be", "an", "IP", "address", "and", "the", "master", "running", "this", "runner", "must", "have", "create", "privileges", "on", "that", "server", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/ddns.py#L56-L91
[ "def", "create", "(", "zone", ",", "name", ",", "ttl", ",", "rdtype", ",", "data", ",", "keyname", ",", "keyfile", ",", "nameserver", ",", "timeout", ",", "port", "=", "53", ",", "keyalgorithm", "=", "'hmac-md5'", ")", ":", "if", "zone", "in", "name"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
add_host
Create both A and PTR (reverse) records for a host. CLI Example: .. code-block:: bash salt-run ddns.add_host domain.com my-test-vm 3600 10.20.30.40 my-tsig-key /etc/salt/tsig.keyring 10.0.0.1 5
salt/runners/ddns.py
def add_host(zone, name, ttl, ip, keyname, keyfile, nameserver, timeout, port=53, keyalgorithm='hmac-md5'): ''' Create both A and PTR (reverse) records for a host. CLI Example: .. code-block:: bash salt-run ddns.add_host domain.com my-test-vm 3600 10.20.30.40 my-tsig-key /etc/sal...
def add_host(zone, name, ttl, ip, keyname, keyfile, nameserver, timeout, port=53, keyalgorithm='hmac-md5'): ''' Create both A and PTR (reverse) records for a host. CLI Example: .. code-block:: bash salt-run ddns.add_host domain.com my-test-vm 3600 10.20.30.40 my-tsig-key /etc/sal...
[ "Create", "both", "A", "and", "PTR", "(", "reverse", ")", "records", "for", "a", "host", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/ddns.py#L187-L229
[ "def", "add_host", "(", "zone", ",", "name", ",", "ttl", ",", "ip", ",", "keyname", ",", "keyfile", ",", "nameserver", ",", "timeout", ",", "port", "=", "53", ",", "keyalgorithm", "=", "'hmac-md5'", ")", ":", "res", "=", "[", "]", "if", "zone", "in...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
delete_host
Delete both forward (A) and reverse (PTR) records for a host only if the forward (A) record exists. CLI Example: .. code-block:: bash salt-run ddns.delete_host domain.com my-test-vm my-tsig-key /etc/salt/tsig.keyring 10.0.0.1 5
salt/runners/ddns.py
def delete_host(zone, name, keyname, keyfile, nameserver, timeout, port=53, keyalgorithm='hmac-md5'): ''' Delete both forward (A) and reverse (PTR) records for a host only if the forward (A) record exists. CLI Example: .. code-block:: bash salt-run ddns.delete_host domain....
def delete_host(zone, name, keyname, keyfile, nameserver, timeout, port=53, keyalgorithm='hmac-md5'): ''' Delete both forward (A) and reverse (PTR) records for a host only if the forward (A) record exists. CLI Example: .. code-block:: bash salt-run ddns.delete_host domain....
[ "Delete", "both", "forward", "(", "A", ")", "and", "reverse", "(", "PTR", ")", "records", "for", "a", "host", "only", "if", "the", "forward", "(", "A", ")", "record", "exists", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/ddns.py#L232-L282
[ "def", "delete_host", "(", "zone", ",", "name", ",", "keyname", ",", "keyfile", ",", "nameserver", ",", "timeout", ",", "port", "=", "53", ",", "keyalgorithm", "=", "'hmac-md5'", ")", ":", "res", "=", "[", "]", "if", "zone", "in", "name", ":", "name"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
combine_comments
Given a list of comments, or a comment submitted as a string, return a single line of text containing all of the comments.
salt/utils/pkg/deb.py
def combine_comments(comments): ''' Given a list of comments, or a comment submitted as a string, return a single line of text containing all of the comments. ''' if isinstance(comments, list): for idx in range(len(comments)): if not isinstance(comments[idx], six.string_types): ...
def combine_comments(comments): ''' Given a list of comments, or a comment submitted as a string, return a single line of text containing all of the comments. ''' if isinstance(comments, list): for idx in range(len(comments)): if not isinstance(comments[idx], six.string_types): ...
[ "Given", "a", "list", "of", "comments", "or", "a", "comment", "submitted", "as", "a", "string", "return", "a", "single", "line", "of", "text", "containing", "all", "of", "the", "comments", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/pkg/deb.py#L14-L28
[ "def", "combine_comments", "(", "comments", ")", ":", "if", "isinstance", "(", "comments", ",", "list", ")", ":", "for", "idx", "in", "range", "(", "len", "(", "comments", ")", ")", ":", "if", "not", "isinstance", "(", "comments", "[", "idx", "]", ",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
strip_uri
Remove the trailing slash from the URI in a repo definition
salt/utils/pkg/deb.py
def strip_uri(repo): ''' Remove the trailing slash from the URI in a repo definition ''' splits = repo.split() for idx in range(len(splits)): if any(splits[idx].startswith(x) for x in ('http://', 'https://', 'ftp://')): splits[idx] = splits[idx].rstrip('/') ret...
def strip_uri(repo): ''' Remove the trailing slash from the URI in a repo definition ''' splits = repo.split() for idx in range(len(splits)): if any(splits[idx].startswith(x) for x in ('http://', 'https://', 'ftp://')): splits[idx] = splits[idx].rstrip('/') ret...
[ "Remove", "the", "trailing", "slash", "from", "the", "URI", "in", "a", "repo", "definition" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/pkg/deb.py#L31-L40
[ "def", "strip_uri", "(", "repo", ")", ":", "splits", "=", "repo", ".", "split", "(", ")", "for", "idx", "in", "range", "(", "len", "(", "splits", ")", ")", ":", "if", "any", "(", "splits", "[", "idx", "]", ".", "startswith", "(", "x", ")", "for...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_get_si
Authenticate with vCenter server and return service instance object.
salt/cloud/clouds/vmware.py
def _get_si(): ''' Authenticate with vCenter server and return service instance object. ''' url = config.get_cloud_config_value( 'url', get_configured_provider(), __opts__, search_global=False ) username = config.get_cloud_config_value( 'user', get_configured_provider(), __opts_...
def _get_si(): ''' Authenticate with vCenter server and return service instance object. ''' url = config.get_cloud_config_value( 'url', get_configured_provider(), __opts__, search_global=False ) username = config.get_cloud_config_value( 'user', get_configured_provider(), __opts_...
[ "Authenticate", "with", "vCenter", "server", "and", "return", "service", "instance", "object", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L238-L263
[ "def", "_get_si", "(", ")", ":", "url", "=", "config", ".", "get_cloud_config_value", "(", "'url'", ",", "get_configured_provider", "(", ")", ",", "__opts__", ",", "search_global", "=", "False", ")", "username", "=", "config", ".", "get_cloud_config_value", "(...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_add_new_ide_controller_helper
Helper function for adding new IDE controllers .. versionadded:: 2016.3.0 Args: ide_controller_label: label of the IDE controller controller_key: if not None, the controller key to use; otherwise it is randomly generated bus_number: bus number Returns: created device spec for an IDE con...
salt/cloud/clouds/vmware.py
def _add_new_ide_controller_helper(ide_controller_label, controller_key, bus_number): ''' Helper function for adding new IDE controllers .. versionadded:: 2016.3.0 Args: ide_controller_label: label of the IDE controller ...
def _add_new_ide_controller_helper(ide_controller_label, controller_key, bus_number): ''' Helper function for adding new IDE controllers .. versionadded:: 2016.3.0 Args: ide_controller_label: label of the IDE controller ...
[ "Helper", "function", "for", "adding", "new", "IDE", "controllers" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L554-L584
[ "def", "_add_new_ide_controller_helper", "(", "ide_controller_label", ",", "controller_key", ",", "bus_number", ")", ":", "if", "controller_key", "is", "None", ":", "controller_key", "=", "randint", "(", "-", "200", ",", "250", ")", "ide_spec", "=", "vim", ".", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_valid_ip
Check if the IP address is valid and routable Return either True or False
salt/cloud/clouds/vmware.py
def _valid_ip(ip_address): ''' Check if the IP address is valid and routable Return either True or False ''' try: address = ipaddress.IPv4Address(ip_address) except ipaddress.AddressValueError: return False if address.is_unspecified or \ address.is_loopback or \ ...
def _valid_ip(ip_address): ''' Check if the IP address is valid and routable Return either True or False ''' try: address = ipaddress.IPv4Address(ip_address) except ipaddress.AddressValueError: return False if address.is_unspecified or \ address.is_loopback or \ ...
[ "Check", "if", "the", "IP", "address", "is", "valid", "and", "routable", "Return", "either", "True", "or", "False" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L993-L1011
[ "def", "_valid_ip", "(", "ip_address", ")", ":", "try", ":", "address", "=", "ipaddress", ".", "IPv4Address", "(", "ip_address", ")", "except", "ipaddress", ".", "AddressValueError", ":", "return", "False", "if", "address", ".", "is_unspecified", "or", "addres...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_valid_ip6
Check if the IPv6 address is valid and routable Return either True or False
salt/cloud/clouds/vmware.py
def _valid_ip6(ip_address): ''' Check if the IPv6 address is valid and routable Return either True or False ''' # Validate IPv6 address try: address = ipaddress.IPv6Address(ip_address) except ipaddress.AddressValueError: return False if address.is_unspecified or \ ...
def _valid_ip6(ip_address): ''' Check if the IPv6 address is valid and routable Return either True or False ''' # Validate IPv6 address try: address = ipaddress.IPv6Address(ip_address) except ipaddress.AddressValueError: return False if address.is_unspecified or \ ...
[ "Check", "if", "the", "IPv6", "address", "is", "valid", "and", "routable", "Return", "either", "True", "or", "False" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1014-L1036
[ "def", "_valid_ip6", "(", "ip_address", ")", ":", "# Validate IPv6 address", "try", ":", "address", "=", "ipaddress", ".", "IPv6Address", "(", "ip_address", ")", "except", "ipaddress", ".", "AddressValueError", ":", "return", "False", "if", "address", ".", "is_u...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_master_supports_ipv6
Check if the salt master has a valid and routable IPv6 address available
salt/cloud/clouds/vmware.py
def _master_supports_ipv6(): ''' Check if the salt master has a valid and routable IPv6 address available ''' master_fqdn = salt.utils.network.get_fqhostname() pillar_util = salt.utils.master.MasterPillarUtil(master_fqdn, tgt_type='glob', ...
def _master_supports_ipv6(): ''' Check if the salt master has a valid and routable IPv6 address available ''' master_fqdn = salt.utils.network.get_fqhostname() pillar_util = salt.utils.master.MasterPillarUtil(master_fqdn, tgt_type='glob', ...
[ "Check", "if", "the", "salt", "master", "has", "a", "valid", "and", "routable", "IPv6", "address", "available" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1039-L1055
[ "def", "_master_supports_ipv6", "(", ")", ":", "master_fqdn", "=", "salt", ".", "utils", ".", "network", ".", "get_fqhostname", "(", ")", "pillar_util", "=", "salt", ".", "utils", ".", "master", ".", "MasterPillarUtil", "(", "master_fqdn", ",", "tgt_type", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_get_hba_type
Convert a string representation of a HostHostBusAdapter into an object reference.
salt/cloud/clouds/vmware.py
def _get_hba_type(hba_type): ''' Convert a string representation of a HostHostBusAdapter into an object reference. ''' if hba_type == "parallel": return vim.host.ParallelScsiHba elif hba_type == "block": return vim.host.BlockHba elif hba_type == "iscsi": return vim.ho...
def _get_hba_type(hba_type): ''' Convert a string representation of a HostHostBusAdapter into an object reference. ''' if hba_type == "parallel": return vim.host.ParallelScsiHba elif hba_type == "block": return vim.host.BlockHba elif hba_type == "iscsi": return vim.ho...
[ "Convert", "a", "string", "representation", "of", "a", "HostHostBusAdapter", "into", "an", "object", "reference", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1484-L1498
[ "def", "_get_hba_type", "(", "hba_type", ")", ":", "if", "hba_type", "==", "\"parallel\"", ":", "return", "vim", ".", "host", ".", "ParallelScsiHba", "elif", "hba_type", "==", "\"block\"", ":", "return", "vim", ".", "host", ".", "BlockHba", "elif", "hba_type...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_vcenter_version
Show the vCenter Server version with build number. CLI Example: .. code-block:: bash salt-cloud -f get_vcenter_version my-vmware-config
salt/cloud/clouds/vmware.py
def get_vcenter_version(kwargs=None, call=None): ''' Show the vCenter Server version with build number. CLI Example: .. code-block:: bash salt-cloud -f get_vcenter_version my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The get_vcenter_versi...
def get_vcenter_version(kwargs=None, call=None): ''' Show the vCenter Server version with build number. CLI Example: .. code-block:: bash salt-cloud -f get_vcenter_version my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The get_vcenter_versi...
[ "Show", "the", "vCenter", "Server", "version", "with", "build", "number", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1528-L1547
[ "def", "get_vcenter_version", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The get_vcenter_version function must be called with '", "'-f or --function.'", ")", "# Get the in...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_datacenters
List all the data centers for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_datacenters my-vmware-config
salt/cloud/clouds/vmware.py
def list_datacenters(kwargs=None, call=None): ''' List all the data centers for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_datacenters my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The list_datacenters fun...
def list_datacenters(kwargs=None, call=None): ''' List all the data centers for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_datacenters my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The list_datacenters fun...
[ "List", "all", "the", "data", "centers", "for", "this", "VMware", "environment" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1550-L1566
[ "def", "list_datacenters", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_datacenters function must be called with '", "'-f or --function.'", ")", "return", "{", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_portgroups
List all the distributed virtual portgroups for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_portgroups my-vmware-config
salt/cloud/clouds/vmware.py
def list_portgroups(kwargs=None, call=None): ''' List all the distributed virtual portgroups for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_portgroups my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The list...
def list_portgroups(kwargs=None, call=None): ''' List all the distributed virtual portgroups for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_portgroups my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The list...
[ "List", "all", "the", "distributed", "virtual", "portgroups", "for", "this", "VMware", "environment" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1569-L1585
[ "def", "list_portgroups", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_portgroups function must be called with '", "'-f or --function.'", ")", "return", "{", "'...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_clusters
List all the clusters for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_clusters my-vmware-config
salt/cloud/clouds/vmware.py
def list_clusters(kwargs=None, call=None): ''' List all the clusters for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_clusters my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The list_clusters function must be...
def list_clusters(kwargs=None, call=None): ''' List all the clusters for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_clusters my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The list_clusters function must be...
[ "List", "all", "the", "clusters", "for", "this", "VMware", "environment" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1588-L1604
[ "def", "list_clusters", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_clusters function must be called with '", "'-f or --function.'", ")", "return", "{", "'Clus...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_datastore_clusters
List all the datastore clusters for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_datastore_clusters my-vmware-config
salt/cloud/clouds/vmware.py
def list_datastore_clusters(kwargs=None, call=None): ''' List all the datastore clusters for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_datastore_clusters my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The ...
def list_datastore_clusters(kwargs=None, call=None): ''' List all the datastore clusters for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_datastore_clusters my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The ...
[ "List", "all", "the", "datastore", "clusters", "for", "this", "VMware", "environment" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1607-L1623
[ "def", "list_datastore_clusters", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_datastore_clusters function must be called with '", "'-f or --function.'", ")", "retu...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_datastores
List all the datastores for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_datastores my-vmware-config
salt/cloud/clouds/vmware.py
def list_datastores(kwargs=None, call=None): ''' List all the datastores for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_datastores my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The list_datastores function...
def list_datastores(kwargs=None, call=None): ''' List all the datastores for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_datastores my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The list_datastores function...
[ "List", "all", "the", "datastores", "for", "this", "VMware", "environment" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1626-L1642
[ "def", "list_datastores", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_datastores function must be called with '", "'-f or --function.'", ")", "return", "{", "'...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_datastores_full
List all the datastores for this VMware environment, with extra information CLI Example: .. code-block:: bash salt-cloud -f list_datastores_full my-vmware-config
salt/cloud/clouds/vmware.py
def list_datastores_full(kwargs=None, call=None): ''' List all the datastores for this VMware environment, with extra information CLI Example: .. code-block:: bash salt-cloud -f list_datastores_full my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( ...
def list_datastores_full(kwargs=None, call=None): ''' List all the datastores for this VMware environment, with extra information CLI Example: .. code-block:: bash salt-cloud -f list_datastores_full my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( ...
[ "List", "all", "the", "datastores", "for", "this", "VMware", "environment", "with", "extra", "information" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1645-L1661
[ "def", "list_datastores_full", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_datastores_full function must be called with '", "'-f or --function.'", ")", "return", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_datastore_full
Returns a dictionary with basic information for the given datastore CLI Example: .. code-block:: bash salt-cloud -f list_datastore_full my-vmware-config datastore=datastore-name
salt/cloud/clouds/vmware.py
def list_datastore_full(kwargs=None, call=None, datastore=None): ''' Returns a dictionary with basic information for the given datastore CLI Example: .. code-block:: bash salt-cloud -f list_datastore_full my-vmware-config datastore=datastore-name ''' if call != 'function': rai...
def list_datastore_full(kwargs=None, call=None, datastore=None): ''' Returns a dictionary with basic information for the given datastore CLI Example: .. code-block:: bash salt-cloud -f list_datastore_full my-vmware-config datastore=datastore-name ''' if call != 'function': rai...
[ "Returns", "a", "dictionary", "with", "basic", "information", "for", "the", "given", "datastore" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1664-L1688
[ "def", "list_datastore_full", "(", "kwargs", "=", "None", ",", "call", "=", "None", ",", "datastore", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_datastore_full function must be called with '", "'-f o...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_hosts
List all the hosts for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_hosts my-vmware-config
salt/cloud/clouds/vmware.py
def list_hosts(kwargs=None, call=None): ''' List all the hosts for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_hosts my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The list_hosts function must be called with...
def list_hosts(kwargs=None, call=None): ''' List all the hosts for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_hosts my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The list_hosts function must be called with...
[ "List", "all", "the", "hosts", "for", "this", "VMware", "environment" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1691-L1707
[ "def", "list_hosts", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_hosts function must be called with '", "'-f or --function.'", ")", "return", "{", "'Hosts'", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_resourcepools
List all the resource pools for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_resourcepools my-vmware-config
salt/cloud/clouds/vmware.py
def list_resourcepools(kwargs=None, call=None): ''' List all the resource pools for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_resourcepools my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The list_resourcep...
def list_resourcepools(kwargs=None, call=None): ''' List all the resource pools for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_resourcepools my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The list_resourcep...
[ "List", "all", "the", "resource", "pools", "for", "this", "VMware", "environment" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1710-L1726
[ "def", "list_resourcepools", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_resourcepools function must be called with '", "'-f or --function.'", ")", "return", "{"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_networks
List all the standard networks for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_networks my-vmware-config
salt/cloud/clouds/vmware.py
def list_networks(kwargs=None, call=None): ''' List all the standard networks for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_networks my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The list_networks functio...
def list_networks(kwargs=None, call=None): ''' List all the standard networks for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_networks my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The list_networks functio...
[ "List", "all", "the", "standard", "networks", "for", "this", "VMware", "environment" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1729-L1745
[ "def", "list_networks", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_networks function must be called with '", "'-f or --function.'", ")", "return", "{", "'Netw...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_nodes_min
Return a list of all VMs and templates that are on the specified provider, with no details CLI Example: .. code-block:: bash salt-cloud -f list_nodes_min my-vmware-config
salt/cloud/clouds/vmware.py
def list_nodes_min(kwargs=None, call=None): ''' Return a list of all VMs and templates that are on the specified provider, with no details CLI Example: .. code-block:: bash salt-cloud -f list_nodes_min my-vmware-config ''' if call == 'action': raise SaltCloudSystemExit( ...
def list_nodes_min(kwargs=None, call=None): ''' Return a list of all VMs and templates that are on the specified provider, with no details CLI Example: .. code-block:: bash salt-cloud -f list_nodes_min my-vmware-config ''' if call == 'action': raise SaltCloudSystemExit( ...
[ "Return", "a", "list", "of", "all", "VMs", "and", "templates", "that", "are", "on", "the", "specified", "provider", "with", "no", "details" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1748-L1772
[ "def", "list_nodes_min", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "==", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_nodes_min function must be called '", "'with -f or --function.'", ")", "ret", "=", "{", "}...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_nodes
Return a list of all VMs and templates that are on the specified provider, with basic fields CLI Example: .. code-block:: bash salt-cloud -f list_nodes my-vmware-config To return a list of all VMs and templates present on ALL configured providers, with basic fields: CLI Example: .....
salt/cloud/clouds/vmware.py
def list_nodes(kwargs=None, call=None): ''' Return a list of all VMs and templates that are on the specified provider, with basic fields CLI Example: .. code-block:: bash salt-cloud -f list_nodes my-vmware-config To return a list of all VMs and templates present on ALL configured provide...
def list_nodes(kwargs=None, call=None): ''' Return a list of all VMs and templates that are on the specified provider, with basic fields CLI Example: .. code-block:: bash salt-cloud -f list_nodes my-vmware-config To return a list of all VMs and templates present on ALL configured provide...
[ "Return", "a", "list", "of", "all", "VMs", "and", "templates", "that", "are", "on", "the", "specified", "provider", "with", "basic", "fields" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1775-L1829
[ "def", "list_nodes", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "==", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_nodes function must be called '", "'with -f or --function.'", ")", "ret", "=", "{", "}", "vm...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_nodes_select
Return a list of all VMs and templates that are on the specified provider, with fields specified under ``query.selection`` in ``/etc/salt/cloud`` CLI Example: .. code-block:: bash salt-cloud -f list_nodes_select my-vmware-config To return a list of all VMs and templates present on ALL config...
salt/cloud/clouds/vmware.py
def list_nodes_select(call=None): ''' Return a list of all VMs and templates that are on the specified provider, with fields specified under ``query.selection`` in ``/etc/salt/cloud`` CLI Example: .. code-block:: bash salt-cloud -f list_nodes_select my-vmware-config To return a list ...
def list_nodes_select(call=None): ''' Return a list of all VMs and templates that are on the specified provider, with fields specified under ``query.selection`` in ``/etc/salt/cloud`` CLI Example: .. code-block:: bash salt-cloud -f list_nodes_select my-vmware-config To return a list ...
[ "Return", "a", "list", "of", "all", "VMs", "and", "templates", "that", "are", "on", "the", "specified", "provider", "with", "fields", "specified", "under", "query", ".", "selection", "in", "/", "etc", "/", "salt", "/", "cloud" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1883-L1968
[ "def", "list_nodes_select", "(", "call", "=", "None", ")", ":", "if", "call", "==", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_nodes_select function must be called '", "'with -f or --function.'", ")", "ret", "=", "{", "}", "vm_properties", "=", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
show_instance
List all available details of the specified VM CLI Example: .. code-block:: bash salt-cloud -a show_instance vmname
salt/cloud/clouds/vmware.py
def show_instance(name, call=None): ''' List all available details of the specified VM CLI Example: .. code-block:: bash salt-cloud -a show_instance vmname ''' if call != 'action': raise SaltCloudSystemExit( 'The show_instance action must be called with ' ...
def show_instance(name, call=None): ''' List all available details of the specified VM CLI Example: .. code-block:: bash salt-cloud -a show_instance vmname ''' if call != 'action': raise SaltCloudSystemExit( 'The show_instance action must be called with ' ...
[ "List", "all", "available", "details", "of", "the", "specified", "VM" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1971-L2010
[ "def", "show_instance", "(", "name", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The show_instance action must be called with '", "'-a or --action.'", ")", "vm_properties", "=", "[", "\"config.hardwar...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
avail_images
Return a list of all the templates present in this VMware environment with basic details CLI Example: .. code-block:: bash salt-cloud --list-images my-vmware-config
salt/cloud/clouds/vmware.py
def avail_images(call=None): ''' Return a list of all the templates present in this VMware environment with basic details CLI Example: .. code-block:: bash salt-cloud --list-images my-vmware-config ''' if call == 'action': raise SaltCloudSystemExit( 'The avail_...
def avail_images(call=None): ''' Return a list of all the templates present in this VMware environment with basic details CLI Example: .. code-block:: bash salt-cloud --list-images my-vmware-config ''' if call == 'action': raise SaltCloudSystemExit( 'The avail_...
[ "Return", "a", "list", "of", "all", "the", "templates", "present", "in", "this", "VMware", "environment", "with", "basic", "details" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L2013-L2050
[ "def", "avail_images", "(", "call", "=", "None", ")", ":", "if", "call", "==", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The avail_images function must be called with '", "'-f or --function, or with the --list-images option.'", ")", "templates", "=", "{", "}...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_folders
List all the folders for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_folders my-vmware-config
salt/cloud/clouds/vmware.py
def list_folders(kwargs=None, call=None): ''' List all the folders for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_folders my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The list_folders function must be cal...
def list_folders(kwargs=None, call=None): ''' List all the folders for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_folders my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The list_folders function must be cal...
[ "List", "all", "the", "folders", "for", "this", "VMware", "environment" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L2121-L2137
[ "def", "list_folders", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_folders function must be called with '", "'-f or --function.'", ")", "return", "{", "'Folder...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_snapshots
List snapshots either for all VMs and templates or for a specific VM/template in this VMware environment To list snapshots for all VMs and templates: CLI Example: .. code-block:: bash salt-cloud -f list_snapshots my-vmware-config To list snapshots for a specific VM/template: CLI Ex...
salt/cloud/clouds/vmware.py
def list_snapshots(kwargs=None, call=None): ''' List snapshots either for all VMs and templates or for a specific VM/template in this VMware environment To list snapshots for all VMs and templates: CLI Example: .. code-block:: bash salt-cloud -f list_snapshots my-vmware-config T...
def list_snapshots(kwargs=None, call=None): ''' List snapshots either for all VMs and templates or for a specific VM/template in this VMware environment To list snapshots for all VMs and templates: CLI Example: .. code-block:: bash salt-cloud -f list_snapshots my-vmware-config T...
[ "List", "snapshots", "either", "for", "all", "VMs", "and", "templates", "or", "for", "a", "specific", "VM", "/", "template", "in", "this", "VMware", "environment" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L2140-L2186
[ "def", "list_snapshots", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_snapshots function must be called with '", "'-f or --function.'", ")", "ret", "=", "{", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
suspend
To suspend a VM using its name CLI Example: .. code-block:: bash salt-cloud -a suspend vmname
salt/cloud/clouds/vmware.py
def suspend(name, call=None): ''' To suspend a VM using its name CLI Example: .. code-block:: bash salt-cloud -a suspend vmname ''' if call != 'action': raise SaltCloudSystemExit( 'The suspend action must be called with ' '-a or --action.' ) ...
def suspend(name, call=None): ''' To suspend a VM using its name CLI Example: .. code-block:: bash salt-cloud -a suspend vmname ''' if call != 'action': raise SaltCloudSystemExit( 'The suspend action must be called with ' '-a or --action.' ) ...
[ "To", "suspend", "a", "VM", "using", "its", "name" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L2291-L2337
[ "def", "suspend", "(", "name", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The suspend action must be called with '", "'-a or --action.'", ")", "vm_properties", "=", "[", "\"name\"", ",", "\"summa...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
reset
To reset a VM using its name .. note:: If ``soft=True`` then issues a command to the guest operating system asking it to perform a reboot. Otherwise hypervisor will terminate VM and start it again. Default is soft=False For ``soft=True`` vmtools should be installed on guest system...
salt/cloud/clouds/vmware.py
def reset(name, soft=False, call=None): ''' To reset a VM using its name .. note:: If ``soft=True`` then issues a command to the guest operating system asking it to perform a reboot. Otherwise hypervisor will terminate VM and start it again. Default is soft=False For ``sof...
def reset(name, soft=False, call=None): ''' To reset a VM using its name .. note:: If ``soft=True`` then issues a command to the guest operating system asking it to perform a reboot. Otherwise hypervisor will terminate VM and start it again. Default is soft=False For ``sof...
[ "To", "reset", "a", "VM", "using", "its", "name" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L2340-L2394
[ "def", "reset", "(", "name", ",", "soft", "=", "False", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The reset action must be called with '", "'-a or --action.'", ")", "vm_properties", "=", "[", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
terminate
To do an immediate power off of a VM using its name. A ``SIGKILL`` is issued to the vmx process of the VM CLI Example: .. code-block:: bash salt-cloud -a terminate vmname
salt/cloud/clouds/vmware.py
def terminate(name, call=None): ''' To do an immediate power off of a VM using its name. A ``SIGKILL`` is issued to the vmx process of the VM CLI Example: .. code-block:: bash salt-cloud -a terminate vmname ''' if call != 'action': raise SaltCloudSystemExit( 'T...
def terminate(name, call=None): ''' To do an immediate power off of a VM using its name. A ``SIGKILL`` is issued to the vmx process of the VM CLI Example: .. code-block:: bash salt-cloud -a terminate vmname ''' if call != 'action': raise SaltCloudSystemExit( 'T...
[ "To", "do", "an", "immediate", "power", "off", "of", "a", "VM", "using", "its", "name", ".", "A", "SIGKILL", "is", "issued", "to", "the", "vmx", "process", "of", "the", "VM" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L2397-L2439
[ "def", "terminate", "(", "name", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The terminate action must be called with '", "'-a or --action.'", ")", "vm_properties", "=", "[", "\"name\"", ",", "\"s...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
destroy
To destroy a VM from the VMware environment CLI Example: .. code-block:: bash salt-cloud -d vmname salt-cloud --destroy vmname salt-cloud -a destroy vmname
salt/cloud/clouds/vmware.py
def destroy(name, call=None): ''' To destroy a VM from the VMware environment CLI Example: .. code-block:: bash salt-cloud -d vmname salt-cloud --destroy vmname salt-cloud -a destroy vmname ''' if call == 'function': raise SaltCloudSystemExit( 'The ...
def destroy(name, call=None): ''' To destroy a VM from the VMware environment CLI Example: .. code-block:: bash salt-cloud -d vmname salt-cloud --destroy vmname salt-cloud -a destroy vmname ''' if call == 'function': raise SaltCloudSystemExit( 'The ...
[ "To", "destroy", "a", "VM", "from", "the", "VMware", "environment" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L2442-L2516
[ "def", "destroy", "(", "name", ",", "call", "=", "None", ")", ":", "if", "call", "==", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The destroy action must be called with -d, --destroy, '", "'-a or --action.'", ")", "__utils__", "[", "'cloud.fire_event'", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create
To create a single VM in the VMware environment. Sample profile and arguments that can be specified in it can be found :ref:`here. <vmware-cloud-profile>` CLI Example: .. code-block:: bash salt-cloud -p vmware-centos6.5 vmname
salt/cloud/clouds/vmware.py
def create(vm_): ''' To create a single VM in the VMware environment. Sample profile and arguments that can be specified in it can be found :ref:`here. <vmware-cloud-profile>` CLI Example: .. code-block:: bash salt-cloud -p vmware-centos6.5 vmname ''' try: # Check for...
def create(vm_): ''' To create a single VM in the VMware environment. Sample profile and arguments that can be specified in it can be found :ref:`here. <vmware-cloud-profile>` CLI Example: .. code-block:: bash salt-cloud -p vmware-centos6.5 vmname ''' try: # Check for...
[ "To", "create", "a", "single", "VM", "in", "the", "VMware", "environment", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L2519-L3080
[ "def", "create", "(", "vm_", ")", ":", "try", ":", "# Check for required profile parameters before sending any API calls.", "if", "(", "vm_", "[", "'profile'", "]", "and", "config", ".", "is_profile_configured", "(", "__opts__", ",", "__active_provider_name__", "or", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
handle_snapshot
Returns a clone spec for cloning from shapshots :rtype vim.vm.CloneSpec
salt/cloud/clouds/vmware.py
def handle_snapshot(config_spec, object_ref, reloc_spec, template, vm_): ''' Returns a clone spec for cloning from shapshots :rtype vim.vm.CloneSpec ''' if 'snapshot' not in vm_: return None allowed_types = [ FLATTEN_DISK_FULL_CLONE, COPY_ALL_DISKS_FULL_CLONE, CU...
def handle_snapshot(config_spec, object_ref, reloc_spec, template, vm_): ''' Returns a clone spec for cloning from shapshots :rtype vim.vm.CloneSpec ''' if 'snapshot' not in vm_: return None allowed_types = [ FLATTEN_DISK_FULL_CLONE, COPY_ALL_DISKS_FULL_CLONE, CU...
[ "Returns", "a", "clone", "spec", "for", "cloning", "from", "shapshots", ":", "rtype", "vim", ".", "vm", ".", "CloneSpec" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3083-L3108
[ "def", "handle_snapshot", "(", "config_spec", ",", "object_ref", ",", "reloc_spec", ",", "template", ",", "vm_", ")", ":", "if", "'snapshot'", "not", "in", "vm_", ":", "return", "None", "allowed_types", "=", "[", "FLATTEN_DISK_FULL_CLONE", ",", "COPY_ALL_DISKS_F...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_clonespec_for_valid_snapshot
return clonespec only if values are valid
salt/cloud/clouds/vmware.py
def get_clonespec_for_valid_snapshot(config_spec, object_ref, reloc_spec, template, vm_): ''' return clonespec only if values are valid ''' moving = True if QUICK_LINKED_CLONE == vm_['snapshot']['disk_move_type']: reloc_spec.diskMoveType = QUICK_LINKED_CLONE elif CURRENT_STATE_LINKED_CLO...
def get_clonespec_for_valid_snapshot(config_spec, object_ref, reloc_spec, template, vm_): ''' return clonespec only if values are valid ''' moving = True if QUICK_LINKED_CLONE == vm_['snapshot']['disk_move_type']: reloc_spec.diskMoveType = QUICK_LINKED_CLONE elif CURRENT_STATE_LINKED_CLO...
[ "return", "clonespec", "only", "if", "values", "are", "valid" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3111-L3130
[ "def", "get_clonespec_for_valid_snapshot", "(", "config_spec", ",", "object_ref", ",", "reloc_spec", ",", "template", ",", "vm_", ")", ":", "moving", "=", "True", "if", "QUICK_LINKED_CLONE", "==", "vm_", "[", "'snapshot'", "]", "[", "'disk_move_type'", "]", ":",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
build_clonespec
Returns the clone spec
salt/cloud/clouds/vmware.py
def build_clonespec(config_spec, object_ref, reloc_spec, template): ''' Returns the clone spec ''' if reloc_spec.diskMoveType == QUICK_LINKED_CLONE: return vim.vm.CloneSpec( template=template, location=reloc_spec, config=config_spec, snapshot=objec...
def build_clonespec(config_spec, object_ref, reloc_spec, template): ''' Returns the clone spec ''' if reloc_spec.diskMoveType == QUICK_LINKED_CLONE: return vim.vm.CloneSpec( template=template, location=reloc_spec, config=config_spec, snapshot=objec...
[ "Returns", "the", "clone", "spec" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3133-L3149
[ "def", "build_clonespec", "(", "config_spec", ",", "object_ref", ",", "reloc_spec", ",", "template", ")", ":", "if", "reloc_spec", ".", "diskMoveType", "==", "QUICK_LINKED_CLONE", ":", "return", "vim", ".", "vm", ".", "CloneSpec", "(", "template", "=", "templa...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_datacenter
Create a new data center in this VMware environment CLI Example: .. code-block:: bash salt-cloud -f create_datacenter my-vmware-config name="MyNewDatacenter"
salt/cloud/clouds/vmware.py
def create_datacenter(kwargs=None, call=None): ''' Create a new data center in this VMware environment CLI Example: .. code-block:: bash salt-cloud -f create_datacenter my-vmware-config name="MyNewDatacenter" ''' if call != 'function': raise SaltCloudSystemExit( 'T...
def create_datacenter(kwargs=None, call=None): ''' Create a new data center in this VMware environment CLI Example: .. code-block:: bash salt-cloud -f create_datacenter my-vmware-config name="MyNewDatacenter" ''' if call != 'function': raise SaltCloudSystemExit( 'T...
[ "Create", "a", "new", "data", "center", "in", "this", "VMware", "environment" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3152-L3206
[ "def", "create_datacenter", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The create_datacenter function must be called with '", "'-f or --function.'", ")", "datacenter_name"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_cluster
Create a new cluster under the specified datacenter in this VMware environment CLI Example: .. code-block:: bash salt-cloud -f create_cluster my-vmware-config name="myNewCluster" datacenter="datacenterName"
salt/cloud/clouds/vmware.py
def create_cluster(kwargs=None, call=None): ''' Create a new cluster under the specified datacenter in this VMware environment CLI Example: .. code-block:: bash salt-cloud -f create_cluster my-vmware-config name="myNewCluster" datacenter="datacenterName" ''' if call != 'function': ...
def create_cluster(kwargs=None, call=None): ''' Create a new cluster under the specified datacenter in this VMware environment CLI Example: .. code-block:: bash salt-cloud -f create_cluster my-vmware-config name="myNewCluster" datacenter="datacenterName" ''' if call != 'function': ...
[ "Create", "a", "new", "cluster", "under", "the", "specified", "datacenter", "in", "this", "VMware", "environment" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3209-L3275
[ "def", "create_cluster", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The create_cluster function must be called with '", "'-f or --function.'", ")", "cluster_name", "=", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
rescan_hba
To rescan a specified HBA or all the HBAs on the Host System CLI Example: .. code-block:: bash salt-cloud -f rescan_hba my-vmware-config host="hostSystemName" salt-cloud -f rescan_hba my-vmware-config hba="hbaDeviceName" host="hostSystemName"
salt/cloud/clouds/vmware.py
def rescan_hba(kwargs=None, call=None): ''' To rescan a specified HBA or all the HBAs on the Host System CLI Example: .. code-block:: bash salt-cloud -f rescan_hba my-vmware-config host="hostSystemName" salt-cloud -f rescan_hba my-vmware-config hba="hbaDeviceName" host="hostSystemName...
def rescan_hba(kwargs=None, call=None): ''' To rescan a specified HBA or all the HBAs on the Host System CLI Example: .. code-block:: bash salt-cloud -f rescan_hba my-vmware-config host="hostSystemName" salt-cloud -f rescan_hba my-vmware-config hba="hbaDeviceName" host="hostSystemName...
[ "To", "rescan", "a", "specified", "HBA", "or", "all", "the", "HBAs", "on", "the", "Host", "System" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3278-L3323
[ "def", "rescan_hba", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The rescan_hba function must be called with '", "'-f or --function.'", ")", "hba", "=", "kwargs", "."...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
upgrade_tools_all
To upgrade VMware Tools on all virtual machines present in the specified provider .. note:: If the virtual machine is running Windows OS, this function will attempt to suppress the automatic reboot caused by a VMware Tools upgrade. CLI Example: .. code-block:: bash s...
salt/cloud/clouds/vmware.py
def upgrade_tools_all(call=None): ''' To upgrade VMware Tools on all virtual machines present in the specified provider .. note:: If the virtual machine is running Windows OS, this function will attempt to suppress the automatic reboot caused by a VMware Tools upgrade. CLI...
def upgrade_tools_all(call=None): ''' To upgrade VMware Tools on all virtual machines present in the specified provider .. note:: If the virtual machine is running Windows OS, this function will attempt to suppress the automatic reboot caused by a VMware Tools upgrade. CLI...
[ "To", "upgrade", "VMware", "Tools", "on", "all", "virtual", "machines", "present", "in", "the", "specified", "provider" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3326-L3357
[ "def", "upgrade_tools_all", "(", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The upgrade_tools_all function must be called with '", "'-f or --function.'", ")", "ret", "=", "{", "}", "vm_properties", "=",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
upgrade_tools
To upgrade VMware Tools on a specified virtual machine. .. note:: If the virtual machine is running Windows OS, use ``reboot=True`` to reboot the virtual machine after VMware tools upgrade. Default is ``reboot=False`` CLI Example: .. code-block:: bash salt-cloud -a upgra...
salt/cloud/clouds/vmware.py
def upgrade_tools(name, reboot=False, call=None): ''' To upgrade VMware Tools on a specified virtual machine. .. note:: If the virtual machine is running Windows OS, use ``reboot=True`` to reboot the virtual machine after VMware tools upgrade. Default is ``reboot=False`` CLI E...
def upgrade_tools(name, reboot=False, call=None): ''' To upgrade VMware Tools on a specified virtual machine. .. note:: If the virtual machine is running Windows OS, use ``reboot=True`` to reboot the virtual machine after VMware tools upgrade. Default is ``reboot=False`` CLI E...
[ "To", "upgrade", "VMware", "Tools", "on", "a", "specified", "virtual", "machine", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3360-L3385
[ "def", "upgrade_tools", "(", "name", ",", "reboot", "=", "False", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The upgrade_tools action must be called with '", "'-a or --action.'", ")", "vm_ref", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_hosts_by_cluster
List hosts for each cluster; or hosts for a specified cluster in this VMware environment To list hosts for each cluster: CLI Example: .. code-block:: bash salt-cloud -f list_hosts_by_cluster my-vmware-config To list hosts for a specified cluster: CLI Example: .. code-block:: b...
salt/cloud/clouds/vmware.py
def list_hosts_by_cluster(kwargs=None, call=None): ''' List hosts for each cluster; or hosts for a specified cluster in this VMware environment To list hosts for each cluster: CLI Example: .. code-block:: bash salt-cloud -f list_hosts_by_cluster my-vmware-config To list hosts fo...
def list_hosts_by_cluster(kwargs=None, call=None): ''' List hosts for each cluster; or hosts for a specified cluster in this VMware environment To list hosts for each cluster: CLI Example: .. code-block:: bash salt-cloud -f list_hosts_by_cluster my-vmware-config To list hosts fo...
[ "List", "hosts", "for", "each", "cluster", ";", "or", "hosts", "for", "a", "specified", "cluster", "in", "this", "VMware", "environment" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3388-L3431
[ "def", "list_hosts_by_cluster", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_hosts_by_cluster function must be called with '", "'-f or --function.'", ")", "ret", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_clusters_by_datacenter
List clusters for each datacenter; or clusters for a specified datacenter in this VMware environment To list clusters for each datacenter: CLI Example: .. code-block:: bash salt-cloud -f list_clusters_by_datacenter my-vmware-config To list clusters for a specified datacenter: CLI E...
salt/cloud/clouds/vmware.py
def list_clusters_by_datacenter(kwargs=None, call=None): ''' List clusters for each datacenter; or clusters for a specified datacenter in this VMware environment To list clusters for each datacenter: CLI Example: .. code-block:: bash salt-cloud -f list_clusters_by_datacenter my-vmwar...
def list_clusters_by_datacenter(kwargs=None, call=None): ''' List clusters for each datacenter; or clusters for a specified datacenter in this VMware environment To list clusters for each datacenter: CLI Example: .. code-block:: bash salt-cloud -f list_clusters_by_datacenter my-vmwar...
[ "List", "clusters", "for", "each", "datacenter", ";", "or", "clusters", "for", "a", "specified", "datacenter", "in", "this", "VMware", "environment" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3434-L3475
[ "def", "list_clusters_by_datacenter", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_clusters_by_datacenter function must be called with '", "'-f or --function.'", ")",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_hbas
List all HBAs for each host system; or all HBAs for a specified host system; or HBAs of specified type for each host system; or HBAs of specified type for a specified host system in this VMware environment .. note:: You can specify type as either ``parallel``, ``iscsi``, ``block`` or ``fib...
salt/cloud/clouds/vmware.py
def list_hbas(kwargs=None, call=None): ''' List all HBAs for each host system; or all HBAs for a specified host system; or HBAs of specified type for each host system; or HBAs of specified type for a specified host system in this VMware environment .. note:: You can specify type as either ...
def list_hbas(kwargs=None, call=None): ''' List all HBAs for each host system; or all HBAs for a specified host system; or HBAs of specified type for each host system; or HBAs of specified type for a specified host system in this VMware environment .. note:: You can specify type as either ...
[ "List", "all", "HBAs", "for", "each", "host", "system", ";", "or", "all", "HBAs", "for", "a", "specified", "host", "system", ";", "or", "HBAs", "of", "specified", "type", "for", "each", "host", "system", ";", "or", "HBAs", "of", "specified", "type", "f...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3524-L3610
[ "def", "list_hbas", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_hbas function must be called with '", "'-f or --function.'", ")", "ret", "=", "{", "}", "hb...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_dvs
List all the distributed virtual switches for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_dvs my-vmware-config
salt/cloud/clouds/vmware.py
def list_dvs(kwargs=None, call=None): ''' List all the distributed virtual switches for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_dvs my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The list_dvs function mu...
def list_dvs(kwargs=None, call=None): ''' List all the distributed virtual switches for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_dvs my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The list_dvs function mu...
[ "List", "all", "the", "distributed", "virtual", "switches", "for", "this", "VMware", "environment" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3613-L3629
[ "def", "list_dvs", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_dvs function must be called with '", "'-f or --function.'", ")", "return", "{", "'Distributed Vi...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_vapps
List all the vApps for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_vapps my-vmware-config
salt/cloud/clouds/vmware.py
def list_vapps(kwargs=None, call=None): ''' List all the vApps for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_vapps my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The list_vapps function must be called with...
def list_vapps(kwargs=None, call=None): ''' List all the vApps for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_vapps my-vmware-config ''' if call != 'function': raise SaltCloudSystemExit( 'The list_vapps function must be called with...
[ "List", "all", "the", "vApps", "for", "this", "VMware", "environment" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3632-L3648
[ "def", "list_vapps", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_vapps function must be called with '", "'-f or --function.'", ")", "return", "{", "'vApps'", ...
e8541fd6e744ab0df786c0f76102e41631f45d46