id
int32
0
252k
repo
stringlengths
7
55
path
stringlengths
4
127
func_name
stringlengths
1
88
original_string
stringlengths
75
19.8k
language
stringclasses
1 value
code
stringlengths
75
19.8k
code_tokens
list
docstring
stringlengths
3
17.3k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
87
242
35,600
saltstack/salt
salt/modules/win_iis.py
_prepare_settings
def _prepare_settings(pspath, settings): ''' Prepare settings before execution with get or set functions. Removes settings with a match parameter when index is not found. ''' prepared_settings = [] for setting in settings: match = re.search(r'Collection\[(\{.*\})\]', setting['name']) ...
python
def _prepare_settings(pspath, settings): ''' Prepare settings before execution with get or set functions. Removes settings with a match parameter when index is not found. ''' prepared_settings = [] for setting in settings: match = re.search(r'Collection\[(\{.*\})\]', setting['name']) ...
[ "def", "_prepare_settings", "(", "pspath", ",", "settings", ")", ":", "prepared_settings", "=", "[", "]", "for", "setting", "in", "settings", ":", "match", "=", "re", ".", "search", "(", "r'Collection\\[(\\{.*\\})\\]'", ",", "setting", "[", "'name'", "]", ")...
Prepare settings before execution with get or set functions. Removes settings with a match parameter when index is not found.
[ "Prepare", "settings", "before", "execution", "with", "get", "or", "set", "functions", ".", "Removes", "settings", "with", "a", "match", "parameter", "when", "index", "is", "not", "found", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L177-L194
35,601
saltstack/salt
salt/modules/win_iis.py
list_sites
def list_sites(): ''' List all the currently deployed websites. Returns: dict: A dictionary of the IIS sites and their properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_sites ''' ret = dict() ps_cmd = ['Get-ChildItem', '-Path', r"'IIS:\...
python
def list_sites(): ''' List all the currently deployed websites. Returns: dict: A dictionary of the IIS sites and their properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_sites ''' ret = dict() ps_cmd = ['Get-ChildItem', '-Path', r"'IIS:\...
[ "def", "list_sites", "(", ")", ":", "ret", "=", "dict", "(", ")", "ps_cmd", "=", "[", "'Get-ChildItem'", ",", "'-Path'", ",", "r\"'IIS:\\Sites'\"", ",", "'|'", ",", "'Select-Object applicationPool, applicationDefaults, Bindings, ID, Name, PhysicalPath, State'", "]", "ke...
List all the currently deployed websites. Returns: dict: A dictionary of the IIS sites and their properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_sites
[ "List", "all", "the", "currently", "deployed", "websites", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L197-L264
35,602
saltstack/salt
salt/modules/win_iis.py
create_site
def create_site(name, sourcepath, apppool='', hostheader='', ipaddress='*', port=80, protocol='http', preload=''): ''' Create a basic website in IIS. .. note:: This function only validates against the site name, and will return True even if the site already exists with a di...
python
def create_site(name, sourcepath, apppool='', hostheader='', ipaddress='*', port=80, protocol='http', preload=''): ''' Create a basic website in IIS. .. note:: This function only validates against the site name, and will return True even if the site already exists with a di...
[ "def", "create_site", "(", "name", ",", "sourcepath", ",", "apppool", "=", "''", ",", "hostheader", "=", "''", ",", "ipaddress", "=", "'*'", ",", "port", "=", "80", ",", "protocol", "=", "'http'", ",", "preload", "=", "''", ")", ":", "protocol", "=",...
Create a basic website in IIS. .. note:: This function only validates against the site name, and will return True even if the site already exists with a different configuration. It will not modify the configuration of an existing site. Args: name (str): The IIS site name. ...
[ "Create", "a", "basic", "website", "in", "IIS", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L267-L351
35,603
saltstack/salt
salt/modules/win_iis.py
modify_site
def modify_site(name, sourcepath=None, apppool=None, preload=None): ''' Modify a basic website in IIS. .. versionadded:: 2017.7.0 Args: name (str): The IIS site name. sourcepath (str): The physical path of the IIS site. apppool (str): The name of the IIS application pool. ...
python
def modify_site(name, sourcepath=None, apppool=None, preload=None): ''' Modify a basic website in IIS. .. versionadded:: 2017.7.0 Args: name (str): The IIS site name. sourcepath (str): The physical path of the IIS site. apppool (str): The name of the IIS application pool. ...
[ "def", "modify_site", "(", "name", ",", "sourcepath", "=", "None", ",", "apppool", "=", "None", ",", "preload", "=", "None", ")", ":", "site_path", "=", "r'IIS:\\Sites\\{0}'", ".", "format", "(", "name", ")", "current_sites", "=", "list_sites", "(", ")", ...
Modify a basic website in IIS. .. versionadded:: 2017.7.0 Args: name (str): The IIS site name. sourcepath (str): The physical path of the IIS site. apppool (str): The name of the IIS application pool. preload (bool): Whether preloading should be enabled Returns: bo...
[ "Modify", "a", "basic", "website", "in", "IIS", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L354-L426
35,604
saltstack/salt
salt/modules/win_iis.py
stop_site
def stop_site(name): ''' Stop a Web Site in IIS. .. versionadded:: 2017.7.0 Args: name (str): The name of the website to stop. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.stop_site name='My Test Site' ...
python
def stop_site(name): ''' Stop a Web Site in IIS. .. versionadded:: 2017.7.0 Args: name (str): The name of the website to stop. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.stop_site name='My Test Site' ...
[ "def", "stop_site", "(", "name", ")", ":", "ps_cmd", "=", "[", "'Stop-WebSite'", ",", "r\"'{0}'\"", ".", "format", "(", "name", ")", "]", "cmd_ret", "=", "_srvmgr", "(", "ps_cmd", ")", "return", "cmd_ret", "[", "'retcode'", "]", "==", "0" ]
Stop a Web Site in IIS. .. versionadded:: 2017.7.0 Args: name (str): The name of the website to stop. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.stop_site name='My Test Site'
[ "Stop", "a", "Web", "Site", "in", "IIS", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L469-L491
35,605
saltstack/salt
salt/modules/win_iis.py
start_site
def start_site(name): ''' Start a Web Site in IIS. .. versionadded:: 2017.7.0 Args: name (str): The name of the website to start. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.start_site name='My Test Site'...
python
def start_site(name): ''' Start a Web Site in IIS. .. versionadded:: 2017.7.0 Args: name (str): The name of the website to start. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.start_site name='My Test Site'...
[ "def", "start_site", "(", "name", ")", ":", "ps_cmd", "=", "[", "'Start-WebSite'", ",", "r\"'{0}'\"", ".", "format", "(", "name", ")", "]", "cmd_ret", "=", "_srvmgr", "(", "ps_cmd", ")", "return", "cmd_ret", "[", "'retcode'", "]", "==", "0" ]
Start a Web Site in IIS. .. versionadded:: 2017.7.0 Args: name (str): The name of the website to start. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.start_site name='My Test Site'
[ "Start", "a", "Web", "Site", "in", "IIS", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L494-L516
35,606
saltstack/salt
salt/modules/win_iis.py
list_bindings
def list_bindings(site): ''' Get all configured IIS bindings for the specified site. Args: site (str): The name if the IIS Site Returns: dict: A dictionary of the binding names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_bindings site ...
python
def list_bindings(site): ''' Get all configured IIS bindings for the specified site. Args: site (str): The name if the IIS Site Returns: dict: A dictionary of the binding names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_bindings site ...
[ "def", "list_bindings", "(", "site", ")", ":", "ret", "=", "dict", "(", ")", "sites", "=", "list_sites", "(", ")", "if", "site", "not", "in", "sites", ":", "log", ".", "warning", "(", "'Site not found: %s'", ",", "site", ")", "return", "ret", "ret", ...
Get all configured IIS bindings for the specified site. Args: site (str): The name if the IIS Site Returns: dict: A dictionary of the binding names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_bindings site
[ "Get", "all", "configured", "IIS", "bindings", "for", "the", "specified", "site", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L540-L568
35,607
saltstack/salt
salt/modules/win_iis.py
create_binding
def create_binding(site, hostheader='', ipaddress='*', port=80, protocol='http', sslflags=None): ''' Create an IIS Web Binding. .. note:: This function only validates against the binding ipaddress:port:hostheader combination, and will return True even if the bind...
python
def create_binding(site, hostheader='', ipaddress='*', port=80, protocol='http', sslflags=None): ''' Create an IIS Web Binding. .. note:: This function only validates against the binding ipaddress:port:hostheader combination, and will return True even if the bind...
[ "def", "create_binding", "(", "site", ",", "hostheader", "=", "''", ",", "ipaddress", "=", "'*'", ",", "port", "=", "80", ",", "protocol", "=", "'http'", ",", "sslflags", "=", "None", ")", ":", "protocol", "=", "six", ".", "text_type", "(", "protocol",...
Create an IIS Web Binding. .. note:: This function only validates against the binding ipaddress:port:hostheader combination, and will return True even if the binding already exists with a different configuration. It will not modify the configuration of an existing binding. Arg...
[ "Create", "an", "IIS", "Web", "Binding", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L571-L650
35,608
saltstack/salt
salt/modules/win_iis.py
modify_binding
def modify_binding(site, binding, hostheader=None, ipaddress=None, port=None, sslflags=None): ''' Modify an IIS Web Binding. Use ``site`` and ``binding`` to target the binding. .. versionadded:: 2017.7.0 Args: site (str): The IIS site name. binding (str): The bin...
python
def modify_binding(site, binding, hostheader=None, ipaddress=None, port=None, sslflags=None): ''' Modify an IIS Web Binding. Use ``site`` and ``binding`` to target the binding. .. versionadded:: 2017.7.0 Args: site (str): The IIS site name. binding (str): The bin...
[ "def", "modify_binding", "(", "site", ",", "binding", ",", "hostheader", "=", "None", ",", "ipaddress", "=", "None", ",", "port", "=", "None", ",", "sslflags", "=", "None", ")", ":", "if", "sslflags", "is", "not", "None", "and", "sslflags", "not", "in"...
Modify an IIS Web Binding. Use ``site`` and ``binding`` to target the binding. .. versionadded:: 2017.7.0 Args: site (str): The IIS site name. binding (str): The binding to edit. This is a combination of the IP address, port, and hostheader. It is in the following format: ...
[ "Modify", "an", "IIS", "Web", "Binding", ".", "Use", "site", "and", "binding", "to", "target", "the", "binding", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L653-L739
35,609
saltstack/salt
salt/modules/win_iis.py
list_cert_bindings
def list_cert_bindings(site): ''' List certificate bindings for an IIS site. .. versionadded:: 2016.11.0 Args: site (str): The IIS site name. Returns: dict: A dictionary of the binding names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list...
python
def list_cert_bindings(site): ''' List certificate bindings for an IIS site. .. versionadded:: 2016.11.0 Args: site (str): The IIS site name. Returns: dict: A dictionary of the binding names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list...
[ "def", "list_cert_bindings", "(", "site", ")", ":", "ret", "=", "dict", "(", ")", "sites", "=", "list_sites", "(", ")", "if", "site", "not", "in", "sites", ":", "log", ".", "warning", "(", "'Site not found: %s'", ",", "site", ")", "return", "ret", "for...
List certificate bindings for an IIS site. .. versionadded:: 2016.11.0 Args: site (str): The IIS site name. Returns: dict: A dictionary of the binding names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_bindings site
[ "List", "certificate", "bindings", "for", "an", "IIS", "site", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L787-L819
35,610
saltstack/salt
salt/modules/win_iis.py
create_cert_binding
def create_cert_binding(name, site, hostheader='', ipaddress='*', port=443, sslflags=0): ''' Assign a certificate to an IIS Web Binding. .. versionadded:: 2016.11.0 .. note:: The web binding that the certificate is being assigned to must already exist. Arg...
python
def create_cert_binding(name, site, hostheader='', ipaddress='*', port=443, sslflags=0): ''' Assign a certificate to an IIS Web Binding. .. versionadded:: 2016.11.0 .. note:: The web binding that the certificate is being assigned to must already exist. Arg...
[ "def", "create_cert_binding", "(", "name", ",", "site", ",", "hostheader", "=", "''", ",", "ipaddress", "=", "'*'", ",", "port", "=", "443", ",", "sslflags", "=", "0", ")", ":", "name", "=", "six", ".", "text_type", "(", "name", ")", ".", "upper", ...
Assign a certificate to an IIS Web Binding. .. versionadded:: 2016.11.0 .. note:: The web binding that the certificate is being assigned to must already exist. Args: name (str): The thumbprint of the certificate. site (str): The IIS site name. hostheader (str): Th...
[ "Assign", "a", "certificate", "to", "an", "IIS", "Web", "Binding", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L822-L930
35,611
saltstack/salt
salt/modules/win_iis.py
remove_cert_binding
def remove_cert_binding(name, site, hostheader='', ipaddress='*', port=443): ''' Remove a certificate from an IIS Web Binding. .. versionadded:: 2016.11.0 .. note:: This function only removes the certificate from the web binding. It does not remove the web binding itself. Args: ...
python
def remove_cert_binding(name, site, hostheader='', ipaddress='*', port=443): ''' Remove a certificate from an IIS Web Binding. .. versionadded:: 2016.11.0 .. note:: This function only removes the certificate from the web binding. It does not remove the web binding itself. Args: ...
[ "def", "remove_cert_binding", "(", "name", ",", "site", ",", "hostheader", "=", "''", ",", "ipaddress", "=", "'*'", ",", "port", "=", "443", ")", ":", "name", "=", "six", ".", "text_type", "(", "name", ")", ".", "upper", "(", ")", "binding_info", "="...
Remove a certificate from an IIS Web Binding. .. versionadded:: 2016.11.0 .. note:: This function only removes the certificate from the web binding. It does not remove the web binding itself. Args: name (str): The thumbprint of the certificate. site (str): The IIS site na...
[ "Remove", "a", "certificate", "from", "an", "IIS", "Web", "Binding", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L933-L1002
35,612
saltstack/salt
salt/modules/win_iis.py
list_apppools
def list_apppools(): ''' List all configured IIS application pools. Returns: dict: A dictionary of IIS application pools and their details. CLI Example: .. code-block:: bash salt '*' win_iis.list_apppools ''' ret = dict() ps_cmd = [] ps_cmd.append(r"Get-ChildItem ...
python
def list_apppools(): ''' List all configured IIS application pools. Returns: dict: A dictionary of IIS application pools and their details. CLI Example: .. code-block:: bash salt '*' win_iis.list_apppools ''' ret = dict() ps_cmd = [] ps_cmd.append(r"Get-ChildItem ...
[ "def", "list_apppools", "(", ")", ":", "ret", "=", "dict", "(", ")", "ps_cmd", "=", "[", "]", "ps_cmd", ".", "append", "(", "r\"Get-ChildItem -Path 'IIS:\\AppPools' | Select-Object Name, State\"", ")", "# Include the equivalent of output from the Applications column, since th...
List all configured IIS application pools. Returns: dict: A dictionary of IIS application pools and their details. CLI Example: .. code-block:: bash salt '*' win_iis.list_apppools
[ "List", "all", "configured", "IIS", "application", "pools", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1005-L1063
35,613
saltstack/salt
salt/modules/win_iis.py
stop_apppool
def stop_apppool(name): ''' Stop an IIS application pool. .. versionadded:: 2017.7.0 Args: name (str): The name of the App Pool to stop. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.stop_apppool name='MyTe...
python
def stop_apppool(name): ''' Stop an IIS application pool. .. versionadded:: 2017.7.0 Args: name (str): The name of the App Pool to stop. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.stop_apppool name='MyTe...
[ "def", "stop_apppool", "(", "name", ")", ":", "ps_cmd", "=", "[", "'Stop-WebAppPool'", ",", "r\"'{0}'\"", ".", "format", "(", "name", ")", "]", "cmd_ret", "=", "_srvmgr", "(", "ps_cmd", ")", "return", "cmd_ret", "[", "'retcode'", "]", "==", "0" ]
Stop an IIS application pool. .. versionadded:: 2017.7.0 Args: name (str): The name of the App Pool to stop. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.stop_apppool name='MyTestPool'
[ "Stop", "an", "IIS", "application", "pool", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1145-L1167
35,614
saltstack/salt
salt/modules/win_iis.py
start_apppool
def start_apppool(name): ''' Start an IIS application pool. .. versionadded:: 2017.7.0 Args: name (str): The name of the App Pool to start. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.start_apppool name='...
python
def start_apppool(name): ''' Start an IIS application pool. .. versionadded:: 2017.7.0 Args: name (str): The name of the App Pool to start. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.start_apppool name='...
[ "def", "start_apppool", "(", "name", ")", ":", "ps_cmd", "=", "[", "'Start-WebAppPool'", ",", "r\"'{0}'\"", ".", "format", "(", "name", ")", "]", "cmd_ret", "=", "_srvmgr", "(", "ps_cmd", ")", "return", "cmd_ret", "[", "'retcode'", "]", "==", "0" ]
Start an IIS application pool. .. versionadded:: 2017.7.0 Args: name (str): The name of the App Pool to start. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.start_apppool name='MyTestPool'
[ "Start", "an", "IIS", "application", "pool", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1170-L1192
35,615
saltstack/salt
salt/modules/win_iis.py
restart_apppool
def restart_apppool(name): ''' Restart an IIS application pool. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS application pool. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.restart_appp...
python
def restart_apppool(name): ''' Restart an IIS application pool. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS application pool. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.restart_appp...
[ "def", "restart_apppool", "(", "name", ")", ":", "ps_cmd", "=", "[", "'Restart-WebAppPool'", ",", "r\"'{0}'\"", ".", "format", "(", "name", ")", "]", "cmd_ret", "=", "_srvmgr", "(", "ps_cmd", ")", "return", "cmd_ret", "[", "'retcode'", "]", "==", "0" ]
Restart an IIS application pool. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS application pool. Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.restart_apppool name='MyTestPool'
[ "Restart", "an", "IIS", "application", "pool", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1195-L1217
35,616
saltstack/salt
salt/modules/win_iis.py
get_container_setting
def get_container_setting(name, container, settings): ''' Get the value of the setting for the IIS container. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS container. container (str): The type of IIS container. The container types are: AppPools, Sites, S...
python
def get_container_setting(name, container, settings): ''' Get the value of the setting for the IIS container. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS container. container (str): The type of IIS container. The container types are: AppPools, Sites, S...
[ "def", "get_container_setting", "(", "name", ",", "container", ",", "settings", ")", ":", "ret", "=", "dict", "(", ")", "ps_cmd", "=", "list", "(", ")", "ps_cmd_validate", "=", "list", "(", ")", "container_path", "=", "r\"IIS:\\{0}\\{1}\"", ".", "format", ...
Get the value of the setting for the IIS container. .. versionadded:: 2016.11.0 Args: name (str): The name of the IIS container. container (str): The type of IIS container. The container types are: AppPools, Sites, SslBindings settings (dict): A dictionary of the setting na...
[ "Get", "the", "value", "of", "the", "setting", "for", "the", "IIS", "container", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1220-L1294
35,617
saltstack/salt
salt/modules/win_iis.py
list_apps
def list_apps(site): ''' Get all configured IIS applications for the specified site. Args: site (str): The IIS site name. Returns: A dictionary of the application names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_apps site ''' ret = dict()...
python
def list_apps(site): ''' Get all configured IIS applications for the specified site. Args: site (str): The IIS site name. Returns: A dictionary of the application names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_apps site ''' ret = dict()...
[ "def", "list_apps", "(", "site", ")", ":", "ret", "=", "dict", "(", ")", "ps_cmd", "=", "list", "(", ")", "ps_cmd", ".", "append", "(", "\"Get-WebApplication -Site '{0}'\"", ".", "format", "(", "site", ")", ")", "ps_cmd", ".", "append", "(", "r\"| Select...
Get all configured IIS applications for the specified site. Args: site (str): The IIS site name. Returns: A dictionary of the application names and properties. CLI Example: .. code-block:: bash salt '*' win_iis.list_apps site
[ "Get", "all", "configured", "IIS", "applications", "for", "the", "specified", "site", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1386-L1438
35,618
saltstack/salt
salt/modules/win_iis.py
list_vdirs
def list_vdirs(site, app=_DEFAULT_APP): ''' Get all configured IIS virtual directories for the specified site, or for the combination of site and application. Args: site (str): The IIS site name. app (str): The IIS application. Returns: dict: A dictionary of the virtual dir...
python
def list_vdirs(site, app=_DEFAULT_APP): ''' Get all configured IIS virtual directories for the specified site, or for the combination of site and application. Args: site (str): The IIS site name. app (str): The IIS application. Returns: dict: A dictionary of the virtual dir...
[ "def", "list_vdirs", "(", "site", ",", "app", "=", "_DEFAULT_APP", ")", ":", "ret", "=", "dict", "(", ")", "ps_cmd", "=", "[", "'Get-WebVirtualDirectory'", ",", "'-Site'", ",", "r\"'{0}'\"", ".", "format", "(", "site", ")", ",", "'-Application'", ",", "r...
Get all configured IIS virtual directories for the specified site, or for the combination of site and application. Args: site (str): The IIS site name. app (str): The IIS application. Returns: dict: A dictionary of the virtual directory names and properties. CLI Example: ...
[ "Get", "all", "configured", "IIS", "virtual", "directories", "for", "the", "specified", "site", "or", "for", "the", "combination", "of", "site", "and", "application", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1547-L1586
35,619
saltstack/salt
salt/modules/win_iis.py
create_backup
def create_backup(name): r''' Backup an IIS Configuration on the System. .. versionadded:: 2017.7.0 .. note:: Backups are stored in the ``$env:Windir\System32\inetsrv\backup`` folder. Args: name (str): The name to give the backup Returns: bool: True if success...
python
def create_backup(name): r''' Backup an IIS Configuration on the System. .. versionadded:: 2017.7.0 .. note:: Backups are stored in the ``$env:Windir\System32\inetsrv\backup`` folder. Args: name (str): The name to give the backup Returns: bool: True if success...
[ "def", "create_backup", "(", "name", ")", ":", "if", "name", "in", "list_backups", "(", ")", ":", "raise", "CommandExecutionError", "(", "'Backup already present: {0}'", ".", "format", "(", "name", ")", ")", "ps_cmd", "=", "[", "'Backup-WebConfiguration'", ",", ...
r''' Backup an IIS Configuration on the System. .. versionadded:: 2017.7.0 .. note:: Backups are stored in the ``$env:Windir\System32\inetsrv\backup`` folder. Args: name (str): The name to give the backup Returns: bool: True if successful, otherwise False CLI...
[ "r", "Backup", "an", "IIS", "Configuration", "on", "the", "System", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1749-L1784
35,620
saltstack/salt
salt/modules/win_iis.py
remove_backup
def remove_backup(name): ''' Remove an IIS Configuration backup from the System. .. versionadded:: 2017.7.0 Args: name (str): The name of the backup to remove Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.r...
python
def remove_backup(name): ''' Remove an IIS Configuration backup from the System. .. versionadded:: 2017.7.0 Args: name (str): The name of the backup to remove Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.r...
[ "def", "remove_backup", "(", "name", ")", ":", "if", "name", "not", "in", "list_backups", "(", ")", ":", "log", ".", "debug", "(", "'Backup already removed: %s'", ",", "name", ")", "return", "True", "ps_cmd", "=", "[", "'Remove-WebConfigurationBackup'", ",", ...
Remove an IIS Configuration backup from the System. .. versionadded:: 2017.7.0 Args: name (str): The name of the backup to remove Returns: bool: True if successful, otherwise False CLI Example: .. code-block:: bash salt '*' win_iis.remove_backup backup_20170209
[ "Remove", "an", "IIS", "Configuration", "backup", "from", "the", "System", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1787-L1819
35,621
saltstack/salt
salt/modules/win_iis.py
list_worker_processes
def list_worker_processes(apppool): ''' Returns a list of worker processes that correspond to the passed application pool. .. versionadded:: 2017.7.0 Args: apppool (str): The application pool to query Returns: dict: A dictionary of worker processes with their process IDs ...
python
def list_worker_processes(apppool): ''' Returns a list of worker processes that correspond to the passed application pool. .. versionadded:: 2017.7.0 Args: apppool (str): The application pool to query Returns: dict: A dictionary of worker processes with their process IDs ...
[ "def", "list_worker_processes", "(", "apppool", ")", ":", "ps_cmd", "=", "[", "'Get-ChildItem'", ",", "r\"'IIS:\\AppPools\\{0}\\WorkerProcesses'\"", ".", "format", "(", "apppool", ")", "]", "cmd_ret", "=", "_srvmgr", "(", "cmd", "=", "ps_cmd", ",", "return_json", ...
Returns a list of worker processes that correspond to the passed application pool. .. versionadded:: 2017.7.0 Args: apppool (str): The application pool to query Returns: dict: A dictionary of worker processes with their process IDs CLI Example: .. code-block:: bash ...
[ "Returns", "a", "list", "of", "worker", "processes", "that", "correspond", "to", "the", "passed", "application", "pool", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L1822-L1858
35,622
saltstack/salt
salt/modules/win_iis.py
get_webconfiguration_settings
def get_webconfiguration_settings(name, settings, location=''): r''' Get the webconfiguration settings for the IIS PSPath. Args: name (str): The PSPath of the IIS webconfiguration settings. settings (list): A list of dictionaries containing setting name and filter. location (str): T...
python
def get_webconfiguration_settings(name, settings, location=''): r''' Get the webconfiguration settings for the IIS PSPath. Args: name (str): The PSPath of the IIS webconfiguration settings. settings (list): A list of dictionaries containing setting name and filter. location (str): T...
[ "def", "get_webconfiguration_settings", "(", "name", ",", "settings", ",", "location", "=", "''", ")", ":", "ret", "=", "{", "}", "ps_cmd", "=", "[", "]", "ps_cmd_validate", "=", "[", "]", "if", "not", "settings", ":", "log", ".", "warning", "(", "'No ...
r''' Get the webconfiguration settings for the IIS PSPath. Args: name (str): The PSPath of the IIS webconfiguration settings. settings (list): A list of dictionaries containing setting name and filter. location (str): The location of the settings (optional) Returns: dict: A...
[ "r", "Get", "the", "webconfiguration", "settings", "for", "the", "IIS", "PSPath", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L2045-L2122
35,623
saltstack/salt
salt/modules/win_iis.py
set_webconfiguration_settings
def set_webconfiguration_settings(name, settings, location=''): r''' Set the value of the setting for an IIS container. Args: name (str): The PSPath of the IIS webconfiguration settings. settings (list): A list of dictionaries containing setting name, filter and value. location (str...
python
def set_webconfiguration_settings(name, settings, location=''): r''' Set the value of the setting for an IIS container. Args: name (str): The PSPath of the IIS webconfiguration settings. settings (list): A list of dictionaries containing setting name, filter and value. location (str...
[ "def", "set_webconfiguration_settings", "(", "name", ",", "settings", ",", "location", "=", "''", ")", ":", "ps_cmd", "=", "[", "]", "if", "not", "settings", ":", "log", ".", "warning", "(", "'No settings provided'", ")", "return", "False", "settings", "=", ...
r''' Set the value of the setting for an IIS container. Args: name (str): The PSPath of the IIS webconfiguration settings. settings (list): A list of dictionaries containing setting name, filter and value. location (str): The location of the settings (optional) Returns: boo...
[ "r", "Set", "the", "value", "of", "the", "setting", "for", "an", "IIS", "container", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_iis.py#L2125-L2214
35,624
saltstack/salt
salt/runners/ddns.py
create
def create(zone, name, ttl, rdtype, data, keyname, keyfile, nameserver, timeout, port=53, keyalgorithm='hmac-md5'): ''' Create a DNS record. The nameserver must be an IP address and the master running this runner must have create privileges on that server. CLI Example: .. code-block:: b...
python
def create(zone, name, ttl, rdtype, data, keyname, keyfile, nameserver, timeout, port=53, keyalgorithm='hmac-md5'): ''' Create a DNS record. The nameserver must be an IP address and the master running this runner must have create privileges on that server. CLI Example: .. code-block:: b...
[ "def", "create", "(", "zone", ",", "name", ",", "ttl", ",", "rdtype", ",", "data", ",", "keyname", ",", "keyfile", ",", "nameserver", ",", "timeout", ",", "port", "=", "53", ",", "keyalgorithm", "=", "'hmac-md5'", ")", ":", "if", "zone", "in", "name"...
Create a DNS record. The nameserver must be an IP address and the master running this runner must have create privileges on that server. CLI Example: .. code-block:: bash salt-run ddns.create domain.com my-test-vm 3600 A 10.20.30.40 my-tsig-key /etc/salt/tsig.keyring 10.0.0.1 5
[ "Create", "a", "DNS", "record", ".", "The", "nameserver", "must", "be", "an", "IP", "address", "and", "the", "master", "running", "this", "runner", "must", "have", "create", "privileges", "on", "that", "server", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/ddns.py#L56-L91
35,625
saltstack/salt
salt/utils/pkg/deb.py
combine_comments
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): ...
python
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", ")", ":", "if", "isinstance", "(", "comments", ",", "list", ")", ":", "for", "idx", "in", "range", "(", "len", "(", "comments", ")", ")", ":", "if", "not", "isinstance", "(", "comments", "[", "idx", "]", ",...
Given a list of comments, or a comment submitted as a string, return a single line of text containing all of the comments.
[ "Given", "a", "list", "of", "comments", "or", "a", "comment", "submitted", "as", "a", "string", "return", "a", "single", "line", "of", "text", "containing", "all", "of", "the", "comments", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/pkg/deb.py#L14-L28
35,626
saltstack/salt
salt/utils/pkg/deb.py
strip_uri
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...
python
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", ")", ":", "splits", "=", "repo", ".", "split", "(", ")", "for", "idx", "in", "range", "(", "len", "(", "splits", ")", ")", ":", "if", "any", "(", "splits", "[", "idx", "]", ".", "startswith", "(", "x", ")", "for...
Remove the trailing slash from the URI in a repo definition
[ "Remove", "the", "trailing", "slash", "from", "the", "URI", "in", "a", "repo", "definition" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/pkg/deb.py#L31-L40
35,627
saltstack/salt
salt/cloud/clouds/vmware.py
_get_si
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_...
python
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", "(", ")", ":", "url", "=", "config", ".", "get_cloud_config_value", "(", "'url'", ",", "get_configured_provider", "(", ")", ",", "__opts__", ",", "search_global", "=", "False", ")", "username", "=", "config", ".", "get_cloud_config_value", "(...
Authenticate with vCenter server and return service instance object.
[ "Authenticate", "with", "vCenter", "server", "and", "return", "service", "instance", "object", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L238-L263
35,628
saltstack/salt
salt/cloud/clouds/vmware.py
_add_new_ide_controller_helper
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 ...
python
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", ")", ":", "if", "controller_key", "is", "None", ":", "controller_key", "=", "randint", "(", "-", "200", ",", "250", ")", "ide_spec", "=", "vim", ".", ...
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...
[ "Helper", "function", "for", "adding", "new", "IDE", "controllers" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L554-L584
35,629
saltstack/salt
salt/cloud/clouds/vmware.py
_valid_ip
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 \ ...
python
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", ")", ":", "try", ":", "address", "=", "ipaddress", ".", "IPv4Address", "(", "ip_address", ")", "except", "ipaddress", ".", "AddressValueError", ":", "return", "False", "if", "address", ".", "is_unspecified", "or", "addres...
Check if the IP address is valid and routable Return either True or False
[ "Check", "if", "the", "IP", "address", "is", "valid", "and", "routable", "Return", "either", "True", "or", "False" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L993-L1011
35,630
saltstack/salt
salt/cloud/clouds/vmware.py
_valid_ip6
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 \ ...
python
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", ")", ":", "# Validate IPv6 address", "try", ":", "address", "=", "ipaddress", ".", "IPv6Address", "(", "ip_address", ")", "except", "ipaddress", ".", "AddressValueError", ":", "return", "False", "if", "address", ".", "is_u...
Check if the IPv6 address is valid and routable Return either True or False
[ "Check", "if", "the", "IPv6", "address", "is", "valid", "and", "routable", "Return", "either", "True", "or", "False" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1014-L1036
35,631
saltstack/salt
salt/cloud/clouds/vmware.py
_master_supports_ipv6
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', ...
python
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", "(", ")", ":", "master_fqdn", "=", "salt", ".", "utils", ".", "network", ".", "get_fqhostname", "(", ")", "pillar_util", "=", "salt", ".", "utils", ".", "master", ".", "MasterPillarUtil", "(", "master_fqdn", ",", "tgt_type", "...
Check if the salt master has a valid and routable IPv6 address available
[ "Check", "if", "the", "salt", "master", "has", "a", "valid", "and", "routable", "IPv6", "address", "available" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1039-L1055
35,632
saltstack/salt
salt/cloud/clouds/vmware.py
_get_hba_type
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...
python
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", ")", ":", "if", "hba_type", "==", "\"parallel\"", ":", "return", "vim", ".", "host", ".", "ParallelScsiHba", "elif", "hba_type", "==", "\"block\"", ":", "return", "vim", ".", "host", ".", "BlockHba", "elif", "hba_type...
Convert a string representation of a HostHostBusAdapter into an object reference.
[ "Convert", "a", "string", "representation", "of", "a", "HostHostBusAdapter", "into", "an", "object", "reference", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1484-L1498
35,633
saltstack/salt
salt/cloud/clouds/vmware.py
get_vcenter_version
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...
python
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", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The get_vcenter_version function must be called with '", "'-f or --function.'", ")", "# Get the in...
Show the vCenter Server version with build number. CLI Example: .. code-block:: bash salt-cloud -f get_vcenter_version my-vmware-config
[ "Show", "the", "vCenter", "Server", "version", "with", "build", "number", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1528-L1547
35,634
saltstack/salt
salt/cloud/clouds/vmware.py
list_datacenters
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...
python
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", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_datacenters function must be called with '", "'-f or --function.'", ")", "return", "{", ...
List all the data centers for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_datacenters my-vmware-config
[ "List", "all", "the", "data", "centers", "for", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1550-L1566
35,635
saltstack/salt
salt/cloud/clouds/vmware.py
list_portgroups
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...
python
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", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_portgroups function must be called with '", "'-f or --function.'", ")", "return", "{", "'...
List all the distributed virtual portgroups for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_portgroups my-vmware-config
[ "List", "all", "the", "distributed", "virtual", "portgroups", "for", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1569-L1585
35,636
saltstack/salt
salt/cloud/clouds/vmware.py
list_clusters
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...
python
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", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_clusters function must be called with '", "'-f or --function.'", ")", "return", "{", "'Clus...
List all the clusters for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_clusters my-vmware-config
[ "List", "all", "the", "clusters", "for", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1588-L1604
35,637
saltstack/salt
salt/cloud/clouds/vmware.py
list_datastore_clusters
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 ...
python
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", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_datastore_clusters function must be called with '", "'-f or --function.'", ")", "retu...
List all the datastore clusters for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_datastore_clusters my-vmware-config
[ "List", "all", "the", "datastore", "clusters", "for", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1607-L1623
35,638
saltstack/salt
salt/cloud/clouds/vmware.py
list_datastores
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...
python
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", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_datastores function must be called with '", "'-f or --function.'", ")", "return", "{", "'...
List all the datastores for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_datastores my-vmware-config
[ "List", "all", "the", "datastores", "for", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1626-L1642
35,639
saltstack/salt
salt/cloud/clouds/vmware.py
list_datastores_full
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( ...
python
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", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_datastores_full function must be called with '", "'-f or --function.'", ")", "return", ...
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
[ "List", "all", "the", "datastores", "for", "this", "VMware", "environment", "with", "extra", "information" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1645-L1661
35,640
saltstack/salt
salt/cloud/clouds/vmware.py
list_datastore_full
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...
python
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", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_datastore_full function must be called with '", "'-f o...
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
[ "Returns", "a", "dictionary", "with", "basic", "information", "for", "the", "given", "datastore" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1664-L1688
35,641
saltstack/salt
salt/cloud/clouds/vmware.py
list_hosts
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...
python
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", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_hosts function must be called with '", "'-f or --function.'", ")", "return", "{", "'Hosts'", ...
List all the hosts for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_hosts my-vmware-config
[ "List", "all", "the", "hosts", "for", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1691-L1707
35,642
saltstack/salt
salt/cloud/clouds/vmware.py
list_resourcepools
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...
python
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", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_resourcepools function must be called with '", "'-f or --function.'", ")", "return", "{"...
List all the resource pools for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_resourcepools my-vmware-config
[ "List", "all", "the", "resource", "pools", "for", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1710-L1726
35,643
saltstack/salt
salt/cloud/clouds/vmware.py
list_networks
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...
python
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", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_networks function must be called with '", "'-f or --function.'", ")", "return", "{", "'Netw...
List all the standard networks for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_networks my-vmware-config
[ "List", "all", "the", "standard", "networks", "for", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1729-L1745
35,644
saltstack/salt
salt/cloud/clouds/vmware.py
list_nodes_min
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( ...
python
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", ")", ":", "if", "call", "==", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_nodes_min function must be called '", "'with -f or --function.'", ")", "ret", "=", "{", "}...
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
[ "Return", "a", "list", "of", "all", "VMs", "and", "templates", "that", "are", "on", "the", "specified", "provider", "with", "no", "details" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1748-L1772
35,645
saltstack/salt
salt/cloud/clouds/vmware.py
list_nodes
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...
python
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", ")", ":", "if", "call", "==", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_nodes function must be called '", "'with -f or --function.'", ")", "ret", "=", "{", "}", "vm...
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: .....
[ "Return", "a", "list", "of", "all", "VMs", "and", "templates", "that", "are", "on", "the", "specified", "provider", "with", "basic", "fields" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1775-L1829
35,646
saltstack/salt
salt/cloud/clouds/vmware.py
show_instance
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 ' ...
python
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", ")", ":", "if", "call", "!=", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The show_instance action must be called with '", "'-a or --action.'", ")", "vm_properties", "=", "[", "\"config.hardwar...
List all available details of the specified VM CLI Example: .. code-block:: bash salt-cloud -a show_instance vmname
[ "List", "all", "available", "details", "of", "the", "specified", "VM" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1971-L2010
35,647
saltstack/salt
salt/cloud/clouds/vmware.py
avail_images
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_...
python
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", ")", ":", "if", "call", "==", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The avail_images function must be called with '", "'-f or --function, or with the --list-images option.'", ")", "templates", "=", "{", "}...
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
[ "Return", "a", "list", "of", "all", "the", "templates", "present", "in", "this", "VMware", "environment", "with", "basic", "details" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L2013-L2050
35,648
saltstack/salt
salt/cloud/clouds/vmware.py
list_folders
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...
python
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", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_folders function must be called with '", "'-f or --function.'", ")", "return", "{", "'Folder...
List all the folders for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_folders my-vmware-config
[ "List", "all", "the", "folders", "for", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L2121-L2137
35,649
saltstack/salt
salt/cloud/clouds/vmware.py
suspend
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.' ) ...
python
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", ")", ":", "if", "call", "!=", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The suspend action must be called with '", "'-a or --action.'", ")", "vm_properties", "=", "[", "\"name\"", ",", "\"summa...
To suspend a VM using its name CLI Example: .. code-block:: bash salt-cloud -a suspend vmname
[ "To", "suspend", "a", "VM", "using", "its", "name" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L2291-L2337
35,650
saltstack/salt
salt/cloud/clouds/vmware.py
reset
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...
python
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", ")", ":", "if", "call", "!=", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The reset action must be called with '", "'-a or --action.'", ")", "vm_properties", "=", "[", ...
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...
[ "To", "reset", "a", "VM", "using", "its", "name" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L2340-L2394
35,651
saltstack/salt
salt/cloud/clouds/vmware.py
terminate
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...
python
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", ")", ":", "if", "call", "!=", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The terminate action must be called with '", "'-a or --action.'", ")", "vm_properties", "=", "[", "\"name\"", ",", "\"s...
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
[ "To", "do", "an", "immediate", "power", "off", "of", "a", "VM", "using", "its", "name", ".", "A", "SIGKILL", "is", "issued", "to", "the", "vmx", "process", "of", "the", "VM" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L2397-L2439
35,652
saltstack/salt
salt/cloud/clouds/vmware.py
destroy
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 ...
python
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", ")", ":", "if", "call", "==", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The destroy action must be called with -d, --destroy, '", "'-a or --action.'", ")", "__utils__", "[", "'cloud.fire_event'", ...
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
[ "To", "destroy", "a", "VM", "from", "the", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L2442-L2516
35,653
saltstack/salt
salt/cloud/clouds/vmware.py
get_clonespec_for_valid_snapshot
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...
python
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_", ")", ":", "moving", "=", "True", "if", "QUICK_LINKED_CLONE", "==", "vm_", "[", "'snapshot'", "]", "[", "'disk_move_type'", "]", ":",...
return clonespec only if values are valid
[ "return", "clonespec", "only", "if", "values", "are", "valid" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3111-L3130
35,654
saltstack/salt
salt/cloud/clouds/vmware.py
build_clonespec
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...
python
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", ")", ":", "if", "reloc_spec", ".", "diskMoveType", "==", "QUICK_LINKED_CLONE", ":", "return", "vim", ".", "vm", ".", "CloneSpec", "(", "template", "=", "templa...
Returns the clone spec
[ "Returns", "the", "clone", "spec" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3133-L3149
35,655
saltstack/salt
salt/cloud/clouds/vmware.py
create_datacenter
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...
python
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", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The create_datacenter function must be called with '", "'-f or --function.'", ")", "datacenter_name"...
Create a new data center in this VMware environment CLI Example: .. code-block:: bash salt-cloud -f create_datacenter my-vmware-config name="MyNewDatacenter"
[ "Create", "a", "new", "data", "center", "in", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3152-L3206
35,656
saltstack/salt
salt/cloud/clouds/vmware.py
create_cluster
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': ...
python
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", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The create_cluster function must be called with '", "'-f or --function.'", ")", "cluster_name", "=", ...
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"
[ "Create", "a", "new", "cluster", "under", "the", "specified", "datacenter", "in", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3209-L3275
35,657
saltstack/salt
salt/cloud/clouds/vmware.py
rescan_hba
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...
python
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", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The rescan_hba function must be called with '", "'-f or --function.'", ")", "hba", "=", "kwargs", "."...
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" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3278-L3323
35,658
saltstack/salt
salt/cloud/clouds/vmware.py
upgrade_tools_all
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...
python
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", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The upgrade_tools_all function must be called with '", "'-f or --function.'", ")", "ret", "=", "{", "}", "vm_properties", "=",...
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...
[ "To", "upgrade", "VMware", "Tools", "on", "all", "virtual", "machines", "present", "in", "the", "specified", "provider" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3326-L3357
35,659
saltstack/salt
salt/cloud/clouds/vmware.py
upgrade_tools
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...
python
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", ")", ":", "if", "call", "!=", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The upgrade_tools action must be called with '", "'-a or --action.'", ")", "vm_ref", "...
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...
[ "To", "upgrade", "VMware", "Tools", "on", "a", "specified", "virtual", "machine", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3360-L3385
35,660
saltstack/salt
salt/cloud/clouds/vmware.py
list_hosts_by_cluster
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...
python
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", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_hosts_by_cluster function must be called with '", "'-f or --function.'", ")", "ret", ...
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...
[ "List", "hosts", "for", "each", "cluster", ";", "or", "hosts", "for", "a", "specified", "cluster", "in", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3388-L3431
35,661
saltstack/salt
salt/cloud/clouds/vmware.py
list_clusters_by_datacenter
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...
python
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", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_clusters_by_datacenter function must be called with '", "'-f or --function.'", ")",...
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...
[ "List", "clusters", "for", "each", "datacenter", ";", "or", "clusters", "for", "a", "specified", "datacenter", "in", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3434-L3475
35,662
saltstack/salt
salt/cloud/clouds/vmware.py
list_hbas
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 ...
python
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", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_hbas function must be called with '", "'-f or --function.'", ")", "ret", "=", "{", "}", "hb...
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...
[ "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...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3524-L3610
35,663
saltstack/salt
salt/cloud/clouds/vmware.py
list_dvs
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...
python
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", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_dvs function must be called with '", "'-f or --function.'", ")", "return", "{", "'Distributed Vi...
List all the distributed virtual switches for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_dvs my-vmware-config
[ "List", "all", "the", "distributed", "virtual", "switches", "for", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3613-L3629
35,664
saltstack/salt
salt/cloud/clouds/vmware.py
list_vapps
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...
python
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", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_vapps function must be called with '", "'-f or --function.'", ")", "return", "{", "'vApps'", ...
List all the vApps for this VMware environment CLI Example: .. code-block:: bash salt-cloud -f list_vapps my-vmware-config
[ "List", "all", "the", "vApps", "for", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3632-L3648
35,665
saltstack/salt
salt/cloud/clouds/vmware.py
enter_maintenance_mode
def enter_maintenance_mode(kwargs=None, call=None): ''' To put the specified host system in maintenance mode in this VMware environment CLI Example: .. code-block:: bash salt-cloud -f enter_maintenance_mode my-vmware-config host="myHostSystemName" ''' if call != 'function': ra...
python
def enter_maintenance_mode(kwargs=None, call=None): ''' To put the specified host system in maintenance mode in this VMware environment CLI Example: .. code-block:: bash salt-cloud -f enter_maintenance_mode my-vmware-config host="myHostSystemName" ''' if call != 'function': ra...
[ "def", "enter_maintenance_mode", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The enter_maintenance_mode function must be called with '", "'-f or --function.'", ")", "host_n...
To put the specified host system in maintenance mode in this VMware environment CLI Example: .. code-block:: bash salt-cloud -f enter_maintenance_mode my-vmware-config host="myHostSystemName"
[ "To", "put", "the", "specified", "host", "system", "in", "maintenance", "mode", "in", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3651-L3691
35,666
saltstack/salt
salt/cloud/clouds/vmware.py
create_folder
def create_folder(kwargs=None, call=None): ''' Create the specified folder path in this VMware environment .. note:: To create a Host and Cluster Folder under a Datacenter, specify ``path="/yourDatacenterName/host/yourFolderName"`` To create a Network Folder under a Datacenter, sp...
python
def create_folder(kwargs=None, call=None): ''' Create the specified folder path in this VMware environment .. note:: To create a Host and Cluster Folder under a Datacenter, specify ``path="/yourDatacenterName/host/yourFolderName"`` To create a Network Folder under a Datacenter, sp...
[ "def", "create_folder", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The create_folder function must be called with '", "'-f or --function.'", ")", "# Get the service instan...
Create the specified folder path in this VMware environment .. note:: To create a Host and Cluster Folder under a Datacenter, specify ``path="/yourDatacenterName/host/yourFolderName"`` To create a Network Folder under a Datacenter, specify ``path="/yourDatacenterName/network/yourF...
[ "Create", "the", "specified", "folder", "path", "in", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3737-L3811
35,667
saltstack/salt
salt/cloud/clouds/vmware.py
create_snapshot
def create_snapshot(name, kwargs=None, call=None): ''' Create a snapshot of the specified virtual machine in this VMware environment .. note:: If the VM is powered on, the internal state of the VM (memory dump) is included in the snapshot by default which will also set the powe...
python
def create_snapshot(name, kwargs=None, call=None): ''' Create a snapshot of the specified virtual machine in this VMware environment .. note:: If the VM is powered on, the internal state of the VM (memory dump) is included in the snapshot by default which will also set the powe...
[ "def", "create_snapshot", "(", "name", ",", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The create_snapshot action must be called with '", "'-a or --action.'", ")", "if", "k...
Create a snapshot of the specified virtual machine in this VMware environment .. note:: If the VM is powered on, the internal state of the VM (memory dump) is included in the snapshot by default which will also set the power state of the snapshot to "powered on". You can set ``...
[ "Create", "a", "snapshot", "of", "the", "specified", "virtual", "machine", "in", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3814-L3889
35,668
saltstack/salt
salt/cloud/clouds/vmware.py
revert_to_snapshot
def revert_to_snapshot(name, kwargs=None, call=None): ''' Revert virtual machine to it's current snapshot. If no snapshot exists, the state of the virtual machine remains unchanged .. note:: The virtual machine will be powered on if the power state of the snapshot when it was created w...
python
def revert_to_snapshot(name, kwargs=None, call=None): ''' Revert virtual machine to it's current snapshot. If no snapshot exists, the state of the virtual machine remains unchanged .. note:: The virtual machine will be powered on if the power state of the snapshot when it was created w...
[ "def", "revert_to_snapshot", "(", "name", ",", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The revert_to_snapshot action must be called with '", "'-a or --action.'", ")", "if"...
Revert virtual machine to it's current snapshot. If no snapshot exists, the state of the virtual machine remains unchanged .. note:: The virtual machine will be powered on if the power state of the snapshot when it was created was set to "Powered On". Set ``power_off=True`` so that the...
[ "Revert", "virtual", "machine", "to", "it", "s", "current", "snapshot", ".", "If", "no", "snapshot", "exists", "the", "state", "of", "the", "virtual", "machine", "remains", "unchanged" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3892-L3960
35,669
saltstack/salt
salt/cloud/clouds/vmware.py
remove_snapshot
def remove_snapshot(name, kwargs=None, call=None): ''' Remove a snapshot of the specified virtual machine in this VMware environment CLI Example: .. code-block:: bash salt-cloud -a remove_snapshot vmname snapshot_name="mySnapshot" salt-cloud -a remove_snapshot vmname snapshot_name="my...
python
def remove_snapshot(name, kwargs=None, call=None): ''' Remove a snapshot of the specified virtual machine in this VMware environment CLI Example: .. code-block:: bash salt-cloud -a remove_snapshot vmname snapshot_name="mySnapshot" salt-cloud -a remove_snapshot vmname snapshot_name="my...
[ "def", "remove_snapshot", "(", "name", ",", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The create_snapshot action must be called with '", "'-a or --action.'", ")", "if", "k...
Remove a snapshot of the specified virtual machine in this VMware environment CLI Example: .. code-block:: bash salt-cloud -a remove_snapshot vmname snapshot_name="mySnapshot" salt-cloud -a remove_snapshot vmname snapshot_name="mySnapshot" [remove_children="True"]
[ "Remove", "a", "snapshot", "of", "the", "specified", "virtual", "machine", "in", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3963-L4018
35,670
saltstack/salt
salt/cloud/clouds/vmware.py
remove_all_snapshots
def remove_all_snapshots(name, kwargs=None, call=None): ''' Remove all the snapshots present for the specified virtual machine. .. note:: All the snapshots higher up in the hierarchy of the current snapshot tree are consolidated and their virtual disks are merged. To override this ...
python
def remove_all_snapshots(name, kwargs=None, call=None): ''' Remove all the snapshots present for the specified virtual machine. .. note:: All the snapshots higher up in the hierarchy of the current snapshot tree are consolidated and their virtual disks are merged. To override this ...
[ "def", "remove_all_snapshots", "(", "name", ",", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The remove_all_snapshots action must be called with '", "'-a or --action.'", ")", ...
Remove all the snapshots present for the specified virtual machine. .. note:: All the snapshots higher up in the hierarchy of the current snapshot tree are consolidated and their virtual disks are merged. To override this behavior and only remove all snapshots, set ``merge_snapshots=False`...
[ "Remove", "all", "the", "snapshots", "present", "for", "the", "specified", "virtual", "machine", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L4021-L4060
35,671
saltstack/salt
salt/cloud/clouds/vmware.py
convert_to_template
def convert_to_template(name, kwargs=None, call=None): ''' Convert the specified virtual machine to template. CLI Example: .. code-block:: bash salt-cloud -a convert_to_template vmname ''' if call != 'action': raise SaltCloudSystemExit( 'The convert_to_template act...
python
def convert_to_template(name, kwargs=None, call=None): ''' Convert the specified virtual machine to template. CLI Example: .. code-block:: bash salt-cloud -a convert_to_template vmname ''' if call != 'action': raise SaltCloudSystemExit( 'The convert_to_template act...
[ "def", "convert_to_template", "(", "name", ",", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The convert_to_template action must be called with '", "'-a or --action.'", ")", "v...
Convert the specified virtual machine to template. CLI Example: .. code-block:: bash salt-cloud -a convert_to_template vmname
[ "Convert", "the", "specified", "virtual", "machine", "to", "template", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L4063-L4099
35,672
saltstack/salt
salt/cloud/clouds/vmware.py
remove_host
def remove_host(kwargs=None, call=None): ''' Remove the specified host system from this VMware environment CLI Example: .. code-block:: bash salt-cloud -f remove_host my-vmware-config host="myHostSystemName" ''' if call != 'function': raise SaltCloudSystemExit( 'Th...
python
def remove_host(kwargs=None, call=None): ''' Remove the specified host system from this VMware environment CLI Example: .. code-block:: bash salt-cloud -f remove_host my-vmware-config host="myHostSystemName" ''' if call != 'function': raise SaltCloudSystemExit( 'Th...
[ "def", "remove_host", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The remove_host function must be called with '", "'-f or --function.'", ")", "host_name", "=", "kwargs...
Remove the specified host system from this VMware environment CLI Example: .. code-block:: bash salt-cloud -f remove_host my-vmware-config host="myHostSystemName"
[ "Remove", "the", "specified", "host", "system", "from", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L4268-L4317
35,673
saltstack/salt
salt/cloud/clouds/vmware.py
connect_host
def connect_host(kwargs=None, call=None): ''' Connect the specified host system in this VMware environment CLI Example: .. code-block:: bash salt-cloud -f connect_host my-vmware-config host="myHostSystemName" ''' if call != 'function': raise SaltCloudSystemExit( 'T...
python
def connect_host(kwargs=None, call=None): ''' Connect the specified host system in this VMware environment CLI Example: .. code-block:: bash salt-cloud -f connect_host my-vmware-config host="myHostSystemName" ''' if call != 'function': raise SaltCloudSystemExit( 'T...
[ "def", "connect_host", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The connect_host function must be called with '", "'-f or --function.'", ")", "host_name", "=", "kwar...
Connect the specified host system in this VMware environment CLI Example: .. code-block:: bash salt-cloud -f connect_host my-vmware-config host="myHostSystemName"
[ "Connect", "the", "specified", "host", "system", "in", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L4320-L4367
35,674
saltstack/salt
salt/cloud/clouds/vmware.py
create_datastore_cluster
def create_datastore_cluster(kwargs=None, call=None): ''' Create a new datastore cluster for the specified datacenter in this VMware environment CLI Example: .. code-block:: bash salt-cloud -f create_datastore_cluster my-vmware-config name="datastoreClusterName" datacenter="datacenterName" ...
python
def create_datastore_cluster(kwargs=None, call=None): ''' Create a new datastore cluster for the specified datacenter in this VMware environment CLI Example: .. code-block:: bash salt-cloud -f create_datastore_cluster my-vmware-config name="datastoreClusterName" datacenter="datacenterName" ...
[ "def", "create_datastore_cluster", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The create_datastore_cluster function must be called with '", "'-f or --function.'", ")", "da...
Create a new datastore cluster for the specified datacenter in this VMware environment CLI Example: .. code-block:: bash salt-cloud -f create_datastore_cluster my-vmware-config name="datastoreClusterName" datacenter="datacenterName"
[ "Create", "a", "new", "datastore", "cluster", "for", "the", "specified", "datacenter", "in", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L4491-L4550
35,675
saltstack/salt
salt/cloud/clouds/vmware.py
shutdown_host
def shutdown_host(kwargs=None, call=None): ''' Shut down the specified host system in this VMware environment .. note:: If the host system is not in maintenance mode, it will not be shut down. If you want to shut down the host system regardless of whether it is in maintenance mode, ...
python
def shutdown_host(kwargs=None, call=None): ''' Shut down the specified host system in this VMware environment .. note:: If the host system is not in maintenance mode, it will not be shut down. If you want to shut down the host system regardless of whether it is in maintenance mode, ...
[ "def", "shutdown_host", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The shutdown_host function must be called with '", "'-f or --function.'", ")", "host_name", "=", "kw...
Shut down the specified host system in this VMware environment .. note:: If the host system is not in maintenance mode, it will not be shut down. If you want to shut down the host system regardless of whether it is in maintenance mode, set ``force=True``. Default is ``force=False``. C...
[ "Shut", "down", "the", "specified", "host", "system", "in", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L4553-L4620
35,676
saltstack/salt
salt/runners/survey.py
diff
def diff(*args, **kwargs): ''' Return the DIFFERENCE of the result sets returned by each matching minion pool .. versionadded:: 2014.7.0 These pools are determined from the aggregated and sorted results of a salt command. This command displays the "diffs" as a series of 2-way differences ...
python
def diff(*args, **kwargs): ''' Return the DIFFERENCE of the result sets returned by each matching minion pool .. versionadded:: 2014.7.0 These pools are determined from the aggregated and sorted results of a salt command. This command displays the "diffs" as a series of 2-way differences ...
[ "def", "diff", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "# TODO: The salt execution module \"cp.get_file_str file:///...\" is a", "# non-obvious way to display the differences between files using", "# survey.diff . A more obvious method needs to be found or developed.", "imp...
Return the DIFFERENCE of the result sets returned by each matching minion pool .. versionadded:: 2014.7.0 These pools are determined from the aggregated and sorted results of a salt command. This command displays the "diffs" as a series of 2-way differences -- namely the difference between th...
[ "Return", "the", "DIFFERENCE", "of", "the", "result", "sets", "returned", "by", "each", "matching", "minion", "pool" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/survey.py#L58-L132
35,677
saltstack/salt
salt/runners/survey.py
_get_pool_results
def _get_pool_results(*args, **kwargs): ''' A helper function which returns a dictionary of minion pools along with their matching result sets. Useful for developing other "survey style" functions. Optionally accepts a "survey_sort=up" or "survey_sort=down" kwargs for specifying sort order. ...
python
def _get_pool_results(*args, **kwargs): ''' A helper function which returns a dictionary of minion pools along with their matching result sets. Useful for developing other "survey style" functions. Optionally accepts a "survey_sort=up" or "survey_sort=down" kwargs for specifying sort order. ...
[ "def", "_get_pool_results", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "# TODO: the option \"survey.sort=\" would be preferred for namespace", "# separation but the kwargs parser for the salt-run command seems to", "# improperly pass the options containing a \".\" in them for lat...
A helper function which returns a dictionary of minion pools along with their matching result sets. Useful for developing other "survey style" functions. Optionally accepts a "survey_sort=up" or "survey_sort=down" kwargs for specifying sort order. Because the kwargs namespace of the "salt" and "surv...
[ "A", "helper", "function", "which", "returns", "a", "dictionary", "of", "minion", "pools", "along", "with", "their", "matching", "result", "sets", ".", "Useful", "for", "developing", "other", "survey", "style", "functions", ".", "Optionally", "accepts", "a", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/survey.py#L135-L188
35,678
saltstack/salt
salt/states/artifactory.py
downloaded
def downloaded(name, artifact, target_dir='/tmp', target_file=None, use_literal_group_id=False): ''' Ensures that the artifact from artifactory exists at given location. If it doesn't exist, then it will be downloaded. If it already exists then the checksum of existing file is checked against checksum i...
python
def downloaded(name, artifact, target_dir='/tmp', target_file=None, use_literal_group_id=False): ''' Ensures that the artifact from artifactory exists at given location. If it doesn't exist, then it will be downloaded. If it already exists then the checksum of existing file is checked against checksum i...
[ "def", "downloaded", "(", "name", ",", "artifact", ",", "target_dir", "=", "'/tmp'", ",", "target_file", "=", "None", ",", "use_literal_group_id", "=", "False", ")", ":", "log", ".", "debug", "(", "\" ======================== STATE: artifactory.downloaded (name: %s) \...
Ensures that the artifact from artifactory exists at given location. If it doesn't exist, then it will be downloaded. If it already exists then the checksum of existing file is checked against checksum in artifactory. If it is different then the step will fail. artifact Details of the artifact to b...
[ "Ensures", "that", "the", "artifact", "from", "artifactory", "exists", "at", "given", "location", ".", "If", "it", "doesn", "t", "exist", "then", "it", "will", "be", "downloaded", ".", "If", "it", "already", "exists", "then", "the", "checksum", "of", "exis...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/artifactory.py#L15-L107
35,679
saltstack/salt
salt/modules/random_org.py
getUsage
def getUsage(api_key=None, api_version=None): ''' Show current usages statistics :param api_key: The Random.org api key. :param api_version: The Random.org api version. :return: The current usage statistics. CLI Example: .. code-block:: bash salt '*' random_org.getUsage ...
python
def getUsage(api_key=None, api_version=None): ''' Show current usages statistics :param api_key: The Random.org api key. :param api_version: The Random.org api version. :return: The current usage statistics. CLI Example: .. code-block:: bash salt '*' random_org.getUsage ...
[ "def", "getUsage", "(", "api_key", "=", "None", ",", "api_version", "=", "None", ")", ":", "ret", "=", "{", "'res'", ":", "True", "}", "if", "not", "api_key", "or", "not", "api_version", ":", "try", ":", "options", "=", "__salt__", "[", "'config.option...
Show current usages statistics :param api_key: The Random.org api key. :param api_version: The Random.org api version. :return: The current usage statistics. CLI Example: .. code-block:: bash salt '*' random_org.getUsage salt '*' random_org.getUsage api_key=peWcBiMOS9HrZG15peWcB...
[ "Show", "current", "usages", "statistics" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/random_org.py#L126-L177
35,680
saltstack/salt
salt/utils/oset.py
OrderedSet.add
def add(self, key): """ Add `key` as an item to this OrderedSet, then return its index. If `key` is already in the OrderedSet, return the index it already had. """ if key not in self.map: self.map[key] = len(self.items) self.items.append(key) ...
python
def add(self, key): """ Add `key` as an item to this OrderedSet, then return its index. If `key` is already in the OrderedSet, return the index it already had. """ if key not in self.map: self.map[key] = len(self.items) self.items.append(key) ...
[ "def", "add", "(", "self", ",", "key", ")", ":", "if", "key", "not", "in", "self", ".", "map", ":", "self", ".", "map", "[", "key", "]", "=", "len", "(", "self", ".", "items", ")", "self", ".", "items", ".", "append", "(", "key", ")", "return...
Add `key` as an item to this OrderedSet, then return its index. If `key` is already in the OrderedSet, return the index it already had.
[ "Add", "key", "as", "an", "item", "to", "this", "OrderedSet", "then", "return", "its", "index", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/oset.py#L110-L120
35,681
saltstack/salt
salt/utils/oset.py
OrderedSet.index
def index(self, key): """ Get the index of a given entry, raising an IndexError if it's not present. `key` can be an iterable of entries that is not a string, in which case this returns a list of indices. """ if is_iterable(key): return [self.index(su...
python
def index(self, key): """ Get the index of a given entry, raising an IndexError if it's not present. `key` can be an iterable of entries that is not a string, in which case this returns a list of indices. """ if is_iterable(key): return [self.index(su...
[ "def", "index", "(", "self", ",", "key", ")", ":", "if", "is_iterable", "(", "key", ")", ":", "return", "[", "self", ".", "index", "(", "subkey", ")", "for", "subkey", "in", "key", "]", "return", "self", ".", "map", "[", "key", "]" ]
Get the index of a given entry, raising an IndexError if it's not present. `key` can be an iterable of entries that is not a string, in which case this returns a list of indices.
[ "Get", "the", "index", "of", "a", "given", "entry", "raising", "an", "IndexError", "if", "it", "s", "not", "present", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/oset.py#L136-L146
35,682
saltstack/salt
salt/modules/ini_manage.py
set_option
def set_option(file_name, sections=None, separator='='): ''' Edit an ini file, replacing one or more sections. Returns a dictionary containing the changes made. file_name path of ini_file sections : None A dictionary representing the sections to be edited ini file The keys ...
python
def set_option(file_name, sections=None, separator='='): ''' Edit an ini file, replacing one or more sections. Returns a dictionary containing the changes made. file_name path of ini_file sections : None A dictionary representing the sections to be edited ini file The keys ...
[ "def", "set_option", "(", "file_name", ",", "sections", "=", "None", ",", "separator", "=", "'='", ")", ":", "sections", "=", "sections", "or", "{", "}", "changes", "=", "{", "}", "inifile", "=", "_Ini", ".", "get_ini_file", "(", "file_name", ",", "sep...
Edit an ini file, replacing one or more sections. Returns a dictionary containing the changes made. file_name path of ini_file sections : None A dictionary representing the sections to be edited ini file The keys are the section names and the values are the dictionary conta...
[ "Edit", "an", "ini", "file", "replacing", "one", "or", "more", "sections", ".", "Returns", "a", "dictionary", "containing", "the", "changes", "made", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ini_manage.py#L46-L88
35,683
saltstack/salt
salt/modules/ini_manage.py
get_option
def get_option(file_name, section, option, separator='='): ''' Get value of a key from a section in an ini file. Returns ``None`` if no matching key was found. API Example: .. code-block:: python import salt sc = salt.client.get_local_client() sc.cmd('target', 'ini.get_opt...
python
def get_option(file_name, section, option, separator='='): ''' Get value of a key from a section in an ini file. Returns ``None`` if no matching key was found. API Example: .. code-block:: python import salt sc = salt.client.get_local_client() sc.cmd('target', 'ini.get_opt...
[ "def", "get_option", "(", "file_name", ",", "section", ",", "option", ",", "separator", "=", "'='", ")", ":", "inifile", "=", "_Ini", ".", "get_ini_file", "(", "file_name", ",", "separator", "=", "separator", ")", "if", "section", ":", "try", ":", "retur...
Get value of a key from a section in an ini file. Returns ``None`` if no matching key was found. API Example: .. code-block:: python import salt sc = salt.client.get_local_client() sc.cmd('target', 'ini.get_option', [path_to_ini_file, section_name, option]) CLI...
[ "Get", "value", "of", "a", "key", "from", "a", "section", "in", "an", "ini", "file", ".", "Returns", "None", "if", "no", "matching", "key", "was", "found", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ini_manage.py#L91-L118
35,684
saltstack/salt
salt/modules/ini_manage.py
get_section
def get_section(file_name, section, separator='='): ''' Retrieve a section from an ini file. Returns the section as dictionary. If the section is not found, an empty dictionary is returned. API Example: .. code-block:: python import salt sc = salt.client.get_local_client() ...
python
def get_section(file_name, section, separator='='): ''' Retrieve a section from an ini file. Returns the section as dictionary. If the section is not found, an empty dictionary is returned. API Example: .. code-block:: python import salt sc = salt.client.get_local_client() ...
[ "def", "get_section", "(", "file_name", ",", "section", ",", "separator", "=", "'='", ")", ":", "inifile", "=", "_Ini", ".", "get_ini_file", "(", "file_name", ",", "separator", "=", "separator", ")", "ret", "=", "{", "}", "for", "key", ",", "value", "i...
Retrieve a section from an ini file. Returns the section as dictionary. If the section is not found, an empty dictionary is returned. API Example: .. code-block:: python import salt sc = salt.client.get_local_client() sc.cmd('target', 'ini.get_section', [path_to_ini...
[ "Retrieve", "a", "section", "from", "an", "ini", "file", ".", "Returns", "the", "section", "as", "dictionary", ".", "If", "the", "section", "is", "not", "found", "an", "empty", "dictionary", "is", "returned", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ini_manage.py#L151-L176
35,685
saltstack/salt
salt/modules/ini_manage.py
remove_section
def remove_section(file_name, section, separator='='): ''' Remove a section in an ini file. Returns the removed section as dictionary, or ``None`` if nothing was removed. API Example: .. code-block:: python import salt sc = salt.client.get_local_client() sc.cmd('target', '...
python
def remove_section(file_name, section, separator='='): ''' Remove a section in an ini file. Returns the removed section as dictionary, or ``None`` if nothing was removed. API Example: .. code-block:: python import salt sc = salt.client.get_local_client() sc.cmd('target', '...
[ "def", "remove_section", "(", "file_name", ",", "section", ",", "separator", "=", "'='", ")", ":", "inifile", "=", "_Ini", ".", "get_ini_file", "(", "file_name", ",", "separator", "=", "separator", ")", "if", "section", "in", "inifile", ":", "section", "="...
Remove a section in an ini file. Returns the removed section as dictionary, or ``None`` if nothing was removed. API Example: .. code-block:: python import salt sc = salt.client.get_local_client() sc.cmd('target', 'ini.remove_section', [path_to_ini_file, section_name...
[ "Remove", "a", "section", "in", "an", "ini", "file", ".", "Returns", "the", "removed", "section", "as", "dictionary", "or", "None", "if", "nothing", "was", "removed", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ini_manage.py#L179-L207
35,686
saltstack/salt
salt/modules/ini_manage.py
get_ini
def get_ini(file_name, separator='='): ''' Retrieve whole structure from an ini file and return it as dictionary. API Example: .. code-block:: python import salt sc = salt.client.get_local_client() sc.cmd('target', 'ini.get_ini', [path_to_ini_file]) CLI Exa...
python
def get_ini(file_name, separator='='): ''' Retrieve whole structure from an ini file and return it as dictionary. API Example: .. code-block:: python import salt sc = salt.client.get_local_client() sc.cmd('target', 'ini.get_ini', [path_to_ini_file]) CLI Exa...
[ "def", "get_ini", "(", "file_name", ",", "separator", "=", "'='", ")", ":", "def", "ini_odict2dict", "(", "odict", ")", ":", "'''\n Transform OrderedDict to regular dict recursively\n :param odict: OrderedDict\n :return: regular dict\n '''", "ret", "="...
Retrieve whole structure from an ini file and return it as dictionary. API Example: .. code-block:: python import salt sc = salt.client.get_local_client() sc.cmd('target', 'ini.get_ini', [path_to_ini_file]) CLI Example: .. code-block:: bash salt '*' i...
[ "Retrieve", "whole", "structure", "from", "an", "ini", "file", "and", "return", "it", "as", "dictionary", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ini_manage.py#L210-L245
35,687
saltstack/salt
salt/renderers/py.py
render
def render(template, saltenv='base', sls='', tmplpath=None, **kws): ''' Render the python module's components :rtype: string ''' template = tmplpath if not os.path.isfile(template): raise SaltRenderError('Template {0} is not a file!'.format(template)) tmp_data = salt.utils.template...
python
def render(template, saltenv='base', sls='', tmplpath=None, **kws): ''' Render the python module's components :rtype: string ''' template = tmplpath if not os.path.isfile(template): raise SaltRenderError('Template {0} is not a file!'.format(template)) tmp_data = salt.utils.template...
[ "def", "render", "(", "template", ",", "saltenv", "=", "'base'", ",", "sls", "=", "''", ",", "tmplpath", "=", "None", ",", "*", "*", "kws", ")", ":", "template", "=", "tmplpath", "if", "not", "os", ".", "path", ".", "isfile", "(", "template", ")", ...
Render the python module's components :rtype: string
[ "Render", "the", "python", "module", "s", "components" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/renderers/py.py#L123-L153
35,688
saltstack/salt
salt/states/rabbitmq_vhost.py
present
def present(name): ''' Ensure the RabbitMQ VHost exists. name VHost name user Initial user permission to set on the VHost, if present .. deprecated:: 2015.8.0 owner Initial owner permission to set on the VHost, if present .. deprecated:: 2015.8.0 conf ...
python
def present(name): ''' Ensure the RabbitMQ VHost exists. name VHost name user Initial user permission to set on the VHost, if present .. deprecated:: 2015.8.0 owner Initial owner permission to set on the VHost, if present .. deprecated:: 2015.8.0 conf ...
[ "def", "present", "(", "name", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", ",", "'changes'", ":", "{", "}", "}", "vhost_exists", "=", "__salt__", "[", "'rabbitmq.vhost_exists'", "]", "(",...
Ensure the RabbitMQ VHost exists. name VHost name user Initial user permission to set on the VHost, if present .. deprecated:: 2015.8.0 owner Initial owner permission to set on the VHost, if present .. deprecated:: 2015.8.0 conf Initial conf string to ...
[ "Ensure", "the", "RabbitMQ", "VHost", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/rabbitmq_vhost.py#L35-L93
35,689
saltstack/salt
salt/modules/svn.py
_run_svn
def _run_svn(cmd, cwd, user, username, password, opts, **kwargs): ''' Execute svn return the output of the command cmd The command to run. cwd The path to the Subversion repository user Run svn as a user other than what the minion runs as username Connect ...
python
def _run_svn(cmd, cwd, user, username, password, opts, **kwargs): ''' Execute svn return the output of the command cmd The command to run. cwd The path to the Subversion repository user Run svn as a user other than what the minion runs as username Connect ...
[ "def", "_run_svn", "(", "cmd", ",", "cwd", ",", "user", ",", "username", ",", "password", ",", "opts", ",", "*", "*", "kwargs", ")", ":", "cmd", "=", "[", "'svn'", ",", "'--non-interactive'", ",", "cmd", "]", "options", "=", "list", "(", "opts", ")...
Execute svn return the output of the command cmd The command to run. cwd The path to the Subversion repository user Run svn as a user other than what the minion runs as username Connect to the Subversion server as another user password Connect to the ...
[ "Execute", "svn", "return", "the", "output", "of", "the", "command" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/svn.py#L30-L73
35,690
saltstack/salt
salt/modules/svn.py
info
def info(cwd, targets=None, user=None, username=None, password=None, fmt='str'): ''' Display the Subversion information from the checkout. cwd The path to the Subversion repository targets : None files, directories, and URLs to pass to the c...
python
def info(cwd, targets=None, user=None, username=None, password=None, fmt='str'): ''' Display the Subversion information from the checkout. cwd The path to the Subversion repository targets : None files, directories, and URLs to pass to the c...
[ "def", "info", "(", "cwd", ",", "targets", "=", "None", ",", "user", "=", "None", ",", "username", "=", "None", ",", "password", "=", "None", ",", "fmt", "=", "'str'", ")", ":", "opts", "=", "list", "(", ")", "if", "fmt", "==", "'xml'", ":", "o...
Display the Subversion information from the checkout. cwd The path to the Subversion repository targets : None files, directories, and URLs to pass to the command as arguments svn uses '.' by default user : None Run svn as a user other than what the minion runs as use...
[ "Display", "the", "Subversion", "information", "from", "the", "checkout", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/svn.py#L76-L130
35,691
saltstack/salt
salt/modules/svn.py
checkout
def checkout(cwd, remote, target=None, user=None, username=None, password=None, *opts): ''' Download a working copy of the remote Subversion repository directory or file cwd The path to the Subversion repository ...
python
def checkout(cwd, remote, target=None, user=None, username=None, password=None, *opts): ''' Download a working copy of the remote Subversion repository directory or file cwd The path to the Subversion repository ...
[ "def", "checkout", "(", "cwd", ",", "remote", ",", "target", "=", "None", ",", "user", "=", "None", ",", "username", "=", "None", ",", "password", "=", "None", ",", "*", "opts", ")", ":", "opts", "+=", "(", "remote", ",", ")", "if", "target", ":"...
Download a working copy of the remote Subversion repository directory or file cwd The path to the Subversion repository remote : None URL to checkout target : None The name to give the file or directory working copy Default: svn uses the remote basename user : Non...
[ "Download", "a", "working", "copy", "of", "the", "remote", "Subversion", "repository", "directory", "or", "file" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/svn.py#L133-L174
35,692
saltstack/salt
salt/modules/svn.py
update
def update(cwd, targets=None, user=None, username=None, password=None, *opts): ''' Update the current directory, files, or directories from the remote Subversion repository cwd The path to the Subversion repository targets : None files and directories to pass to the command as argu...
python
def update(cwd, targets=None, user=None, username=None, password=None, *opts): ''' Update the current directory, files, or directories from the remote Subversion repository cwd The path to the Subversion repository targets : None files and directories to pass to the command as argu...
[ "def", "update", "(", "cwd", ",", "targets", "=", "None", ",", "user", "=", "None", ",", "username", "=", "None", ",", "password", "=", "None", ",", "*", "opts", ")", ":", "if", "targets", ":", "opts", "+=", "tuple", "(", "salt", ".", "utils", "....
Update the current directory, files, or directories from the remote Subversion repository cwd The path to the Subversion repository targets : None files and directories to pass to the command as arguments Default: svn uses '.' user : None Run svn as a user other than w...
[ "Update", "the", "current", "directory", "files", "or", "directories", "from", "the", "remote", "Subversion", "repository" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/svn.py#L216-L247
35,693
saltstack/salt
salt/utils/stringutils.py
to_bool
def to_bool(text): ''' Convert the string name of a boolean to that boolean value. ''' downcased_text = six.text_type(text).strip().lower() if downcased_text == 'false': return False elif downcased_text == 'true': return True return text
python
def to_bool(text): ''' Convert the string name of a boolean to that boolean value. ''' downcased_text = six.text_type(text).strip().lower() if downcased_text == 'false': return False elif downcased_text == 'true': return True return text
[ "def", "to_bool", "(", "text", ")", ":", "downcased_text", "=", "six", ".", "text_type", "(", "text", ")", ".", "strip", "(", ")", ".", "lower", "(", ")", "if", "downcased_text", "==", "'false'", ":", "return", "False", "elif", "downcased_text", "==", ...
Convert the string name of a boolean to that boolean value.
[ "Convert", "the", "string", "name", "of", "a", "boolean", "to", "that", "boolean", "value", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/stringutils.py#L182-L192
35,694
saltstack/salt
salt/utils/stringutils.py
is_quoted
def is_quoted(value): ''' Return a single or double quote, if a string is wrapped in extra quotes. Otherwise return an empty string. ''' ret = '' if isinstance(value, six.string_types) \ and value[0] == value[-1] \ and value.startswith(('\'', '"')): ret = value[0]...
python
def is_quoted(value): ''' Return a single or double quote, if a string is wrapped in extra quotes. Otherwise return an empty string. ''' ret = '' if isinstance(value, six.string_types) \ and value[0] == value[-1] \ and value.startswith(('\'', '"')): ret = value[0]...
[ "def", "is_quoted", "(", "value", ")", ":", "ret", "=", "''", "if", "isinstance", "(", "value", ",", "six", ".", "string_types", ")", "and", "value", "[", "0", "]", "==", "value", "[", "-", "1", "]", "and", "value", ".", "startswith", "(", "(", "...
Return a single or double quote, if a string is wrapped in extra quotes. Otherwise return an empty string.
[ "Return", "a", "single", "or", "double", "quote", "if", "a", "string", "is", "wrapped", "in", "extra", "quotes", ".", "Otherwise", "return", "an", "empty", "string", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/stringutils.py#L204-L214
35,695
saltstack/salt
salt/utils/stringutils.py
is_binary
def is_binary(data): ''' Detects if the passed string of data is binary or text ''' if not data or not isinstance(data, (six.string_types, six.binary_type)): return False if isinstance(data, six.binary_type): if b'\0' in data: return True elif str('\0') in data: ...
python
def is_binary(data): ''' Detects if the passed string of data is binary or text ''' if not data or not isinstance(data, (six.string_types, six.binary_type)): return False if isinstance(data, six.binary_type): if b'\0' in data: return True elif str('\0') in data: ...
[ "def", "is_binary", "(", "data", ")", ":", "if", "not", "data", "or", "not", "isinstance", "(", "data", ",", "(", "six", ".", "string_types", ",", "six", ".", "binary_type", ")", ")", ":", "return", "False", "if", "isinstance", "(", "data", ",", "six...
Detects if the passed string of data is binary or text
[ "Detects", "if", "the", "passed", "string", "of", "data", "is", "binary", "or", "text" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/stringutils.py#L238-L272
35,696
saltstack/salt
salt/utils/stringutils.py
build_whitespace_split_regex
def build_whitespace_split_regex(text): ''' Create a regular expression at runtime which should match ignoring the addition or deletion of white space or line breaks, unless between commas Example: .. code-block:: python >>> import re >>> import salt.utils.stringutils >>> ...
python
def build_whitespace_split_regex(text): ''' Create a regular expression at runtime which should match ignoring the addition or deletion of white space or line breaks, unless between commas Example: .. code-block:: python >>> import re >>> import salt.utils.stringutils >>> ...
[ "def", "build_whitespace_split_regex", "(", "text", ")", ":", "def", "__build_parts", "(", "text", ")", ":", "lexer", "=", "shlex", ".", "shlex", "(", "text", ")", "lexer", ".", "whitespace_split", "=", "True", "lexer", ".", "commenters", "=", "''", "if", ...
Create a regular expression at runtime which should match ignoring the addition or deletion of white space or line breaks, unless between commas Example: .. code-block:: python >>> import re >>> import salt.utils.stringutils >>> regex = salt.utils.stringutils.build_whitespace_spli...
[ "Create", "a", "regular", "expression", "at", "runtime", "which", "should", "match", "ignoring", "the", "addition", "or", "deletion", "of", "white", "space", "or", "line", "breaks", "unless", "between", "commas" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/stringutils.py#L316-L361
35,697
saltstack/salt
salt/utils/stringutils.py
get_context
def get_context(template, line, num_lines=5, marker=None): ''' Returns debugging context around a line in a given string Returns:: string ''' template_lines = template.splitlines() num_template_lines = len(template_lines) # In test mode, a single line template would return a crazy line num...
python
def get_context(template, line, num_lines=5, marker=None): ''' Returns debugging context around a line in a given string Returns:: string ''' template_lines = template.splitlines() num_template_lines = len(template_lines) # In test mode, a single line template would return a crazy line num...
[ "def", "get_context", "(", "template", ",", "line", ",", "num_lines", "=", "5", ",", "marker", "=", "None", ")", ":", "template_lines", "=", "template", ".", "splitlines", "(", ")", "num_template_lines", "=", "len", "(", "template_lines", ")", "# In test mod...
Returns debugging context around a line in a given string Returns:: string
[ "Returns", "debugging", "context", "around", "a", "line", "in", "a", "given", "string" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/stringutils.py#L540-L572
35,698
saltstack/salt
salt/utils/stringutils.py
get_diff
def get_diff(a, b, *args, **kwargs): ''' Perform diff on two iterables containing lines from two files, and return the diff as as string. Lines are normalized to str types to avoid issues with unicode on PY2. ''' encoding = ('utf-8', 'latin-1', __salt_system_encoding__) # Late import to avoi...
python
def get_diff(a, b, *args, **kwargs): ''' Perform diff on two iterables containing lines from two files, and return the diff as as string. Lines are normalized to str types to avoid issues with unicode on PY2. ''' encoding = ('utf-8', 'latin-1', __salt_system_encoding__) # Late import to avoi...
[ "def", "get_diff", "(", "a", ",", "b", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "encoding", "=", "(", "'utf-8'", ",", "'latin-1'", ",", "__salt_system_encoding__", ")", "# Late import to avoid circular import", "import", "salt", ".", "utils", "."...
Perform diff on two iterables containing lines from two files, and return the diff as as string. Lines are normalized to str types to avoid issues with unicode on PY2.
[ "Perform", "diff", "on", "two", "iterables", "containing", "lines", "from", "two", "files", "and", "return", "the", "diff", "as", "as", "string", ".", "Lines", "are", "normalized", "to", "str", "types", "to", "avoid", "issues", "with", "unicode", "on", "PY...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/stringutils.py#L575-L590
35,699
saltstack/salt
salt/modules/ethtool.py
show_coalesce
def show_coalesce(devname): ''' Queries the specified network device for coalescing information CLI Example: .. code-block:: bash salt '*' ethtool.show_coalesce <devname> ''' try: coalesce = ethtool.get_coalesce(devname) except IOError: log.error('Interrupt coales...
python
def show_coalesce(devname): ''' Queries the specified network device for coalescing information CLI Example: .. code-block:: bash salt '*' ethtool.show_coalesce <devname> ''' try: coalesce = ethtool.get_coalesce(devname) except IOError: log.error('Interrupt coales...
[ "def", "show_coalesce", "(", "devname", ")", ":", "try", ":", "coalesce", "=", "ethtool", ".", "get_coalesce", "(", "devname", ")", "except", "IOError", ":", "log", ".", "error", "(", "'Interrupt coalescing not supported on %s'", ",", "devname", ")", "return", ...
Queries the specified network device for coalescing information CLI Example: .. code-block:: bash salt '*' ethtool.show_coalesce <devname>
[ "Queries", "the", "specified", "network", "device", "for", "coalescing", "information" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ethtool.py#L109-L130