repo
stringlengths
7
54
path
stringlengths
4
223
func_name
stringlengths
1
134
original_string
stringlengths
75
104k
language
stringclasses
1 value
code
stringlengths
75
104k
code_tokens
listlengths
20
28.4k
docstring
stringlengths
1
46.3k
docstring_tokens
listlengths
1
1.66k
sha
stringlengths
40
40
url
stringlengths
87
315
partition
stringclasses
1 value
summary
stringlengths
4
350
obf_code
stringlengths
7.85k
764k
saltstack/salt
salt/utils/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
train
Given a list of comments or a string return a single line of text containing all of the comments.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/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
train
Remove the trailing slash from the URI in a repo definition
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Authenticate with vCenter server and return service instance object.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Helper function to add new IDE controllers to the virtual machine
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Check if the IP address is valid and routable Return either True or False
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Check if the IPv6 address is valid and routable Return either True or False
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Check if the master supports IPv6
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Returns a string representation of a HostHostBusAdapter into an an object reference.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Show the vCenter Server version with build number.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
List all the data centers for this VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Return a list of distributed virtual portgroups for this VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
List all the clusters for this VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
List all the datastore clusters for this VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
List all the datastores for this VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
List all the datastores for this VMware environment with extra information
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Returns a dictionary with basic information for the given datastore
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
List all the hosts for this VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
List all the resource pools for this VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
List all the standard networks for this VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Return a list of all VMs and templates that are on the specified provider with no details
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Return a list of all VMs and templates present on the specified provider
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/vmware.py
list_nodes_select
def list_nodes_select(call=None): ''' Return a list of all VMs and templates that are on the specified provider, with fields specified under ``query.selection`` in ``/etc/salt/cloud`` CLI Example: .. code-block:: bash salt-cloud -f list_nodes_select my-vmware-config To return a list ...
python
def list_nodes_select(call=None): ''' Return a list of all VMs and templates that are on the specified provider, with fields specified under ``query.selection`` in ``/etc/salt/cloud`` CLI Example: .. code-block:: bash salt-cloud -f list_nodes_select my-vmware-config To return a list ...
[ "def", "list_nodes_select", "(", "call", "=", "None", ")", ":", "if", "call", "==", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_nodes_select function must be called '", "'with -f or --function.'", ")", "ret", "=", "{", "}", "vm_properties", "=", ...
Return a list of all VMs and templates that are on the specified provider, with fields specified under ``query.selection`` in ``/etc/salt/cloud`` CLI Example: .. code-block:: bash salt-cloud -f list_nodes_select my-vmware-config To return a list of all VMs and templates present on ALL config...
[ "Return", "a", "list", "of", "all", "VMs", "and", "templates", "that", "are", "on", "the", "specified", "provider", "with", "fields", "specified", "under", "query", ".", "selection", "in", "/", "etc", "/", "salt", "/", "cloud" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L1883-L1968
train
Return a list of all VMs and templates that are on the specified provider with fields specified under query. selection.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Show details of the specified VM
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Return a list of all the templates present in this VMware environment with basic details
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
List all the folders for this VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/vmware.py
list_snapshots
def list_snapshots(kwargs=None, call=None): ''' List snapshots either for all VMs and templates or for a specific VM/template in this VMware environment To list snapshots for all VMs and templates: CLI Example: .. code-block:: bash salt-cloud -f list_snapshots my-vmware-config T...
python
def list_snapshots(kwargs=None, call=None): ''' List snapshots either for all VMs and templates or for a specific VM/template in this VMware environment To list snapshots for all VMs and templates: CLI Example: .. code-block:: bash salt-cloud -f list_snapshots my-vmware-config T...
[ "def", "list_snapshots", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_snapshots function must be called with '", "'-f or --function.'", ")", "ret", "=", "{", ...
List snapshots either for all VMs and templates or for a specific VM/template in this VMware environment To list snapshots for all VMs and templates: CLI Example: .. code-block:: bash salt-cloud -f list_snapshots my-vmware-config To list snapshots for a specific VM/template: CLI Ex...
[ "List", "snapshots", "either", "for", "all", "VMs", "and", "templates", "or", "for", "a", "specific", "VM", "/", "template", "in", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L2140-L2186
train
List the snapshots for all VMs and templates in this VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Suspends a VM using its name
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Reset a VM using its name
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Terminate a VM using its name.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Destroys a VM from the VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/vmware.py
create
def create(vm_): ''' To create a single VM in the VMware environment. Sample profile and arguments that can be specified in it can be found :ref:`here. <vmware-cloud-profile>` CLI Example: .. code-block:: bash salt-cloud -p vmware-centos6.5 vmname ''' try: # Check for...
python
def create(vm_): ''' To create a single VM in the VMware environment. Sample profile and arguments that can be specified in it can be found :ref:`here. <vmware-cloud-profile>` CLI Example: .. code-block:: bash salt-cloud -p vmware-centos6.5 vmname ''' try: # Check for...
[ "def", "create", "(", "vm_", ")", ":", "try", ":", "# Check for required profile parameters before sending any API calls.", "if", "(", "vm_", "[", "'profile'", "]", "and", "config", ".", "is_profile_configured", "(", "__opts__", ",", "__active_provider_name__", "or", ...
To create a single VM in the VMware environment. Sample profile and arguments that can be specified in it can be found :ref:`here. <vmware-cloud-profile>` CLI Example: .. code-block:: bash salt-cloud -p vmware-centos6.5 vmname
[ "To", "create", "a", "single", "VM", "in", "the", "VMware", "environment", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L2519-L3080
train
Create a single VM in the VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/vmware.py
handle_snapshot
def handle_snapshot(config_spec, object_ref, reloc_spec, template, vm_): ''' Returns a clone spec for cloning from shapshots :rtype vim.vm.CloneSpec ''' if 'snapshot' not in vm_: return None allowed_types = [ FLATTEN_DISK_FULL_CLONE, COPY_ALL_DISKS_FULL_CLONE, CU...
python
def handle_snapshot(config_spec, object_ref, reloc_spec, template, vm_): ''' Returns a clone spec for cloning from shapshots :rtype vim.vm.CloneSpec ''' if 'snapshot' not in vm_: return None allowed_types = [ FLATTEN_DISK_FULL_CLONE, COPY_ALL_DISKS_FULL_CLONE, CU...
[ "def", "handle_snapshot", "(", "config_spec", ",", "object_ref", ",", "reloc_spec", ",", "template", ",", "vm_", ")", ":", "if", "'snapshot'", "not", "in", "vm_", ":", "return", "None", "allowed_types", "=", "[", "FLATTEN_DISK_FULL_CLONE", ",", "COPY_ALL_DISKS_F...
Returns a clone spec for cloning from shapshots :rtype vim.vm.CloneSpec
[ "Returns", "a", "clone", "spec", "for", "cloning", "from", "shapshots", ":", "rtype", "vim", ".", "vm", ".", "CloneSpec" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L3083-L3108
train
Handles a snapshot of a resource.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Returns a clonespec for the given object_ref and relocation spec.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Builds a clone spec based on the object ref and the reloc_spec.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Creates a new data center in this VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Creates a new cluster under the specified datacenter in this VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Rescan a specified HBA or all the HBAs on the Host System
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
This function upgrades VMware Tools on all virtual machines present in the specified provider.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Upgrades VMware Tools on a specified virtual machine.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Returns a list of hosts for each cluster in VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Returns a list of clusters for each datacenter in VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
List all HBAs in the VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
List all the distributed virtual switches for this VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
List all the vApps for this VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
This function is used to enter the specified host system in maintenance mode in this VMware environment.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Creates a new folder under the VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Creates a snapshot of the specified virtual machine in this VMware environment.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Revert virtual machine to current snapshot.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Removes a snapshot of the specified virtual machine in this VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Remove all the snapshots present for the specified virtual machine.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Converts the virtual machine to template.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/vmware.py
add_host
def add_host(kwargs=None, call=None): ''' Add a host system to the specified cluster or datacenter in this VMware environment .. note:: To use this function, you need to specify ``esxi_host_user`` and ``esxi_host_password`` under your provider configuration set up at ``/etc/salt/cl...
python
def add_host(kwargs=None, call=None): ''' Add a host system to the specified cluster or datacenter in this VMware environment .. note:: To use this function, you need to specify ``esxi_host_user`` and ``esxi_host_password`` under your provider configuration set up at ``/etc/salt/cl...
[ "def", "add_host", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The add_host function must be called with '", "'-f or --function.'", ")", "host_name", "=", "kwargs", "...
Add a host system to the specified cluster or datacenter in this VMware environment .. note:: To use this function, you need to specify ``esxi_host_user`` and ``esxi_host_password`` under your provider configuration set up at ``/etc/salt/cloud.providers`` or ``/etc/salt/cloud.providers.d/v...
[ "Add", "a", "host", "system", "to", "the", "specified", "cluster", "or", "datacenter", "in", "this", "VMware", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/vmware.py#L4102-L4265
train
Adds a host system to the specified cluster or datacenter in this VMware environment.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Removes the specified host system from this VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Connect the specified host system in this VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Creates a new datastore cluster for the specified datacenter in this VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Shut down the specified host system in this VMware environment.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/zabbix_usermacro.py
present
def present(name, value, hostid=None, **kwargs): ''' Creates a new usermacro. :param name: name of the usermacro :param value: value of the usermacro :param hostid: id's of the hosts to apply the usermacro on, if missing a global usermacro is assumed. :param _connection_user: Optional - zabbix...
python
def present(name, value, hostid=None, **kwargs): ''' Creates a new usermacro. :param name: name of the usermacro :param value: value of the usermacro :param hostid: id's of the hosts to apply the usermacro on, if missing a global usermacro is assumed. :param _connection_user: Optional - zabbix...
[ "def", "present", "(", "name", ",", "value", ",", "hostid", "=", "None", ",", "*", "*", "kwargs", ")", ":", "connection_args", "=", "{", "}", "if", "'_connection_user'", "in", "kwargs", ":", "connection_args", "[", "'_connection_user'", "]", "=", "kwargs",...
Creates a new usermacro. :param name: name of the usermacro :param value: value of the usermacro :param hostid: id's of the hosts to apply the usermacro on, if missing a global usermacro is assumed. :param _connection_user: Optional - zabbix user (can also be set in opts or pillar, see module's docstr...
[ "Creates", "a", "new", "usermacro", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zabbix_usermacro.py#L22-L152
train
Creates a new usermacro.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/zabbix_usermacro.py
absent
def absent(name, hostid=None, **kwargs): ''' Ensures that the mediatype does not exist, eventually deletes the mediatype. :param name: name of the usermacro :param hostid: id's of the hosts to apply the usermacro on, if missing a global usermacro is assumed. :param _connection_user: Optional - zab...
python
def absent(name, hostid=None, **kwargs): ''' Ensures that the mediatype does not exist, eventually deletes the mediatype. :param name: name of the usermacro :param hostid: id's of the hosts to apply the usermacro on, if missing a global usermacro is assumed. :param _connection_user: Optional - zab...
[ "def", "absent", "(", "name", ",", "hostid", "=", "None", ",", "*", "*", "kwargs", ")", ":", "connection_args", "=", "{", "}", "if", "'_connection_user'", "in", "kwargs", ":", "connection_args", "[", "'_connection_user'", "]", "=", "kwargs", "[", "'_connec...
Ensures that the mediatype does not exist, eventually deletes the mediatype. :param name: name of the usermacro :param hostid: id's of the hosts to apply the usermacro on, if missing a global usermacro is assumed. :param _connection_user: Optional - zabbix user (can also be set in opts or pillar, see modu...
[ "Ensures", "that", "the", "mediatype", "does", "not", "exist", "eventually", "deletes", "the", "mediatype", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zabbix_usermacro.py#L155-L237
train
Ensures that the mediatype does not exist eventually deletes the mediatype.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/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
train
Return the DIFFERENCE of the minion pool result sets
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/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
train
Helper function to return a dictionary of minion pools along with their matching result sets.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/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
train
Download an artifact from artifactory to given location.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/saltutil.py
sync_all
def sync_all(name, **kwargs): ''' Performs the same task as saltutil.sync_all module See :mod:`saltutil module for full list of options <salt.modules.saltutil>` .. code-block:: yaml sync_everything: saltutil.sync_all: - refresh: True ''' ret = {'name': name, 'chan...
python
def sync_all(name, **kwargs): ''' Performs the same task as saltutil.sync_all module See :mod:`saltutil module for full list of options <salt.modules.saltutil>` .. code-block:: yaml sync_everything: saltutil.sync_all: - refresh: True ''' ret = {'name': name, 'chan...
[ "def", "sync_all", "(", "name", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", "}", "if", "__opts__", "[", "'test'", "]", ":",...
Performs the same task as saltutil.sync_all module See :mod:`saltutil module for full list of options <salt.modules.saltutil>` .. code-block:: yaml sync_everything: saltutil.sync_all: - refresh: True
[ "Performs", "the", "same", "task", "as", "saltutil", ".", "sync_all", "module", "See", ":", "mod", ":", "saltutil", "module", "for", "full", "list", "of", "options", "<salt", ".", "modules", ".", "saltutil", ">" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/saltutil.py#L54-L87
train
Syncs the entire tree with the master
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/random_org.py
_query
def _query(api_version=None, data=None): ''' Slack object method function to construct and execute on the API URL. :param api_key: The Random.org api key. :param api_version: The version of Random.org api. :param data: The data to be sent for POST method. :return: The json...
python
def _query(api_version=None, data=None): ''' Slack object method function to construct and execute on the API URL. :param api_key: The Random.org api key. :param api_version: The version of Random.org api. :param data: The data to be sent for POST method. :return: The json...
[ "def", "_query", "(", "api_version", "=", "None", ",", "data", "=", "None", ")", ":", "if", "data", "is", "None", ":", "data", "=", "{", "}", "ret", "=", "{", "'res'", ":", "True", "}", "api_url", "=", "'https://api.random.org/'", "base_url", "=", "_...
Slack object method function to construct and execute on the API URL. :param api_key: The Random.org api key. :param api_version: The version of Random.org api. :param data: The data to be sent for POST method. :return: The json response from the API call or False.
[ "Slack", "object", "method", "function", "to", "construct", "and", "execute", "on", "the", "API", "URL", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/random_org.py#L81-L123
train
Query the Random. org API.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/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
train
Show current usages statistics.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/random_org.py
generateIntegers
def generateIntegers(api_key=None, api_version=None, **kwargs): ''' Generate random integers :param api_key: The Random.org api key. :param api_version: The Random.org api version. :param number: The number of integers to generate :param minimum: The lo...
python
def generateIntegers(api_key=None, api_version=None, **kwargs): ''' Generate random integers :param api_key: The Random.org api key. :param api_version: The Random.org api version. :param number: The number of integers to generate :param minimum: The lo...
[ "def", "generateIntegers", "(", "api_key", "=", "None", ",", "api_version", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'res'", ":", "True", "}", "if", "not", "api_key", "or", "not", "api_version", ":", "try", ":", "options", "=...
Generate random integers :param api_key: The Random.org api key. :param api_version: The Random.org api version. :param number: The number of integers to generate :param minimum: The lower boundary for the range from which the random numbers will be picked. Must be within ...
[ "Generate", "random", "integers" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/random_org.py#L180-L294
train
Generate random integers from the Random. org API key and API version.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/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
train
Add a key to the OrderedSet then return its index.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/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
train
Returns the index of a given entry raising an IndexError if it s not there.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/oset.py
OrderedSet.discard
def discard(self, key): """ Remove an element. Do not raise an exception if absent. The MutableSet mixin uses this to implement the .remove() method, which *does* raise an error when asked to remove a non-existent item. """ if key in self: i = self.map[key] ...
python
def discard(self, key): """ Remove an element. Do not raise an exception if absent. The MutableSet mixin uses this to implement the .remove() method, which *does* raise an error when asked to remove a non-existent item. """ if key in self: i = self.map[key] ...
[ "def", "discard", "(", "self", ",", "key", ")", ":", "if", "key", "in", "self", ":", "i", "=", "self", ".", "map", "[", "key", "]", "del", "self", ".", "items", "[", "i", "]", "del", "self", ".", "map", "[", "key", "]", "for", "k", ",", "v"...
Remove an element. Do not raise an exception if absent. The MutableSet mixin uses this to implement the .remove() method, which *does* raise an error when asked to remove a non-existent item.
[ "Remove", "an", "element", ".", "Do", "not", "raise", "an", "exception", "if", "absent", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/oset.py#L162-L175
train
Remove an element from the MutableSet.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/git_pillar.py
update
def update(branch=None, repo=None): ''' .. versionadded:: 2014.1.0 .. versionchanged:: 2015.8.4 This runner function now supports the :ref:`git_pillar configuration schema <git-pillar-configuration>` introduced in 2015.8.0. Additionally, the branch and repo can now be omitted to ...
python
def update(branch=None, repo=None): ''' .. versionadded:: 2014.1.0 .. versionchanged:: 2015.8.4 This runner function now supports the :ref:`git_pillar configuration schema <git-pillar-configuration>` introduced in 2015.8.0. Additionally, the branch and repo can now be omitted to ...
[ "def", "update", "(", "branch", "=", "None", ",", "repo", "=", "None", ")", ":", "ret", "=", "{", "}", "for", "ext_pillar", "in", "__opts__", ".", "get", "(", "'ext_pillar'", ",", "[", "]", ")", ":", "pillar_type", "=", "next", "(", "iter", "(", ...
.. versionadded:: 2014.1.0 .. versionchanged:: 2015.8.4 This runner function now supports the :ref:`git_pillar configuration schema <git-pillar-configuration>` introduced in 2015.8.0. Additionally, the branch and repo can now be omitted to update all git_pillar remotes. The return d...
[ "..", "versionadded", "::", "2014", ".", "1", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/git_pillar.py#L18-L104
train
Update the git_pillar cache for a specific branch and repo.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/aptpkg.py
held
def held(name): ''' Set package in 'hold' state, meaning it will not be upgraded. name The name of the package, e.g., 'tmux' ''' ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''} state = __salt__['pkg.get_selections']( pattern=name, ) if not state: ...
python
def held(name): ''' Set package in 'hold' state, meaning it will not be upgraded. name The name of the package, e.g., 'tmux' ''' ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''} state = __salt__['pkg.get_selections']( pattern=name, ) if not state: ...
[ "def", "held", "(", "name", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", "}", "state", "=", "__salt__", "[", "'pkg.get_selections'", "]", "(", "pattern"...
Set package in 'hold' state, meaning it will not be upgraded. name The name of the package, e.g., 'tmux'
[ "Set", "package", "in", "hold", "state", "meaning", "it", "will", "not", "be", "upgraded", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/aptpkg.py#L30-L58
train
Ensure that the named package is not held.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/openbsdservice.py
_get_rc
def _get_rc(): ''' Returns a dict where the key is the daemon's name and the value a boolean indicating its status (True: enabled or False: disabled). Check the daemons started by the system in /etc/rc and configured in /etc/rc.conf and /etc/rc.conf.local. Also add to the dict all the localy ena...
python
def _get_rc(): ''' Returns a dict where the key is the daemon's name and the value a boolean indicating its status (True: enabled or False: disabled). Check the daemons started by the system in /etc/rc and configured in /etc/rc.conf and /etc/rc.conf.local. Also add to the dict all the localy ena...
[ "def", "_get_rc", "(", ")", ":", "daemons_flags", "=", "{", "}", "try", ":", "# now read the system startup script /etc/rc", "# to know what are the system enabled daemons", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "'/etc/rc'", ",", "'r'", ")",...
Returns a dict where the key is the daemon's name and the value a boolean indicating its status (True: enabled or False: disabled). Check the daemons started by the system in /etc/rc and configured in /etc/rc.conf and /etc/rc.conf.local. Also add to the dict all the localy enabled daemons via $pkg_scrip...
[ "Returns", "a", "dict", "where", "the", "key", "is", "the", "daemon", "s", "name", "and", "the", "value", "a", "boolean", "indicating", "its", "status", "(", "True", ":", "enabled", "or", "False", ":", "disabled", ")", ".", "Check", "the", "daemons", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/openbsdservice.py#L159-L211
train
Return a dictionary where the key is the daemon s name and the value is a boolean indicating its status.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/openbsdservice.py
available
def available(name): ''' .. versionadded:: 2014.7.0 Returns ``True`` if the specified service is available, otherwise returns ``False``. CLI Example: .. code-block:: bash salt '*' service.available sshd ''' path = '/etc/rc.d/{0}'.format(name) return os.path.isfile(path) a...
python
def available(name): ''' .. versionadded:: 2014.7.0 Returns ``True`` if the specified service is available, otherwise returns ``False``. CLI Example: .. code-block:: bash salt '*' service.available sshd ''' path = '/etc/rc.d/{0}'.format(name) return os.path.isfile(path) a...
[ "def", "available", "(", "name", ")", ":", "path", "=", "'/etc/rc.d/{0}'", ".", "format", "(", "name", ")", "return", "os", ".", "path", ".", "isfile", "(", "path", ")", "and", "os", ".", "access", "(", "path", ",", "os", ".", "X_OK", ")" ]
.. versionadded:: 2014.7.0 Returns ``True`` if the specified service is available, otherwise returns ``False``. CLI Example: .. code-block:: bash salt '*' service.available sshd
[ "..", "versionadded", "::", "2014", ".", "7", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/openbsdservice.py#L214-L228
train
Returns True if the specified service is available.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/openbsdservice.py
get_all
def get_all(): ''' .. versionadded:: 2014.7.0 Return all available boot services CLI Example: .. code-block:: bash salt '*' service.get_all ''' services = [] if not os.path.isdir('/etc/rc.d'): return services for service in os.listdir('/etc/rc.d'): # this ...
python
def get_all(): ''' .. versionadded:: 2014.7.0 Return all available boot services CLI Example: .. code-block:: bash salt '*' service.get_all ''' services = [] if not os.path.isdir('/etc/rc.d'): return services for service in os.listdir('/etc/rc.d'): # this ...
[ "def", "get_all", "(", ")", ":", "services", "=", "[", "]", "if", "not", "os", ".", "path", ".", "isdir", "(", "'/etc/rc.d'", ")", ":", "return", "services", "for", "service", "in", "os", ".", "listdir", "(", "'/etc/rc.d'", ")", ":", "# this will remov...
.. versionadded:: 2014.7.0 Return all available boot services CLI Example: .. code-block:: bash salt '*' service.get_all
[ "..", "versionadded", "::", "2014", ".", "7", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/openbsdservice.py#L248-L267
train
Return all available boot services
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/openbsdservice.py
get_disabled
def get_disabled(): ''' .. versionadded:: 2014.7.0 Return a set of services that are installed but disabled CLI Example: .. code-block:: bash salt '*' service.get_disabled ''' services = [] for daemon, is_enabled in six.iteritems(_get_rc()): if not is_enabled: ...
python
def get_disabled(): ''' .. versionadded:: 2014.7.0 Return a set of services that are installed but disabled CLI Example: .. code-block:: bash salt '*' service.get_disabled ''' services = [] for daemon, is_enabled in six.iteritems(_get_rc()): if not is_enabled: ...
[ "def", "get_disabled", "(", ")", ":", "services", "=", "[", "]", "for", "daemon", ",", "is_enabled", "in", "six", ".", "iteritems", "(", "_get_rc", "(", ")", ")", ":", "if", "not", "is_enabled", ":", "services", ".", "append", "(", "daemon", ")", "re...
.. versionadded:: 2014.7.0 Return a set of services that are installed but disabled CLI Example: .. code-block:: bash salt '*' service.get_disabled
[ "..", "versionadded", "::", "2014", ".", "7", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/openbsdservice.py#L304-L320
train
Return a set of services that are installed but disabled
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/mysql_user.py
present
def present(name, host='localhost', password=None, password_hash=None, allow_passwordless=False, unix_socket=False, password_column=None, **connection_args): ''' Ensure that the named user is present with the specified propertie...
python
def present(name, host='localhost', password=None, password_hash=None, allow_passwordless=False, unix_socket=False, password_column=None, **connection_args): ''' Ensure that the named user is present with the specified propertie...
[ "def", "present", "(", "name", ",", "host", "=", "'localhost'", ",", "password", "=", "None", ",", "password_hash", "=", "None", ",", "allow_passwordless", "=", "False", ",", "unix_socket", "=", "False", ",", "password_column", "=", "None", ",", "*", "*", ...
Ensure that the named user is present with the specified properties. A passwordless user can be configured by omitting ``password`` and ``password_hash``, and setting ``allow_passwordless`` to ``True``. name The name of the user to manage host Host for which this user/password combo ap...
[ "Ensure", "that", "the", "named", "user", "is", "present", "with", "the", "specified", "properties", ".", "A", "passwordless", "user", "can", "be", "configured", "by", "omitting", "password", "and", "password_hash", "and", "setting", "allow_passwordless", "to", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/mysql_user.py#L69-L228
train
Ensures that the named user is present with the specified properties.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/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
train
Edit an ini file replacing one or more sections. Returns a dictionary containing the changes made.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/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
train
Get a value of a key from an ini file. Returns None if no matching key was found.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/ini_manage.py
remove_option
def remove_option(file_name, section, option, separator='='): ''' Remove a key/value pair from a section in an ini file. Returns the value of the removed key, or ``None`` if nothing was removed. API Example: .. code-block:: python import salt sc = salt.client.get_local_client() ...
python
def remove_option(file_name, section, option, separator='='): ''' Remove a key/value pair from a section in an ini file. Returns the value of the removed key, or ``None`` if nothing was removed. API Example: .. code-block:: python import salt sc = salt.client.get_local_client() ...
[ "def", "remove_option", "(", "file_name", ",", "section", ",", "option", ",", "separator", "=", "'='", ")", ":", "inifile", "=", "_Ini", ".", "get_ini_file", "(", "file_name", ",", "separator", "=", "separator", ")", "if", "isinstance", "(", "inifile", "."...
Remove a key/value pair from a section in an ini file. Returns the value of the removed key, or ``None`` if nothing was removed. API Example: .. code-block:: python import salt sc = salt.client.get_local_client() sc.cmd('target', 'ini.remove_option', [path_to_ini_fi...
[ "Remove", "a", "key", "/", "value", "pair", "from", "a", "section", "in", "an", "ini", "file", ".", "Returns", "the", "value", "of", "the", "removed", "key", "or", "None", "if", "nothing", "was", "removed", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ini_manage.py#L121-L148
train
Removes an option from an ini file. Returns the value of or None if nothing was removed.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/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
train
Retrieve a section from an ini file. Returns the section as dictionary.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/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
train
Remove a section from an ini file. Returns the removed section as dictionary.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/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
train
Retrieve whole structure from an ini file and return it as dictionary.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Render the python module s components
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/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
train
Ensure a RabbitMQ VHost exists and is present.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/dracr.py
property_present
def property_present(properties, admin_username='root', admin_password='calvin', host=None, **kwargs): ''' properties = {} ''' ret = {'name': host, 'context': {'Host': host}, 'result': True, 'changes': {}, 'comment': ''} if host is None: output =...
python
def property_present(properties, admin_username='root', admin_password='calvin', host=None, **kwargs): ''' properties = {} ''' ret = {'name': host, 'context': {'Host': host}, 'result': True, 'changes': {}, 'comment': ''} if host is None: output =...
[ "def", "property_present", "(", "properties", ",", "admin_username", "=", "'root'", ",", "admin_password", "=", "'calvin'", ",", "host", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "host", ",", "'context'", ":", "{", ...
properties = {}
[ "properties", "=", "{}" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/dracr.py#L41-L96
train
Ensure that the specified properties are present on the idrac instance.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/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
train
Execute svn command and return the output of the command
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/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
train
Display the information from the Subversion repository.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Download a working copy of the remote Subversion repository or file and checkout the file or directory.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/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
train
Update the current directory files or directories of the remote Subversion repository
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/svn.py
export
def export(cwd, remote, target=None, user=None, username=None, password=None, revision='HEAD', *opts): ''' Create an unversioned copy of a tree. cwd The path to the Subversion repository remote : None URL and ...
python
def export(cwd, remote, target=None, user=None, username=None, password=None, revision='HEAD', *opts): ''' Create an unversioned copy of a tree. cwd The path to the Subversion repository remote : None URL and ...
[ "def", "export", "(", "cwd", ",", "remote", ",", "target", "=", "None", ",", "user", "=", "None", ",", "username", "=", "None", ",", "password", "=", "None", ",", "revision", "=", "'HEAD'", ",", "*", "opts", ")", ":", "opts", "+=", "(", "remote", ...
Create an unversioned copy of a tree. cwd The path to the Subversion repository remote : None URL and path to file or directory checkout target : None The name to give the file or directory working copy Default: svn uses the remote basename user : None Run svn...
[ "Create", "an", "unversioned", "copy", "of", "a", "tree", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/svn.py#L438-L481
train
Create an unversioned copy of a tree from a remote repository.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/stringutils.py
to_bytes
def to_bytes(s, encoding=None, errors='strict'): ''' Given bytes, bytearray, str, or unicode (python 2), return bytes (str for python 2) ''' if encoding is None: # Try utf-8 first, and fall back to detected encoding encoding = ('utf-8', __salt_system_encoding__) if not isinstance...
python
def to_bytes(s, encoding=None, errors='strict'): ''' Given bytes, bytearray, str, or unicode (python 2), return bytes (str for python 2) ''' if encoding is None: # Try utf-8 first, and fall back to detected encoding encoding = ('utf-8', __salt_system_encoding__) if not isinstance...
[ "def", "to_bytes", "(", "s", ",", "encoding", "=", "None", ",", "errors", "=", "'strict'", ")", ":", "if", "encoding", "is", "None", ":", "# Try utf-8 first, and fall back to detected encoding", "encoding", "=", "(", "'utf-8'", ",", "__salt_system_encoding__", ")"...
Given bytes, bytearray, str, or unicode (python 2), return bytes (str for python 2)
[ "Given", "bytes", "bytearray", "str", "or", "unicode", "(", "python", "2", ")", "return", "bytes", "(", "str", "for", "python", "2", ")" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/stringutils.py#L30-L63
train
Given bytes bytearray str or unicode ( python 2 ) return bytes
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Convert the string name of a boolean to that boolean value.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/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
train
Return a single or double quote if a string is wrapped in extra quotes. Otherwise return an empty string.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Detects if the passed string of data is binary or text
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/stringutils.py
human_to_bytes
def human_to_bytes(size): ''' Given a human-readable byte string (e.g. 2G, 30M), return the number of bytes. Will return 0 if the argument has unexpected form. .. versionadded:: 2018.3.0 ''' sbytes = size[:-1] unit = size[-1] if sbytes.isdigit(): sbytes = int(sbytes) ...
python
def human_to_bytes(size): ''' Given a human-readable byte string (e.g. 2G, 30M), return the number of bytes. Will return 0 if the argument has unexpected form. .. versionadded:: 2018.3.0 ''' sbytes = size[:-1] unit = size[-1] if sbytes.isdigit(): sbytes = int(sbytes) ...
[ "def", "human_to_bytes", "(", "size", ")", ":", "sbytes", "=", "size", "[", ":", "-", "1", "]", "unit", "=", "size", "[", "-", "1", "]", "if", "sbytes", ".", "isdigit", "(", ")", ":", "sbytes", "=", "int", "(", "sbytes", ")", "if", "unit", "=="...
Given a human-readable byte string (e.g. 2G, 30M), return the number of bytes. Will return 0 if the argument has unexpected form. .. versionadded:: 2018.3.0
[ "Given", "a", "human", "-", "readable", "byte", "string", "(", "e", ".", "g", ".", "2G", "30M", ")", "return", "the", "number", "of", "bytes", ".", "Will", "return", "0", "if", "the", "argument", "has", "unexpected", "form", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/stringutils.py#L289-L313
train
Converts a human - readable byte string to a number of bytes.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Create a regular expression at runtime which should match ignoring the whitespace or line breaks unless between commas
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/stringutils.py
expr_match
def expr_match(line, expr): ''' Checks whether or not the passed value matches the specified expression. Tries to match expr first as a glob using fnmatch.fnmatch(), and then tries to match expr as a regular expression. Originally designed to match minion IDs for whitelists/blacklists. Note tha...
python
def expr_match(line, expr): ''' Checks whether or not the passed value matches the specified expression. Tries to match expr first as a glob using fnmatch.fnmatch(), and then tries to match expr as a regular expression. Originally designed to match minion IDs for whitelists/blacklists. Note tha...
[ "def", "expr_match", "(", "line", ",", "expr", ")", ":", "try", ":", "if", "fnmatch", ".", "fnmatch", "(", "line", ",", "expr", ")", ":", "return", "True", "try", ":", "if", "re", ".", "match", "(", "r'\\A{0}\\Z'", ".", "format", "(", "expr", ")", ...
Checks whether or not the passed value matches the specified expression. Tries to match expr first as a glob using fnmatch.fnmatch(), and then tries to match expr as a regular expression. Originally designed to match minion IDs for whitelists/blacklists. Note that this also does exact matches, as fnmat...
[ "Checks", "whether", "or", "not", "the", "passed", "value", "matches", "the", "specified", "expression", ".", "Tries", "to", "match", "expr", "first", "as", "a", "glob", "using", "fnmatch", ".", "fnmatch", "()", "and", "then", "tries", "to", "match", "expr...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/stringutils.py#L364-L389
train
Returns True if or not the passed value matches the specified expression.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/stringutils.py
check_whitelist_blacklist
def check_whitelist_blacklist(value, whitelist=None, blacklist=None): ''' Check a whitelist and/or blacklist to see if the value matches it. value The item to check the whitelist and/or blacklist against. whitelist The list of items that are white-listed. If ``value`` is found ...
python
def check_whitelist_blacklist(value, whitelist=None, blacklist=None): ''' Check a whitelist and/or blacklist to see if the value matches it. value The item to check the whitelist and/or blacklist against. whitelist The list of items that are white-listed. If ``value`` is found ...
[ "def", "check_whitelist_blacklist", "(", "value", ",", "whitelist", "=", "None", ",", "blacklist", "=", "None", ")", ":", "# Normalize the input so that we have a list", "if", "blacklist", ":", "if", "isinstance", "(", "blacklist", ",", "six", ".", "string_types", ...
Check a whitelist and/or blacklist to see if the value matches it. value The item to check the whitelist and/or blacklist against. whitelist The list of items that are white-listed. If ``value`` is found in the whitelist, then the function returns ``True``. Otherwise, it return...
[ "Check", "a", "whitelist", "and", "/", "or", "blacklist", "to", "see", "if", "the", "value", "matches", "it", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/stringutils.py#L393-L454
train
Check a whitelist and blacklist against a value.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/stringutils.py
print_cli
def print_cli(msg, retries=10, step=0.01): ''' Wrapper around print() that suppresses tracebacks on broken pipes (i.e. when salt output is piped to less and less is stopped prematurely). ''' while retries: try: try: print(msg) except UnicodeEncodeError...
python
def print_cli(msg, retries=10, step=0.01): ''' Wrapper around print() that suppresses tracebacks on broken pipes (i.e. when salt output is piped to less and less is stopped prematurely). ''' while retries: try: try: print(msg) except UnicodeEncodeError...
[ "def", "print_cli", "(", "msg", ",", "retries", "=", "10", ",", "step", "=", "0.01", ")", ":", "while", "retries", ":", "try", ":", "try", ":", "print", "(", "msg", ")", "except", "UnicodeEncodeError", ":", "print", "(", "msg", ".", "encode", "(", ...
Wrapper around print() that suppresses tracebacks on broken pipes (i.e. when salt output is piped to less and less is stopped prematurely).
[ "Wrapper", "around", "print", "()", "that", "suppresses", "tracebacks", "on", "broken", "pipes", "(", "i", ".", "e", ".", "when", "salt", "output", "is", "piped", "to", "less", "and", "less", "is", "stopped", "prematurely", ")", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/stringutils.py#L513-L537
train
Wrapper around print that retries times and retries the next message.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/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
train
Returns a debugging context around a line in a given string Returns :: string
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/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
train
Perform diff on two iterables containing lines from two files and return the diff as string.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...