repo
stringlengths
7
54
path
stringlengths
4
223
func_name
stringlengths
1
134
original_string
stringlengths
75
104k
language
stringclasses
1 value
code
stringlengths
75
104k
code_tokens
listlengths
20
28.4k
docstring
stringlengths
1
46.3k
docstring_tokens
listlengths
1
1.66k
sha
stringlengths
40
40
url
stringlengths
87
315
partition
stringclasses
1 value
summary
stringlengths
4
350
obf_code
stringlengths
7.85k
764k
saltstack/salt
salt/modules/virt.py
purge
def purge(vm_, dirs=False, removables=None, **kwargs): ''' Recursively destroy and delete a persistent virtual machine, pass True for dir's to also delete the directories containing the virtual machine disk images - USE WITH EXTREME CAUTION! Pass removables=False to avoid deleting cdrom and floppy ...
python
def purge(vm_, dirs=False, removables=None, **kwargs): ''' Recursively destroy and delete a persistent virtual machine, pass True for dir's to also delete the directories containing the virtual machine disk images - USE WITH EXTREME CAUTION! Pass removables=False to avoid deleting cdrom and floppy ...
[ "def", "purge", "(", "vm_", ",", "dirs", "=", "False", ",", "removables", "=", "None", ",", "*", "*", "kwargs", ")", ":", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "dom", "=", "_get_domain", "(", "conn", ",", "vm_", ")", "disks", "...
Recursively destroy and delete a persistent virtual machine, pass True for dir's to also delete the directories containing the virtual machine disk images - USE WITH EXTREME CAUTION! Pass removables=False to avoid deleting cdrom and floppy images. To avoid disruption, the default but dangerous value is...
[ "Recursively", "destroy", "and", "delete", "a", "persistent", "virtual", "machine", "pass", "True", "for", "dir", "s", "to", "also", "delete", "the", "directories", "containing", "the", "virtual", "machine", "disk", "images", "-", "USE", "WITH", "EXTREME", "CA...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L3350-L3421
train
Recursively destroy and delete a persistent 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/modules/virt.py
_is_kvm_hyper
def _is_kvm_hyper(): ''' Returns a bool whether or not this node is a KVM hypervisor ''' try: with salt.utils.files.fopen('/proc/modules') as fp_: if 'kvm_' not in salt.utils.stringutils.to_unicode(fp_.read()): return False except IOError: # No /proc/modul...
python
def _is_kvm_hyper(): ''' Returns a bool whether or not this node is a KVM hypervisor ''' try: with salt.utils.files.fopen('/proc/modules') as fp_: if 'kvm_' not in salt.utils.stringutils.to_unicode(fp_.read()): return False except IOError: # No /proc/modul...
[ "def", "_is_kvm_hyper", "(", ")", ":", "try", ":", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "'/proc/modules'", ")", "as", "fp_", ":", "if", "'kvm_'", "not", "in", "salt", ".", "utils", ".", "stringutils", ".", "to_unicode", "(", ...
Returns a bool whether or not this node is a KVM hypervisor
[ "Returns", "a", "bool", "whether", "or", "not", "this", "node", "is", "a", "KVM", "hypervisor" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L3437-L3448
train
Returns a bool whether or not this node is a KVM hypervisor
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
get_hypervisor
def get_hypervisor(): ''' Returns the name of the hypervisor running on this node or ``None``. Detected hypervisors: - kvm - xen - bhyve CLI Example: .. code-block:: bash salt '*' virt.get_hypervisor .. versionadded:: 2019.2.0 the function and the ``kvm``, ``xen...
python
def get_hypervisor(): ''' Returns the name of the hypervisor running on this node or ``None``. Detected hypervisors: - kvm - xen - bhyve CLI Example: .. code-block:: bash salt '*' virt.get_hypervisor .. versionadded:: 2019.2.0 the function and the ``kvm``, ``xen...
[ "def", "get_hypervisor", "(", ")", ":", "# To add a new 'foo' hypervisor, add the _is_foo_hyper function,", "# add 'foo' to the list below and add it to the docstring with a .. versionadded::", "hypervisors", "=", "[", "'kvm'", ",", "'xen'", ",", "'bhyve'", "]", "result", "=", "[...
Returns the name of the hypervisor running on this node or ``None``. Detected hypervisors: - kvm - xen - bhyve CLI Example: .. code-block:: bash salt '*' virt.get_hypervisor .. versionadded:: 2019.2.0 the function and the ``kvm``, ``xen`` and ``bhyve`` hypervisors suppo...
[ "Returns", "the", "name", "of", "the", "hypervisor", "running", "on", "this", "node", "or", "None", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L3511-L3534
train
Returns the name of the hypervisor running on this node or None if no hypervisor is running on this 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...
saltstack/salt
salt/modules/virt.py
_is_bhyve_hyper
def _is_bhyve_hyper(): ''' Returns a bool whether or not this node is a bhyve hypervisor ''' sysctl_cmd = 'sysctl hw.vmm.create' vmm_enabled = False try: stdout = subprocess.Popen(sysctl_cmd, shell=True, stdout=subproces...
python
def _is_bhyve_hyper(): ''' Returns a bool whether or not this node is a bhyve hypervisor ''' sysctl_cmd = 'sysctl hw.vmm.create' vmm_enabled = False try: stdout = subprocess.Popen(sysctl_cmd, shell=True, stdout=subproces...
[ "def", "_is_bhyve_hyper", "(", ")", ":", "sysctl_cmd", "=", "'sysctl hw.vmm.create'", "vmm_enabled", "=", "False", "try", ":", "stdout", "=", "subprocess", ".", "Popen", "(", "sysctl_cmd", ",", "shell", "=", "True", ",", "stdout", "=", "subprocess", ".", "PI...
Returns a bool whether or not this node is a bhyve hypervisor
[ "Returns", "a", "bool", "whether", "or", "not", "this", "node", "is", "a", "bhyve", "hypervisor" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L3537-L3550
train
Returns a bool whether or not this node is a bhyve hypervisor
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
vm_cputime
def vm_cputime(vm_=None, **kwargs): ''' Return cputime used by the vms on this hyper in a list of dicts: :param vm_: domain name :param connection: libvirt connection URI, overriding defaults .. versionadded:: 2019.2.0 :param username: username to connect with, overriding defaults ...
python
def vm_cputime(vm_=None, **kwargs): ''' Return cputime used by the vms on this hyper in a list of dicts: :param vm_: domain name :param connection: libvirt connection URI, overriding defaults .. versionadded:: 2019.2.0 :param username: username to connect with, overriding defaults ...
[ "def", "vm_cputime", "(", "vm_", "=", "None", ",", "*", "*", "kwargs", ")", ":", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "host_cpus", "=", "conn", ".", "getInfo", "(", ")", "[", "2", "]", "def", "_info", "(", "dom", ")", ":", "...
Return cputime used by the vms on this hyper in a list of dicts: :param vm_: domain name :param connection: libvirt connection URI, overriding defaults .. versionadded:: 2019.2.0 :param username: username to connect with, overriding defaults .. versionadded:: 2019.2.0 :param passw...
[ "Return", "cputime", "used", "by", "the", "vms", "on", "this", "hyper", "in", "a", "list", "of", "dicts", ":" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L3568-L3628
train
Return a list of dicts that represents the cputime used by the vms on this hyper.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
vm_netstats
def vm_netstats(vm_=None, **kwargs): ''' Return combined network counters used by the vms on this hyper in a list of dicts: :param vm_: domain name :param connection: libvirt connection URI, overriding defaults .. versionadded:: 2019.2.0 :param username: username to connect with, overr...
python
def vm_netstats(vm_=None, **kwargs): ''' Return combined network counters used by the vms on this hyper in a list of dicts: :param vm_: domain name :param connection: libvirt connection URI, overriding defaults .. versionadded:: 2019.2.0 :param username: username to connect with, overr...
[ "def", "vm_netstats", "(", "vm_", "=", "None", ",", "*", "*", "kwargs", ")", ":", "def", "_info", "(", "dom", ")", ":", "'''\n Compute network stats of a domain\n '''", "nics", "=", "_get_nics", "(", "dom", ")", "ret", "=", "{", "'rx_bytes'", "...
Return combined network counters used by the vms on this hyper in a list of dicts: :param vm_: domain name :param connection: libvirt connection URI, overriding defaults .. versionadded:: 2019.2.0 :param username: username to connect with, overriding defaults .. versionadded:: 2019.2....
[ "Return", "combined", "network", "counters", "used", "by", "the", "vms", "on", "this", "hyper", "in", "a", "list", "of", "dicts", ":" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L3631-L3709
train
Return combined network counters used by the vms on this hyper.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
vm_diskstats
def vm_diskstats(vm_=None, **kwargs): ''' Return disk usage counters used by the vms on this hyper in a list of dicts: :param vm_: domain name :param connection: libvirt connection URI, overriding defaults .. versionadded:: 2019.2.0 :param username: username to connect with, overriding...
python
def vm_diskstats(vm_=None, **kwargs): ''' Return disk usage counters used by the vms on this hyper in a list of dicts: :param vm_: domain name :param connection: libvirt connection URI, overriding defaults .. versionadded:: 2019.2.0 :param username: username to connect with, overriding...
[ "def", "vm_diskstats", "(", "vm_", "=", "None", ",", "*", "*", "kwargs", ")", ":", "def", "get_disk_devs", "(", "dom", ")", ":", "'''\n Extract the disk devices names from the domain XML definition\n '''", "doc", "=", "ElementTree", ".", "fromstring", "(...
Return disk usage counters used by the vms on this hyper in a list of dicts: :param vm_: domain name :param connection: libvirt connection URI, overriding defaults .. versionadded:: 2019.2.0 :param username: username to connect with, overriding defaults .. versionadded:: 2019.2.0 ...
[ "Return", "disk", "usage", "counters", "used", "by", "the", "vms", "on", "this", "hyper", "in", "a", "list", "of", "dicts", ":" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L3712-L3788
train
Return the disk usage counters for the vms on this hyper.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
_parse_snapshot_description
def _parse_snapshot_description(vm_snapshot, unix_time=False): ''' Parse XML doc and return a dict with the status values. :param xmldoc: :return: ''' ret = dict() tree = ElementTree.fromstring(vm_snapshot.getXMLDesc()) for node in tree: if node.tag == 'name': ret['n...
python
def _parse_snapshot_description(vm_snapshot, unix_time=False): ''' Parse XML doc and return a dict with the status values. :param xmldoc: :return: ''' ret = dict() tree = ElementTree.fromstring(vm_snapshot.getXMLDesc()) for node in tree: if node.tag == 'name': ret['n...
[ "def", "_parse_snapshot_description", "(", "vm_snapshot", ",", "unix_time", "=", "False", ")", ":", "ret", "=", "dict", "(", ")", "tree", "=", "ElementTree", ".", "fromstring", "(", "vm_snapshot", ".", "getXMLDesc", "(", ")", ")", "for", "node", "in", "tre...
Parse XML doc and return a dict with the status values. :param xmldoc: :return:
[ "Parse", "XML", "doc", "and", "return", "a", "dict", "with", "the", "status", "values", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L3791-L3811
train
Parse the snapshot description and return a dict with the status values.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/virt.py
list_snapshots
def list_snapshots(domain=None, **kwargs): ''' List available snapshots for certain vm or for all. :param domain: domain name :param connection: libvirt connection URI, overriding defaults .. versionadded:: 2019.2.0 :param username: username to connect with, overriding defaults .....
python
def list_snapshots(domain=None, **kwargs): ''' List available snapshots for certain vm or for all. :param domain: domain name :param connection: libvirt connection URI, overriding defaults .. versionadded:: 2019.2.0 :param username: username to connect with, overriding defaults .....
[ "def", "list_snapshots", "(", "domain", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "dict", "(", ")", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "for", "vm_domain", "in", "_get_domain", "(", "conn", ",", "*", "(", "dom...
List available snapshots for certain vm or for all. :param domain: domain name :param connection: libvirt connection URI, overriding defaults .. versionadded:: 2019.2.0 :param username: username to connect with, overriding defaults .. versionadded:: 2019.2.0 :param password: password ...
[ "List", "available", "snapshots", "for", "certain", "vm", "or", "for", "all", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L3814-L3844
train
List available snapshots for a certain vm or for all.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
snapshot
def snapshot(domain, name=None, suffix=None, **kwargs): ''' Create a snapshot of a VM. :param domain: domain name :param name: Name of the snapshot. If the name is omitted, then will be used original domain name with ISO 8601 time as a suffix. :param suffix: Add suffix for the new...
python
def snapshot(domain, name=None, suffix=None, **kwargs): ''' Create a snapshot of a VM. :param domain: domain name :param name: Name of the snapshot. If the name is omitted, then will be used original domain name with ISO 8601 time as a suffix. :param suffix: Add suffix for the new...
[ "def", "snapshot", "(", "domain", ",", "name", "=", "None", ",", "suffix", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "name", "and", "name", ".", "lower", "(", ")", "==", "domain", ".", "lower", "(", ")", ":", "raise", "CommandExecutionE...
Create a snapshot of a VM. :param domain: domain name :param name: Name of the snapshot. If the name is omitted, then will be used original domain name with ISO 8601 time as a suffix. :param suffix: Add suffix for the new name. Useful in states, where such snapshots can...
[ "Create", "a", "snapshot", "of", "a", "VM", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L3847-L3894
train
Create a snapshot of 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/modules/virt.py
delete_snapshots
def delete_snapshots(name, *names, **kwargs): ''' Delete one or more snapshots of the given VM. :param name: domain name :param names: names of the snapshots to remove :param connection: libvirt connection URI, overriding defaults .. versionadded:: 2019.2.0 :param username: username to...
python
def delete_snapshots(name, *names, **kwargs): ''' Delete one or more snapshots of the given VM. :param name: domain name :param names: names of the snapshots to remove :param connection: libvirt connection URI, overriding defaults .. versionadded:: 2019.2.0 :param username: username to...
[ "def", "delete_snapshots", "(", "name", ",", "*", "names", ",", "*", "*", "kwargs", ")", ":", "deleted", "=", "dict", "(", ")", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "domain", "=", "_get_domain", "(", "conn", ",", "name", ")", "f...
Delete one or more snapshots of the given VM. :param name: domain name :param names: names of the snapshots to remove :param connection: libvirt connection URI, overriding defaults .. versionadded:: 2019.2.0 :param username: username to connect with, overriding defaults .. versionadde...
[ "Delete", "one", "or", "more", "snapshots", "of", "the", "given", "VM", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L3897-L3934
train
Delete one or more snapshots of the given VM.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/virt.py
revert_snapshot
def revert_snapshot(name, vm_snapshot=None, cleanup=False, **kwargs): ''' Revert snapshot to the previous from current (if available) or to the specific. :param name: domain name :param vm_snapshot: name of the snapshot to revert :param cleanup: Remove all newer than reverted snapshots. Values: Tru...
python
def revert_snapshot(name, vm_snapshot=None, cleanup=False, **kwargs): ''' Revert snapshot to the previous from current (if available) or to the specific. :param name: domain name :param vm_snapshot: name of the snapshot to revert :param cleanup: Remove all newer than reverted snapshots. Values: Tru...
[ "def", "revert_snapshot", "(", "name", ",", "vm_snapshot", "=", "None", ",", "cleanup", "=", "False", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "dict", "(", ")", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "domain", "=", "_get_domai...
Revert snapshot to the previous from current (if available) or to the specific. :param name: domain name :param vm_snapshot: name of the snapshot to revert :param cleanup: Remove all newer than reverted snapshots. Values: True or False (default False). :param connection: libvirt connection URI, overrid...
[ "Revert", "snapshot", "to", "the", "previous", "from", "current", "(", "if", "available", ")", "or", "to", "the", "specific", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L3937-L4016
train
Revert a snapshot to the previous from current or to specific.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
_caps_add_machine
def _caps_add_machine(machines, node): ''' Parse the <machine> element of the host capabilities and add it to the machines list. ''' maxcpus = node.get('maxCpus') canonical = node.get('canonical') name = node.text alternate_name = "" if canonical: alternate_name = name ...
python
def _caps_add_machine(machines, node): ''' Parse the <machine> element of the host capabilities and add it to the machines list. ''' maxcpus = node.get('maxCpus') canonical = node.get('canonical') name = node.text alternate_name = "" if canonical: alternate_name = name ...
[ "def", "_caps_add_machine", "(", "machines", ",", "node", ")", ":", "maxcpus", "=", "node", ".", "get", "(", "'maxCpus'", ")", "canonical", "=", "node", ".", "get", "(", "'canonical'", ")", "name", "=", "node", ".", "text", "alternate_name", "=", "\"\"",...
Parse the <machine> element of the host capabilities and add it to the machines list.
[ "Parse", "the", "<machine", ">", "element", "of", "the", "host", "capabilities", "and", "add", "it", "to", "the", "machines", "list", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L4019-L4040
train
Parse the host capabilities element and add it to the machines 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/virt.py
_parse_caps_guest
def _parse_caps_guest(guest): ''' Parse the <guest> element of the connection capabilities XML ''' arch_node = guest.find('arch') result = { 'os_type': guest.find('os_type').text, 'arch': { 'name': arch_node.get('name'), 'machines': {}, 'domains': ...
python
def _parse_caps_guest(guest): ''' Parse the <guest> element of the connection capabilities XML ''' arch_node = guest.find('arch') result = { 'os_type': guest.find('os_type').text, 'arch': { 'name': arch_node.get('name'), 'machines': {}, 'domains': ...
[ "def", "_parse_caps_guest", "(", "guest", ")", ":", "arch_node", "=", "guest", ".", "find", "(", "'arch'", ")", "result", "=", "{", "'os_type'", ":", "guest", ".", "find", "(", "'os_type'", ")", ".", "text", ",", "'arch'", ":", "{", "'name'", ":", "a...
Parse the <guest> element of the connection capabilities XML
[ "Parse", "the", "<guest", ">", "element", "of", "the", "connection", "capabilities", "XML" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L4043-L4087
train
Parses the guest element of the connection capabilities XML
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
_parse_caps_cell
def _parse_caps_cell(cell): ''' Parse the <cell> nodes of the connection capabilities XML output. ''' result = { 'id': int(cell.get('id')) } mem_node = cell.find('memory') if mem_node is not None: unit = mem_node.get('unit', 'KiB') memory = mem_node.text resu...
python
def _parse_caps_cell(cell): ''' Parse the <cell> nodes of the connection capabilities XML output. ''' result = { 'id': int(cell.get('id')) } mem_node = cell.find('memory') if mem_node is not None: unit = mem_node.get('unit', 'KiB') memory = mem_node.text resu...
[ "def", "_parse_caps_cell", "(", "cell", ")", ":", "result", "=", "{", "'id'", ":", "int", "(", "cell", ".", "get", "(", "'id'", ")", ")", "}", "mem_node", "=", "cell", ".", "find", "(", "'memory'", ")", "if", "mem_node", "is", "not", "None", ":", ...
Parse the <cell> nodes of the connection capabilities XML output.
[ "Parse", "the", "<cell", ">", "nodes", "of", "the", "connection", "capabilities", "XML", "output", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L4090-L4134
train
Parse the nodes of the connection capabilities XML output.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
_parse_caps_bank
def _parse_caps_bank(bank): ''' Parse the <bank> element of the connection capabilities XML. ''' result = { 'id': int(bank.get('id')), 'level': int(bank.get('level')), 'type': bank.get('type'), 'size': "{} {}".format(bank.get('size'), bank.get('unit')), 'cpus': ba...
python
def _parse_caps_bank(bank): ''' Parse the <bank> element of the connection capabilities XML. ''' result = { 'id': int(bank.get('id')), 'level': int(bank.get('level')), 'type': bank.get('type'), 'size': "{} {}".format(bank.get('size'), bank.get('unit')), 'cpus': ba...
[ "def", "_parse_caps_bank", "(", "bank", ")", ":", "result", "=", "{", "'id'", ":", "int", "(", "bank", ".", "get", "(", "'id'", ")", ")", ",", "'level'", ":", "int", "(", "bank", ".", "get", "(", "'level'", ")", ")", ",", "'type'", ":", "bank", ...
Parse the <bank> element of the connection capabilities XML.
[ "Parse", "the", "<bank", ">", "element", "of", "the", "connection", "capabilities", "XML", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L4137-L4165
train
Parse the bank element of the connection capabilities XML.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
_parse_caps_host
def _parse_caps_host(host): ''' Parse the <host> element of the connection capabilities XML. ''' result = {} for child in host: if child.tag == 'uuid': result['uuid'] = child.text elif child.tag == 'cpu': cpu = { 'arch': child.find('arch').te...
python
def _parse_caps_host(host): ''' Parse the <host> element of the connection capabilities XML. ''' result = {} for child in host: if child.tag == 'uuid': result['uuid'] = child.text elif child.tag == 'cpu': cpu = { 'arch': child.find('arch').te...
[ "def", "_parse_caps_host", "(", "host", ")", ":", "result", "=", "{", "}", "for", "child", "in", "host", ":", "if", "child", ".", "tag", "==", "'uuid'", ":", "result", "[", "'uuid'", "]", "=", "child", ".", "text", "elif", "child", ".", "tag", "=="...
Parse the <host> element of the connection capabilities XML.
[ "Parse", "the", "<host", ">", "element", "of", "the", "connection", "capabilities", "XML", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L4168-L4226
train
Parses the XML of the connection capabilities XML.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
capabilities
def capabilities(**kwargs): ''' Return the hypervisor connection capabilities. :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults .. versionadded:: 2019.2.0...
python
def capabilities(**kwargs): ''' Return the hypervisor connection capabilities. :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults .. versionadded:: 2019.2.0...
[ "def", "capabilities", "(", "*", "*", "kwargs", ")", ":", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "caps", "=", "ElementTree", ".", "fromstring", "(", "conn", ".", "getCapabilities", "(", ")", ")", "conn", ".", "close", "(", ")", "ret...
Return the hypervisor connection capabilities. :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults .. versionadded:: 2019.2.0 CLI Example: .. code-block:: ...
[ "Return", "the", "hypervisor", "connection", "capabilities", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L4229-L4252
train
Return the hypervisor connection capabilities.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
_parse_caps_cpu
def _parse_caps_cpu(node): ''' Parse the <cpu> element of the domain capabilities ''' result = {} for mode in node.findall('mode'): if not mode.get('supported') == 'yes': continue name = mode.get('name') if name == 'host-passthrough': result[name] = T...
python
def _parse_caps_cpu(node): ''' Parse the <cpu> element of the domain capabilities ''' result = {} for mode in node.findall('mode'): if not mode.get('supported') == 'yes': continue name = mode.get('name') if name == 'host-passthrough': result[name] = T...
[ "def", "_parse_caps_cpu", "(", "node", ")", ":", "result", "=", "{", "}", "for", "mode", "in", "node", ".", "findall", "(", "'mode'", ")", ":", "if", "not", "mode", ".", "get", "(", "'supported'", ")", "==", "'yes'", ":", "continue", "name", "=", "...
Parse the <cpu> element of the domain capabilities
[ "Parse", "the", "<cpu", ">", "element", "of", "the", "domain", "capabilities" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L4262-L4309
train
Parse the <cpu > element of the domain capabilities
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
_parse_caps_devices_features
def _parse_caps_devices_features(node): ''' Parse the devices or features list of the domain capatilities ''' result = {} for child in node: if child.get('supported') == 'yes': enums = [_parse_caps_enum(node) for node in child.findall('enum')] result[child.tag] = {ite...
python
def _parse_caps_devices_features(node): ''' Parse the devices or features list of the domain capatilities ''' result = {} for child in node: if child.get('supported') == 'yes': enums = [_parse_caps_enum(node) for node in child.findall('enum')] result[child.tag] = {ite...
[ "def", "_parse_caps_devices_features", "(", "node", ")", ":", "result", "=", "{", "}", "for", "child", "in", "node", ":", "if", "child", ".", "get", "(", "'supported'", ")", "==", "'yes'", ":", "enums", "=", "[", "_parse_caps_enum", "(", "node", ")", "...
Parse the devices or features list of the domain capatilities
[ "Parse", "the", "devices", "or", "features", "list", "of", "the", "domain", "capatilities" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L4312-L4321
train
Parse the devices or features list of the domain capatilities
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
_parse_caps_loader
def _parse_caps_loader(node): ''' Parse the <loader> element of the domain capabilities. ''' enums = [_parse_caps_enum(enum) for enum in node.findall('enum')] result = {item[0]: item[1] for item in enums if item[0]} values = [child.text for child in node.findall('value')] if values: ...
python
def _parse_caps_loader(node): ''' Parse the <loader> element of the domain capabilities. ''' enums = [_parse_caps_enum(enum) for enum in node.findall('enum')] result = {item[0]: item[1] for item in enums if item[0]} values = [child.text for child in node.findall('value')] if values: ...
[ "def", "_parse_caps_loader", "(", "node", ")", ":", "enums", "=", "[", "_parse_caps_enum", "(", "enum", ")", "for", "enum", "in", "node", ".", "findall", "(", "'enum'", ")", "]", "result", "=", "{", "item", "[", "0", "]", ":", "item", "[", "1", "]"...
Parse the <loader> element of the domain capabilities.
[ "Parse", "the", "<loader", ">", "element", "of", "the", "domain", "capabilities", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L4324-L4336
train
Parse the loader element of the domain capabilities.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
_parse_domain_caps
def _parse_domain_caps(caps): ''' Parse the XML document of domain capabilities into a structure. Return the domain capabilities given an emulator, architecture, machine or virtualization type. .. versionadded:: 2019.2.0 :param emulator: return the capabilities for the given emulator binary :p...
python
def _parse_domain_caps(caps): ''' Parse the XML document of domain capabilities into a structure. Return the domain capabilities given an emulator, architecture, machine or virtualization type. .. versionadded:: 2019.2.0 :param emulator: return the capabilities for the given emulator binary :p...
[ "def", "_parse_domain_caps", "(", "caps", ")", ":", "result", "=", "{", "'emulator'", ":", "caps", ".", "find", "(", "'path'", ")", ".", "text", "if", "caps", ".", "find", "(", "'path'", ")", "is", "not", "None", "else", "None", ",", "'domain'", ":",...
Parse the XML document of domain capabilities into a structure. Return the domain capabilities given an emulator, architecture, machine or virtualization type. .. versionadded:: 2019.2.0 :param emulator: return the capabilities for the given emulator binary :param arch: return the capabilities for the...
[ "Parse", "the", "XML", "document", "of", "domain", "capabilities", "into", "a", "structure", ".", "Return", "the", "domain", "capabilities", "given", "an", "emulator", "architecture", "machine", "or", "virtualization", "type", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L4339-L4402
train
Parse the XML document of domain capabilities into a structure.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/virt.py
domain_capabilities
def domain_capabilities(emulator=None, arch=None, machine=None, domain=None, **kwargs): ''' Return the domain capabilities given an emulator, architecture, machine or virtualization type. .. versionadded:: 2019.2.0 :param emulator: return the capabilities for the given emulator binary :param arch:...
python
def domain_capabilities(emulator=None, arch=None, machine=None, domain=None, **kwargs): ''' Return the domain capabilities given an emulator, architecture, machine or virtualization type. .. versionadded:: 2019.2.0 :param emulator: return the capabilities for the given emulator binary :param arch:...
[ "def", "domain_capabilities", "(", "emulator", "=", "None", ",", "arch", "=", "None", ",", "machine", "=", "None", ",", "domain", "=", "None", ",", "*", "*", "kwargs", ")", ":", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "result", "=", ...
Return the domain capabilities given an emulator, architecture, machine or virtualization type. .. versionadded:: 2019.2.0 :param emulator: return the capabilities for the given emulator binary :param arch: return the capabilities for the given CPU architecture :param machine: return the capabilities ...
[ "Return", "the", "domain", "capabilities", "given", "an", "emulator", "architecture", "machine", "or", "virtualization", "type", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L4405-L4439
train
Return the domain capabilities given an emulator architecture machine or virtualization 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/modules/virt.py
all_capabilities
def all_capabilities(**kwargs): ''' Return the host and domain capabilities in a single call. .. versionadded:: Neon :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overridi...
python
def all_capabilities(**kwargs): ''' Return the host and domain capabilities in a single call. .. versionadded:: Neon :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overridi...
[ "def", "all_capabilities", "(", "*", "*", "kwargs", ")", ":", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "result", "=", "{", "}", "try", ":", "host_caps", "=", "ElementTree", ".", "fromstring", "(", "conn", ".", "getCapabilities", "(", ")...
Return the host and domain capabilities in a single call. .. versionadded:: Neon :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults CLI Example: .. code-b...
[ "Return", "the", "host", "and", "domain", "capabilities", "in", "a", "single", "call", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L4442-L4478
train
Return the host and domain capabilities in a single call.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
cpu_baseline
def cpu_baseline(full=False, migratable=False, out='libvirt', **kwargs): ''' Return the optimal 'custom' CPU baseline config for VM's on this minion .. versionadded:: 2016.3.0 :param full: Return all CPU features rather than the ones on top of the closest CPU model :param migratable: Exclude CPU f...
python
def cpu_baseline(full=False, migratable=False, out='libvirt', **kwargs): ''' Return the optimal 'custom' CPU baseline config for VM's on this minion .. versionadded:: 2016.3.0 :param full: Return all CPU features rather than the ones on top of the closest CPU model :param migratable: Exclude CPU f...
[ "def", "cpu_baseline", "(", "full", "=", "False", ",", "migratable", "=", "False", ",", "out", "=", "'libvirt'", ",", "*", "*", "kwargs", ")", ":", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "caps", "=", "ElementTree", ".", "fromstring", ...
Return the optimal 'custom' CPU baseline config for VM's on this minion .. versionadded:: 2016.3.0 :param full: Return all CPU features rather than the ones on top of the closest CPU model :param migratable: Exclude CPU features that are unmigratable (libvirt 2.13+) :param out: 'libvirt' (default) for...
[ "Return", "the", "optimal", "custom", "CPU", "baseline", "config", "for", "VM", "s", "on", "this", "minion" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L4481-L4562
train
Return the optimal custom CPU baseline config for VM s on this minion
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/virt.py
network_define
def network_define(name, bridge, forward, **kwargs): ''' Create libvirt network. :param name: Network name :param bridge: Bridge name :param forward: Forward mode(bridge, router, nat) :param vport: Virtualport type :param tag: Vlan tag :param autostart: Network autostart (default True) ...
python
def network_define(name, bridge, forward, **kwargs): ''' Create libvirt network. :param name: Network name :param bridge: Bridge name :param forward: Forward mode(bridge, router, nat) :param vport: Virtualport type :param tag: Vlan tag :param autostart: Network autostart (default True) ...
[ "def", "network_define", "(", "name", ",", "bridge", ",", "forward", ",", "*", "*", "kwargs", ")", ":", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "vport", "=", "kwargs", ".", "get", "(", "'vport'", ",", "None", ")", "tag", "=", "kwar...
Create libvirt network. :param name: Network name :param bridge: Bridge name :param forward: Forward mode(bridge, router, nat) :param vport: Virtualport type :param tag: Vlan tag :param autostart: Network autostart (default True) :param start: Network start (default True) :param connect...
[ "Create", "libvirt", "network", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L4565-L4628
train
Function to create libvirt 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/modules/virt.py
list_networks
def list_networks(**kwargs): ''' List all virtual networks. :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults .. versionadded:: 2019.2.0 CLI Example: ...
python
def list_networks(**kwargs): ''' List all virtual networks. :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults .. versionadded:: 2019.2.0 CLI Example: ...
[ "def", "list_networks", "(", "*", "*", "kwargs", ")", ":", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "try", ":", "return", "[", "net", ".", "name", "(", ")", "for", "net", "in", "conn", ".", "listAllNetworks", "(", ")", "]", "finally...
List all virtual networks. :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults .. versionadded:: 2019.2.0 CLI Example: .. code-block:: bash salt '*...
[ "List", "all", "virtual", "networks", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L4631-L4651
train
List all virtual networks.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
network_info
def network_info(name=None, **kwargs): ''' Return informations on a virtual network provided its name. :param name: virtual network name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to con...
python
def network_info(name=None, **kwargs): ''' Return informations on a virtual network provided its name. :param name: virtual network name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to con...
[ "def", "network_info", "(", "name", "=", "None", ",", "*", "*", "kwargs", ")", ":", "result", "=", "{", "}", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "def", "_net_get_leases", "(", "net", ")", ":", "'''\n Get all DHCP leases for a ne...
Return informations on a virtual network provided its name. :param name: virtual network name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults If no name is p...
[ "Return", "informations", "on", "a", "virtual", "network", "provided", "its", "name", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L4654-L4703
train
Return informations on a virtual network provided its name.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/virt.py
network_start
def network_start(name, **kwargs): ''' Start a defined virtual network. :param name: virtual network name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults ...
python
def network_start(name, **kwargs): ''' Start a defined virtual network. :param name: virtual network name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults ...
[ "def", "network_start", "(", "name", ",", "*", "*", "kwargs", ")", ":", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "try", ":", "net", "=", "conn", ".", "networkLookupByName", "(", "name", ")", "return", "not", "bool", "(", "net", ".", ...
Start a defined virtual network. :param name: virtual network name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults .. versionadded:: 2019.2.0 CLI Exampl...
[ "Start", "a", "defined", "virtual", "network", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L4706-L4728
train
Start a defined 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/modules/virt.py
network_stop
def network_stop(name, **kwargs): ''' Stop a defined virtual network. :param name: virtual network name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults ...
python
def network_stop(name, **kwargs): ''' Stop a defined virtual network. :param name: virtual network name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults ...
[ "def", "network_stop", "(", "name", ",", "*", "*", "kwargs", ")", ":", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "try", ":", "net", "=", "conn", ".", "networkLookupByName", "(", "name", ")", "return", "not", "bool", "(", "net", ".", ...
Stop a defined virtual network. :param name: virtual network name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults .. versionadded:: 2019.2.0 CLI Example...
[ "Stop", "a", "defined", "virtual", "network", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L4731-L4753
train
Stop a defined 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/modules/virt.py
network_undefine
def network_undefine(name, **kwargs): ''' Remove a defined virtual network. This does not stop the virtual network. :param name: virtual network name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: pa...
python
def network_undefine(name, **kwargs): ''' Remove a defined virtual network. This does not stop the virtual network. :param name: virtual network name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: pa...
[ "def", "network_undefine", "(", "name", ",", "*", "*", "kwargs", ")", ":", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "try", ":", "net", "=", "conn", ".", "networkLookupByName", "(", "name", ")", "return", "not", "bool", "(", "net", "."...
Remove a defined virtual network. This does not stop the virtual network. :param name: virtual network name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults ....
[ "Remove", "a", "defined", "virtual", "network", ".", "This", "does", "not", "stop", "the", "virtual", "network", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L4756-L4778
train
Remove a defined virtual network. This does not stop 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/modules/virt.py
network_set_autostart
def network_set_autostart(name, state='on', **kwargs): ''' Set the autostart flag on a virtual network so that the network will start with the host system on reboot. :param name: virtual network name :param state: 'on' to auto start the network, anything else to mark the virtual n...
python
def network_set_autostart(name, state='on', **kwargs): ''' Set the autostart flag on a virtual network so that the network will start with the host system on reboot. :param name: virtual network name :param state: 'on' to auto start the network, anything else to mark the virtual n...
[ "def", "network_set_autostart", "(", "name", ",", "state", "=", "'on'", ",", "*", "*", "kwargs", ")", ":", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "try", ":", "net", "=", "conn", ".", "networkLookupByName", "(", "name", ")", "return", ...
Set the autostart flag on a virtual network so that the network will start with the host system on reboot. :param name: virtual network name :param state: 'on' to auto start the network, anything else to mark the virtual network not to be started when the host boots :param connection:...
[ "Set", "the", "autostart", "flag", "on", "a", "virtual", "network", "so", "that", "the", "network", "will", "start", "with", "the", "host", "system", "on", "reboot", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L4781-L4806
train
Sets the autostart flag on a 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/modules/virt.py
pool_define
def pool_define(name, ptype, target=None, permissions=None, source_devices=None, source_dir=None, source_adapter=None, source_hosts=None, source_auth=None, source_name=None, ...
python
def pool_define(name, ptype, target=None, permissions=None, source_devices=None, source_dir=None, source_adapter=None, source_hosts=None, source_auth=None, source_name=None, ...
[ "def", "pool_define", "(", "name", ",", "ptype", ",", "target", "=", "None", ",", "permissions", "=", "None", ",", "source_devices", "=", "None", ",", "source_dir", "=", "None", ",", "source_adapter", "=", "None", ",", "source_hosts", "=", "None", ",", "...
Create libvirt pool. :param name: Pool name :param ptype: Pool type. See `libvirt documentation <https://libvirt.org/storage.html>`_ for the possible values. :param target: Pool full path target :param permissions: Permissions to set on the target folder. This is mostly used for ...
[ "Create", "libvirt", "pool", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L4809-L4979
train
Create libvirt pool.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
list_pools
def list_pools(**kwargs): ''' List all storage pools. :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults .. versionadded:: 2019.2.0 CLI Example: ....
python
def list_pools(**kwargs): ''' List all storage pools. :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults .. versionadded:: 2019.2.0 CLI Example: ....
[ "def", "list_pools", "(", "*", "*", "kwargs", ")", ":", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "try", ":", "return", "[", "pool", ".", "name", "(", ")", "for", "pool", "in", "conn", ".", "listAllStoragePools", "(", ")", "]", "fina...
List all storage pools. :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults .. versionadded:: 2019.2.0 CLI Example: .. code-block:: bash salt '*' ...
[ "List", "all", "storage", "pools", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L4982-L5002
train
List all libvirt storage pools.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
pool_info
def pool_info(name=None, **kwargs): ''' Return informations on a storage pool provided its name. :param name: libvirt storage pool name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to conn...
python
def pool_info(name=None, **kwargs): ''' Return informations on a storage pool provided its name. :param name: libvirt storage pool name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to conn...
[ "def", "pool_info", "(", "name", "=", "None", ",", "*", "*", "kwargs", ")", ":", "result", "=", "{", "}", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "def", "_pool_extract_infos", "(", "pool", ")", ":", "'''\n Format the pool info dicti...
Return informations on a storage pool provided its name. :param name: libvirt storage pool name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults If no name is...
[ "Return", "informations", "on", "a", "storage", "pool", "provided", "its", "name", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L5005-L5057
train
Return informations on a libvirt storage pool provided its name.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/virt.py
pool_start
def pool_start(name, **kwargs): ''' Start a defined libvirt storage pool. :param name: libvirt storage pool name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding de...
python
def pool_start(name, **kwargs): ''' Start a defined libvirt storage pool. :param name: libvirt storage pool name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding de...
[ "def", "pool_start", "(", "name", ",", "*", "*", "kwargs", ")", ":", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "try", ":", "pool", "=", "conn", ".", "storagePoolLookupByName", "(", "name", ")", "return", "not", "bool", "(", "pool", "."...
Start a defined libvirt storage pool. :param name: libvirt storage pool name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults .. versionadded:: 2019.2.0 ...
[ "Start", "a", "defined", "libvirt", "storage", "pool", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L5060-L5082
train
Start a libvirt storage pool.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
pool_build
def pool_build(name, **kwargs): ''' Build a defined libvirt storage pool. :param name: libvirt storage pool name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding de...
python
def pool_build(name, **kwargs): ''' Build a defined libvirt storage pool. :param name: libvirt storage pool name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding de...
[ "def", "pool_build", "(", "name", ",", "*", "*", "kwargs", ")", ":", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "try", ":", "pool", "=", "conn", ".", "storagePoolLookupByName", "(", "name", ")", "return", "not", "bool", "(", "pool", "."...
Build a defined libvirt storage pool. :param name: libvirt storage pool name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults .. versionadded:: 2019.2.0 ...
[ "Build", "a", "defined", "libvirt", "storage", "pool", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L5085-L5107
train
Build a libvirt storage pool.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
pool_stop
def pool_stop(name, **kwargs): ''' Stop a defined libvirt storage pool. :param name: libvirt storage pool name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defa...
python
def pool_stop(name, **kwargs): ''' Stop a defined libvirt storage pool. :param name: libvirt storage pool name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defa...
[ "def", "pool_stop", "(", "name", ",", "*", "*", "kwargs", ")", ":", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "try", ":", "pool", "=", "conn", ".", "storagePoolLookupByName", "(", "name", ")", "return", "not", "bool", "(", "pool", ".",...
Stop a defined libvirt storage pool. :param name: libvirt storage pool name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults .. versionadded:: 2019.2.0 C...
[ "Stop", "a", "defined", "libvirt", "storage", "pool", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L5110-L5132
train
Stop a defined libvirt storage pool.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
pool_undefine
def pool_undefine(name, **kwargs): ''' Remove a defined libvirt storage pool. The pool needs to be stopped before calling. :param name: libvirt storage pool name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param ...
python
def pool_undefine(name, **kwargs): ''' Remove a defined libvirt storage pool. The pool needs to be stopped before calling. :param name: libvirt storage pool name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param ...
[ "def", "pool_undefine", "(", "name", ",", "*", "*", "kwargs", ")", ":", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "try", ":", "pool", "=", "conn", ".", "storagePoolLookupByName", "(", "name", ")", "return", "not", "bool", "(", "pool", ...
Remove a defined libvirt storage pool. The pool needs to be stopped before calling. :param name: libvirt storage pool name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding ...
[ "Remove", "a", "defined", "libvirt", "storage", "pool", ".", "The", "pool", "needs", "to", "be", "stopped", "before", "calling", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L5135-L5157
train
Remove a libvirt storage pool.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
pool_delete
def pool_delete(name, fast=True, **kwargs): ''' Delete the resources of a defined libvirt storage pool. :param name: libvirt storage pool name :param fast: if set to False, zeroes out all the data. Default value is True. :param connection: libvirt connection URI, overriding default...
python
def pool_delete(name, fast=True, **kwargs): ''' Delete the resources of a defined libvirt storage pool. :param name: libvirt storage pool name :param fast: if set to False, zeroes out all the data. Default value is True. :param connection: libvirt connection URI, overriding default...
[ "def", "pool_delete", "(", "name", ",", "fast", "=", "True", ",", "*", "*", "kwargs", ")", ":", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "try", ":", "pool", "=", "conn", ".", "storagePoolLookupByName", "(", "name", ")", "flags", "=", ...
Delete the resources of a defined libvirt storage pool. :param name: libvirt storage pool name :param fast: if set to False, zeroes out all the data. Default value is True. :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overrid...
[ "Delete", "the", "resources", "of", "a", "defined", "libvirt", "storage", "pool", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L5160-L5187
train
Delete the resources of a libvirt storage pool.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
pool_refresh
def pool_refresh(name, **kwargs): ''' Refresh a defined libvirt storage pool. :param name: libvirt storage pool name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overridin...
python
def pool_refresh(name, **kwargs): ''' Refresh a defined libvirt storage pool. :param name: libvirt storage pool name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overridin...
[ "def", "pool_refresh", "(", "name", ",", "*", "*", "kwargs", ")", ":", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "try", ":", "pool", "=", "conn", ".", "storagePoolLookupByName", "(", "name", ")", "return", "not", "bool", "(", "pool", "...
Refresh a defined libvirt storage pool. :param name: libvirt storage pool name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults .. versionadded:: 2019.2.0 ...
[ "Refresh", "a", "defined", "libvirt", "storage", "pool", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L5190-L5212
train
Refresh a defined libvirt storage pool.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
pool_set_autostart
def pool_set_autostart(name, state='on', **kwargs): ''' Set the autostart flag on a libvirt storage pool so that the storage pool will start with the host system on reboot. :param name: libvirt storage pool name :param state: 'on' to auto start the pool, anything else to mark the ...
python
def pool_set_autostart(name, state='on', **kwargs): ''' Set the autostart flag on a libvirt storage pool so that the storage pool will start with the host system on reboot. :param name: libvirt storage pool name :param state: 'on' to auto start the pool, anything else to mark the ...
[ "def", "pool_set_autostart", "(", "name", ",", "state", "=", "'on'", ",", "*", "*", "kwargs", ")", ":", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "try", ":", "pool", "=", "conn", ".", "storagePoolLookupByName", "(", "name", ")", "return"...
Set the autostart flag on a libvirt storage pool so that the storage pool will start with the host system on reboot. :param name: libvirt storage pool name :param state: 'on' to auto start the pool, anything else to mark the pool not to be started when the host boots :param connection...
[ "Set", "the", "autostart", "flag", "on", "a", "libvirt", "storage", "pool", "so", "that", "the", "storage", "pool", "will", "start", "with", "the", "host", "system", "on", "reboot", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L5215-L5240
train
Sets the autostart flag on a libvirt storage pool
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
pool_list_volumes
def pool_list_volumes(name, **kwargs): ''' List the volumes contained in a defined libvirt storage pool. :param name: libvirt storage pool name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password...
python
def pool_list_volumes(name, **kwargs): ''' List the volumes contained in a defined libvirt storage pool. :param name: libvirt storage pool name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password...
[ "def", "pool_list_volumes", "(", "name", ",", "*", "*", "kwargs", ")", ":", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "try", ":", "pool", "=", "conn", ".", "storagePoolLookupByName", "(", "name", ")", "return", "pool", ".", "listVolumes", ...
List the volumes contained in a defined libvirt storage pool. :param name: libvirt storage pool name :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults .. versi...
[ "List", "the", "volumes", "contained", "in", "a", "defined", "libvirt", "storage", "pool", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L5243-L5265
train
List the volumes contained in a libvirt storage pool.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
_get_storage_vol
def _get_storage_vol(conn, pool, vol): ''' Helper function getting a storage volume. Will throw a libvirtError if the pool or the volume couldn't be found. ''' pool_obj = conn.storagePoolLookupByName(pool) return pool_obj.storageVolLookupByName(vol)
python
def _get_storage_vol(conn, pool, vol): ''' Helper function getting a storage volume. Will throw a libvirtError if the pool or the volume couldn't be found. ''' pool_obj = conn.storagePoolLookupByName(pool) return pool_obj.storageVolLookupByName(vol)
[ "def", "_get_storage_vol", "(", "conn", ",", "pool", ",", "vol", ")", ":", "pool_obj", "=", "conn", ".", "storagePoolLookupByName", "(", "pool", ")", "return", "pool_obj", ".", "storageVolLookupByName", "(", "vol", ")" ]
Helper function getting a storage volume. Will throw a libvirtError if the pool or the volume couldn't be found.
[ "Helper", "function", "getting", "a", "storage", "volume", ".", "Will", "throw", "a", "libvirtError", "if", "the", "pool", "or", "the", "volume", "couldn", "t", "be", "found", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L5268-L5274
train
Helper function getting a storage volume. Will throw libvirtError if the pool or the volume couldn t be found.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/virt.py
_get_all_volumes_paths
def _get_all_volumes_paths(conn): ''' Extract the path and backing stores path of all volumes. :param conn: libvirt connection to use ''' volumes = [vol for l in [obj.listAllVolumes() for obj in conn.listAllStoragePools()] for vol in l] return {vol.path(): [path.text for path in ElementTree.fro...
python
def _get_all_volumes_paths(conn): ''' Extract the path and backing stores path of all volumes. :param conn: libvirt connection to use ''' volumes = [vol for l in [obj.listAllVolumes() for obj in conn.listAllStoragePools()] for vol in l] return {vol.path(): [path.text for path in ElementTree.fro...
[ "def", "_get_all_volumes_paths", "(", "conn", ")", ":", "volumes", "=", "[", "vol", "for", "l", "in", "[", "obj", ".", "listAllVolumes", "(", ")", "for", "obj", "in", "conn", ".", "listAllStoragePools", "(", ")", "]", "for", "vol", "in", "l", "]", "r...
Extract the path and backing stores path of all volumes. :param conn: libvirt connection to use
[ "Extract", "the", "path", "and", "backing", "stores", "path", "of", "all", "volumes", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L5290-L5298
train
Extract the path and backing stores path of all volumes.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
volume_infos
def volume_infos(pool=None, volume=None, **kwargs): ''' Provide details on a storage volume. If no volume name is provided, the infos all the volumes contained in the pool are provided. If no pool is provided, the infos of the volumes of all pools are output. :param pool: libvirt storage pool name ...
python
def volume_infos(pool=None, volume=None, **kwargs): ''' Provide details on a storage volume. If no volume name is provided, the infos all the volumes contained in the pool are provided. If no pool is provided, the infos of the volumes of all pools are output. :param pool: libvirt storage pool name ...
[ "def", "volume_infos", "(", "pool", "=", "None", ",", "volume", "=", "None", ",", "*", "*", "kwargs", ")", ":", "result", "=", "{", "}", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "try", ":", "backing_stores", "=", "_get_all_volumes_paths...
Provide details on a storage volume. If no volume name is provided, the infos all the volumes contained in the pool are provided. If no pool is provided, the infos of the volumes of all pools are output. :param pool: libvirt storage pool name (default: ``None``) :param volume: name of the volume to get...
[ "Provide", "details", "on", "a", "storage", "volume", ".", "If", "no", "volume", "name", "is", "provided", "the", "infos", "all", "the", "volumes", "contained", "in", "the", "pool", "are", "provided", ".", "If", "no", "pool", "is", "provided", "the", "in...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L5301-L5367
train
Return a dictionary of storage volume infos for a given libvirt storage pool and volume.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/virt.py
volume_delete
def volume_delete(pool, volume, **kwargs): ''' Delete a libvirt managed volume. :param pool: libvirt storage pool name :param volume: name of the volume to delete :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :p...
python
def volume_delete(pool, volume, **kwargs): ''' Delete a libvirt managed volume. :param pool: libvirt storage pool name :param volume: name of the volume to delete :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :p...
[ "def", "volume_delete", "(", "pool", ",", "volume", ",", "*", "*", "kwargs", ")", ":", "conn", "=", "__get_conn", "(", "*", "*", "kwargs", ")", "try", ":", "vol", "=", "_get_storage_vol", "(", "conn", ",", "pool", ",", "volume", ")", "return", "not",...
Delete a libvirt managed volume. :param pool: libvirt storage pool name :param volume: name of the volume to delete :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding def...
[ "Delete", "a", "libvirt", "managed", "volume", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/virt.py#L5370-L5393
train
Delete a libvirt managed volume.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/mdata.py
list_
def list_(): ''' List available metadata CLI Example: .. code-block:: bash salt '*' mdata.list ''' mdata = _check_mdata_list() if mdata: cmd = '{0}'.format(mdata) return __salt__['cmd.run'](cmd, ignore_retcode=True).splitlines() return {}
python
def list_(): ''' List available metadata CLI Example: .. code-block:: bash salt '*' mdata.list ''' mdata = _check_mdata_list() if mdata: cmd = '{0}'.format(mdata) return __salt__['cmd.run'](cmd, ignore_retcode=True).splitlines() return {}
[ "def", "list_", "(", ")", ":", "mdata", "=", "_check_mdata_list", "(", ")", "if", "mdata", ":", "cmd", "=", "'{0}'", ".", "format", "(", "mdata", ")", "return", "__salt__", "[", "'cmd.run'", "]", "(", "cmd", ",", "ignore_retcode", "=", "True", ")", "...
List available metadata CLI Example: .. code-block:: bash salt '*' mdata.list
[ "List", "available", "metadata" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mdata.py#L81-L95
train
List available metadata available on the minion
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/mdata.py
get_
def get_(*keyname): ''' Get metadata keyname : string name of key .. note:: If no keynames are specified, we get all (public) properties CLI Example: .. code-block:: bash salt '*' mdata.get salt:role salt '*' mdata.get user-script salt:role ''' mdata...
python
def get_(*keyname): ''' Get metadata keyname : string name of key .. note:: If no keynames are specified, we get all (public) properties CLI Example: .. code-block:: bash salt '*' mdata.get salt:role salt '*' mdata.get user-script salt:role ''' mdata...
[ "def", "get_", "(", "*", "keyname", ")", ":", "mdata", "=", "_check_mdata_get", "(", ")", "ret", "=", "{", "}", "if", "not", "keyname", ":", "keyname", "=", "list_", "(", ")", "for", "k", "in", "keyname", ":", "if", "mdata", ":", "cmd", "=", "'{0...
Get metadata keyname : string name of key .. note:: If no keynames are specified, we get all (public) properties CLI Example: .. code-block:: bash salt '*' mdata.get salt:role salt '*' mdata.get user-script salt:role
[ "Get", "metadata" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mdata.py#L98-L130
train
Get metadata of a key.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/mdata.py
put_
def put_(keyname, val): ''' Put metadata prop : string name of property val : string value to set CLI Example: .. code-block:: bash salt '*' mdata.list ''' mdata = _check_mdata_put() ret = {} if mdata: cmd = 'echo {2} | {0} {1}'.format(mdata, ...
python
def put_(keyname, val): ''' Put metadata prop : string name of property val : string value to set CLI Example: .. code-block:: bash salt '*' mdata.list ''' mdata = _check_mdata_put() ret = {} if mdata: cmd = 'echo {2} | {0} {1}'.format(mdata, ...
[ "def", "put_", "(", "keyname", ",", "val", ")", ":", "mdata", "=", "_check_mdata_put", "(", ")", "ret", "=", "{", "}", "if", "mdata", ":", "cmd", "=", "'echo {2} | {0} {1}'", ".", "format", "(", "mdata", ",", "keyname", ",", "val", ")", "ret", "=", ...
Put metadata prop : string name of property val : string value to set CLI Example: .. code-block:: bash salt '*' mdata.list
[ "Put", "metadata" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mdata.py#L133-L155
train
Set the value of keyname in the property
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/mdata.py
delete_
def delete_(*keyname): ''' Delete metadata prop : string name of property CLI Example: .. code-block:: bash salt '*' mdata.get salt:role salt '*' mdata.get user-script salt:role ''' mdata = _check_mdata_delete() valid_keynames = list_() ret = {} for k...
python
def delete_(*keyname): ''' Delete metadata prop : string name of property CLI Example: .. code-block:: bash salt '*' mdata.get salt:role salt '*' mdata.get user-script salt:role ''' mdata = _check_mdata_delete() valid_keynames = list_() ret = {} for k...
[ "def", "delete_", "(", "*", "keyname", ")", ":", "mdata", "=", "_check_mdata_delete", "(", ")", "valid_keynames", "=", "list_", "(", ")", "ret", "=", "{", "}", "for", "k", "in", "keyname", ":", "if", "mdata", "and", "k", "in", "valid_keynames", ":", ...
Delete metadata prop : string name of property CLI Example: .. code-block:: bash salt '*' mdata.get salt:role salt '*' mdata.get user-script salt:role
[ "Delete", "metadata" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mdata.py#L158-L183
train
Delete all the keys in keyname
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/saltify.py
show_instance
def show_instance(name, call=None): ''' List the a single node, return dict of grains. ''' local = salt.client.LocalClient() ret = local.cmd(name, 'grains.items') ret.update(_build_required_items(ret)) return ret
python
def show_instance(name, call=None): ''' List the a single node, return dict of grains. ''' local = salt.client.LocalClient() ret = local.cmd(name, 'grains.items') ret.update(_build_required_items(ret)) return ret
[ "def", "show_instance", "(", "name", ",", "call", "=", "None", ")", ":", "local", "=", "salt", ".", "client", ".", "LocalClient", "(", ")", "ret", "=", "local", ".", "cmd", "(", "name", ",", "'grains.items'", ")", "ret", ".", "update", "(", "_build_r...
List the a single node, return dict of grains.
[ "List", "the", "a", "single", "node", "return", "dict", "of", "grains", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/saltify.py#L203-L210
train
Show the details of a single 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...
saltstack/salt
salt/cloud/clouds/saltify.py
create
def create(vm_): ''' if configuration parameter ``deploy`` is ``True``, Provision a single machine, adding its keys to the salt master else, Test ssh connections to the machine Configuration parameters: - deploy: (see above) - provider: name of entry in ``salt/cloud.provid...
python
def create(vm_): ''' if configuration parameter ``deploy`` is ``True``, Provision a single machine, adding its keys to the salt master else, Test ssh connections to the machine Configuration parameters: - deploy: (see above) - provider: name of entry in ``salt/cloud.provid...
[ "def", "create", "(", "vm_", ")", ":", "deploy_config", "=", "config", ".", "get_cloud_config_value", "(", "'deploy'", ",", "vm_", ",", "__opts__", ",", "default", "=", "False", ")", "# If ssh_host is not set, default to the minion name", "if", "not", "config", "....
if configuration parameter ``deploy`` is ``True``, Provision a single machine, adding its keys to the salt master else, Test ssh connections to the machine Configuration parameters: - deploy: (see above) - provider: name of entry in ``salt/cloud.providers.d/???`` file - ssh_ho...
[ "if", "configuration", "parameter", "deploy", "is", "True" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/saltify.py#L213-L291
train
Create a new salt master
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/saltify.py
_verify
def _verify(vm_): ''' Verify credentials for an existing system ''' log.info('Verifying credentials for %s', vm_['name']) win_installer = config.get_cloud_config_value( 'win_installer', vm_, __opts__) if win_installer: log.debug('Testing Windows authentication method for %s', ...
python
def _verify(vm_): ''' Verify credentials for an existing system ''' log.info('Verifying credentials for %s', vm_['name']) win_installer = config.get_cloud_config_value( 'win_installer', vm_, __opts__) if win_installer: log.debug('Testing Windows authentication method for %s', ...
[ "def", "_verify", "(", "vm_", ")", ":", "log", ".", "info", "(", "'Verifying credentials for %s'", ",", "vm_", "[", "'name'", "]", ")", "win_installer", "=", "config", ".", "get_cloud_config_value", "(", "'win_installer'", ",", "vm_", ",", "__opts__", ")", "...
Verify credentials for an existing system
[ "Verify", "credentials", "for", "an", "existing", "system" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/saltify.py#L305-L396
train
Verify that the credentials for an existing system is correct.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/saltify.py
destroy
def destroy(name, call=None): ''' Destroy a node. .. versionadded:: 2018.3.0 Disconnect a minion from the master, and remove its keys. Optionally, (if ``remove_config_on_destroy`` is ``True``), disables salt-minion from running on the minion, and erases the Salt configuration files from i...
python
def destroy(name, call=None): ''' Destroy a node. .. versionadded:: 2018.3.0 Disconnect a minion from the master, and remove its keys. Optionally, (if ``remove_config_on_destroy`` is ``True``), disables salt-minion from running on the minion, and erases the Salt configuration files from i...
[ "def", "destroy", "(", "name", ",", "call", "=", "None", ")", ":", "if", "call", "==", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The destroy action must be called with -d, --destroy, '", "'-a, or --action.'", ")", "opts", "=", "__opts__", "__utils__", ...
Destroy a node. .. versionadded:: 2018.3.0 Disconnect a minion from the master, and remove its keys. Optionally, (if ``remove_config_on_destroy`` is ``True``), disables salt-minion from running on the minion, and erases the Salt configuration files from it. Optionally, (if ``shutdown_on_...
[ "Destroy", "a", "node", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/saltify.py#L399-L485
train
Destroy a 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...
saltstack/salt
salt/cloud/clouds/saltify.py
reboot
def reboot(name, call=None): ''' Reboot a saltify minion. ..versionadded:: 2018.3.0 name The name of the VM to reboot. CLI Example: .. code-block:: bash salt-cloud -a reboot vm_name ''' if call != 'action': raise SaltCloudException( 'The reboot a...
python
def reboot(name, call=None): ''' Reboot a saltify minion. ..versionadded:: 2018.3.0 name The name of the VM to reboot. CLI Example: .. code-block:: bash salt-cloud -a reboot vm_name ''' if call != 'action': raise SaltCloudException( 'The reboot a...
[ "def", "reboot", "(", "name", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'action'", ":", "raise", "SaltCloudException", "(", "'The reboot action must be called with -a or --action.'", ")", "local", "=", "salt", ".", "client", ".", "LocalClient", "(...
Reboot a saltify minion. ..versionadded:: 2018.3.0 name The name of the VM to reboot. CLI Example: .. code-block:: bash salt-cloud -a reboot vm_name
[ "Reboot", "a", "saltify", "minion", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/saltify.py#L488-L510
train
Reboot a saltify resource.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/jenkins.py
present
def present(name, config=None, **kwargs): ''' Ensure the job is present in the Jenkins configured jobs name The unique name for the Jenkins job config The Salt URL for the file to use for configuring the job ''' ret = {'name': name, 'result':...
python
def present(name, config=None, **kwargs): ''' Ensure the job is present in the Jenkins configured jobs name The unique name for the Jenkins job config The Salt URL for the file to use for configuring the job ''' ret = {'name': name, 'result':...
[ "def", "present", "(", "name", ",", "config", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "True", ",", "'changes'", ":", "{", "}", ",", "'comment'", ":", "[", "'Job {0} is up to date.'...
Ensure the job is present in the Jenkins configured jobs name The unique name for the Jenkins job config The Salt URL for the file to use for configuring the job
[ "Ensure", "the", "job", "is", "present", "in", "the", "Jenkins", "configured", "jobs" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/jenkins.py#L47-L101
train
Ensure the Jenkins job is present in Jenkins configured jobs
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/jenkins.py
absent
def absent(name, **kwargs): ''' Ensure the job is absent from the Jenkins configured jobs name The name of the Jenkins job to remove ''' ret = {'name': name, 'result': True, 'changes': {}, 'comment': []} if __salt__['jenkins.job_exists'](name...
python
def absent(name, **kwargs): ''' Ensure the job is absent from the Jenkins configured jobs name The name of the Jenkins job to remove ''' ret = {'name': name, 'result': True, 'changes': {}, 'comment': []} if __salt__['jenkins.job_exists'](name...
[ "def", "absent", "(", "name", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "True", ",", "'changes'", ":", "{", "}", ",", "'comment'", ":", "[", "]", "}", "if", "__salt__", "[", "'jenkins.job_exist...
Ensure the job is absent from the Jenkins configured jobs name The name of the Jenkins job to remove
[ "Ensure", "the", "job", "is", "absent", "from", "the", "Jenkins", "configured", "jobs" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/jenkins.py#L104-L126
train
Ensure the Jenkins job is absent from the Jenkins configured jobs
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/beacons/salt_proxy.py
_run_proxy_processes
def _run_proxy_processes(proxies): ''' Iterate over a list of proxy names and restart any that aren't running ''' ret = [] for proxy in proxies: result = {} if not __salt__['salt_proxy.is_running'](proxy)['result']: __salt__['salt_proxy.configure_proxy'](proxy, st...
python
def _run_proxy_processes(proxies): ''' Iterate over a list of proxy names and restart any that aren't running ''' ret = [] for proxy in proxies: result = {} if not __salt__['salt_proxy.is_running'](proxy)['result']: __salt__['salt_proxy.configure_proxy'](proxy, st...
[ "def", "_run_proxy_processes", "(", "proxies", ")", ":", "ret", "=", "[", "]", "for", "proxy", "in", "proxies", ":", "result", "=", "{", "}", "if", "not", "__salt__", "[", "'salt_proxy.is_running'", "]", "(", "proxy", ")", "[", "'result'", "]", ":", "_...
Iterate over a list of proxy names and restart any that aren't running
[ "Iterate", "over", "a", "list", "of", "proxy", "names", "and", "restart", "any", "that", "aren", "t", "running" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/beacons/salt_proxy.py#L17-L34
train
Iterate over a list of proxynames and restart any that aren t running
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/beacons/salt_proxy.py
beacon
def beacon(config): ''' Handle configured proxies .. code-block:: yaml beacons: salt_proxy: - proxies: p8000: {} p8001: {} ''' log.trace('salt proxy beacon called') _config = {} list(map(_config.update, config)) return _ru...
python
def beacon(config): ''' Handle configured proxies .. code-block:: yaml beacons: salt_proxy: - proxies: p8000: {} p8001: {} ''' log.trace('salt proxy beacon called') _config = {} list(map(_config.update, config)) return _ru...
[ "def", "beacon", "(", "config", ")", ":", "log", ".", "trace", "(", "'salt proxy beacon called'", ")", "_config", "=", "{", "}", "list", "(", "map", "(", "_config", ".", "update", ",", "config", ")", ")", "return", "_run_proxy_processes", "(", "_config", ...
Handle configured proxies .. code-block:: yaml beacons: salt_proxy: - proxies: p8000: {} p8001: {}
[ "Handle", "configured", "proxies" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/beacons/salt_proxy.py#L60-L77
train
Handle configured proxies and return a list of the processed proxies
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/powerpath.py
list_licenses
def list_licenses(): ''' returns a list of applied powerpath license keys ''' KEY_PATTERN = re.compile('Key (.*)') keys = [] out = __salt__['cmd.run']('/sbin/emcpreg -list') for line in out.splitlines(): match = KEY_PATTERN.match(line) if not match: continue ...
python
def list_licenses(): ''' returns a list of applied powerpath license keys ''' KEY_PATTERN = re.compile('Key (.*)') keys = [] out = __salt__['cmd.run']('/sbin/emcpreg -list') for line in out.splitlines(): match = KEY_PATTERN.match(line) if not match: continue ...
[ "def", "list_licenses", "(", ")", ":", "KEY_PATTERN", "=", "re", ".", "compile", "(", "'Key (.*)'", ")", "keys", "=", "[", "]", "out", "=", "__salt__", "[", "'cmd.run'", "]", "(", "'/sbin/emcpreg -list'", ")", "for", "line", "in", "out", ".", "splitlines...
returns a list of applied powerpath license keys
[ "returns", "a", "list", "of", "applied", "powerpath", "license", "keys" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/powerpath.py#L54-L70
train
returns a list of applied powerpath license keys returns a list of applied powerpath license keys
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/powerpath.py
add_license
def add_license(key): ''' Add a license ''' result = { 'result': False, 'retcode': -1, 'output': '' } if not has_powerpath(): result['output'] = 'PowerPath is not installed' return result cmd = '/sbin/emcpreg -add {0}'.format(key) ret = __salt__[...
python
def add_license(key): ''' Add a license ''' result = { 'result': False, 'retcode': -1, 'output': '' } if not has_powerpath(): result['output'] = 'PowerPath is not installed' return result cmd = '/sbin/emcpreg -add {0}'.format(key) ret = __salt__[...
[ "def", "add_license", "(", "key", ")", ":", "result", "=", "{", "'result'", ":", "False", ",", "'retcode'", ":", "-", "1", ",", "'output'", ":", "''", "}", "if", "not", "has_powerpath", "(", ")", ":", "result", "[", "'output'", "]", "=", "'PowerPath ...
Add a license
[ "Add", "a", "license" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/powerpath.py#L73-L98
train
Add a license to the specified key
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/openvswitch_db.py
managed
def managed(name, table, data, record=None): ''' Ensures that the specified columns of the named record have the specified values. Args: name: The name of the record. table: The name of the table to which the record belongs. data: Dictionary containing a mapping from column name...
python
def managed(name, table, data, record=None): ''' Ensures that the specified columns of the named record have the specified values. Args: name: The name of the record. table: The name of the table to which the record belongs. data: Dictionary containing a mapping from column name...
[ "def", "managed", "(", "name", ",", "table", ",", "data", ",", "record", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", "}", "if", "recor...
Ensures that the specified columns of the named record have the specified values. Args: name: The name of the record. table: The name of the table to which the record belongs. data: Dictionary containing a mapping from column names to the desired values. Columns that exist, ...
[ "Ensures", "that", "the", "specified", "columns", "of", "the", "named", "record", "have", "the", "specified", "values", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/openvswitch_db.py#L17-L69
train
Ensures that the specified columns of the named record are set to the specified values.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/x509.py
_fix_ctx
def _fix_ctx(m2_ctx, issuer=None): ''' This is part of an ugly hack to fix an ancient bug in M2Crypto https://bugzilla.osafoundation.org/show_bug.cgi?id=7530#c13 ''' ctx = _Ctx.from_address(int(m2_ctx)) # pylint: disable=no-member ctx.flags = 0 ctx.subject_cert = None ctx.subject_req =...
python
def _fix_ctx(m2_ctx, issuer=None): ''' This is part of an ugly hack to fix an ancient bug in M2Crypto https://bugzilla.osafoundation.org/show_bug.cgi?id=7530#c13 ''' ctx = _Ctx.from_address(int(m2_ctx)) # pylint: disable=no-member ctx.flags = 0 ctx.subject_cert = None ctx.subject_req =...
[ "def", "_fix_ctx", "(", "m2_ctx", ",", "issuer", "=", "None", ")", ":", "ctx", "=", "_Ctx", ".", "from_address", "(", "int", "(", "m2_ctx", ")", ")", "# pylint: disable=no-member", "ctx", ".", "flags", "=", "0", "ctx", ".", "subject_cert", "=", "None", ...
This is part of an ugly hack to fix an ancient bug in M2Crypto https://bugzilla.osafoundation.org/show_bug.cgi?id=7530#c13
[ "This", "is", "part", "of", "an", "ugly", "hack", "to", "fix", "an", "ancient", "bug", "in", "M2Crypto", "https", ":", "//", "bugzilla", ".", "osafoundation", ".", "org", "/", "show_bug", ".", "cgi?id", "=", "7530#c13" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L105-L119
train
Fixes the context of a M2Crypto .
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/x509.py
_new_extension
def _new_extension(name, value, critical=0, issuer=None, _pyfree=1): ''' Create new X509_Extension, This is required because M2Crypto doesn't support getting the publickeyidentifier from the issuer to create the authoritykeyidentifier extension. ''' if name == 'subjectKeyIdentifier' and value.st...
python
def _new_extension(name, value, critical=0, issuer=None, _pyfree=1): ''' Create new X509_Extension, This is required because M2Crypto doesn't support getting the publickeyidentifier from the issuer to create the authoritykeyidentifier extension. ''' if name == 'subjectKeyIdentifier' and value.st...
[ "def", "_new_extension", "(", "name", ",", "value", ",", "critical", "=", "0", ",", "issuer", "=", "None", ",", "_pyfree", "=", "1", ")", ":", "if", "name", "==", "'subjectKeyIdentifier'", "and", "value", ".", "strip", "(", "'0123456789abcdefABCDEF:'", ")"...
Create new X509_Extension, This is required because M2Crypto doesn't support getting the publickeyidentifier from the issuer to create the authoritykeyidentifier extension.
[ "Create", "new", "X509_Extension", "This", "is", "required", "because", "M2Crypto", "doesn", "t", "support", "getting", "the", "publickeyidentifier", "from", "the", "issuer", "to", "create", "the", "authoritykeyidentifier", "extension", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L122-L158
train
Create a new X509 extension.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/x509.py
_parse_openssl_req
def _parse_openssl_req(csr_filename): ''' Parses openssl command line output, this is a workaround for M2Crypto's inability to get them from CSR objects. ''' if not salt.utils.path.which('openssl'): raise salt.exceptions.SaltInvocationError( 'openssl binary not found in path' ...
python
def _parse_openssl_req(csr_filename): ''' Parses openssl command line output, this is a workaround for M2Crypto's inability to get them from CSR objects. ''' if not salt.utils.path.which('openssl'): raise salt.exceptions.SaltInvocationError( 'openssl binary not found in path' ...
[ "def", "_parse_openssl_req", "(", "csr_filename", ")", ":", "if", "not", "salt", ".", "utils", ".", "path", ".", "which", "(", "'openssl'", ")", ":", "raise", "salt", ".", "exceptions", ".", "SaltInvocationError", "(", "'openssl binary not found in path'", ")", ...
Parses openssl command line output, this is a workaround for M2Crypto's inability to get them from CSR objects.
[ "Parses", "openssl", "command", "line", "output", "this", "is", "a", "workaround", "for", "M2Crypto", "s", "inability", "to", "get", "them", "from", "CSR", "objects", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L164-L180
train
Parses openssl command line output and returns a dict of the resulting CSR 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/modules/x509.py
_get_csr_extensions
def _get_csr_extensions(csr): ''' Returns a list of dicts containing the name, value and critical value of any extension contained in a csr object. ''' ret = OrderedDict() csrtempfile = tempfile.NamedTemporaryFile() csrtempfile.write(csr.as_pem()) csrtempfile.flush() csryaml = _pars...
python
def _get_csr_extensions(csr): ''' Returns a list of dicts containing the name, value and critical value of any extension contained in a csr object. ''' ret = OrderedDict() csrtempfile = tempfile.NamedTemporaryFile() csrtempfile.write(csr.as_pem()) csrtempfile.flush() csryaml = _pars...
[ "def", "_get_csr_extensions", "(", "csr", ")", ":", "ret", "=", "OrderedDict", "(", ")", "csrtempfile", "=", "tempfile", ".", "NamedTemporaryFile", "(", ")", "csrtempfile", ".", "write", "(", "csr", ".", "as_pem", "(", ")", ")", "csrtempfile", ".", "flush"...
Returns a list of dicts containing the name, value and critical value of any extension contained in a csr object.
[ "Returns", "a", "list", "of", "dicts", "containing", "the", "name", "value", "and", "critical", "value", "of", "any", "extension", "contained", "in", "a", "csr", "object", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L183-L206
train
Returns a list of dicts containing the name value and critical value of any extension contained in a CSR 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/x509.py
_parse_openssl_crl
def _parse_openssl_crl(crl_filename): ''' Parses openssl command line output, this is a workaround for M2Crypto's inability to get them from CSR objects. ''' if not salt.utils.path.which('openssl'): raise salt.exceptions.SaltInvocationError( 'openssl binary not found in path' ...
python
def _parse_openssl_crl(crl_filename): ''' Parses openssl command line output, this is a workaround for M2Crypto's inability to get them from CSR objects. ''' if not salt.utils.path.which('openssl'): raise salt.exceptions.SaltInvocationError( 'openssl binary not found in path' ...
[ "def", "_parse_openssl_crl", "(", "crl_filename", ")", ":", "if", "not", "salt", ".", "utils", ".", "path", ".", "which", "(", "'openssl'", ")", ":", "raise", "salt", ".", "exceptions", ".", "SaltInvocationError", "(", "'openssl binary not found in path'", ")", ...
Parses openssl command line output, this is a workaround for M2Crypto's inability to get them from CSR objects.
[ "Parses", "openssl", "command", "line", "output", "this", "is", "a", "workaround", "for", "M2Crypto", "s", "inability", "to", "get", "them", "from", "CSR", "objects", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L212-L282
train
Parses the contents of a openssl - text file and returns a dict of the keys to be used in the CSR 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/modules/x509.py
_pretty_hex
def _pretty_hex(hex_str): ''' Nicely formats hex strings ''' if len(hex_str) % 2 != 0: hex_str = '0' + hex_str return ':'.join( [hex_str[i:i + 2] for i in range(0, len(hex_str), 2)]).upper()
python
def _pretty_hex(hex_str): ''' Nicely formats hex strings ''' if len(hex_str) % 2 != 0: hex_str = '0' + hex_str return ':'.join( [hex_str[i:i + 2] for i in range(0, len(hex_str), 2)]).upper()
[ "def", "_pretty_hex", "(", "hex_str", ")", ":", "if", "len", "(", "hex_str", ")", "%", "2", "!=", "0", ":", "hex_str", "=", "'0'", "+", "hex_str", "return", "':'", ".", "join", "(", "[", "hex_str", "[", "i", ":", "i", "+", "2", "]", "for", "i",...
Nicely formats hex strings
[ "Nicely", "formats", "hex", "strings" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L295-L302
train
Nicely formats hex strings
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/x509.py
_text_or_file
def _text_or_file(input_): ''' Determines if input is a path to a file, or a string with the content to be parsed. ''' if _isfile(input_): with salt.utils.files.fopen(input_) as fp_: out = salt.utils.stringutils.to_str(fp_.read()) else: out = salt.utils.stringutils.to...
python
def _text_or_file(input_): ''' Determines if input is a path to a file, or a string with the content to be parsed. ''' if _isfile(input_): with salt.utils.files.fopen(input_) as fp_: out = salt.utils.stringutils.to_str(fp_.read()) else: out = salt.utils.stringutils.to...
[ "def", "_text_or_file", "(", "input_", ")", ":", "if", "_isfile", "(", "input_", ")", ":", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "input_", ")", "as", "fp_", ":", "out", "=", "salt", ".", "utils", ".", "stringutils", ".", "t...
Determines if input is a path to a file, or a string with the content to be parsed.
[ "Determines", "if", "input", "is", "a", "path", "to", "a", "file", "or", "a", "string", "with", "the", "content", "to", "be", "parsed", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L324-L335
train
Determines if input is a file or a string with the Taxonomy content to be parsed.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/x509.py
_parse_subject
def _parse_subject(subject): ''' Returns a dict containing all values in an X509 Subject ''' ret = {} nids = [] for nid_name, nid_num in six.iteritems(subject.nid): if nid_num in nids: continue try: val = getattr(subject, nid_name) if val: ...
python
def _parse_subject(subject): ''' Returns a dict containing all values in an X509 Subject ''' ret = {} nids = [] for nid_name, nid_num in six.iteritems(subject.nid): if nid_num in nids: continue try: val = getattr(subject, nid_name) if val: ...
[ "def", "_parse_subject", "(", "subject", ")", ":", "ret", "=", "{", "}", "nids", "=", "[", "]", "for", "nid_name", ",", "nid_num", "in", "six", ".", "iteritems", "(", "subject", ".", "nid", ")", ":", "if", "nid_num", "in", "nids", ":", "continue", ...
Returns a dict containing all values in an X509 Subject
[ "Returns", "a", "dict", "containing", "all", "values", "in", "an", "X509", "Subject" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L338-L355
train
Returns a dict containing all values in an X509 Subject
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/x509.py
_get_certificate_obj
def _get_certificate_obj(cert): ''' Returns a certificate object based on PEM text. ''' if isinstance(cert, M2Crypto.X509.X509): return cert text = _text_or_file(cert) text = get_pem_entry(text, pem_type='CERTIFICATE') return M2Crypto.X509.load_cert_string(text)
python
def _get_certificate_obj(cert): ''' Returns a certificate object based on PEM text. ''' if isinstance(cert, M2Crypto.X509.X509): return cert text = _text_or_file(cert) text = get_pem_entry(text, pem_type='CERTIFICATE') return M2Crypto.X509.load_cert_string(text)
[ "def", "_get_certificate_obj", "(", "cert", ")", ":", "if", "isinstance", "(", "cert", ",", "M2Crypto", ".", "X509", ".", "X509", ")", ":", "return", "cert", "text", "=", "_text_or_file", "(", "cert", ")", "text", "=", "get_pem_entry", "(", "text", ",", ...
Returns a certificate object based on PEM text.
[ "Returns", "a", "certificate", "object", "based", "on", "PEM", "text", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L358-L367
train
Returns a certificate object based on PEM text.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/x509.py
_get_private_key_obj
def _get_private_key_obj(private_key, passphrase=None): ''' Returns a private key object based on PEM text. ''' private_key = _text_or_file(private_key) private_key = get_pem_entry(private_key, pem_type='(?:RSA )?PRIVATE KEY') rsaprivkey = M2Crypto.RSA.load_key_string( private_key, callb...
python
def _get_private_key_obj(private_key, passphrase=None): ''' Returns a private key object based on PEM text. ''' private_key = _text_or_file(private_key) private_key = get_pem_entry(private_key, pem_type='(?:RSA )?PRIVATE KEY') rsaprivkey = M2Crypto.RSA.load_key_string( private_key, callb...
[ "def", "_get_private_key_obj", "(", "private_key", ",", "passphrase", "=", "None", ")", ":", "private_key", "=", "_text_or_file", "(", "private_key", ")", "private_key", "=", "get_pem_entry", "(", "private_key", ",", "pem_type", "=", "'(?:RSA )?PRIVATE KEY'", ")", ...
Returns a private key object based on PEM text.
[ "Returns", "a", "private", "key", "object", "based", "on", "PEM", "text", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L370-L380
train
Returns a private key object based on PEM text.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/x509.py
_passphrase_callback
def _passphrase_callback(passphrase): ''' Returns a callback function used to supply a passphrase for private keys ''' def f(*args): return salt.utils.stringutils.to_bytes(passphrase) return f
python
def _passphrase_callback(passphrase): ''' Returns a callback function used to supply a passphrase for private keys ''' def f(*args): return salt.utils.stringutils.to_bytes(passphrase) return f
[ "def", "_passphrase_callback", "(", "passphrase", ")", ":", "def", "f", "(", "*", "args", ")", ":", "return", "salt", ".", "utils", ".", "stringutils", ".", "to_bytes", "(", "passphrase", ")", "return", "f" ]
Returns a callback function used to supply a passphrase for private keys
[ "Returns", "a", "callback", "function", "used", "to", "supply", "a", "passphrase", "for", "private", "keys" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L383-L389
train
Returns a callback function used to supply a passphrase for private keys
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/x509.py
_get_request_obj
def _get_request_obj(csr): ''' Returns a CSR object based on PEM text. ''' text = _text_or_file(csr) text = get_pem_entry(text, pem_type='CERTIFICATE REQUEST') return M2Crypto.X509.load_request_string(text)
python
def _get_request_obj(csr): ''' Returns a CSR object based on PEM text. ''' text = _text_or_file(csr) text = get_pem_entry(text, pem_type='CERTIFICATE REQUEST') return M2Crypto.X509.load_request_string(text)
[ "def", "_get_request_obj", "(", "csr", ")", ":", "text", "=", "_text_or_file", "(", "csr", ")", "text", "=", "get_pem_entry", "(", "text", ",", "pem_type", "=", "'CERTIFICATE REQUEST'", ")", "return", "M2Crypto", ".", "X509", ".", "load_request_string", "(", ...
Returns a CSR object based on PEM text.
[ "Returns", "a", "CSR", "object", "based", "on", "PEM", "text", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L392-L398
train
Returns a CSR object based on PEM text.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/x509.py
_get_pubkey_hash
def _get_pubkey_hash(cert): ''' Returns the sha1 hash of the modulus of a public key in a cert Used for generating subject key identifiers ''' sha_hash = hashlib.sha1(cert.get_pubkey().get_modulus()).hexdigest() return _pretty_hex(sha_hash)
python
def _get_pubkey_hash(cert): ''' Returns the sha1 hash of the modulus of a public key in a cert Used for generating subject key identifiers ''' sha_hash = hashlib.sha1(cert.get_pubkey().get_modulus()).hexdigest() return _pretty_hex(sha_hash)
[ "def", "_get_pubkey_hash", "(", "cert", ")", ":", "sha_hash", "=", "hashlib", ".", "sha1", "(", "cert", ".", "get_pubkey", "(", ")", ".", "get_modulus", "(", ")", ")", ".", "hexdigest", "(", ")", "return", "_pretty_hex", "(", "sha_hash", ")" ]
Returns the sha1 hash of the modulus of a public key in a cert Used for generating subject key identifiers
[ "Returns", "the", "sha1", "hash", "of", "the", "modulus", "of", "a", "public", "key", "in", "a", "cert", "Used", "for", "generating", "subject", "key", "identifiers" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L401-L407
train
Returns the sha1 hash of the modulus of a public key in a cert Used for generating subject key identifiers
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/x509.py
_make_regex
def _make_regex(pem_type): ''' Dynamically generate a regex to match pem_type ''' return re.compile( r"\s*(?P<pem_header>-----BEGIN {0}-----)\s+" r"(?:(?P<proc_type>Proc-Type: 4,ENCRYPTED)\s*)?" r"(?:(?P<dek_info>DEK-Info: (?:DES-[3A-Z\-]+,[0-9A-F]{{16}}|[0-9A-Z\-]+,[0-9A-F]{{32}...
python
def _make_regex(pem_type): ''' Dynamically generate a regex to match pem_type ''' return re.compile( r"\s*(?P<pem_header>-----BEGIN {0}-----)\s+" r"(?:(?P<proc_type>Proc-Type: 4,ENCRYPTED)\s*)?" r"(?:(?P<dek_info>DEK-Info: (?:DES-[3A-Z\-]+,[0-9A-F]{{16}}|[0-9A-Z\-]+,[0-9A-F]{{32}...
[ "def", "_make_regex", "(", "pem_type", ")", ":", "return", "re", ".", "compile", "(", "r\"\\s*(?P<pem_header>-----BEGIN {0}-----)\\s+\"", "r\"(?:(?P<proc_type>Proc-Type: 4,ENCRYPTED)\\s*)?\"", "r\"(?:(?P<dek_info>DEK-Info: (?:DES-[3A-Z\\-]+,[0-9A-F]{{16}}|[0-9A-Z\\-]+,[0-9A-F]{{32}}))\\s*)...
Dynamically generate a regex to match pem_type
[ "Dynamically", "generate", "a", "regex", "to", "match", "pem_type" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L418-L429
train
Dynamically generate a regex to match pem_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/modules/x509.py
get_pem_entry
def get_pem_entry(text, pem_type=None): ''' Returns a properly formatted PEM string from the input text fixing any whitespace or line-break issues text: Text containing the X509 PEM entry to be returned or path to a file containing the text. pem_type: If specified, this fun...
python
def get_pem_entry(text, pem_type=None): ''' Returns a properly formatted PEM string from the input text fixing any whitespace or line-break issues text: Text containing the X509 PEM entry to be returned or path to a file containing the text. pem_type: If specified, this fun...
[ "def", "get_pem_entry", "(", "text", ",", "pem_type", "=", "None", ")", ":", "text", "=", "_text_or_file", "(", "text", ")", "# Replace encoded newlines", "text", "=", "text", ".", "replace", "(", "'\\\\n'", ",", "'\\n'", ")", "_match", "=", "None", "if", ...
Returns a properly formatted PEM string from the input text fixing any whitespace or line-break issues text: Text containing the X509 PEM entry to be returned or path to a file containing the text. pem_type: If specified, this function will only return a pem of a certain type, ...
[ "Returns", "a", "properly", "formatted", "PEM", "string", "from", "the", "input", "text", "fixing", "any", "whitespace", "or", "line", "-", "break", "issues" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L432-L509
train
Returns a properly formatted PEM string from the input text removing any whitespace or line - break issues and adding a new entry to the output.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/x509.py
get_pem_entries
def get_pem_entries(glob_path): ''' Returns a dict containing PEM entries in files matching a glob glob_path: A path to certificates to be read and returned. CLI Example: .. code-block:: bash salt '*' x509.get_pem_entries "/etc/pki/*.crt" ''' ret = {} for path in glo...
python
def get_pem_entries(glob_path): ''' Returns a dict containing PEM entries in files matching a glob glob_path: A path to certificates to be read and returned. CLI Example: .. code-block:: bash salt '*' x509.get_pem_entries "/etc/pki/*.crt" ''' ret = {} for path in glo...
[ "def", "get_pem_entries", "(", "glob_path", ")", ":", "ret", "=", "{", "}", "for", "path", "in", "glob", ".", "glob", "(", "glob_path", ")", ":", "if", "os", ".", "path", ".", "isfile", "(", "path", ")", ":", "try", ":", "ret", "[", "path", "]", ...
Returns a dict containing PEM entries in files matching a glob glob_path: A path to certificates to be read and returned. CLI Example: .. code-block:: bash salt '*' x509.get_pem_entries "/etc/pki/*.crt"
[ "Returns", "a", "dict", "containing", "PEM", "entries", "in", "files", "matching", "a", "glob" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L512-L534
train
Returns a dict containing PEM entries in files matching a glob_path
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/x509.py
read_certificate
def read_certificate(certificate): ''' Returns a dict containing details of a certificate. Input can be a PEM string or file path. certificate: The certificate to be read. Can be a path to a certificate file, or a string containing the PEM formatted text of the certificate. CLI Exa...
python
def read_certificate(certificate): ''' Returns a dict containing details of a certificate. Input can be a PEM string or file path. certificate: The certificate to be read. Can be a path to a certificate file, or a string containing the PEM formatted text of the certificate. CLI Exa...
[ "def", "read_certificate", "(", "certificate", ")", ":", "cert", "=", "_get_certificate_obj", "(", "certificate", ")", "ret", "=", "{", "# X509 Version 3 has a value of 2 in the field.", "# Version 2 has a value of 1.", "# https://tools.ietf.org/html/rfc5280#section-4.1.2.1", "'V...
Returns a dict containing details of a certificate. Input can be a PEM string or file path. certificate: The certificate to be read. Can be a path to a certificate file, or a string containing the PEM formatted text of the certificate. CLI Example: .. code-block:: bash salt '...
[ "Returns", "a", "dict", "containing", "details", "of", "a", "certificate", ".", "Input", "can", "be", "a", "PEM", "string", "or", "file", "path", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L537-L588
train
Read a certificate file and return a dict containing details of the certificate.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/x509.py
read_certificates
def read_certificates(glob_path): ''' Returns a dict containing details of a all certificates matching a glob glob_path: A path to certificates to be read and returned. CLI Example: .. code-block:: bash salt '*' x509.read_certificates "/etc/pki/*.crt" ''' ret = {} fo...
python
def read_certificates(glob_path): ''' Returns a dict containing details of a all certificates matching a glob glob_path: A path to certificates to be read and returned. CLI Example: .. code-block:: bash salt '*' x509.read_certificates "/etc/pki/*.crt" ''' ret = {} fo...
[ "def", "read_certificates", "(", "glob_path", ")", ":", "ret", "=", "{", "}", "for", "path", "in", "glob", ".", "glob", "(", "glob_path", ")", ":", "if", "os", ".", "path", ".", "isfile", "(", "path", ")", ":", "try", ":", "ret", "[", "path", "]"...
Returns a dict containing details of a all certificates matching a glob glob_path: A path to certificates to be read and returned. CLI Example: .. code-block:: bash salt '*' x509.read_certificates "/etc/pki/*.crt"
[ "Returns", "a", "dict", "containing", "details", "of", "a", "all", "certificates", "matching", "a", "glob" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L591-L613
train
Reads all certificates matching a glob_path and returns a dict containing details of a all certificates matching a glob_path
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/x509.py
read_csr
def read_csr(csr): ''' Returns a dict containing details of a certificate request. :depends: - OpenSSL command line tool csr: A path or PEM encoded string containing the CSR to read. CLI Example: .. code-block:: bash salt '*' x509.read_csr /etc/pki/mycert.csr ''' c...
python
def read_csr(csr): ''' Returns a dict containing details of a certificate request. :depends: - OpenSSL command line tool csr: A path or PEM encoded string containing the CSR to read. CLI Example: .. code-block:: bash salt '*' x509.read_csr /etc/pki/mycert.csr ''' c...
[ "def", "read_csr", "(", "csr", ")", ":", "csr", "=", "_get_request_obj", "(", "csr", ")", "ret", "=", "{", "# X509 Version 3 has a value of 2 in the field.", "# Version 2 has a value of 1.", "# https://tools.ietf.org/html/rfc5280#section-4.1.2.1", "'Version'", ":", "csr", "...
Returns a dict containing details of a certificate request. :depends: - OpenSSL command line tool csr: A path or PEM encoded string containing the CSR to read. CLI Example: .. code-block:: bash salt '*' x509.read_csr /etc/pki/mycert.csr
[ "Returns", "a", "dict", "containing", "details", "of", "a", "certificate", "request", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L616-L644
train
Returns a dict containing details of a certificate request.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/x509.py
read_crl
def read_crl(crl): ''' Returns a dict containing details of a certificate revocation list. Input can be a PEM string or file path. :depends: - OpenSSL command line tool csl: A path or PEM encoded string containing the CSL to read. CLI Example: .. code-block:: bash salt...
python
def read_crl(crl): ''' Returns a dict containing details of a certificate revocation list. Input can be a PEM string or file path. :depends: - OpenSSL command line tool csl: A path or PEM encoded string containing the CSL to read. CLI Example: .. code-block:: bash salt...
[ "def", "read_crl", "(", "crl", ")", ":", "text", "=", "_text_or_file", "(", "crl", ")", "text", "=", "get_pem_entry", "(", "text", ",", "pem_type", "=", "'X509 CRL'", ")", "crltempfile", "=", "tempfile", ".", "NamedTemporaryFile", "(", ")", "crltempfile", ...
Returns a dict containing details of a certificate revocation list. Input can be a PEM string or file path. :depends: - OpenSSL command line tool csl: A path or PEM encoded string containing the CSL to read. CLI Example: .. code-block:: bash salt '*' x509.read_crl /etc/pki/myc...
[ "Returns", "a", "dict", "containing", "details", "of", "a", "certificate", "revocation", "list", ".", "Input", "can", "be", "a", "PEM", "string", "or", "file", "path", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L647-L672
train
Reads a PEM encoded X509 CRL and returns a dict containing details of a certificate revocation 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/x509.py
get_public_key
def get_public_key(key, passphrase=None, asObj=False): ''' Returns a string containing the public key in PEM format. key: A path or PEM encoded string containing a CSR, Certificate or Private Key from which a public key can be retrieved. CLI Example: .. code-block:: bash ...
python
def get_public_key(key, passphrase=None, asObj=False): ''' Returns a string containing the public key in PEM format. key: A path or PEM encoded string containing a CSR, Certificate or Private Key from which a public key can be retrieved. CLI Example: .. code-block:: bash ...
[ "def", "get_public_key", "(", "key", ",", "passphrase", "=", "None", ",", "asObj", "=", "False", ")", ":", "if", "isinstance", "(", "key", ",", "M2Crypto", ".", "X509", ".", "X509", ")", ":", "rsa", "=", "key", ".", "get_pubkey", "(", ")", ".", "ge...
Returns a string containing the public key in PEM format. key: A path or PEM encoded string containing a CSR, Certificate or Private Key from which a public key can be retrieved. CLI Example: .. code-block:: bash salt '*' x509.get_public_key /etc/pki/mycert.cer
[ "Returns", "a", "string", "containing", "the", "public", "key", "in", "PEM", "format", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L675-L722
train
Returns a string containing the public key in PEM format.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/x509.py
write_pem
def write_pem(text, path, overwrite=True, pem_type=None): ''' Writes out a PEM string fixing any formatting or whitespace issues before writing. text: PEM string input to be written out. path: Path of the file to write the pem out to. overwrite: If True(default), write...
python
def write_pem(text, path, overwrite=True, pem_type=None): ''' Writes out a PEM string fixing any formatting or whitespace issues before writing. text: PEM string input to be written out. path: Path of the file to write the pem out to. overwrite: If True(default), write...
[ "def", "write_pem", "(", "text", ",", "path", ",", "overwrite", "=", "True", ",", "pem_type", "=", "None", ")", ":", "with", "salt", ".", "utils", ".", "files", ".", "set_umask", "(", "0o077", ")", ":", "text", "=", "get_pem_entry", "(", "text", ",",...
Writes out a PEM string fixing any formatting or whitespace issues before writing. text: PEM string input to be written out. path: Path of the file to write the pem out to. overwrite: If True(default), write_pem will overwrite the entire pem file. Set False to preserve...
[ "Writes", "out", "a", "PEM", "string", "fixing", "any", "formatting", "or", "whitespace", "issues", "before", "writing", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L741-L790
train
Writes out a PEM string to a file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/x509.py
create_private_key
def create_private_key(path=None, text=False, bits=2048, passphrase=None, cipher='aes_128_cbc', verbose=True): ''' Creates a private key in PEM format. path: The path to write the file...
python
def create_private_key(path=None, text=False, bits=2048, passphrase=None, cipher='aes_128_cbc', verbose=True): ''' Creates a private key in PEM format. path: The path to write the file...
[ "def", "create_private_key", "(", "path", "=", "None", ",", "text", "=", "False", ",", "bits", "=", "2048", ",", "passphrase", "=", "None", ",", "cipher", "=", "'aes_128_cbc'", ",", "verbose", "=", "True", ")", ":", "if", "not", "path", "and", "not", ...
Creates a private key in PEM format. path: The path to write the file to, either ``path`` or ``text`` are required. text: If ``True``, return the PEM text without writing to a file. Default ``False``. bits: Length of the private key in bits. Default 2048 passp...
[ "Creates", "a", "private", "key", "in", "PEM", "format", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L793-L860
train
Create a private key in PEM format.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/x509.py
create_crl
def create_crl( # pylint: disable=too-many-arguments,too-many-locals path=None, text=False, signing_private_key=None, signing_private_key_passphrase=None, signing_cert=None, revoked=None, include_expired=False, days_valid=100, digest=''): ''' Create a CRL :depends: - PyOp...
python
def create_crl( # pylint: disable=too-many-arguments,too-many-locals path=None, text=False, signing_private_key=None, signing_private_key_passphrase=None, signing_cert=None, revoked=None, include_expired=False, days_valid=100, digest=''): ''' Create a CRL :depends: - PyOp...
[ "def", "create_crl", "(", "# pylint: disable=too-many-arguments,too-many-locals", "path", "=", "None", ",", "text", "=", "False", ",", "signing_private_key", "=", "None", ",", "signing_private_key_passphrase", "=", "None", ",", "signing_cert", "=", "None", ",", "revok...
Create a CRL :depends: - PyOpenSSL Python module path: Path to write the crl to. text: If ``True``, return the PEM text without writing to a file. Default ``False``. signing_private_key: A path or string of the private key in PEM format that will be used to ...
[ "Create", "a", "CRL" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L863-L1017
train
Create a CRL for the given key - set of certificates.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/x509.py
sign_remote_certificate
def sign_remote_certificate(argdic, **kwargs): ''' Request a certificate to be remotely signed according to a signing policy. argdic: A dict containing all the arguments to be passed into the create_certificate function. This will become kwargs when passed to create_certificate. ...
python
def sign_remote_certificate(argdic, **kwargs): ''' Request a certificate to be remotely signed according to a signing policy. argdic: A dict containing all the arguments to be passed into the create_certificate function. This will become kwargs when passed to create_certificate. ...
[ "def", "sign_remote_certificate", "(", "argdic", ",", "*", "*", "kwargs", ")", ":", "if", "'signing_policy'", "not", "in", "argdic", ":", "return", "'signing_policy must be specified'", "if", "not", "isinstance", "(", "argdic", ",", "dict", ")", ":", "argdic", ...
Request a certificate to be remotely signed according to a signing policy. argdic: A dict containing all the arguments to be passed into the create_certificate function. This will become kwargs when passed to create_certificate. kwargs: kwargs delivered from publish.publish ...
[ "Request", "a", "certificate", "to", "be", "remotely", "signed", "according", "to", "a", "signing", "policy", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L1020-L1070
train
This function is used to create a new certificate that is remotely signed according to a signing policy.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/x509.py
get_signing_policy
def get_signing_policy(signing_policy_name): ''' Returns the details of a names signing policy, including the text of the public key that will be used to sign it. Does not return the private key. CLI Example: .. code-block:: bash salt '*' x509.get_signing_policy www ''' signin...
python
def get_signing_policy(signing_policy_name): ''' Returns the details of a names signing policy, including the text of the public key that will be used to sign it. Does not return the private key. CLI Example: .. code-block:: bash salt '*' x509.get_signing_policy www ''' signin...
[ "def", "get_signing_policy", "(", "signing_policy_name", ")", ":", "signing_policy", "=", "_get_signing_policy", "(", "signing_policy_name", ")", "if", "not", "signing_policy", ":", "return", "'Signing policy {0} does not exist.'", ".", "format", "(", "signing_policy_name",...
Returns the details of a names signing policy, including the text of the public key that will be used to sign it. Does not return the private key. CLI Example: .. code-block:: bash salt '*' x509.get_signing_policy www
[ "Returns", "the", "details", "of", "a", "names", "signing", "policy", "including", "the", "text", "of", "the", "public", "key", "that", "will", "be", "used", "to", "sign", "it", ".", "Does", "not", "return", "the", "private", "key", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L1073-L1105
train
Returns the details of a names signing policy. Does not return the private key.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/x509.py
create_certificate
def create_certificate( path=None, text=False, overwrite=True, ca_server=None, **kwargs): ''' Create an X509 certificate. path: Path to write the certificate to. text: If ``True``, return the PEM text without writing to a file. Default ``False``. overwrite: ...
python
def create_certificate( path=None, text=False, overwrite=True, ca_server=None, **kwargs): ''' Create an X509 certificate. path: Path to write the certificate to. text: If ``True``, return the PEM text without writing to a file. Default ``False``. overwrite: ...
[ "def", "create_certificate", "(", "path", "=", "None", ",", "text", "=", "False", ",", "overwrite", "=", "True", ",", "ca_server", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "not", "path", "and", "not", "text", "and", "(", "'testrun'", "no...
Create an X509 certificate. path: Path to write the certificate to. text: If ``True``, return the PEM text without writing to a file. Default ``False``. overwrite: If True(default), create_certificate will overwrite the entire pem file. Set False to preserve existi...
[ "Create", "an", "X509", "certificate", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L1109-L1585
train
Create a new X509 certificate.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/x509.py
create_csr
def create_csr(path=None, text=False, **kwargs): ''' Create a certificate signing request. path: Path to write the certificate to. text: If ``True``, return the PEM text without writing to a file. Default ``False``. algorithm: The hashing algorithm to be used for s...
python
def create_csr(path=None, text=False, **kwargs): ''' Create a certificate signing request. path: Path to write the certificate to. text: If ``True``, return the PEM text without writing to a file. Default ``False``. algorithm: The hashing algorithm to be used for s...
[ "def", "create_csr", "(", "path", "=", "None", ",", "text", "=", "False", ",", "*", "*", "kwargs", ")", ":", "if", "not", "path", "and", "not", "text", ":", "raise", "salt", ".", "exceptions", ".", "SaltInvocationError", "(", "'Either path or text must be ...
Create a certificate signing request. path: Path to write the certificate to. text: If ``True``, return the PEM text without writing to a file. Default ``False``. algorithm: The hashing algorithm to be used for signing this request. Defaults to sha256. kwargs: ...
[ "Create", "a", "certificate", "signing", "request", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L1589-L1704
train
Create a certificate signing request.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/x509.py
verify_signature
def verify_signature(certificate, signing_pub_key=None, signing_pub_key_passphrase=None): ''' Verify that ``certificate`` has been signed by ``signing_pub_key`` certificate: The certificate to verify. Can be a path or string containing a PEM formatted certificate. ...
python
def verify_signature(certificate, signing_pub_key=None, signing_pub_key_passphrase=None): ''' Verify that ``certificate`` has been signed by ``signing_pub_key`` certificate: The certificate to verify. Can be a path or string containing a PEM formatted certificate. ...
[ "def", "verify_signature", "(", "certificate", ",", "signing_pub_key", "=", "None", ",", "signing_pub_key_passphrase", "=", "None", ")", ":", "cert", "=", "_get_certificate_obj", "(", "certificate", ")", "if", "signing_pub_key", ":", "signing_pub_key", "=", "get_pub...
Verify that ``certificate`` has been signed by ``signing_pub_key`` certificate: The certificate to verify. Can be a path or string containing a PEM formatted certificate. signing_pub_key: The public key to verify, can be a string or path to a PEM formatted certificate, csr, or ...
[ "Verify", "that", "certificate", "has", "been", "signed", "by", "signing_pub_key" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L1732-L1761
train
Verify that a certificate has been signed by a specific public key.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/x509.py
verify_crl
def verify_crl(crl, cert): ''' Validate a CRL against a certificate. Parses openssl command line output, this is a workaround for M2Crypto's inability to get them from CSR objects. crl: The CRL to verify cert: The certificate to verify the CRL against CLI Example: .. ...
python
def verify_crl(crl, cert): ''' Validate a CRL against a certificate. Parses openssl command line output, this is a workaround for M2Crypto's inability to get them from CSR objects. crl: The CRL to verify cert: The certificate to verify the CRL against CLI Example: .. ...
[ "def", "verify_crl", "(", "crl", ",", "cert", ")", ":", "if", "not", "salt", ".", "utils", ".", "path", ".", "which", "(", "'openssl'", ")", ":", "raise", "salt", ".", "exceptions", ".", "SaltInvocationError", "(", "'External command \"openssl\" not found'", ...
Validate a CRL against a certificate. Parses openssl command line output, this is a workaround for M2Crypto's inability to get them from CSR objects. crl: The CRL to verify cert: The certificate to verify the CRL against CLI Example: .. code-block:: bash salt '*' x50...
[ "Validate", "a", "CRL", "against", "a", "certificate", ".", "Parses", "openssl", "command", "line", "output", "this", "is", "a", "workaround", "for", "M2Crypto", "s", "inability", "to", "get", "them", "from", "CSR", "objects", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L1764-L1805
train
Validate a CRL against a certificate.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/x509.py
expired
def expired(certificate): ''' Returns a dict containing limited details of a certificate and whether the certificate has expired. .. versionadded:: 2016.11.0 certificate: The certificate to be read. Can be a path to a certificate file, or a string containing the PEM formatted text ...
python
def expired(certificate): ''' Returns a dict containing limited details of a certificate and whether the certificate has expired. .. versionadded:: 2016.11.0 certificate: The certificate to be read. Can be a path to a certificate file, or a string containing the PEM formatted text ...
[ "def", "expired", "(", "certificate", ")", ":", "ret", "=", "{", "}", "if", "os", ".", "path", ".", "isfile", "(", "certificate", ")", ":", "try", ":", "ret", "[", "'path'", "]", "=", "certificate", "cert", "=", "_get_certificate_obj", "(", "certificat...
Returns a dict containing limited details of a certificate and whether the certificate has expired. .. versionadded:: 2016.11.0 certificate: The certificate to be read. Can be a path to a certificate file, or a string containing the PEM formatted text of the certificate. CLI Example: ...
[ "Returns", "a", "dict", "containing", "limited", "details", "of", "a", "certificate", "and", "whether", "the", "certificate", "has", "expired", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L1808-L1846
train
Returns a dict containing limited details of a certificate and whether the certificate has expired.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/x509.py
will_expire
def will_expire(certificate, days): ''' Returns a dict containing details of a certificate and whether the certificate will expire in the specified number of days. Input can be a PEM string or file path. .. versionadded:: 2016.11.0 certificate: The certificate to be read. Can be a path...
python
def will_expire(certificate, days): ''' Returns a dict containing details of a certificate and whether the certificate will expire in the specified number of days. Input can be a PEM string or file path. .. versionadded:: 2016.11.0 certificate: The certificate to be read. Can be a path...
[ "def", "will_expire", "(", "certificate", ",", "days", ")", ":", "ts_pt", "=", "\"%Y-%m-%d %H:%M:%S\"", "ret", "=", "{", "}", "if", "os", ".", "path", ".", "isfile", "(", "certificate", ")", ":", "try", ":", "ret", "[", "'path'", "]", "=", "certificate...
Returns a dict containing details of a certificate and whether the certificate will expire in the specified number of days. Input can be a PEM string or file path. .. versionadded:: 2016.11.0 certificate: The certificate to be read. Can be a path to a certificate file, or a string cont...
[ "Returns", "a", "dict", "containing", "details", "of", "a", "certificate", "and", "whether", "the", "certificate", "will", "expire", "in", "the", "specified", "number", "of", "days", ".", "Input", "can", "be", "a", "PEM", "string", "or", "file", "path", "....
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/x509.py#L1849-L1886
train
Returns a dict containing details of a certificate and whether it will expire in the specified number of days.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/django_orm.py
ext_pillar
def ext_pillar(minion_id, # pylint: disable=W0613 pillar, # pylint: disable=W0613 pillar_name, project_path, settings_module, django_app, env=None, env_file=None, *args, # pylint: disable=W0613 ...
python
def ext_pillar(minion_id, # pylint: disable=W0613 pillar, # pylint: disable=W0613 pillar_name, project_path, settings_module, django_app, env=None, env_file=None, *args, # pylint: disable=W0613 ...
[ "def", "ext_pillar", "(", "minion_id", ",", "# pylint: disable=W0613", "pillar", ",", "# pylint: disable=W0613", "pillar_name", ",", "project_path", ",", "settings_module", ",", "django_app", ",", "env", "=", "None", ",", "env_file", "=", "None", ",", "*", "args",...
Connect to a Django database through the ORM and retrieve model fields :type pillar_name: str :param pillar_name: The name of the pillar to be returned :type project_path: str :param project_path: The full path to your Django project (the directory manage.py is in) :type settings_module: ...
[ "Connect", "to", "a", "Django", "database", "through", "the", "ORM", "and", "retrieve", "model", "fields" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/django_orm.py#L120-L243
train
This function returns pillar data for a specific minion.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/smartos_virt.py
list_domains
def list_domains(): ''' Return a list of virtual machine names on the minion CLI Example: .. code-block:: bash salt '*' virt.list_domains ''' data = __salt__['vmadm.list'](keyed=True) vms = ["UUID TYPE RAM STATE ALIAS"] for vm...
python
def list_domains(): ''' Return a list of virtual machine names on the minion CLI Example: .. code-block:: bash salt '*' virt.list_domains ''' data = __salt__['vmadm.list'](keyed=True) vms = ["UUID TYPE RAM STATE ALIAS"] for vm...
[ "def", "list_domains", "(", ")", ":", "data", "=", "__salt__", "[", "'vmadm.list'", "]", "(", "keyed", "=", "True", ")", "vms", "=", "[", "\"UUID TYPE RAM STATE ALIAS\"", "]", "for", "vm", "in", "data", ":", "vms"...
Return a list of virtual machine names on the minion CLI Example: .. code-block:: bash salt '*' virt.list_domains
[ "Return", "a", "list", "of", "virtual", "machine", "names", "on", "the", "minion" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_virt.py#L49-L69
train
Return a list of virtual machine names on the minion
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/smartos_virt.py
vm_virt_type
def vm_virt_type(domain): ''' Return VM virtualization type : OS or KVM CLI Example: .. code-block:: bash salt '*' virt.vm_virt_type <domain> ''' ret = __salt__['vmadm.lookup'](search="uuid={uuid}".format(uuid=domain), order='type') if not ret: raise CommandExecutionError(...
python
def vm_virt_type(domain): ''' Return VM virtualization type : OS or KVM CLI Example: .. code-block:: bash salt '*' virt.vm_virt_type <domain> ''' ret = __salt__['vmadm.lookup'](search="uuid={uuid}".format(uuid=domain), order='type') if not ret: raise CommandExecutionError(...
[ "def", "vm_virt_type", "(", "domain", ")", ":", "ret", "=", "__salt__", "[", "'vmadm.lookup'", "]", "(", "search", "=", "\"uuid={uuid}\"", ".", "format", "(", "uuid", "=", "domain", ")", ",", "order", "=", "'type'", ")", "if", "not", "ret", ":", "raise...
Return VM virtualization type : OS or KVM CLI Example: .. code-block:: bash salt '*' virt.vm_virt_type <domain>
[ "Return", "VM", "virtualization", "type", ":", "OS", "or", "KVM" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_virt.py#L181-L195
train
Return the virtualization type of this VM
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/smartos_virt.py
setmem
def setmem(domain, memory): ''' Change the amount of memory allocated to VM. <memory> is to be specified in MB. Note for KVM : this would require a restart of the VM. CLI Example: .. code-block:: bash salt '*' virt.setmem <domain> 512 ''' vmtype = vm_virt_type(domain) if ...
python
def setmem(domain, memory): ''' Change the amount of memory allocated to VM. <memory> is to be specified in MB. Note for KVM : this would require a restart of the VM. CLI Example: .. code-block:: bash salt '*' virt.setmem <domain> 512 ''' vmtype = vm_virt_type(domain) if ...
[ "def", "setmem", "(", "domain", ",", "memory", ")", ":", "vmtype", "=", "vm_virt_type", "(", "domain", ")", "if", "vmtype", "==", "'OS'", ":", "return", "__salt__", "[", "'vmadm.update'", "]", "(", "vm", "=", "domain", ",", "max_physical_memory", "=", "m...
Change the amount of memory allocated to VM. <memory> is to be specified in MB. Note for KVM : this would require a restart of the VM. CLI Example: .. code-block:: bash salt '*' virt.setmem <domain> 512
[ "Change", "the", "amount", "of", "memory", "allocated", "to", "VM", ".", "<memory", ">", "is", "to", "be", "specified", "in", "MB", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_virt.py#L198-L222
train
Change the amount of memory allocated to VM.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/smartos_virt.py
get_macs
def get_macs(domain): ''' Return a list off MAC addresses from the named VM CLI Example: .. code-block:: bash salt '*' virt.get_macs <domain> ''' macs = [] ret = __salt__['vmadm.lookup'](search="uuid={uuid}".format(uuid=domain), order='nics') if not ret: raise CommandE...
python
def get_macs(domain): ''' Return a list off MAC addresses from the named VM CLI Example: .. code-block:: bash salt '*' virt.get_macs <domain> ''' macs = [] ret = __salt__['vmadm.lookup'](search="uuid={uuid}".format(uuid=domain), order='nics') if not ret: raise CommandE...
[ "def", "get_macs", "(", "domain", ")", ":", "macs", "=", "[", "]", "ret", "=", "__salt__", "[", "'vmadm.lookup'", "]", "(", "search", "=", "\"uuid={uuid}\"", ".", "format", "(", "uuid", "=", "domain", ")", ",", "order", "=", "'nics'", ")", "if", "not...
Return a list off MAC addresses from the named VM CLI Example: .. code-block:: bash salt '*' virt.get_macs <domain>
[ "Return", "a", "list", "off", "MAC", "addresses", "from", "the", "named", "VM" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_virt.py#L225-L242
train
Return a list off MAC addresses from the named VM CLI Example : bash salt '*' virt. get_macs <domain >
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...