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/vmware.py
get_mor_by_moid
def get_mor_by_moid(si, obj_type, obj_moid): ''' Get reference to an object of specified object type and id si ServiceInstance for the vSphere or ESXi server (see get_service_instance) obj_type Type of the object (vim.StoragePod, vim.Datastore, etc) obj_moid ID of the obje...
python
def get_mor_by_moid(si, obj_type, obj_moid): ''' Get reference to an object of specified object type and id si ServiceInstance for the vSphere or ESXi server (see get_service_instance) obj_type Type of the object (vim.StoragePod, vim.Datastore, etc) obj_moid ID of the obje...
[ "def", "get_mor_by_moid", "(", "si", ",", "obj_type", ",", "obj_moid", ")", ":", "inventory", "=", "get_inventory", "(", "si", ")", "container", "=", "inventory", ".", "viewManager", ".", "CreateContainerView", "(", "inventory", ".", "rootFolder", ",", "[", ...
Get reference to an object of specified object type and id si ServiceInstance for the vSphere or ESXi server (see get_service_instance) obj_type Type of the object (vim.StoragePod, vim.Datastore, etc) obj_moid ID of the object
[ "Get", "reference", "to", "an", "object", "of", "specified", "object", "type", "and", "id" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L2016-L2034
train
Get reference to an object of specified object type and id
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/vmware.py
get_datastore_files
def get_datastore_files(service_instance, directory, datastores, container_object, browser_spec): ''' Get the files with a given browser specification from the datastore. service_instance The Service Instance Object from which to obtain datastores. directory The name of the directory w...
python
def get_datastore_files(service_instance, directory, datastores, container_object, browser_spec): ''' Get the files with a given browser specification from the datastore. service_instance The Service Instance Object from which to obtain datastores. directory The name of the directory w...
[ "def", "get_datastore_files", "(", "service_instance", ",", "directory", ",", "datastores", ",", "container_object", ",", "browser_spec", ")", ":", "files", "=", "[", "]", "datastore_objects", "=", "get_datastores", "(", "service_instance", ",", "container_object", ...
Get the files with a given browser specification from the datastore. service_instance The Service Instance Object from which to obtain datastores. directory The name of the directory where we would like to search datastores Name of the datastores container_object The ...
[ "Get", "the", "files", "with", "a", "given", "browser", "specification", "from", "the", "datastore", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L2037-L2081
train
Get the files from the datastore and return them as a list of vim. host. DatastoreBrowser. SearchResults objects.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vmware.py
get_datastores
def get_datastores(service_instance, reference, datastore_names=None, backing_disk_ids=None, get_all_datastores=False): ''' Returns a list of vim.Datastore objects representing the datastores visible from a VMware object, filtered by their names, or the backing disk cannonical name or...
python
def get_datastores(service_instance, reference, datastore_names=None, backing_disk_ids=None, get_all_datastores=False): ''' Returns a list of vim.Datastore objects representing the datastores visible from a VMware object, filtered by their names, or the backing disk cannonical name or...
[ "def", "get_datastores", "(", "service_instance", ",", "reference", ",", "datastore_names", "=", "None", ",", "backing_disk_ids", "=", "None", ",", "get_all_datastores", "=", "False", ")", ":", "obj_name", "=", "get_managed_object_name", "(", "reference", ")", "if...
Returns a list of vim.Datastore objects representing the datastores visible from a VMware object, filtered by their names, or the backing disk cannonical name or scsi_addresses service_instance The Service Instance Object from which to obtain datastores. reference The VMware object fro...
[ "Returns", "a", "list", "of", "vim", ".", "Datastore", "objects", "representing", "the", "datastores", "visible", "from", "a", "VMware", "object", "filtered", "by", "their", "names", "or", "the", "backing", "disk", "cannonical", "name", "or", "scsi_addresses" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L2084-L2211
train
Returns a list of vim. Datastore objects representing the datastores visible to a service 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/utils/vmware.py
rename_datastore
def rename_datastore(datastore_ref, new_datastore_name): ''' Renames a datastore datastore_ref vim.Datastore reference to the datastore object to be changed new_datastore_name New datastore name ''' ds_name = get_managed_object_name(datastore_ref) log.trace("Renaming datast...
python
def rename_datastore(datastore_ref, new_datastore_name): ''' Renames a datastore datastore_ref vim.Datastore reference to the datastore object to be changed new_datastore_name New datastore name ''' ds_name = get_managed_object_name(datastore_ref) log.trace("Renaming datast...
[ "def", "rename_datastore", "(", "datastore_ref", ",", "new_datastore_name", ")", ":", "ds_name", "=", "get_managed_object_name", "(", "datastore_ref", ")", "log", ".", "trace", "(", "\"Renaming datastore '%s' to '%s'\"", ",", "ds_name", ",", "new_datastore_name", ")", ...
Renames a datastore datastore_ref vim.Datastore reference to the datastore object to be changed new_datastore_name New datastore name
[ "Renames", "a", "datastore" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L2214-L2238
train
Renames a datastore object to be changed Taxonomy
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vmware.py
_get_partition_info
def _get_partition_info(storage_system, device_path): ''' Returns partition informations for a device path, of type vim.HostDiskPartitionInfo ''' try: partition_infos = \ storage_system.RetrieveDiskPartitionInfo( devicePath=[device_path]) except vim.fa...
python
def _get_partition_info(storage_system, device_path): ''' Returns partition informations for a device path, of type vim.HostDiskPartitionInfo ''' try: partition_infos = \ storage_system.RetrieveDiskPartitionInfo( devicePath=[device_path]) except vim.fa...
[ "def", "_get_partition_info", "(", "storage_system", ",", "device_path", ")", ":", "try", ":", "partition_infos", "=", "storage_system", ".", "RetrieveDiskPartitionInfo", "(", "devicePath", "=", "[", "device_path", "]", ")", "except", "vim", ".", "fault", ".", "...
Returns partition informations for a device path, of type vim.HostDiskPartitionInfo
[ "Returns", "partition", "informations", "for", "a", "device", "path", "of", "type", "vim", ".", "HostDiskPartitionInfo" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L2266-L2287
train
Returns partition informations for a device path of type
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vmware.py
_get_new_computed_partition_spec
def _get_new_computed_partition_spec(storage_system, device_path, partition_info): ''' Computes the new disk partition info when adding a new vmfs partition that uses up the remainder of the disk; returns a tuple (new_partition_nu...
python
def _get_new_computed_partition_spec(storage_system, device_path, partition_info): ''' Computes the new disk partition info when adding a new vmfs partition that uses up the remainder of the disk; returns a tuple (new_partition_nu...
[ "def", "_get_new_computed_partition_spec", "(", "storage_system", ",", "device_path", ",", "partition_info", ")", ":", "log", ".", "trace", "(", "'Adding a partition at the end of the disk and getting the new '", "'computed partition spec'", ")", "# TODO implement support for multi...
Computes the new disk partition info when adding a new vmfs partition that uses up the remainder of the disk; returns a tuple (new_partition_number, vim.HostDiskPartitionSpec
[ "Computes", "the", "new", "disk", "partition", "info", "when", "adding", "a", "new", "vmfs", "partition", "that", "uses", "up", "the", "remainder", "of", "the", "disk", ";", "returns", "a", "tuple", "(", "new_partition_number", "vim", ".", "HostDiskPartitionSp...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L2290-L2350
train
Returns the new computed partition spec for the given 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/utils/vmware.py
create_vmfs_datastore
def create_vmfs_datastore(host_ref, datastore_name, disk_ref, vmfs_major_version, storage_system=None): ''' Creates a VMFS datastore from a disk_id host_ref vim.HostSystem object referencing a host to create the datastore on datastore_name Name of the datastor...
python
def create_vmfs_datastore(host_ref, datastore_name, disk_ref, vmfs_major_version, storage_system=None): ''' Creates a VMFS datastore from a disk_id host_ref vim.HostSystem object referencing a host to create the datastore on datastore_name Name of the datastor...
[ "def", "create_vmfs_datastore", "(", "host_ref", ",", "datastore_name", ",", "disk_ref", ",", "vmfs_major_version", ",", "storage_system", "=", "None", ")", ":", "# TODO Support variable sized partitions", "hostname", "=", "get_managed_object_name", "(", "host_ref", ")", ...
Creates a VMFS datastore from a disk_id host_ref vim.HostSystem object referencing a host to create the datastore on datastore_name Name of the datastore disk_ref vim.HostScsiDislk on which the datastore is created vmfs_major_version VMFS major version to use
[ "Creates", "a", "VMFS", "datastore", "from", "a", "disk_id" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L2353-L2412
train
Creates a VMFS datastore from a disk and a VMFS major 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/vmware.py
get_host_datastore_system
def get_host_datastore_system(host_ref, hostname=None): ''' Returns a host's datastore system host_ref Reference to the ESXi host hostname Name of the host. This argument is optional. ''' if not hostname: hostname = get_managed_object_name(host_ref) service_instanc...
python
def get_host_datastore_system(host_ref, hostname=None): ''' Returns a host's datastore system host_ref Reference to the ESXi host hostname Name of the host. This argument is optional. ''' if not hostname: hostname = get_managed_object_name(host_ref) service_instanc...
[ "def", "get_host_datastore_system", "(", "host_ref", ",", "hostname", "=", "None", ")", ":", "if", "not", "hostname", ":", "hostname", "=", "get_managed_object_name", "(", "host_ref", ")", "service_instance", "=", "get_service_instance_from_managed_object", "(", "host...
Returns a host's datastore system host_ref Reference to the ESXi host hostname Name of the host. This argument is optional.
[ "Returns", "a", "host", "s", "datastore", "system" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L2415-L2443
train
Returns a host s datastore 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/utils/vmware.py
remove_datastore
def remove_datastore(service_instance, datastore_ref): ''' Creates a VMFS datastore from a disk_id service_instance The Service Instance Object containing the datastore datastore_ref The reference to the datastore to remove ''' ds_props = get_properties_of_managed_object( ...
python
def remove_datastore(service_instance, datastore_ref): ''' Creates a VMFS datastore from a disk_id service_instance The Service Instance Object containing the datastore datastore_ref The reference to the datastore to remove ''' ds_props = get_properties_of_managed_object( ...
[ "def", "remove_datastore", "(", "service_instance", ",", "datastore_ref", ")", ":", "ds_props", "=", "get_properties_of_managed_object", "(", "datastore_ref", ",", "[", "'host'", ",", "'info'", ",", "'name'", "]", ")", "ds_name", "=", "ds_props", "[", "'name'", ...
Creates a VMFS datastore from a disk_id service_instance The Service Instance Object containing the datastore datastore_ref The reference to the datastore to remove
[ "Creates", "a", "VMFS", "datastore", "from", "a", "disk_id" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L2446-L2481
train
Removes a datastore from a service 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/utils/vmware.py
get_hosts
def get_hosts(service_instance, datacenter_name=None, host_names=None, cluster_name=None, get_all_hosts=False): ''' Returns a list of vim.HostSystem objects representing ESXi hosts in a vcenter filtered by their names and/or datacenter, cluster membership. service_instance The Ser...
python
def get_hosts(service_instance, datacenter_name=None, host_names=None, cluster_name=None, get_all_hosts=False): ''' Returns a list of vim.HostSystem objects representing ESXi hosts in a vcenter filtered by their names and/or datacenter, cluster membership. service_instance The Ser...
[ "def", "get_hosts", "(", "service_instance", ",", "datacenter_name", "=", "None", ",", "host_names", "=", "None", ",", "cluster_name", "=", "None", ",", "get_all_hosts", "=", "False", ")", ":", "properties", "=", "[", "'name'", "]", "if", "cluster_name", "an...
Returns a list of vim.HostSystem objects representing ESXi hosts in a vcenter filtered by their names and/or datacenter, cluster membership. service_instance The Service Instance Object from which to obtain the hosts. datacenter_name The datacenter name. Default is None. host_names ...
[ "Returns", "a", "list", "of", "vim", ".", "HostSystem", "objects", "representing", "ESXi", "hosts", "in", "a", "vcenter", "filtered", "by", "their", "names", "and", "/", "or", "datacenter", "cluster", "membership", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L2484-L2547
train
Returns a list of vim. HostSystem objects representing ESXi hosts in a vcenter filtered by their names and cluster membership.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vmware.py
_get_scsi_address_to_lun_key_map
def _get_scsi_address_to_lun_key_map(service_instance, host_ref, storage_system=None, hostname=None): ''' Returns a map between the scsi addresses and the keys of all luns on an ESXi host. ...
python
def _get_scsi_address_to_lun_key_map(service_instance, host_ref, storage_system=None, hostname=None): ''' Returns a map between the scsi addresses and the keys of all luns on an ESXi host. ...
[ "def", "_get_scsi_address_to_lun_key_map", "(", "service_instance", ",", "host_ref", ",", "storage_system", "=", "None", ",", "hostname", "=", "None", ")", ":", "if", "not", "hostname", ":", "hostname", "=", "get_managed_object_name", "(", "host_ref", ")", "if", ...
Returns a map between the scsi addresses and the keys of all luns on an ESXi host. map[<scsi_address>] = <lun key> service_instance The Service Instance Object from which to obtain the hosts host_ref The vim.HostSystem object representing the host that contains the requeste...
[ "Returns", "a", "map", "between", "the", "scsi", "addresses", "and", "the", "keys", "of", "all", "luns", "on", "an", "ESXi", "host", ".", "map", "[", "<scsi_address", ">", "]", "=", "<lun", "key", ">" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L2550-L2610
train
Returns a map between the scsi addresses and the keys of all luns on an ESXi ArcGIS host.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/vmware.py
get_all_luns
def get_all_luns(host_ref, storage_system=None, hostname=None): ''' Returns a list of all vim.HostScsiDisk objects in a disk host_ref The vim.HostSystem object representing the host that contains the requested disks. storage_system The host's storage system. Default is None. ...
python
def get_all_luns(host_ref, storage_system=None, hostname=None): ''' Returns a list of all vim.HostScsiDisk objects in a disk host_ref The vim.HostSystem object representing the host that contains the requested disks. storage_system The host's storage system. Default is None. ...
[ "def", "get_all_luns", "(", "host_ref", ",", "storage_system", "=", "None", ",", "hostname", "=", "None", ")", ":", "if", "not", "hostname", ":", "hostname", "=", "get_managed_object_name", "(", "host_ref", ")", "if", "not", "storage_system", ":", "si", "=",...
Returns a list of all vim.HostScsiDisk objects in a disk host_ref The vim.HostSystem object representing the host that contains the requested disks. storage_system The host's storage system. Default is None. hostname Name of the host. This argument is optional.
[ "Returns", "a", "list", "of", "all", "vim", ".", "HostScsiDisk", "objects", "in", "a", "disk" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L2613-L2660
train
Returns a list of all scsi luns in a disk.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vmware.py
get_scsi_address_to_lun_map
def get_scsi_address_to_lun_map(host_ref, storage_system=None, hostname=None): ''' Returns a map of all vim.ScsiLun objects on a ESXi host keyed by their scsi address host_ref The vim.HostSystem object representing the host that contains the requested disks. storage_system ...
python
def get_scsi_address_to_lun_map(host_ref, storage_system=None, hostname=None): ''' Returns a map of all vim.ScsiLun objects on a ESXi host keyed by their scsi address host_ref The vim.HostSystem object representing the host that contains the requested disks. storage_system ...
[ "def", "get_scsi_address_to_lun_map", "(", "host_ref", ",", "storage_system", "=", "None", ",", "hostname", "=", "None", ")", ":", "if", "not", "hostname", ":", "hostname", "=", "get_managed_object_name", "(", "host_ref", ")", "si", "=", "get_service_instance_from...
Returns a map of all vim.ScsiLun objects on a ESXi host keyed by their scsi address host_ref The vim.HostSystem object representing the host that contains the requested disks. storage_system The host's storage system. Default is None. hostname Name of the host. This ar...
[ "Returns", "a", "map", "of", "all", "vim", ".", "ScsiLun", "objects", "on", "a", "ESXi", "host", "keyed", "by", "their", "scsi", "address" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L2663-L2689
train
Returns a map of all vim. ScsiLun objects on a ESXi host keyed by their scsi address.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vmware.py
get_disks
def get_disks(host_ref, disk_ids=None, scsi_addresses=None, get_all_disks=False): ''' Returns a list of vim.HostScsiDisk objects representing disks in a ESXi host, filtered by their cannonical names and scsi_addresses host_ref The vim.HostSystem object representing the host that c...
python
def get_disks(host_ref, disk_ids=None, scsi_addresses=None, get_all_disks=False): ''' Returns a list of vim.HostScsiDisk objects representing disks in a ESXi host, filtered by their cannonical names and scsi_addresses host_ref The vim.HostSystem object representing the host that c...
[ "def", "get_disks", "(", "host_ref", ",", "disk_ids", "=", "None", ",", "scsi_addresses", "=", "None", ",", "get_all_disks", "=", "False", ")", ":", "hostname", "=", "get_managed_object_name", "(", "host_ref", ")", "if", "get_all_disks", ":", "log", ".", "tr...
Returns a list of vim.HostScsiDisk objects representing disks in a ESXi host, filtered by their cannonical names and scsi_addresses host_ref The vim.HostSystem object representing the host that contains the requested disks. disk_ids The list of canonical names of the disks to be re...
[ "Returns", "a", "list", "of", "vim", ".", "HostScsiDisk", "objects", "representing", "disks", "in", "a", "ESXi", "host", "filtered", "by", "their", "cannonical", "names", "and", "scsi_addresses" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L2692-L2745
train
Returns a list of vim. HostScsiDisk objects representing the disks in a ESXi host filtered by canonical names and scsi_addresses.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vmware.py
get_disk_partition_info
def get_disk_partition_info(host_ref, disk_id, storage_system=None): ''' Returns all partitions on a disk host_ref The reference of the ESXi host containing the disk disk_id The canonical name of the disk whose partitions are to be removed storage_system The ESXi host's st...
python
def get_disk_partition_info(host_ref, disk_id, storage_system=None): ''' Returns all partitions on a disk host_ref The reference of the ESXi host containing the disk disk_id The canonical name of the disk whose partitions are to be removed storage_system The ESXi host's st...
[ "def", "get_disk_partition_info", "(", "host_ref", ",", "disk_id", ",", "storage_system", "=", "None", ")", ":", "hostname", "=", "get_managed_object_name", "(", "host_ref", ")", "service_instance", "=", "get_service_instance_from_managed_object", "(", "host_ref", ")", ...
Returns all partitions on a disk host_ref The reference of the ESXi host containing the disk disk_id The canonical name of the disk whose partitions are to be removed storage_system The ESXi host's storage system. Default is None.
[ "Returns", "all", "partitions", "on", "a", "disk" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L2748-L2790
train
Returns all partitions on a disk
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vmware.py
erase_disk_partitions
def erase_disk_partitions(service_instance, host_ref, disk_id, hostname=None, storage_system=None): ''' Erases all partitions on a disk in a vcenter filtered by their names and/or datacenter, cluster membership service_instance The Service Instance Object from which t...
python
def erase_disk_partitions(service_instance, host_ref, disk_id, hostname=None, storage_system=None): ''' Erases all partitions on a disk in a vcenter filtered by their names and/or datacenter, cluster membership service_instance The Service Instance Object from which t...
[ "def", "erase_disk_partitions", "(", "service_instance", ",", "host_ref", ",", "disk_id", ",", "hostname", "=", "None", ",", "storage_system", "=", "None", ")", ":", "if", "not", "hostname", ":", "hostname", "=", "get_managed_object_name", "(", "host_ref", ")", ...
Erases all partitions on a disk in a vcenter filtered by their names and/or datacenter, cluster membership service_instance The Service Instance Object from which to obtain all information host_ref The reference of the ESXi host containing the disk disk_id The canonical name ...
[ "Erases", "all", "partitions", "on", "a", "disk" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L2793-L2864
train
Erases all partitions on a disk in a vcenter filtered by their names and or datacenter
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vmware.py
get_diskgroups
def get_diskgroups(host_ref, cache_disk_ids=None, get_all_disk_groups=False): ''' Returns a list of vim.VsanHostDiskMapping objects representing disks in a ESXi host, filtered by their cannonical names. host_ref The vim.HostSystem object representing the host that contains the requested...
python
def get_diskgroups(host_ref, cache_disk_ids=None, get_all_disk_groups=False): ''' Returns a list of vim.VsanHostDiskMapping objects representing disks in a ESXi host, filtered by their cannonical names. host_ref The vim.HostSystem object representing the host that contains the requested...
[ "def", "get_diskgroups", "(", "host_ref", ",", "cache_disk_ids", "=", "None", ",", "get_all_disk_groups", "=", "False", ")", ":", "hostname", "=", "get_managed_object_name", "(", "host_ref", ")", "if", "get_all_disk_groups", ":", "log", ".", "trace", "(", "'Retr...
Returns a list of vim.VsanHostDiskMapping objects representing disks in a ESXi host, filtered by their cannonical names. host_ref The vim.HostSystem object representing the host that contains the requested disks. cache_disk_ids The list of cannonical names of the cache disks to be ...
[ "Returns", "a", "list", "of", "vim", ".", "VsanHostDiskMapping", "objects", "representing", "disks", "in", "a", "ESXi", "host", "filtered", "by", "their", "cannonical", "names", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L2867-L2924
train
Returns a list of vim. VsanHostDiskMapping objects representing the disks in a ESXi host filtered by their cannonical names.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vmware.py
_check_disks_in_diskgroup
def _check_disks_in_diskgroup(disk_group, cache_disk_id, capacity_disk_ids): ''' Checks that the disks in a disk group are as expected and raises CheckError exceptions if the check fails ''' if not disk_group.ssd.canonicalName == cache_disk_id: raise salt.exceptions.ArgumentValueError( ...
python
def _check_disks_in_diskgroup(disk_group, cache_disk_id, capacity_disk_ids): ''' Checks that the disks in a disk group are as expected and raises CheckError exceptions if the check fails ''' if not disk_group.ssd.canonicalName == cache_disk_id: raise salt.exceptions.ArgumentValueError( ...
[ "def", "_check_disks_in_diskgroup", "(", "disk_group", ",", "cache_disk_id", ",", "capacity_disk_ids", ")", ":", "if", "not", "disk_group", ".", "ssd", ".", "canonicalName", "==", "cache_disk_id", ":", "raise", "salt", ".", "exceptions", ".", "ArgumentValueError", ...
Checks that the disks in a disk group are as expected and raises CheckError exceptions if the check fails
[ "Checks", "that", "the", "disks", "in", "a", "disk", "group", "are", "as", "expected", "and", "raises", "CheckError", "exceptions", "if", "the", "check", "fails" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L2927-L2944
train
Checks that the disks in a disk group are as expected and raises a CheckError exception if the check fails
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vmware.py
get_host_cache
def get_host_cache(host_ref, host_cache_manager=None): ''' Returns a vim.HostScsiDisk if the host cache is configured on the specified host, other wise returns None host_ref The vim.HostSystem object representing the host that contains the requested disks. host_cache_manager ...
python
def get_host_cache(host_ref, host_cache_manager=None): ''' Returns a vim.HostScsiDisk if the host cache is configured on the specified host, other wise returns None host_ref The vim.HostSystem object representing the host that contains the requested disks. host_cache_manager ...
[ "def", "get_host_cache", "(", "host_ref", ",", "host_cache_manager", "=", "None", ")", ":", "hostname", "=", "get_managed_object_name", "(", "host_ref", ")", "service_instance", "=", "get_service_instance_from_managed_object", "(", "host_ref", ")", "log", ".", "trace"...
Returns a vim.HostScsiDisk if the host cache is configured on the specified host, other wise returns None host_ref The vim.HostSystem object representing the host that contains the requested disks. host_cache_manager The vim.HostCacheConfigurationManager object representing the cac...
[ "Returns", "a", "vim", ".", "HostScsiDisk", "if", "the", "host", "cache", "is", "configured", "on", "the", "specified", "host", "other", "wise", "returns", "None" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L2948-L2985
train
Returns a vim. HostScsiDisk object representing the host that contains the requested disks.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/vmware.py
configure_host_cache
def configure_host_cache(host_ref, datastore_ref, swap_size_MiB, host_cache_manager=None): ''' Configures the host cahe of the specified host host_ref The vim.HostSystem object representing the host that contains the requested disks. datastore_ref The v...
python
def configure_host_cache(host_ref, datastore_ref, swap_size_MiB, host_cache_manager=None): ''' Configures the host cahe of the specified host host_ref The vim.HostSystem object representing the host that contains the requested disks. datastore_ref The v...
[ "def", "configure_host_cache", "(", "host_ref", ",", "datastore_ref", ",", "swap_size_MiB", ",", "host_cache_manager", "=", "None", ")", ":", "hostname", "=", "get_managed_object_name", "(", "host_ref", ")", "if", "not", "host_cache_manager", ":", "props", "=", "g...
Configures the host cahe of the specified host host_ref The vim.HostSystem object representing the host that contains the requested disks. datastore_ref The vim.Datastore opject representing the datastore the host cache will be configured on. swap_size_MiB The size...
[ "Configures", "the", "host", "cahe", "of", "the", "specified", "host" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L2989-L3040
train
Configure the host cache on the specified host.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/vmware.py
get_resource_pools
def get_resource_pools(service_instance, resource_pool_names, datacenter_name=None, get_all_resource_pools=False): ''' Retrieves resource pool objects service_instance The service instance object to query the vCenter resource_pool_names Resource pool names d...
python
def get_resource_pools(service_instance, resource_pool_names, datacenter_name=None, get_all_resource_pools=False): ''' Retrieves resource pool objects service_instance The service instance object to query the vCenter resource_pool_names Resource pool names d...
[ "def", "get_resource_pools", "(", "service_instance", ",", "resource_pool_names", ",", "datacenter_name", "=", "None", ",", "get_all_resource_pools", "=", "False", ")", ":", "properties", "=", "[", "'name'", "]", "if", "not", "resource_pool_names", ":", "resource_po...
Retrieves resource pool objects service_instance The service instance object to query the vCenter resource_pool_names Resource pool names datacenter_name Name of the datacenter where the resource pool is available get_all_resource_pools Boolean return Res...
[ "Retrieves", "resource", "pool", "objects" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L3053-L3097
train
Returns a list of resource pools that are available in the service 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/utils/vmware.py
wait_for_task
def wait_for_task(task, instance_name, task_type, sleep_seconds=1, log_level='debug'): ''' Waits for a task to be completed. task The task to wait for. instance_name The name of the ESXi host, vCenter Server, or Virtual Machine that the task is being run on. task_type ...
python
def wait_for_task(task, instance_name, task_type, sleep_seconds=1, log_level='debug'): ''' Waits for a task to be completed. task The task to wait for. instance_name The name of the ESXi host, vCenter Server, or Virtual Machine that the task is being run on. task_type ...
[ "def", "wait_for_task", "(", "task", ",", "instance_name", ",", "task_type", ",", "sleep_seconds", "=", "1", ",", "log_level", "=", "'debug'", ")", ":", "time_counter", "=", "0", "start_time", "=", "time", ".", "time", "(", ")", "log", ".", "trace", "(",...
Waits for a task to be completed. task The task to wait for. instance_name The name of the ESXi host, vCenter Server, or Virtual Machine that the task is being run on. task_type The type of task being performed. Useful information for debugging purposes. sleep_seconds...
[ "Waits", "for", "a", "task", "to", "be", "completed", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L3170-L3270
train
Waits for a task to finish.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vmware.py
get_vm_by_property
def get_vm_by_property(service_instance, name, datacenter=None, vm_properties=None, traversal_spec=None, parent_ref=None): ''' Get virtual machine properties based on the traversal specs and properties list, returns Virtual Machine object with properties. service_instance ...
python
def get_vm_by_property(service_instance, name, datacenter=None, vm_properties=None, traversal_spec=None, parent_ref=None): ''' Get virtual machine properties based on the traversal specs and properties list, returns Virtual Machine object with properties. service_instance ...
[ "def", "get_vm_by_property", "(", "service_instance", ",", "name", ",", "datacenter", "=", "None", ",", "vm_properties", "=", "None", ",", "traversal_spec", "=", "None", ",", "parent_ref", "=", "None", ")", ":", "if", "datacenter", "and", "not", "parent_ref", ...
Get virtual machine properties based on the traversal specs and properties list, returns Virtual Machine object with properties. service_instance Service instance object to access vCenter name Name of the virtual machine. datacenter Datacenter name vm_properties L...
[ "Get", "virtual", "machine", "properties", "based", "on", "the", "traversal", "specs", "and", "properties", "list", "returns", "Virtual", "Machine", "object", "with", "properties", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L3273-L3326
train
Get virtual machine properties based on the properties list and the properties list.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/vmware.py
get_folder
def get_folder(service_instance, datacenter, placement, base_vm_name=None): ''' Returns a Folder Object service_instance Service instance object datacenter Name of the datacenter placement Placement dictionary base_vm_name Existing virtual machine name (for cl...
python
def get_folder(service_instance, datacenter, placement, base_vm_name=None): ''' Returns a Folder Object service_instance Service instance object datacenter Name of the datacenter placement Placement dictionary base_vm_name Existing virtual machine name (for cl...
[ "def", "get_folder", "(", "service_instance", ",", "datacenter", ",", "placement", ",", "base_vm_name", "=", "None", ")", ":", "log", ".", "trace", "(", "'Retrieving folder information'", ")", "if", "base_vm_name", ":", "vm_object", "=", "get_vm_by_property", "(",...
Returns a Folder Object service_instance Service instance object datacenter Name of the datacenter placement Placement dictionary base_vm_name Existing virtual machine name (for cloning)
[ "Returns", "a", "Folder", "Object" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L3329-L3369
train
Returns a Folder Object containing the virtual machine and the virtual machine s virtual machine folders.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vmware.py
get_placement
def get_placement(service_instance, datacenter, placement=None): ''' To create a virtual machine a resource pool needs to be supplied, we would like to use the strictest as possible. datacenter Name of the datacenter placement Dictionary with the placement info, cluster, host resource ...
python
def get_placement(service_instance, datacenter, placement=None): ''' To create a virtual machine a resource pool needs to be supplied, we would like to use the strictest as possible. datacenter Name of the datacenter placement Dictionary with the placement info, cluster, host resource ...
[ "def", "get_placement", "(", "service_instance", ",", "datacenter", ",", "placement", "=", "None", ")", ":", "log", ".", "trace", "(", "'Retrieving placement information'", ")", "resourcepool_object", ",", "placement_object", "=", "None", ",", "None", "if", "'host...
To create a virtual machine a resource pool needs to be supplied, we would like to use the strictest as possible. datacenter Name of the datacenter placement Dictionary with the placement info, cluster, host resource pool name return Resource pool, cluster and host object if any a...
[ "To", "create", "a", "virtual", "machine", "a", "resource", "pool", "needs", "to", "be", "supplied", "we", "would", "like", "to", "use", "the", "strictest", "as", "possible", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L3372-L3451
train
Returns a virtual machine with the specified placement 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/utils/vmware.py
convert_to_kb
def convert_to_kb(unit, size): ''' Converts the given size to KB based on the unit, returns a long integer. unit Unit of the size eg. GB; Note: to VMware a GB is the same as GiB = 1024MiB size Number which represents the size ''' if unit.lower() == 'gb': # vCenter needs ...
python
def convert_to_kb(unit, size): ''' Converts the given size to KB based on the unit, returns a long integer. unit Unit of the size eg. GB; Note: to VMware a GB is the same as GiB = 1024MiB size Number which represents the size ''' if unit.lower() == 'gb': # vCenter needs ...
[ "def", "convert_to_kb", "(", "unit", ",", "size", ")", ":", "if", "unit", ".", "lower", "(", ")", "==", "'gb'", ":", "# vCenter needs long value", "target_size", "=", "int", "(", "size", "*", "1024", "*", "1024", ")", "elif", "unit", ".", "lower", "(",...
Converts the given size to KB based on the unit, returns a long integer. unit Unit of the size eg. GB; Note: to VMware a GB is the same as GiB = 1024MiB size Number which represents the size
[ "Converts", "the", "given", "size", "to", "KB", "based", "on", "the", "unit", "returns", "a", "long", "integer", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L3454-L3472
train
Converts the given size to KB based on the unit returns a long integer.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vmware.py
power_cycle_vm
def power_cycle_vm(virtual_machine, action='on'): ''' Powers on/off a virtual machine specified by it's name. virtual_machine vim.VirtualMachine object to power on/off virtual machine action Operation option to power on/off the machine ''' if action == 'on': try: ...
python
def power_cycle_vm(virtual_machine, action='on'): ''' Powers on/off a virtual machine specified by it's name. virtual_machine vim.VirtualMachine object to power on/off virtual machine action Operation option to power on/off the machine ''' if action == 'on': try: ...
[ "def", "power_cycle_vm", "(", "virtual_machine", ",", "action", "=", "'on'", ")", ":", "if", "action", "==", "'on'", ":", "try", ":", "task", "=", "virtual_machine", ".", "PowerOn", "(", ")", "task_name", "=", "'power on'", "except", "vim", ".", "fault", ...
Powers on/off a virtual machine specified by it's name. virtual_machine vim.VirtualMachine object to power on/off virtual machine action Operation option to power on/off the machine
[ "Powers", "on", "/", "off", "a", "virtual", "machine", "specified", "by", "it", "s", "name", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L3475-L3523
train
Power cycle a 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/utils/vmware.py
create_vm
def create_vm(vm_name, vm_config_spec, folder_object, resourcepool_object, host_object=None): ''' Creates virtual machine from config spec vm_name Virtual machine name to be created vm_config_spec Virtual Machine Config Spec object folder_object vm Folder managed object re...
python
def create_vm(vm_name, vm_config_spec, folder_object, resourcepool_object, host_object=None): ''' Creates virtual machine from config spec vm_name Virtual machine name to be created vm_config_spec Virtual Machine Config Spec object folder_object vm Folder managed object re...
[ "def", "create_vm", "(", "vm_name", ",", "vm_config_spec", ",", "folder_object", ",", "resourcepool_object", ",", "host_object", "=", "None", ")", ":", "try", ":", "if", "host_object", "and", "isinstance", "(", "host_object", ",", "vim", ".", "HostSystem", ")"...
Creates virtual machine from config spec vm_name Virtual machine name to be created vm_config_spec Virtual Machine Config Spec object folder_object vm Folder managed object reference resourcepool_object Resource pool object where the machine will be created host_...
[ "Creates", "virtual", "machine", "from", "config", "spec" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L3526-L3568
train
Creates virtual machine from config 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/utils/vmware.py
register_vm
def register_vm(datacenter, name, vmx_path, resourcepool_object, host_object=None): ''' Registers a virtual machine to the inventory with the given vmx file, on success it returns the vim.VirtualMachine managed object reference datacenter Datacenter object of the virtual machine, vim.Datacenter...
python
def register_vm(datacenter, name, vmx_path, resourcepool_object, host_object=None): ''' Registers a virtual machine to the inventory with the given vmx file, on success it returns the vim.VirtualMachine managed object reference datacenter Datacenter object of the virtual machine, vim.Datacenter...
[ "def", "register_vm", "(", "datacenter", ",", "name", ",", "vmx_path", ",", "resourcepool_object", ",", "host_object", "=", "None", ")", ":", "try", ":", "if", "host_object", ":", "task", "=", "datacenter", ".", "vmFolder", ".", "RegisterVM_Task", "(", "path...
Registers a virtual machine to the inventory with the given vmx file, on success it returns the vim.VirtualMachine managed object reference datacenter Datacenter object of the virtual machine, vim.Datacenter object name Name of the virtual machine vmx_path: Full path to the vm...
[ "Registers", "a", "virtual", "machine", "to", "the", "inventory", "with", "the", "given", "vmx", "file", "on", "success", "it", "returns", "the", "vim", ".", "VirtualMachine", "managed", "object", "reference" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L3571-L3618
train
Registers a virtual machine to the inventory with the given vmx file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/vmware.py
update_vm
def update_vm(vm_ref, vm_config_spec): ''' Updates the virtual machine configuration with the given object vm_ref Virtual machine managed object reference vm_config_spec Virtual machine config spec object to update ''' vm_name = get_managed_object_name(vm_ref) log.trace('Up...
python
def update_vm(vm_ref, vm_config_spec): ''' Updates the virtual machine configuration with the given object vm_ref Virtual machine managed object reference vm_config_spec Virtual machine config spec object to update ''' vm_name = get_managed_object_name(vm_ref) log.trace('Up...
[ "def", "update_vm", "(", "vm_ref", ",", "vm_config_spec", ")", ":", "vm_name", "=", "get_managed_object_name", "(", "vm_ref", ")", "log", ".", "trace", "(", "'Updating vm \\'%s\\''", ",", "vm_name", ")", "try", ":", "task", "=", "vm_ref", ".", "ReconfigVM_Task...
Updates the virtual machine configuration with the given object vm_ref Virtual machine managed object reference vm_config_spec Virtual machine config spec object to update
[ "Updates", "the", "virtual", "machine", "configuration", "with", "the", "given", "object" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L3621-L3647
train
Updates the virtual machine configuration with the given 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/utils/vmware.py
unregister_vm
def unregister_vm(vm_ref): ''' Destroys the virtual machine vm_ref Managed object reference of a virtual machine object ''' vm_name = get_managed_object_name(vm_ref) log.trace('Destroying vm \'%s\'', vm_name) try: vm_ref.UnregisterVM() except vim.fault.NoPermission as ex...
python
def unregister_vm(vm_ref): ''' Destroys the virtual machine vm_ref Managed object reference of a virtual machine object ''' vm_name = get_managed_object_name(vm_ref) log.trace('Destroying vm \'%s\'', vm_name) try: vm_ref.UnregisterVM() except vim.fault.NoPermission as ex...
[ "def", "unregister_vm", "(", "vm_ref", ")", ":", "vm_name", "=", "get_managed_object_name", "(", "vm_ref", ")", "log", ".", "trace", "(", "'Destroying vm \\'%s\\''", ",", "vm_name", ")", "try", ":", "vm_ref", ".", "UnregisterVM", "(", ")", "except", "vim", "...
Destroys the virtual machine vm_ref Managed object reference of a virtual machine object
[ "Destroys", "the", "virtual", "machine" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vmware.py#L3675-L3694
train
Destroys the virtual machine object holding the specified virtual machine 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/auth/pki.py
auth
def auth(username, password, **kwargs): ''' Returns True if the given user cert (password is the cert contents) was issued by the CA and if cert's Common Name is equal to username. Returns False otherwise. ``username``: we need it to run the auth function from CLI/API; it should ...
python
def auth(username, password, **kwargs): ''' Returns True if the given user cert (password is the cert contents) was issued by the CA and if cert's Common Name is equal to username. Returns False otherwise. ``username``: we need it to run the auth function from CLI/API; it should ...
[ "def", "auth", "(", "username", ",", "password", ",", "*", "*", "kwargs", ")", ":", "pem", "=", "password", "cacert_file", "=", "__salt__", "[", "'config.get'", "]", "(", "'external_auth:pki:ca_file'", ")", "log", ".", "debug", "(", "'Attempting to authenticat...
Returns True if the given user cert (password is the cert contents) was issued by the CA and if cert's Common Name is equal to username. Returns False otherwise. ``username``: we need it to run the auth function from CLI/API; it should be in master config auth/acl ``password``: conte...
[ "Returns", "True", "if", "the", "given", "user", "cert", "(", "password", "is", "the", "cert", "contents", ")", "was", "issued", "by", "the", "CA", "and", "if", "cert", "s", "Common", "Name", "is", "equal", "to", "username", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/pki.py#L55-L145
train
Authenticate the user with the given username and password.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/dictdiffer.py
RecursiveDictDiffer._get_diffs
def _get_diffs(cls, dict1, dict2, ignore_missing_keys): ''' Returns a dict with the differences between dict1 and dict2 Notes: Keys that only exist in dict2 are not included in the diff if ignore_missing_keys is True, otherwise they are Simple compares are do...
python
def _get_diffs(cls, dict1, dict2, ignore_missing_keys): ''' Returns a dict with the differences between dict1 and dict2 Notes: Keys that only exist in dict2 are not included in the diff if ignore_missing_keys is True, otherwise they are Simple compares are do...
[ "def", "_get_diffs", "(", "cls", ",", "dict1", ",", "dict2", ",", "ignore_missing_keys", ")", ":", "ret_dict", "=", "{", "}", "for", "p", "in", "dict1", ".", "keys", "(", ")", ":", "if", "p", "not", "in", "dict2", ":", "ret_dict", ".", "update", "(...
Returns a dict with the differences between dict1 and dict2 Notes: Keys that only exist in dict2 are not included in the diff if ignore_missing_keys is True, otherwise they are Simple compares are done on lists
[ "Returns", "a", "dict", "with", "the", "differences", "between", "dict1", "and", "dict2" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dictdiffer.py#L166-L192
train
Returns a dict with the differences between dict1 and dict2
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/dictdiffer.py
RecursiveDictDiffer._get_values
def _get_values(cls, diff_dict, type='new'): ''' Returns a dictionaries with the 'new' values in a diff dict. type Which values to return, 'new' or 'old' ''' ret_dict = {} for p in diff_dict.keys(): if type in diff_dict[p].keys(): ...
python
def _get_values(cls, diff_dict, type='new'): ''' Returns a dictionaries with the 'new' values in a diff dict. type Which values to return, 'new' or 'old' ''' ret_dict = {} for p in diff_dict.keys(): if type in diff_dict[p].keys(): ...
[ "def", "_get_values", "(", "cls", ",", "diff_dict", ",", "type", "=", "'new'", ")", ":", "ret_dict", "=", "{", "}", "for", "p", "in", "diff_dict", ".", "keys", "(", ")", ":", "if", "type", "in", "diff_dict", "[", "p", "]", ".", "keys", "(", ")", ...
Returns a dictionaries with the 'new' values in a diff dict. type Which values to return, 'new' or 'old'
[ "Returns", "a", "dictionaries", "with", "the", "new", "values", "in", "a", "diff", "dict", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dictdiffer.py#L195-L209
train
Returns a dictionary with the new values in a diff dict.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dictdiffer.py
RecursiveDictDiffer._get_changes
def _get_changes(cls, diff_dict): ''' Returns a list of string message with the differences in a diff dict. Each inner difference is tabulated two space deeper ''' changes_strings = [] for p in sorted(diff_dict.keys()): if sorted(diff_dict[p].keys()) == ['new...
python
def _get_changes(cls, diff_dict): ''' Returns a list of string message with the differences in a diff dict. Each inner difference is tabulated two space deeper ''' changes_strings = [] for p in sorted(diff_dict.keys()): if sorted(diff_dict[p].keys()) == ['new...
[ "def", "_get_changes", "(", "cls", ",", "diff_dict", ")", ":", "changes_strings", "=", "[", "]", "for", "p", "in", "sorted", "(", "diff_dict", ".", "keys", "(", ")", ")", ":", "if", "sorted", "(", "diff_dict", "[", "p", "]", ".", "keys", "(", ")", ...
Returns a list of string message with the differences in a diff dict. Each inner difference is tabulated two space deeper
[ "Returns", "a", "list", "of", "string", "message", "with", "the", "differences", "in", "a", "diff", "dict", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dictdiffer.py#L212-L245
train
Returns a list of string message with the differences in a diff dict. Each element in the list is a tabulated two space deeper. Each element in the list is a tabulated two space deeper.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/dictdiffer.py
RecursiveDictDiffer.added
def added(self): ''' Returns all keys that have been added. If the keys are in child dictionaries they will be represented with . notation ''' def _added(diffs, prefix): keys = [] for key in diffs.keys(): if isinstance(diffs[key], ...
python
def added(self): ''' Returns all keys that have been added. If the keys are in child dictionaries they will be represented with . notation ''' def _added(diffs, prefix): keys = [] for key in diffs.keys(): if isinstance(diffs[key], ...
[ "def", "added", "(", "self", ")", ":", "def", "_added", "(", "diffs", ",", "prefix", ")", ":", "keys", "=", "[", "]", "for", "key", "in", "diffs", ".", "keys", "(", ")", ":", "if", "isinstance", "(", "diffs", "[", "key", "]", ",", "dict", ")", ...
Returns all keys that have been added. If the keys are in child dictionaries they will be represented with . notation
[ "Returns", "all", "keys", "that", "have", "been", "added", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dictdiffer.py#L247-L269
train
Returns all keys that have been added.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/dictdiffer.py
RecursiveDictDiffer.removed
def removed(self): ''' Returns all keys that have been removed. If the keys are in child dictionaries they will be represented with . notation ''' def _removed(diffs, prefix): keys = [] for key in diffs.keys(): if isinstance(diffs[...
python
def removed(self): ''' Returns all keys that have been removed. If the keys are in child dictionaries they will be represented with . notation ''' def _removed(diffs, prefix): keys = [] for key in diffs.keys(): if isinstance(diffs[...
[ "def", "removed", "(", "self", ")", ":", "def", "_removed", "(", "diffs", ",", "prefix", ")", ":", "keys", "=", "[", "]", "for", "key", "in", "diffs", ".", "keys", "(", ")", ":", "if", "isinstance", "(", "diffs", "[", "key", "]", ",", "dict", "...
Returns all keys that have been removed. If the keys are in child dictionaries they will be represented with . notation
[ "Returns", "all", "keys", "that", "have", "been", "removed", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dictdiffer.py#L271-L292
train
Returns all keys that have been 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/utils/dictdiffer.py
RecursiveDictDiffer.changed
def changed(self): ''' Returns all keys that have been changed. If the keys are in child dictionaries they will be represented with . notation ''' def _changed(diffs, prefix): keys = [] for key in diffs.keys(): if not isinstance(di...
python
def changed(self): ''' Returns all keys that have been changed. If the keys are in child dictionaries they will be represented with . notation ''' def _changed(diffs, prefix): keys = [] for key in diffs.keys(): if not isinstance(di...
[ "def", "changed", "(", "self", ")", ":", "def", "_changed", "(", "diffs", ",", "prefix", ")", ":", "keys", "=", "[", "]", "for", "key", "in", "diffs", ".", "keys", "(", ")", ":", "if", "not", "isinstance", "(", "diffs", "[", "key", "]", ",", "d...
Returns all keys that have been changed. If the keys are in child dictionaries they will be represented with . notation
[ "Returns", "all", "keys", "that", "have", "been", "changed", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dictdiffer.py#L294-L340
train
Returns all keys that have been changed.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/dictdiffer.py
RecursiveDictDiffer.unchanged
def unchanged(self): ''' Returns all keys that have been unchanged. If the keys are in child dictionaries they will be represented with . notation ''' def _unchanged(current_dict, diffs, prefix): keys = [] for key in current_dict.keys(): ...
python
def unchanged(self): ''' Returns all keys that have been unchanged. If the keys are in child dictionaries they will be represented with . notation ''' def _unchanged(current_dict, diffs, prefix): keys = [] for key in current_dict.keys(): ...
[ "def", "unchanged", "(", "self", ")", ":", "def", "_unchanged", "(", "current_dict", ",", "diffs", ",", "prefix", ")", ":", "keys", "=", "[", "]", "for", "key", "in", "current_dict", ".", "keys", "(", ")", ":", "if", "key", "not", "in", "diffs", ":...
Returns all keys that have been unchanged. If the keys are in child dictionaries they will be represented with . notation
[ "Returns", "all", "keys", "that", "have", "been", "unchanged", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dictdiffer.py#L342-L365
train
Returns all keys that have been unchanged.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_groupadd.py
_get_computer_object
def _get_computer_object(): ''' A helper function to get the object for the local machine Returns: object: Returns the computer object for the local machine ''' with salt.utils.winapi.Com(): nt = win32com.client.Dispatch('AdsNameSpaces') return nt.GetObject('', 'WinNT://.,comput...
python
def _get_computer_object(): ''' A helper function to get the object for the local machine Returns: object: Returns the computer object for the local machine ''' with salt.utils.winapi.Com(): nt = win32com.client.Dispatch('AdsNameSpaces') return nt.GetObject('', 'WinNT://.,comput...
[ "def", "_get_computer_object", "(", ")", ":", "with", "salt", ".", "utils", ".", "winapi", ".", "Com", "(", ")", ":", "nt", "=", "win32com", ".", "client", ".", "Dispatch", "(", "'AdsNameSpaces'", ")", "return", "nt", ".", "GetObject", "(", "''", ",", ...
A helper function to get the object for the local machine Returns: object: Returns the computer object for the local machine
[ "A", "helper", "function", "to", "get", "the", "object", "for", "the", "local", "machine" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_groupadd.py#L42-L51
train
A helper function to get the object for the local machine Returns the object for the local machine
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_groupadd.py
_get_group_object
def _get_group_object(name): ''' A helper function to get a specified group object Args: name (str): The name of the object Returns: object: The specified group object ''' with salt.utils.winapi.Com(): nt = win32com.client.Dispatch('AdsNameSpaces') return nt.GetObj...
python
def _get_group_object(name): ''' A helper function to get a specified group object Args: name (str): The name of the object Returns: object: The specified group object ''' with salt.utils.winapi.Com(): nt = win32com.client.Dispatch('AdsNameSpaces') return nt.GetObj...
[ "def", "_get_group_object", "(", "name", ")", ":", "with", "salt", ".", "utils", ".", "winapi", ".", "Com", "(", ")", ":", "nt", "=", "win32com", ".", "client", ".", "Dispatch", "(", "'AdsNameSpaces'", ")", "return", "nt", ".", "GetObject", "(", "''", ...
A helper function to get a specified group object Args: name (str): The name of the object Returns: object: The specified group object
[ "A", "helper", "function", "to", "get", "a", "specified", "group", "object" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_groupadd.py#L54-L67
train
A helper function to get a specified group 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/modules/win_groupadd.py
_get_all_groups
def _get_all_groups(): ''' A helper function that gets a list of group objects for all groups on the machine Returns: iter: A list of objects for all groups on the machine ''' with salt.utils.winapi.Com(): nt = win32com.client.Dispatch('AdsNameSpaces') results = nt.GetObject...
python
def _get_all_groups(): ''' A helper function that gets a list of group objects for all groups on the machine Returns: iter: A list of objects for all groups on the machine ''' with salt.utils.winapi.Com(): nt = win32com.client.Dispatch('AdsNameSpaces') results = nt.GetObject...
[ "def", "_get_all_groups", "(", ")", ":", "with", "salt", ".", "utils", ".", "winapi", ".", "Com", "(", ")", ":", "nt", "=", "win32com", ".", "client", ".", "Dispatch", "(", "'AdsNameSpaces'", ")", "results", "=", "nt", ".", "GetObject", "(", "''", ",...
A helper function that gets a list of group objects for all groups on the machine Returns: iter: A list of objects for all groups on the machine
[ "A", "helper", "function", "that", "gets", "a", "list", "of", "group", "objects", "for", "all", "groups", "on", "the", "machine" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_groupadd.py#L70-L82
train
A helper function that gets a list of group objects for all groups on the
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_groupadd.py
add
def add(name, **kwargs): ''' Add the specified group Args: name (str): The name of the group to add Returns: bool: ``True`` if successful, otherwise ``False`` CLI Example: .. code-block:: bash salt '*' group.add foo ''' if not info(name): ...
python
def add(name, **kwargs): ''' Add the specified group Args: name (str): The name of the group to add Returns: bool: ``True`` if successful, otherwise ``False`` CLI Example: .. code-block:: bash salt '*' group.add foo ''' if not info(name): ...
[ "def", "add", "(", "name", ",", "*", "*", "kwargs", ")", ":", "if", "not", "info", "(", "name", ")", ":", "comp_obj", "=", "_get_computer_object", "(", ")", "try", ":", "new_group", "=", "comp_obj", ".", "Create", "(", "'group'", ",", "name", ")", ...
Add the specified group Args: name (str): The name of the group to add Returns: bool: ``True`` if successful, otherwise ``False`` CLI Example: .. code-block:: bash salt '*' group.add foo
[ "Add", "the", "specified", "group" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_groupadd.py#L96-L128
train
Add the specified group to the specified group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_groupadd.py
delete
def delete(name, **kwargs): ''' Remove the named group Args: name (str): The name of the group to remove Returns: bool: ``True`` if successful, otherwise ``False`` CLI Example: .. code-block:: bash salt '*' group.delete foo ''' if info(name): ...
python
def delete(name, **kwargs): ''' Remove the named group Args: name (str): The name of the group to remove Returns: bool: ``True`` if successful, otherwise ``False`` CLI Example: .. code-block:: bash salt '*' group.delete foo ''' if info(name): ...
[ "def", "delete", "(", "name", ",", "*", "*", "kwargs", ")", ":", "if", "info", "(", "name", ")", ":", "comp_obj", "=", "_get_computer_object", "(", ")", "try", ":", "comp_obj", ".", "Delete", "(", "'group'", ",", "name", ")", "log", ".", "info", "(...
Remove the named group Args: name (str): The name of the group to remove Returns: bool: ``True`` if successful, otherwise ``False`` CLI Example: .. code-block:: bash salt '*' group.delete foo
[ "Remove", "the", "named", "group" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_groupadd.py#L131-L163
train
Remove the named group from the database
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_groupadd.py
info
def info(name): ''' Return information about a group Args: name (str): The name of the group for which to get information Returns: dict: A dictionary of information about the group CLI Example: .. code-block:: bash salt '*' group.info foo ''' try...
python
def info(name): ''' Return information about a group Args: name (str): The name of the group for which to get information Returns: dict: A dictionary of information about the group CLI Example: .. code-block:: bash salt '*' group.info foo ''' try...
[ "def", "info", "(", "name", ")", ":", "try", ":", "groupObj", "=", "_get_group_object", "(", "name", ")", "gr_name", "=", "groupObj", ".", "Name", "gr_mem", "=", "[", "_get_username", "(", "x", ")", "for", "x", "in", "groupObj", ".", "members", "(", ...
Return information about a group Args: name (str): The name of the group for which to get information Returns: dict: A dictionary of information about the group CLI Example: .. code-block:: bash salt '*' group.info foo
[ "Return", "information", "about", "a", "group" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_groupadd.py#L166-L200
train
Return information about a group Taxonomy
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_groupadd.py
getent
def getent(refresh=False): ''' Return info on all groups Args: refresh (bool): Refresh the info for all groups in ``__context__``. If False only the groups in ``__context__`` will be returned. If True the ``__context__`` will be refreshed with current data and r...
python
def getent(refresh=False): ''' Return info on all groups Args: refresh (bool): Refresh the info for all groups in ``__context__``. If False only the groups in ``__context__`` will be returned. If True the ``__context__`` will be refreshed with current data and r...
[ "def", "getent", "(", "refresh", "=", "False", ")", ":", "if", "'group.getent'", "in", "__context__", "and", "not", "refresh", ":", "return", "__context__", "[", "'group.getent'", "]", "ret", "=", "[", "]", "results", "=", "_get_all_groups", "(", ")", "for...
Return info on all groups Args: refresh (bool): Refresh the info for all groups in ``__context__``. If False only the groups in ``__context__`` will be returned. If True the ``__context__`` will be refreshed with current data and returned. Default is False ...
[ "Return", "info", "on", "all", "groups" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_groupadd.py#L203-L238
train
Return info on all groups and their 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/modules/win_groupadd.py
adduser
def adduser(name, username, **kwargs): ''' Add a user to a group Args: name (str): The name of the group to modify username (str): The name of the user to add to the group Returns: bool: ``True`` if successful, otherwise ``False`` CLI Example: ...
python
def adduser(name, username, **kwargs): ''' Add a user to a group Args: name (str): The name of the group to modify username (str): The name of the user to add to the group Returns: bool: ``True`` if successful, otherwise ``False`` CLI Example: ...
[ "def", "adduser", "(", "name", ",", "username", ",", "*", "*", "kwargs", ")", ":", "try", ":", "group_obj", "=", "_get_group_object", "(", "name", ")", "except", "pywintypes", ".", "com_error", "as", "exc", ":", "msg", "=", "'Failed to access group {0}. {1}'...
Add a user to a group Args: name (str): The name of the group to modify username (str): The name of the user to add to the group Returns: bool: ``True`` if successful, otherwise ``False`` CLI Example: .. code-block:: bash salt '*' group.addu...
[ "Add", "a", "user", "to", "a", "group" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_groupadd.py#L241-L286
train
Adds a user to a group
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_groupadd.py
members
def members(name, members_list, **kwargs): ''' Ensure a group contains only the members in the list Args: name (str): The name of the group to modify members_list (str): A single user or a comma separated list of users. The group will contain only the u...
python
def members(name, members_list, **kwargs): ''' Ensure a group contains only the members in the list Args: name (str): The name of the group to modify members_list (str): A single user or a comma separated list of users. The group will contain only the u...
[ "def", "members", "(", "name", ",", "members_list", ",", "*", "*", "kwargs", ")", ":", "members_list", "=", "[", "salt", ".", "utils", ".", "win_functions", ".", "get_sam_name", "(", "m", ")", "for", "m", "in", "members_list", ".", "split", "(", "\",\"...
Ensure a group contains only the members in the list Args: name (str): The name of the group to modify members_list (str): A single user or a comma separated list of users. The group will contain only the users specified in this list. Returns: bool...
[ "Ensure", "a", "group", "contains", "only", "the", "members", "in", "the", "list" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_groupadd.py#L336-L405
train
Ensures a group contains only the members in the members_list.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_groupadd.py
list_groups
def list_groups(refresh=False): ''' Return a list of groups Args: refresh (bool): Refresh the info for all groups in ``__context__``. If False only the groups in ``__context__`` will be returned. If True, the ``__context__`` will be refreshed with current data a...
python
def list_groups(refresh=False): ''' Return a list of groups Args: refresh (bool): Refresh the info for all groups in ``__context__``. If False only the groups in ``__context__`` will be returned. If True, the ``__context__`` will be refreshed with current data a...
[ "def", "list_groups", "(", "refresh", "=", "False", ")", ":", "if", "'group.list_groups'", "in", "__context__", "and", "not", "refresh", ":", "return", "__context__", "[", "'group.list_groups'", "]", "results", "=", "_get_all_groups", "(", ")", "ret", "=", "["...
Return a list of groups Args: refresh (bool): Refresh the info for all groups in ``__context__``. If False only the groups in ``__context__`` will be returned. If True, the ``__context__`` will be refreshed with current data and returned. Default is False ...
[ "Return", "a", "list", "of", "groups" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_groupadd.py#L408-L441
train
Return a list of groups on the machine AttributeNames CLI Example : bash AttributeNames salt '*' group. list_groups
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/decorators/signature.py
identical_signature_wrapper
def identical_signature_wrapper(original_function, wrapped_function): ''' Return a function with identical signature as ``original_function``'s which will call the ``wrapped_function``. ''' context = {'__wrapped__': wrapped_function} function_def = compile( 'def {0}({1}):\n' ' ...
python
def identical_signature_wrapper(original_function, wrapped_function): ''' Return a function with identical signature as ``original_function``'s which will call the ``wrapped_function``. ''' context = {'__wrapped__': wrapped_function} function_def = compile( 'def {0}({1}):\n' ' ...
[ "def", "identical_signature_wrapper", "(", "original_function", ",", "wrapped_function", ")", ":", "context", "=", "{", "'__wrapped__'", ":", "wrapped_function", "}", "function_def", "=", "compile", "(", "'def {0}({1}):\\n'", "' return __wrapped__({2})'", ".", "format"...
Return a function with identical signature as ``original_function``'s which will call the ``wrapped_function``.
[ "Return", "a", "function", "with", "identical", "signature", "as", "original_function", "s", "which", "will", "call", "the", "wrapped_function", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/decorators/signature.py#L18-L43
train
Return a function with identical signature as original_function s which Formula will call the wrapped_function.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/openvswitch.py
_stdout_list_split
def _stdout_list_split(retcode, stdout='', splitstring='\n'): ''' Evaulates Open vSwitch command`s retcode value. Args: retcode: Value of retcode field from response, should be 0, 1 or 2. stdout: Value of stdout filed from response. splitstring: String used to split the stdout defau...
python
def _stdout_list_split(retcode, stdout='', splitstring='\n'): ''' Evaulates Open vSwitch command`s retcode value. Args: retcode: Value of retcode field from response, should be 0, 1 or 2. stdout: Value of stdout filed from response. splitstring: String used to split the stdout defau...
[ "def", "_stdout_list_split", "(", "retcode", ",", "stdout", "=", "''", ",", "splitstring", "=", "'\\n'", ")", ":", "if", "retcode", "==", "0", ":", "ret", "=", "stdout", ".", "split", "(", "splitstring", ")", "return", "ret", "else", ":", "return", "Fa...
Evaulates Open vSwitch command`s retcode value. Args: retcode: Value of retcode field from response, should be 0, 1 or 2. stdout: Value of stdout filed from response. splitstring: String used to split the stdout default new line. Returns: List or False.
[ "Evaulates", "Open", "vSwitch", "command", "s", "retcode", "value", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/openvswitch.py#L80-L96
train
Evaulates Open vSwitch command s retcode value from stdout filed from response.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/openvswitch.py
_convert_json
def _convert_json(obj): ''' Converts from the JSON output provided by ovs-vsctl into a usable Python object tree. In particular, sets and maps are converted from lists to actual sets or maps. Args: obj: Object that shall be recursively converted. Returns: Converted version of o...
python
def _convert_json(obj): ''' Converts from the JSON output provided by ovs-vsctl into a usable Python object tree. In particular, sets and maps are converted from lists to actual sets or maps. Args: obj: Object that shall be recursively converted. Returns: Converted version of o...
[ "def", "_convert_json", "(", "obj", ")", ":", "if", "isinstance", "(", "obj", ",", "dict", ")", ":", "return", "{", "_convert_json", "(", "key", ")", ":", "_convert_json", "(", "val", ")", "for", "(", "key", ",", "val", ")", "in", "six", ".", "iter...
Converts from the JSON output provided by ovs-vsctl into a usable Python object tree. In particular, sets and maps are converted from lists to actual sets or maps. Args: obj: Object that shall be recursively converted. Returns: Converted version of object.
[ "Converts", "from", "the", "JSON", "output", "provided", "by", "ovs", "-", "vsctl", "into", "a", "usable", "Python", "object", "tree", ".", "In", "particular", "sets", "and", "maps", "are", "converted", "from", "lists", "to", "actual", "sets", "or", "maps"...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/openvswitch.py#L99-L129
train
Converts from the JSON output provided by ovs - vsctl into a usable Python object tree.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/openvswitch.py
bridge_list
def bridge_list(): ''' Lists all existing real and fake bridges. Returns: List of bridges (or empty list), False on failure. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' openvswitch.bridge_list ''' cmd = 'ovs-vsctl list-br' result = __salt...
python
def bridge_list(): ''' Lists all existing real and fake bridges. Returns: List of bridges (or empty list), False on failure. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' openvswitch.bridge_list ''' cmd = 'ovs-vsctl list-br' result = __salt...
[ "def", "bridge_list", "(", ")", ":", "cmd", "=", "'ovs-vsctl list-br'", "result", "=", "__salt__", "[", "'cmd.run_all'", "]", "(", "cmd", ")", "retcode", "=", "result", "[", "'retcode'", "]", "stdout", "=", "result", "[", "'stdout'", "]", "return", "_stdou...
Lists all existing real and fake bridges. Returns: List of bridges (or empty list), False on failure. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' openvswitch.bridge_list
[ "Lists", "all", "existing", "real", "and", "fake", "bridges", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/openvswitch.py#L147-L165
train
Lists all existing real and fake bridges.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/openvswitch.py
bridge_exists
def bridge_exists(br): ''' Tests whether bridge exists as a real or fake bridge. Returns: True if Bridge exists, else False. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' openvswitch.bridge_exists br0 ''' cmd = 'ovs-vsctl br-exists {0}'.format...
python
def bridge_exists(br): ''' Tests whether bridge exists as a real or fake bridge. Returns: True if Bridge exists, else False. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' openvswitch.bridge_exists br0 ''' cmd = 'ovs-vsctl br-exists {0}'.format...
[ "def", "bridge_exists", "(", "br", ")", ":", "cmd", "=", "'ovs-vsctl br-exists {0}'", ".", "format", "(", "br", ")", "result", "=", "__salt__", "[", "'cmd.run_all'", "]", "(", "cmd", ")", "retcode", "=", "result", "[", "'retcode'", "]", "return", "_retcode...
Tests whether bridge exists as a real or fake bridge. Returns: True if Bridge exists, else False. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' openvswitch.bridge_exists br0
[ "Tests", "whether", "bridge", "exists", "as", "a", "real", "or", "fake", "bridge", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/openvswitch.py#L168-L185
train
Tests whether bridge exists as a real or fake bridge.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/openvswitch.py
bridge_create
def bridge_create(br, may_exist=True, parent=None, vlan=None): ''' Creates a new bridge. Args: br: A string - bridge name may_exist: Bool, if False - attempting to create a bridge that exists returns False. parent: String, the name of the parent bridge (if the bridge shall be ...
python
def bridge_create(br, may_exist=True, parent=None, vlan=None): ''' Creates a new bridge. Args: br: A string - bridge name may_exist: Bool, if False - attempting to create a bridge that exists returns False. parent: String, the name of the parent bridge (if the bridge shall be ...
[ "def", "bridge_create", "(", "br", ",", "may_exist", "=", "True", ",", "parent", "=", "None", ",", "vlan", "=", "None", ")", ":", "param_may_exist", "=", "_param_may_exist", "(", "may_exist", ")", "if", "parent", "is", "not", "None", "and", "vlan", "is",...
Creates a new bridge. Args: br: A string - bridge name may_exist: Bool, if False - attempting to create a bridge that exists returns False. parent: String, the name of the parent bridge (if the bridge shall be created as a fake bridge). If specified, vlan must also be ...
[ "Creates", "a", "new", "bridge", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/openvswitch.py#L188-L223
train
Creates a new bridge.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/openvswitch.py
bridge_delete
def bridge_delete(br, if_exists=True): ''' Deletes bridge and all of its ports. Args: br: A string - bridge name if_exists: Bool, if False - attempting to delete a bridge that does not exist returns False. Returns: True on success, else False. .. versionadded:: 2016.3.0 ...
python
def bridge_delete(br, if_exists=True): ''' Deletes bridge and all of its ports. Args: br: A string - bridge name if_exists: Bool, if False - attempting to delete a bridge that does not exist returns False. Returns: True on success, else False. .. versionadded:: 2016.3.0 ...
[ "def", "bridge_delete", "(", "br", ",", "if_exists", "=", "True", ")", ":", "param_if_exists", "=", "_param_if_exists", "(", "if_exists", ")", "cmd", "=", "'ovs-vsctl {1}del-br {0}'", ".", "format", "(", "br", ",", "param_if_exists", ")", "result", "=", "__sal...
Deletes bridge and all of its ports. Args: br: A string - bridge name if_exists: Bool, if False - attempting to delete a bridge that does not exist returns False. Returns: True on success, else False. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash ...
[ "Deletes", "bridge", "and", "all", "of", "its", "ports", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/openvswitch.py#L226-L248
train
Deletes a bridge and all of its ports.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/openvswitch.py
bridge_to_parent
def bridge_to_parent(br): ''' Returns the parent bridge of a bridge. Args: br: A string - bridge name Returns: Name of the parent bridge. This is the same as the bridge name if the bridge is not a fake bridge. If the bridge does not exist, False is returned. CLI Ex...
python
def bridge_to_parent(br): ''' Returns the parent bridge of a bridge. Args: br: A string - bridge name Returns: Name of the parent bridge. This is the same as the bridge name if the bridge is not a fake bridge. If the bridge does not exist, False is returned. CLI Ex...
[ "def", "bridge_to_parent", "(", "br", ")", ":", "cmd", "=", "'ovs-vsctl br-to-parent {0}'", ".", "format", "(", "br", ")", "result", "=", "__salt__", "[", "'cmd.run_all'", "]", "(", "cmd", ")", "if", "result", "[", "'retcode'", "]", "!=", "0", ":", "retu...
Returns the parent bridge of a bridge. Args: br: A string - bridge name Returns: Name of the parent bridge. This is the same as the bridge name if the bridge is not a fake bridge. If the bridge does not exist, False is returned. CLI Example: .. code-block:: bash ...
[ "Returns", "the", "parent", "bridge", "of", "a", "bridge", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/openvswitch.py#L251-L274
train
Returns the parent bridge of a bridge.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/openvswitch.py
bridge_to_vlan
def bridge_to_vlan(br): ''' Returns the VLAN ID of a bridge. Args: br: A string - bridge name Returns: VLAN ID of the bridge. The VLAN ID is 0 if the bridge is not a fake bridge. If the bridge does not exist, False is returned. CLI Example: .. code-block:: bash ...
python
def bridge_to_vlan(br): ''' Returns the VLAN ID of a bridge. Args: br: A string - bridge name Returns: VLAN ID of the bridge. The VLAN ID is 0 if the bridge is not a fake bridge. If the bridge does not exist, False is returned. CLI Example: .. code-block:: bash ...
[ "def", "bridge_to_vlan", "(", "br", ")", ":", "cmd", "=", "'ovs-vsctl br-to-vlan {0}'", ".", "format", "(", "br", ")", "result", "=", "__salt__", "[", "'cmd.run_all'", "]", "(", "cmd", ")", "if", "result", "[", "'retcode'", "]", "!=", "0", ":", "return",...
Returns the VLAN ID of a bridge. Args: br: A string - bridge name Returns: VLAN ID of the bridge. The VLAN ID is 0 if the bridge is not a fake bridge. If the bridge does not exist, False is returned. CLI Example: .. code-block:: bash salt '*' openvswitch.bridge_to_p...
[ "Returns", "the", "VLAN", "ID", "of", "a", "bridge", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/openvswitch.py#L277-L298
train
Returns the VLAN ID of a bridge.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/openvswitch.py
port_add
def port_add(br, port, may_exist=False, internal=False): ''' Creates on bridge a new port named port. Returns: True on success, else False. Args: br: A string - bridge name port: A string - port name may_exist: Bool, if False - attempting to create a port that exists re...
python
def port_add(br, port, may_exist=False, internal=False): ''' Creates on bridge a new port named port. Returns: True on success, else False. Args: br: A string - bridge name port: A string - port name may_exist: Bool, if False - attempting to create a port that exists re...
[ "def", "port_add", "(", "br", ",", "port", ",", "may_exist", "=", "False", ",", "internal", "=", "False", ")", ":", "param_may_exist", "=", "_param_may_exist", "(", "may_exist", ")", "cmd", "=", "'ovs-vsctl {2}add-port {0} {1}'", ".", "format", "(", "br", ",...
Creates on bridge a new port named port. Returns: True on success, else False. Args: br: A string - bridge name port: A string - port name may_exist: Bool, if False - attempting to create a port that exists returns False. internal: A boolean to create an internal interf...
[ "Creates", "on", "bridge", "a", "new", "port", "named", "port", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/openvswitch.py#L301-L327
train
Creates on bridge a new port named port.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/openvswitch.py
port_remove
def port_remove(br, port, if_exists=True): ''' Deletes port. Args: br: A string - bridge name (If bridge is None, port is removed from whatever bridge contains it) port: A string - port name. if_exists: Bool, if False - attempting to delete a por that does not exist returns Fals...
python
def port_remove(br, port, if_exists=True): ''' Deletes port. Args: br: A string - bridge name (If bridge is None, port is removed from whatever bridge contains it) port: A string - port name. if_exists: Bool, if False - attempting to delete a por that does not exist returns Fals...
[ "def", "port_remove", "(", "br", ",", "port", ",", "if_exists", "=", "True", ")", ":", "param_if_exists", "=", "_param_if_exists", "(", "if_exists", ")", "if", "port", "and", "not", "br", ":", "cmd", "=", "'ovs-vsctl {1}del-port {0}'", ".", "format", "(", ...
Deletes port. Args: br: A string - bridge name (If bridge is None, port is removed from whatever bridge contains it) port: A string - port name. if_exists: Bool, if False - attempting to delete a por that does not exist returns False. (Default True) Returns: True on success,...
[ "Deletes", "port", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/openvswitch.py#L330-L357
train
Deletes a port from the specified bridge.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/openvswitch.py
port_list
def port_list(br): ''' Lists all of the ports within bridge. Args: br: A string - bridge name. Returns: List of bridges (or empty list), False on failure. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' openvswitch.port_list br0 ''' ...
python
def port_list(br): ''' Lists all of the ports within bridge. Args: br: A string - bridge name. Returns: List of bridges (or empty list), False on failure. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' openvswitch.port_list br0 ''' ...
[ "def", "port_list", "(", "br", ")", ":", "cmd", "=", "'ovs-vsctl list-ports {0}'", ".", "format", "(", "br", ")", "result", "=", "__salt__", "[", "'cmd.run_all'", "]", "(", "cmd", ")", "retcode", "=", "result", "[", "'retcode'", "]", "stdout", "=", "resu...
Lists all of the ports within bridge. Args: br: A string - bridge name. Returns: List of bridges (or empty list), False on failure. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' openvswitch.port_list br0
[ "Lists", "all", "of", "the", "ports", "within", "bridge", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/openvswitch.py#L360-L381
train
Lists all of the ports within a bridge.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/openvswitch.py
port_get_tag
def port_get_tag(port): ''' Lists tags of the port. Args: port: A string - port name. Returns: List of tags (or empty list), False on failure. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' openvswitch.port_get_tag tap0 ''' cmd = 'o...
python
def port_get_tag(port): ''' Lists tags of the port. Args: port: A string - port name. Returns: List of tags (or empty list), False on failure. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' openvswitch.port_get_tag tap0 ''' cmd = 'o...
[ "def", "port_get_tag", "(", "port", ")", ":", "cmd", "=", "'ovs-vsctl get port {0} tag'", ".", "format", "(", "port", ")", "result", "=", "__salt__", "[", "'cmd.run_all'", "]", "(", "cmd", ")", "retcode", "=", "result", "[", "'retcode'", "]", "stdout", "="...
Lists tags of the port. Args: port: A string - port name. Returns: List of tags (or empty list), False on failure. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' openvswitch.port_get_tag tap0
[ "Lists", "tags", "of", "the", "port", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/openvswitch.py#L384-L405
train
Returns a list of tags of the port.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/openvswitch.py
port_create_vlan
def port_create_vlan(br, port, id, internal=False): ''' Isolate VM traffic using VLANs. Args: br: A string - bridge name. port: A string - port name. id: An integer in the valid range 0 to 4095 (inclusive), name of VLAN. internal: A boolean to create an internal interface if...
python
def port_create_vlan(br, port, id, internal=False): ''' Isolate VM traffic using VLANs. Args: br: A string - bridge name. port: A string - port name. id: An integer in the valid range 0 to 4095 (inclusive), name of VLAN. internal: A boolean to create an internal interface if...
[ "def", "port_create_vlan", "(", "br", ",", "port", ",", "id", ",", "internal", "=", "False", ")", ":", "interfaces", "=", "__salt__", "[", "'network.interfaces'", "]", "(", ")", "if", "not", "0", "<=", "id", "<=", "4095", ":", "return", "False", "elif"...
Isolate VM traffic using VLANs. Args: br: A string - bridge name. port: A string - port name. id: An integer in the valid range 0 to 4095 (inclusive), name of VLAN. internal: A boolean to create an internal interface if one does not exist. Returns: True on success, else...
[ "Isolate", "VM", "traffic", "using", "VLANs", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/openvswitch.py#L456-L494
train
Creates a VLAN on a bridge.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/openvswitch.py
port_create_gre
def port_create_gre(br, port, id, remote): ''' Generic Routing Encapsulation - creates GRE tunnel between endpoints. Args: br: A string - bridge name. port: A string - port name. id: An integer - unsigned 32-bit number, tunnel's key. remote: A string - remote endpoint's IP a...
python
def port_create_gre(br, port, id, remote): ''' Generic Routing Encapsulation - creates GRE tunnel between endpoints. Args: br: A string - bridge name. port: A string - port name. id: An integer - unsigned 32-bit number, tunnel's key. remote: A string - remote endpoint's IP a...
[ "def", "port_create_gre", "(", "br", ",", "port", ",", "id", ",", "remote", ")", ":", "if", "not", "0", "<=", "id", "<", "2", "**", "32", ":", "return", "False", "elif", "not", "__salt__", "[", "'dig.check_ip'", "]", "(", "remote", ")", ":", "retur...
Generic Routing Encapsulation - creates GRE tunnel between endpoints. Args: br: A string - bridge name. port: A string - port name. id: An integer - unsigned 32-bit number, tunnel's key. remote: A string - remote endpoint's IP address. Returns: True on success, else Fal...
[ "Generic", "Routing", "Encapsulation", "-", "creates", "GRE", "tunnel", "between", "endpoints", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/openvswitch.py#L497-L531
train
Create GRE tunnel between endpoints.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/openvswitch.py
port_create_vxlan
def port_create_vxlan(br, port, id, remote, dst_port=None): ''' Virtual eXtensible Local Area Network - creates VXLAN tunnel between endpoints. Args: br: A string - bridge name. port: A string - port name. id: An integer - unsigned 64-bit number, tunnel's key. remote: A stri...
python
def port_create_vxlan(br, port, id, remote, dst_port=None): ''' Virtual eXtensible Local Area Network - creates VXLAN tunnel between endpoints. Args: br: A string - bridge name. port: A string - port name. id: An integer - unsigned 64-bit number, tunnel's key. remote: A stri...
[ "def", "port_create_vxlan", "(", "br", ",", "port", ",", "id", ",", "remote", ",", "dst_port", "=", "None", ")", ":", "dst_port", "=", "' options:dst_port='", "+", "six", ".", "text_type", "(", "dst_port", ")", "if", "0", "<", "dst_port", "<=", "65535", ...
Virtual eXtensible Local Area Network - creates VXLAN tunnel between endpoints. Args: br: A string - bridge name. port: A string - port name. id: An integer - unsigned 64-bit number, tunnel's key. remote: A string - remote endpoint's IP address. dst_port: An integer - port t...
[ "Virtual", "eXtensible", "Local", "Area", "Network", "-", "creates", "VXLAN", "tunnel", "between", "endpoints", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/openvswitch.py#L534-L571
train
Create VXLAN tunnel between endpoints.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/openvswitch.py
db_get
def db_get(table, record, column, if_exists=False): ''' Gets a column's value for a specific record. Args: table: A string - name of the database table. record: A string - identifier of the record. column: A string - name of the column. if_exists: A boolean - if True, it is ...
python
def db_get(table, record, column, if_exists=False): ''' Gets a column's value for a specific record. Args: table: A string - name of the database table. record: A string - identifier of the record. column: A string - name of the column. if_exists: A boolean - if True, it is ...
[ "def", "db_get", "(", "table", ",", "record", ",", "column", ",", "if_exists", "=", "False", ")", ":", "cmd", "=", "[", "'ovs-vsctl'", ",", "'--format=json'", ",", "'--columns={0}'", ".", "format", "(", "column", ")", "]", "if", "if_exists", ":", "cmd", ...
Gets a column's value for a specific record. Args: table: A string - name of the database table. record: A string - identifier of the record. column: A string - name of the column. if_exists: A boolean - if True, it is not an error if the record does not exist. Retu...
[ "Gets", "a", "column", "s", "value", "for", "a", "specific", "record", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/openvswitch.py#L574-L604
train
Gets a column s value for a specific record.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/openvswitch.py
db_set
def db_set(table, record, column, value, if_exists=False): ''' Sets a column's value for a specific record. Args: table: A string - name of the database table. record: A string - identifier of the record. column: A string - name of the column. value: A string - the value to ...
python
def db_set(table, record, column, value, if_exists=False): ''' Sets a column's value for a specific record. Args: table: A string - name of the database table. record: A string - identifier of the record. column: A string - name of the column. value: A string - the value to ...
[ "def", "db_set", "(", "table", ",", "record", ",", "column", ",", "value", ",", "if_exists", "=", "False", ")", ":", "cmd", "=", "[", "'ovs-vsctl'", "]", "if", "if_exists", ":", "cmd", "+=", "[", "'--if-exists'", "]", "cmd", "+=", "[", "'set'", ",", ...
Sets a column's value for a specific record. Args: table: A string - name of the database table. record: A string - identifier of the record. column: A string - name of the column. value: A string - the value to be set if_exists: A boolean - if True, it is not an error if th...
[ "Sets", "a", "column", "s", "value", "for", "a", "specific", "record", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/openvswitch.py#L607-L635
train
Sets a column s value for a specific record.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/azurearm_network.py
virtual_network_present
def virtual_network_present(name, address_prefixes, resource_group, dns_servers=None, tags=None, connection_auth=None, **kwargs): ''' .. versionadded:: 2019.2.0 Ensure a virtual network exists. :param name: Name of the virtual network. :param resource_group: ...
python
def virtual_network_present(name, address_prefixes, resource_group, dns_servers=None, tags=None, connection_auth=None, **kwargs): ''' .. versionadded:: 2019.2.0 Ensure a virtual network exists. :param name: Name of the virtual network. :param resource_group: ...
[ "def", "virtual_network_present", "(", "name", ",", "address_prefixes", ",", "resource_group", ",", "dns_servers", "=", "None", ",", "tags", "=", "None", ",", "connection_auth", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":"...
.. versionadded:: 2019.2.0 Ensure a virtual network exists. :param name: Name of the virtual network. :param resource_group: The resource group assigned to the virtual network. :param address_prefixes: A list of CIDR blocks which can be used by subnets within the virtual netw...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/azurearm_network.py#L112-L258
train
Ensures that a virtual network with the given name and address_prefixes and resource group are 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/azurearm_network.py
virtual_network_absent
def virtual_network_absent(name, resource_group, connection_auth=None): ''' .. versionadded:: 2019.2.0 Ensure a virtual network does not exist in the resource group. :param name: Name of the virtual network. :param resource_group: The resource group assigned to the virtual network...
python
def virtual_network_absent(name, resource_group, connection_auth=None): ''' .. versionadded:: 2019.2.0 Ensure a virtual network does not exist in the resource group. :param name: Name of the virtual network. :param resource_group: The resource group assigned to the virtual network...
[ "def", "virtual_network_absent", "(", "name", ",", "resource_group", ",", "connection_auth", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", ",", "'changes'", ":", "{", "}", "}", ...
.. versionadded:: 2019.2.0 Ensure a virtual network does not exist in the resource group. :param name: Name of the virtual network. :param resource_group: The resource group assigned to the virtual network. :param connection_auth: A dict with subscription and authentication p...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/azurearm_network.py#L261-L321
train
Ensure a virtual network is absent in the resource group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/azurearm_network.py
subnet_present
def subnet_present(name, address_prefix, virtual_network, resource_group, security_group=None, route_table=None, connection_auth=None, **kwargs): ''' .. versionadded:: 2019.2.0 Ensure a subnet exists. :param name: Name of the subnet. :param address_prefix: A CID...
python
def subnet_present(name, address_prefix, virtual_network, resource_group, security_group=None, route_table=None, connection_auth=None, **kwargs): ''' .. versionadded:: 2019.2.0 Ensure a subnet exists. :param name: Name of the subnet. :param address_prefix: A CID...
[ "def", "subnet_present", "(", "name", ",", "address_prefix", ",", "virtual_network", ",", "resource_group", ",", "security_group", "=", "None", ",", "route_table", "=", "None", ",", "connection_auth", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=...
.. versionadded:: 2019.2.0 Ensure a subnet exists. :param name: Name of the subnet. :param address_prefix: A CIDR block used by the subnet within the virtual network. :param virtual_network: Name of the existing virtual network to contain the subnet. :param resource_grou...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/azurearm_network.py#L324-L463
train
Ensures a subnet exists in the virtual network.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/azurearm_network.py
subnet_absent
def subnet_absent(name, virtual_network, resource_group, connection_auth=None): ''' .. versionadded:: 2019.2.0 Ensure a virtual network does not exist in the virtual network. :param name: Name of the subnet. :param virtual_network: Name of the existing virtual network containing t...
python
def subnet_absent(name, virtual_network, resource_group, connection_auth=None): ''' .. versionadded:: 2019.2.0 Ensure a virtual network does not exist in the virtual network. :param name: Name of the subnet. :param virtual_network: Name of the existing virtual network containing t...
[ "def", "subnet_absent", "(", "name", ",", "virtual_network", ",", "resource_group", ",", "connection_auth", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", ",", "'changes'", ":", ...
.. versionadded:: 2019.2.0 Ensure a virtual network does not exist in the virtual network. :param name: Name of the subnet. :param virtual_network: Name of the existing virtual network containing the subnet. :param resource_group: The resource group assigned to the virtual ne...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/azurearm_network.py#L466-L530
train
Ensure a subnet is absent in the virtual network.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/azurearm_network.py
network_security_group_present
def network_security_group_present(name, resource_group, tags=None, security_rules=None, connection_auth=None, **kwargs): ''' .. versionadded:: 2019.2.0 Ensure a network security group exists. :param name: Name of the network security group. :param resou...
python
def network_security_group_present(name, resource_group, tags=None, security_rules=None, connection_auth=None, **kwargs): ''' .. versionadded:: 2019.2.0 Ensure a network security group exists. :param name: Name of the network security group. :param resou...
[ "def", "network_security_group_present", "(", "name", ",", "resource_group", ",", "tags", "=", "None", ",", "security_rules", "=", "None", ",", "connection_auth", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", ...
.. versionadded:: 2019.2.0 Ensure a network security group exists. :param name: Name of the network security group. :param resource_group: The resource group assigned to the network security group. :param tags: A dictionary of strings can be passed as tag metadata to the netw...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/azurearm_network.py#L533-L671
train
Ensures a network security group exists.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/azurearm_network.py
network_security_group_absent
def network_security_group_absent(name, resource_group, connection_auth=None): ''' .. versionadded:: 2019.2.0 Ensure a network security group does not exist in the resource group. :param name: Name of the network security group. :param resource_group: The resource group assigned t...
python
def network_security_group_absent(name, resource_group, connection_auth=None): ''' .. versionadded:: 2019.2.0 Ensure a network security group does not exist in the resource group. :param name: Name of the network security group. :param resource_group: The resource group assigned t...
[ "def", "network_security_group_absent", "(", "name", ",", "resource_group", ",", "connection_auth", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", ",", "'changes'", ":", "{", "}", ...
.. versionadded:: 2019.2.0 Ensure a network security group does not exist in the resource group. :param name: Name of the network security group. :param resource_group: The resource group assigned to the network security group. :param connection_auth: A dict with subscription...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/azurearm_network.py#L674-L734
train
Ensure a network security group is absent in the resource group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/azurearm_network.py
security_rule_present
def security_rule_present(name, access, direction, priority, protocol, security_group, resource_group, destination_address_prefix=None, destination_port_range=None, source_address_prefix=None, source_port_range=None, description=None, destination_address_prefixes=None...
python
def security_rule_present(name, access, direction, priority, protocol, security_group, resource_group, destination_address_prefix=None, destination_port_range=None, source_address_prefix=None, source_port_range=None, description=None, destination_address_prefixes=None...
[ "def", "security_rule_present", "(", "name", ",", "access", ",", "direction", ",", "priority", ",", "protocol", ",", "security_group", ",", "resource_group", ",", "destination_address_prefix", "=", "None", ",", "destination_port_range", "=", "None", ",", "source_add...
.. versionadded:: 2019.2.0 Ensure a security rule exists. :param name: Name of the security rule. :param access: 'allow' or 'deny' :param direction: 'inbound' or 'outbound' :param priority: Integer between 100 and 4096 used for ordering rule application. :pa...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/azurearm_network.py#L737-L1052
train
Ensures a security rule exists in the network.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/azurearm_network.py
security_rule_absent
def security_rule_absent(name, security_group, resource_group, connection_auth=None): ''' .. versionadded:: 2019.2.0 Ensure a security rule does not exist in the network security group. :param name: Name of the security rule. :param security_group: The network security group conta...
python
def security_rule_absent(name, security_group, resource_group, connection_auth=None): ''' .. versionadded:: 2019.2.0 Ensure a security rule does not exist in the network security group. :param name: Name of the security rule. :param security_group: The network security group conta...
[ "def", "security_rule_absent", "(", "name", ",", "security_group", ",", "resource_group", ",", "connection_auth", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", ",", "'changes'", "...
.. versionadded:: 2019.2.0 Ensure a security rule does not exist in the network security group. :param name: Name of the security rule. :param security_group: The network security group containing the security rule. :param resource_group: The resource group assigned to the ne...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/azurearm_network.py#L1055-L1119
train
Ensure a security rule is absent in the network security group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/azurearm_network.py
load_balancer_present
def load_balancer_present(name, resource_group, sku=None, frontend_ip_configurations=None, backend_address_pools=None, load_balancing_rules=None, probes=None, inbound_nat_rules=None, inbound_nat_pools=None, outbound_nat_rules=None, tags=None, connection_auth=None, **k...
python
def load_balancer_present(name, resource_group, sku=None, frontend_ip_configurations=None, backend_address_pools=None, load_balancing_rules=None, probes=None, inbound_nat_rules=None, inbound_nat_pools=None, outbound_nat_rules=None, tags=None, connection_auth=None, **k...
[ "def", "load_balancer_present", "(", "name", ",", "resource_group", ",", "sku", "=", "None", ",", "frontend_ip_configurations", "=", "None", ",", "backend_address_pools", "=", "None", ",", "load_balancing_rules", "=", "None", ",", "probes", "=", "None", ",", "in...
.. versionadded:: 2019.2.0 Ensure a load balancer exists. :param name: Name of the load balancer. :param resource_group: The resource group assigned to the load balancer. :param sku: The load balancer SKU, which can be 'Basic' or 'Standard'. :param tags: A dictio...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/azurearm_network.py#L1122-L1478
train
Ensures that a load balancer exists and is up - to - date.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/azurearm_network.py
load_balancer_absent
def load_balancer_absent(name, resource_group, connection_auth=None): ''' .. versionadded:: 2019.2.0 Ensure a load balancer does not exist in the resource group. :param name: Name of the load balancer. :param resource_group: The resource group assigned to the load balancer. :...
python
def load_balancer_absent(name, resource_group, connection_auth=None): ''' .. versionadded:: 2019.2.0 Ensure a load balancer does not exist in the resource group. :param name: Name of the load balancer. :param resource_group: The resource group assigned to the load balancer. :...
[ "def", "load_balancer_absent", "(", "name", ",", "resource_group", ",", "connection_auth", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", ",", "'changes'", ":", "{", "}", "}", ...
.. versionadded:: 2019.2.0 Ensure a load balancer does not exist in the resource group. :param name: Name of the load balancer. :param resource_group: The resource group assigned to the load balancer. :param connection_auth: A dict with subscription and authentication paramet...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/azurearm_network.py#L1481-L1541
train
Ensure a load balancer with the given name is absent in the given resource group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/azurearm_network.py
public_ip_address_present
def public_ip_address_present(name, resource_group, tags=None, sku=None, public_ip_allocation_method=None, public_ip_address_version=None, dns_settings=None, idle_timeout_in_minutes=None, connection_auth=None, **kwargs): ''' .. versionadded:: 2019.2.0 ...
python
def public_ip_address_present(name, resource_group, tags=None, sku=None, public_ip_allocation_method=None, public_ip_address_version=None, dns_settings=None, idle_timeout_in_minutes=None, connection_auth=None, **kwargs): ''' .. versionadded:: 2019.2.0 ...
[ "def", "public_ip_address_present", "(", "name", ",", "resource_group", ",", "tags", "=", "None", ",", "sku", "=", "None", ",", "public_ip_allocation_method", "=", "None", ",", "public_ip_address_version", "=", "None", ",", "dns_settings", "=", "None", ",", "idl...
.. versionadded:: 2019.2.0 Ensure a public IP address exists. :param name: Name of the public IP address. :param resource_group: The resource group assigned to the public IP address. :param dns_settings: An optional dictionary representing a valid PublicIPAddressDnsSettings o...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/azurearm_network.py#L1544-L1727
train
Ensures that a public IP address exists in the resource group with the given name resource group and tags are passed as tag metadata.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/azurearm_network.py
public_ip_address_absent
def public_ip_address_absent(name, resource_group, connection_auth=None): ''' .. versionadded:: 2019.2.0 Ensure a public IP address does not exist in the resource group. :param name: Name of the public IP address. :param resource_group: The resource group assigned to the public IP...
python
def public_ip_address_absent(name, resource_group, connection_auth=None): ''' .. versionadded:: 2019.2.0 Ensure a public IP address does not exist in the resource group. :param name: Name of the public IP address. :param resource_group: The resource group assigned to the public IP...
[ "def", "public_ip_address_absent", "(", "name", ",", "resource_group", ",", "connection_auth", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", ",", "'changes'", ":", "{", "}", "}"...
.. versionadded:: 2019.2.0 Ensure a public IP address does not exist in the resource group. :param name: Name of the public IP address. :param resource_group: The resource group assigned to the public IP address. :param connection_auth: A dict with subscription and authentica...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/azurearm_network.py#L1730-L1790
train
Ensures that the public IP address is absent in the resource group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/azurearm_network.py
network_interface_present
def network_interface_present(name, ip_configurations, subnet, virtual_network, resource_group, tags=None, virtual_machine=None, network_security_group=None, dns_settings=None, mac_address=None, primary=None, enable_accelerated_networking=None, enable_ip_forwa...
python
def network_interface_present(name, ip_configurations, subnet, virtual_network, resource_group, tags=None, virtual_machine=None, network_security_group=None, dns_settings=None, mac_address=None, primary=None, enable_accelerated_networking=None, enable_ip_forwa...
[ "def", "network_interface_present", "(", "name", ",", "ip_configurations", ",", "subnet", ",", "virtual_network", ",", "resource_group", ",", "tags", "=", "None", ",", "virtual_machine", "=", "None", ",", "network_security_group", "=", "None", ",", "dns_settings", ...
.. versionadded:: 2019.2.0 Ensure a network interface exists. :param name: Name of the network interface. :param ip_configurations: A list of dictionaries representing valid NetworkInterfaceIPConfiguration objects. The 'name' key is required at minimum. At least one IP Configurati...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/azurearm_network.py#L1793-L2047
train
Ensures that a network interface with the given parameters 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/azurearm_network.py
network_interface_absent
def network_interface_absent(name, resource_group, connection_auth=None): ''' .. versionadded:: 2019.2.0 Ensure a network interface does not exist in the resource group. :param name: Name of the network interface. :param resource_group: The resource group assigned to the network i...
python
def network_interface_absent(name, resource_group, connection_auth=None): ''' .. versionadded:: 2019.2.0 Ensure a network interface does not exist in the resource group. :param name: Name of the network interface. :param resource_group: The resource group assigned to the network i...
[ "def", "network_interface_absent", "(", "name", ",", "resource_group", ",", "connection_auth", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", ",", "'changes'", ":", "{", "}", "}"...
.. versionadded:: 2019.2.0 Ensure a network interface does not exist in the resource group. :param name: Name of the network interface. :param resource_group: The resource group assigned to the network interface. :param connection_auth: A dict with subscription and authentica...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/azurearm_network.py#L2050-L2110
train
Ensure a network interface does not exist in the resource group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/azurearm_network.py
route_table_present
def route_table_present(name, resource_group, tags=None, routes=None, disable_bgp_route_propagation=None, connection_auth=None, **kwargs): ''' .. versionadded:: 2019.2.0 Ensure a route table exists. :param name: Name of the route table. :param resource_group: ...
python
def route_table_present(name, resource_group, tags=None, routes=None, disable_bgp_route_propagation=None, connection_auth=None, **kwargs): ''' .. versionadded:: 2019.2.0 Ensure a route table exists. :param name: Name of the route table. :param resource_group: ...
[ "def", "route_table_present", "(", "name", ",", "resource_group", ",", "tags", "=", "None", ",", "routes", "=", "None", ",", "disable_bgp_route_propagation", "=", "None", ",", "connection_auth", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "...
.. versionadded:: 2019.2.0 Ensure a route table exists. :param name: Name of the route table. :param resource_group: The resource group assigned to the route table. :param routes: An optional list of dictionaries representing valid Route objects contained within a route table...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/azurearm_network.py#L2113-L2251
train
Ensures that a route table with the given name and resource group exists.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/azurearm_network.py
route_table_absent
def route_table_absent(name, resource_group, connection_auth=None): ''' .. versionadded:: 2019.2.0 Ensure a route table does not exist in the resource group. :param name: Name of the route table. :param resource_group: The resource group assigned to the route table. :param co...
python
def route_table_absent(name, resource_group, connection_auth=None): ''' .. versionadded:: 2019.2.0 Ensure a route table does not exist in the resource group. :param name: Name of the route table. :param resource_group: The resource group assigned to the route table. :param co...
[ "def", "route_table_absent", "(", "name", ",", "resource_group", ",", "connection_auth", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", ",", "'changes'", ":", "{", "}", "}", "i...
.. versionadded:: 2019.2.0 Ensure a route table does not exist in the resource group. :param name: Name of the route table. :param resource_group: The resource group assigned to the route table. :param connection_auth: A dict with subscription and authentication parameters to...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/azurearm_network.py#L2254-L2314
train
Ensure a route table is absent in the resource group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/azurearm_network.py
route_present
def route_present(name, address_prefix, next_hop_type, route_table, resource_group, next_hop_ip_address=None, connection_auth=None, **kwargs): ''' .. versionadded:: 2019.2.0 Ensure a route exists within a route table. :param name: Name of the route. :param address_prefix...
python
def route_present(name, address_prefix, next_hop_type, route_table, resource_group, next_hop_ip_address=None, connection_auth=None, **kwargs): ''' .. versionadded:: 2019.2.0 Ensure a route exists within a route table. :param name: Name of the route. :param address_prefix...
[ "def", "route_present", "(", "name", ",", "address_prefix", ",", "next_hop_type", ",", "route_table", ",", "resource_group", ",", "next_hop_ip_address", "=", "None", ",", "connection_auth", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'n...
.. versionadded:: 2019.2.0 Ensure a route exists within a route table. :param name: Name of the route. :param address_prefix: The destination CIDR to which the route applies. :param next_hop_type: The type of Azure hop the packet should be sent to. Possible values are: 'Virtu...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/azurearm_network.py#L2317-L2447
train
Ensure a route exists within a route table.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/azurearm_network.py
route_absent
def route_absent(name, route_table, resource_group, connection_auth=None): ''' .. versionadded:: 2019.2.0 Ensure a route table does not exist in the resource group. :param name: Name of the route table. :param route_table: The name of the existing route table containing the route....
python
def route_absent(name, route_table, resource_group, connection_auth=None): ''' .. versionadded:: 2019.2.0 Ensure a route table does not exist in the resource group. :param name: Name of the route table. :param route_table: The name of the existing route table containing the route....
[ "def", "route_absent", "(", "name", ",", "route_table", ",", "resource_group", ",", "connection_auth", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", ",", "'changes'", ":", "{", ...
.. versionadded:: 2019.2.0 Ensure a route table does not exist in the resource group. :param name: Name of the route table. :param route_table: The name of the existing route table containing the route. :param resource_group: The resource group assigned to the route table. ...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/azurearm_network.py#L2450-L2514
train
Ensure a route table is absent in the resource group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/jid.py
is_jid
def is_jid(jid): ''' Returns True if the passed in value is a job id ''' if not isinstance(jid, six.string_types): return False if len(jid) != 20 and (len(jid) <= 21 or jid[20] != '_'): return False try: int(jid[:20]) return True except ValueError: ret...
python
def is_jid(jid): ''' Returns True if the passed in value is a job id ''' if not isinstance(jid, six.string_types): return False if len(jid) != 20 and (len(jid) <= 21 or jid[20] != '_'): return False try: int(jid[:20]) return True except ValueError: ret...
[ "def", "is_jid", "(", "jid", ")", ":", "if", "not", "isinstance", "(", "jid", ",", "six", ".", "string_types", ")", ":", "return", "False", "if", "len", "(", "jid", ")", "!=", "20", "and", "(", "len", "(", "jid", ")", "<=", "21", "or", "jid", "...
Returns True if the passed in value is a job id
[ "Returns", "True", "if", "the", "passed", "in", "value", "is", "a", "job", "id" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/jid.py#L42-L54
train
Returns True if the passed in value is a job id Returns False otherwise
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/jid.py
jid_to_time
def jid_to_time(jid): ''' Convert a salt job id into the time when the job was invoked ''' jid = six.text_type(jid) if len(jid) != 20 and (len(jid) <= 21 or jid[20] != '_'): return '' year = jid[:4] month = jid[4:6] day = jid[6:8] hour = jid[8:10] minute = jid[10:12] ...
python
def jid_to_time(jid): ''' Convert a salt job id into the time when the job was invoked ''' jid = six.text_type(jid) if len(jid) != 20 and (len(jid) <= 21 or jid[20] != '_'): return '' year = jid[:4] month = jid[4:6] day = jid[6:8] hour = jid[8:10] minute = jid[10:12] ...
[ "def", "jid_to_time", "(", "jid", ")", ":", "jid", "=", "six", ".", "text_type", "(", "jid", ")", "if", "len", "(", "jid", ")", "!=", "20", "and", "(", "len", "(", "jid", ")", "<=", "21", "or", "jid", "[", "20", "]", "!=", "'_'", ")", ":", ...
Convert a salt job id into the time when the job was invoked
[ "Convert", "a", "salt", "job", "id", "into", "the", "time", "when", "the", "job", "was", "invoked" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/jid.py#L57-L79
train
Convert a salt job id into a time when the job was invoked
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/jid.py
format_job_instance
def format_job_instance(job): ''' Format the job instance correctly ''' ret = {'Function': job.get('fun', 'unknown-function'), 'Arguments': list(job.get('arg', [])), # unlikely but safeguard from invalid returns 'Target': job.get('tgt', 'unknown-target'), 'Tar...
python
def format_job_instance(job): ''' Format the job instance correctly ''' ret = {'Function': job.get('fun', 'unknown-function'), 'Arguments': list(job.get('arg', [])), # unlikely but safeguard from invalid returns 'Target': job.get('tgt', 'unknown-target'), 'Tar...
[ "def", "format_job_instance", "(", "job", ")", ":", "ret", "=", "{", "'Function'", ":", "job", ".", "get", "(", "'fun'", ",", "'unknown-function'", ")", ",", "'Arguments'", ":", "list", "(", "job", ".", "get", "(", "'arg'", ",", "[", "]", ")", ")", ...
Format the job instance correctly
[ "Format", "the", "job", "instance", "correctly" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/jid.py#L82-L99
train
Format the job instance correctly
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/jid.py
format_jid_instance
def format_jid_instance(jid, job): ''' Format the jid correctly ''' ret = format_job_instance(job) ret.update({'StartTime': jid_to_time(jid)}) return ret
python
def format_jid_instance(jid, job): ''' Format the jid correctly ''' ret = format_job_instance(job) ret.update({'StartTime': jid_to_time(jid)}) return ret
[ "def", "format_jid_instance", "(", "jid", ",", "job", ")", ":", "ret", "=", "format_job_instance", "(", "job", ")", "ret", ".", "update", "(", "{", "'StartTime'", ":", "jid_to_time", "(", "jid", ")", "}", ")", "return", "ret" ]
Format the jid correctly
[ "Format", "the", "jid", "correctly" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/jid.py#L102-L108
train
Format the jid correctly
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/jid.py
format_jid_instance_ext
def format_jid_instance_ext(jid, job): ''' Format the jid correctly with jid included ''' ret = format_job_instance(job) ret.update({ 'JID': jid, 'StartTime': jid_to_time(jid)}) return ret
python
def format_jid_instance_ext(jid, job): ''' Format the jid correctly with jid included ''' ret = format_job_instance(job) ret.update({ 'JID': jid, 'StartTime': jid_to_time(jid)}) return ret
[ "def", "format_jid_instance_ext", "(", "jid", ",", "job", ")", ":", "ret", "=", "format_job_instance", "(", "job", ")", "ret", ".", "update", "(", "{", "'JID'", ":", "jid", ",", "'StartTime'", ":", "jid_to_time", "(", "jid", ")", "}", ")", "return", "r...
Format the jid correctly with jid included
[ "Format", "the", "jid", "correctly", "with", "jid", "included" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/jid.py#L111-L119
train
Format the jid correctly with jid included
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/jid.py
jid_dir
def jid_dir(jid, job_dir=None, hash_type='sha256'): ''' Return the jid_dir for the given job id ''' if not isinstance(jid, six.string_types): jid = six.text_type(jid) jhash = getattr(hashlib, hash_type)( salt.utils.stringutils.to_bytes(jid)).hexdigest() parts = [] if job_dir...
python
def jid_dir(jid, job_dir=None, hash_type='sha256'): ''' Return the jid_dir for the given job id ''' if not isinstance(jid, six.string_types): jid = six.text_type(jid) jhash = getattr(hashlib, hash_type)( salt.utils.stringutils.to_bytes(jid)).hexdigest() parts = [] if job_dir...
[ "def", "jid_dir", "(", "jid", ",", "job_dir", "=", "None", ",", "hash_type", "=", "'sha256'", ")", ":", "if", "not", "isinstance", "(", "jid", ",", "six", ".", "string_types", ")", ":", "jid", "=", "six", ".", "text_type", "(", "jid", ")", "jhash", ...
Return the jid_dir for the given job id
[ "Return", "the", "jid_dir", "for", "the", "given", "job", "id" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/jid.py#L122-L135
train
Return the jid_dir for the given job id
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/system.py
init
def init(runlevel): ''' Change the system runlevel on sysV compatible systems CLI Example: .. code-block:: bash salt '*' system.init 3 ''' cmd = ['init', '{0}'.format(runlevel)] ret = __salt__['cmd.run'](cmd, python_shell=False) return ret
python
def init(runlevel): ''' Change the system runlevel on sysV compatible systems CLI Example: .. code-block:: bash salt '*' system.init 3 ''' cmd = ['init', '{0}'.format(runlevel)] ret = __salt__['cmd.run'](cmd, python_shell=False) return ret
[ "def", "init", "(", "runlevel", ")", ":", "cmd", "=", "[", "'init'", ",", "'{0}'", ".", "format", "(", "runlevel", ")", "]", "ret", "=", "__salt__", "[", "'cmd.run'", "]", "(", "cmd", ",", "python_shell", "=", "False", ")", "return", "ret" ]
Change the system runlevel on sysV compatible systems CLI Example: .. code-block:: bash salt '*' system.init 3
[ "Change", "the", "system", "runlevel", "on", "sysV", "compatible", "systems" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/system.py#L64-L76
train
Initialize the system
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/system.py
reboot
def reboot(at_time=None): ''' Reboot the system at_time The wait time in minutes before the system will be rebooted. CLI Example: .. code-block:: bash salt '*' system.reboot ''' cmd = ['shutdown', '-r', ('{0}'.format(at_time) if at_time else 'now')] ret = __salt__['cm...
python
def reboot(at_time=None): ''' Reboot the system at_time The wait time in minutes before the system will be rebooted. CLI Example: .. code-block:: bash salt '*' system.reboot ''' cmd = ['shutdown', '-r', ('{0}'.format(at_time) if at_time else 'now')] ret = __salt__['cm...
[ "def", "reboot", "(", "at_time", "=", "None", ")", ":", "cmd", "=", "[", "'shutdown'", ",", "'-r'", ",", "(", "'{0}'", ".", "format", "(", "at_time", ")", "if", "at_time", "else", "'now'", ")", "]", "ret", "=", "__salt__", "[", "'cmd.run'", "]", "(...
Reboot the system at_time The wait time in minutes before the system will be rebooted. CLI Example: .. code-block:: bash salt '*' system.reboot
[ "Reboot", "the", "system" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/system.py#L94-L109
train
Reboot the system at_time
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/system.py
shutdown
def shutdown(at_time=None): ''' Shutdown a running system at_time The wait time in minutes before the system will be shutdown. CLI Example: .. code-block:: bash salt '*' system.shutdown 5 ''' cmd = ['shutdown', '-h', ('{0}'.format(at_time) if at_time else 'now')] ret ...
python
def shutdown(at_time=None): ''' Shutdown a running system at_time The wait time in minutes before the system will be shutdown. CLI Example: .. code-block:: bash salt '*' system.shutdown 5 ''' cmd = ['shutdown', '-h', ('{0}'.format(at_time) if at_time else 'now')] ret ...
[ "def", "shutdown", "(", "at_time", "=", "None", ")", ":", "cmd", "=", "[", "'shutdown'", ",", "'-h'", ",", "(", "'{0}'", ".", "format", "(", "at_time", ")", "if", "at_time", "else", "'now'", ")", "]", "ret", "=", "__salt__", "[", "'cmd.run'", "]", ...
Shutdown a running system at_time The wait time in minutes before the system will be shutdown. CLI Example: .. code-block:: bash salt '*' system.shutdown 5
[ "Shutdown", "a", "running", "system" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/system.py#L112-L127
train
Shut down a running system
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/system.py
_date_bin_set_datetime
def _date_bin_set_datetime(new_date): ''' set the system date/time using the date command Note using a strictly posix-compliant date binary we can only set the date up to the minute. ''' cmd = ['date'] # if there is a timezone in the datetime object use that offset # This will modify t...
python
def _date_bin_set_datetime(new_date): ''' set the system date/time using the date command Note using a strictly posix-compliant date binary we can only set the date up to the minute. ''' cmd = ['date'] # if there is a timezone in the datetime object use that offset # This will modify t...
[ "def", "_date_bin_set_datetime", "(", "new_date", ")", ":", "cmd", "=", "[", "'date'", "]", "# if there is a timezone in the datetime object use that offset", "# This will modify the new_date to be the equivalent time in UTC", "if", "new_date", ".", "utcoffset", "(", ")", "is",...
set the system date/time using the date command Note using a strictly posix-compliant date binary we can only set the date up to the minute.
[ "set", "the", "system", "date", "/", "time", "using", "the", "date", "command" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/system.py#L130-L169
train
Set the date of the system using the date 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/system.py
has_settable_hwclock
def has_settable_hwclock(): ''' Returns True if the system has a hardware clock capable of being set from software. CLI Example: salt '*' system.has_settable_hwclock ''' if salt.utils.path.which_bin(['hwclock']) is not None: res = __salt__['cmd.run_all']( ['hwclock', '-...
python
def has_settable_hwclock(): ''' Returns True if the system has a hardware clock capable of being set from software. CLI Example: salt '*' system.has_settable_hwclock ''' if salt.utils.path.which_bin(['hwclock']) is not None: res = __salt__['cmd.run_all']( ['hwclock', '-...
[ "def", "has_settable_hwclock", "(", ")", ":", "if", "salt", ".", "utils", ".", "path", ".", "which_bin", "(", "[", "'hwclock'", "]", ")", "is", "not", "None", ":", "res", "=", "__salt__", "[", "'cmd.run_all'", "]", "(", "[", "'hwclock'", ",", "'--test'...
Returns True if the system has a hardware clock capable of being set from software. CLI Example: salt '*' system.has_settable_hwclock
[ "Returns", "True", "if", "the", "system", "has", "a", "hardware", "clock", "capable", "of", "being", "set", "from", "software", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/system.py#L172-L187
train
Returns True if the system has a hardware clock capable of being set from software.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/system.py
_swclock_to_hwclock
def _swclock_to_hwclock(): ''' Set hardware clock to value of software clock. ''' res = __salt__['cmd.run_all'](['hwclock', '--systohc'], python_shell=False) if res['retcode'] != 0: msg = 'hwclock failed to set hardware clock from software clock: {0}'.format(res['stderr']) raise Comm...
python
def _swclock_to_hwclock(): ''' Set hardware clock to value of software clock. ''' res = __salt__['cmd.run_all'](['hwclock', '--systohc'], python_shell=False) if res['retcode'] != 0: msg = 'hwclock failed to set hardware clock from software clock: {0}'.format(res['stderr']) raise Comm...
[ "def", "_swclock_to_hwclock", "(", ")", ":", "res", "=", "__salt__", "[", "'cmd.run_all'", "]", "(", "[", "'hwclock'", ",", "'--systohc'", "]", ",", "python_shell", "=", "False", ")", "if", "res", "[", "'retcode'", "]", "!=", "0", ":", "msg", "=", "'hw...
Set hardware clock to value of software clock.
[ "Set", "hardware", "clock", "to", "value", "of", "software", "clock", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/system.py#L190-L198
train
Set hardware clock to value of software clock.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/system.py
_offset_to_min
def _offset_to_min(utc_offset): ''' Helper function that converts the utc offset string into number of minutes offset. Input is in form "[+-]?HHMM". Example valid inputs are "+0500" "-0300" and "0800". These would return -300, 180, 480 respectively. ''' match = re.match(r"^([+-])?(\d\d)(\d\d)$",...
python
def _offset_to_min(utc_offset): ''' Helper function that converts the utc offset string into number of minutes offset. Input is in form "[+-]?HHMM". Example valid inputs are "+0500" "-0300" and "0800". These would return -300, 180, 480 respectively. ''' match = re.match(r"^([+-])?(\d\d)(\d\d)$",...
[ "def", "_offset_to_min", "(", "utc_offset", ")", ":", "match", "=", "re", ".", "match", "(", "r\"^([+-])?(\\d\\d)(\\d\\d)$\"", ",", "utc_offset", ")", "if", "not", "match", ":", "raise", "SaltInvocationError", "(", "\"Invalid UTC offset\"", ")", "sign", "=", "-"...
Helper function that converts the utc offset string into number of minutes offset. Input is in form "[+-]?HHMM". Example valid inputs are "+0500" "-0300" and "0800". These would return -300, 180, 480 respectively.
[ "Helper", "function", "that", "converts", "the", "utc", "offset", "string", "into", "number", "of", "minutes", "offset", ".", "Input", "is", "in", "form", "[", "+", "-", "]", "?HHMM", ".", "Example", "valid", "inputs", "are", "+", "0500", "-", "0300", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/system.py#L221-L235
train
Helper function that converts the utc offset string into number of minutes offset. Input is in form HHMM - 0500 - 350 - 480.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/system.py
_get_offset_time
def _get_offset_time(utc_offset): ''' Will return the current time adjusted using the input timezone offset. :rtype datetime: ''' if utc_offset is not None: minutes = _offset_to_min(utc_offset) offset = timedelta(minutes=minutes) offset_time = datetime.utcnow() + offset ...
python
def _get_offset_time(utc_offset): ''' Will return the current time adjusted using the input timezone offset. :rtype datetime: ''' if utc_offset is not None: minutes = _offset_to_min(utc_offset) offset = timedelta(minutes=minutes) offset_time = datetime.utcnow() + offset ...
[ "def", "_get_offset_time", "(", "utc_offset", ")", ":", "if", "utc_offset", "is", "not", "None", ":", "minutes", "=", "_offset_to_min", "(", "utc_offset", ")", "offset", "=", "timedelta", "(", "minutes", "=", "minutes", ")", "offset_time", "=", "datetime", "...
Will return the current time adjusted using the input timezone offset. :rtype datetime:
[ "Will", "return", "the", "current", "time", "adjusted", "using", "the", "input", "timezone", "offset", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/system.py#L238-L251
train
Returns the current time adjusted using the input timezone offset.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/system.py
set_system_time
def set_system_time(newtime, utc_offset=None): ''' Set the system time. :param str newtime: The time to set. Can be any of the following formats. - HH:MM:SS AM/PM - HH:MM AM/PM - HH:MM:SS (24 hour) - HH:MM (24 hour) Note that the salt command line parser par...
python
def set_system_time(newtime, utc_offset=None): ''' Set the system time. :param str newtime: The time to set. Can be any of the following formats. - HH:MM:SS AM/PM - HH:MM AM/PM - HH:MM:SS (24 hour) - HH:MM (24 hour) Note that the salt command line parser par...
[ "def", "set_system_time", "(", "newtime", ",", "utc_offset", "=", "None", ")", ":", "fmts", "=", "[", "'%I:%M:%S %p'", ",", "'%I:%M %p'", ",", "'%H:%M:%S'", ",", "'%H:%M'", "]", "dt_obj", "=", "_try_parse_datetime", "(", "newtime", ",", "fmts", ")", "if", ...
Set the system time. :param str newtime: The time to set. Can be any of the following formats. - HH:MM:SS AM/PM - HH:MM AM/PM - HH:MM:SS (24 hour) - HH:MM (24 hour) Note that the salt command line parser parses the date/time before we obtain the argument (pr...
[ "Set", "the", "system", "time", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/system.py#L276-L312
train
Sets the system time for the current node.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...