partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
train
container_config_set
Set a container config value name : Name of the container config_key : The config key to set config_value : The config value to set remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! ...
salt/modules/lxd.py
def container_config_set(name, config_key, config_value, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Set a container config value name : Name of the container config_key : The config key to set config_value : The config value to s...
def container_config_set(name, config_key, config_value, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Set a container config value name : Name of the container config_key : The config key to set config_value : The config value to s...
[ "Set", "a", "container", "config", "value" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L1262-L1307
[ "def", "container_config_set", "(", "name", ",", "config_key", ",", "config_value", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "container", "=", "container_get", "(", "name...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
container_config_delete
Delete a container config value name : Name of the container config_key : The config key to delete remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver....
salt/modules/lxd.py
def container_config_delete(name, config_key, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Delete a container config value name : Name of the container config_key : The config key to delete remote_addr : An URL to a remote Serve...
def container_config_delete(name, config_key, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Delete a container config value name : Name of the container config_key : The config key to delete remote_addr : An URL to a remote Serve...
[ "Delete", "a", "container", "config", "value" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L1310-L1352
[ "def", "container_config_delete", "(", "name", ",", "config_key", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "container", "=", "container_get", "(", "name", ",", "remote_ad...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
container_device_get
Get a container device name : Name of the container device_name : The device name to retrieve remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.lan:8...
salt/modules/lxd.py
def container_device_get(name, device_name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Get a container device name : Name of the container device_name : The device name to retrieve remote_addr : An URL to a remote Server, you als...
def container_device_get(name, device_name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Get a container device name : Name of the container device_name : The device name to retrieve remote_addr : An URL to a remote Server, you als...
[ "Get", "a", "container", "device" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L1355-L1395
[ "def", "container_device_get", "(", "name", ",", "device_name", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "container", "=", "container_get", "(", "name", ",", "remote_addr...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
container_device_add
Add a container device name : Name of the container device_name : The device name to add device_type : Type of the device ** kwargs : Additional device args remote_addr : An URL to a remote Server, you also have to give cert and key if you provide...
salt/modules/lxd.py
def container_device_add(name, device_name, device_type='disk', remote_addr=None, cert=None, key=None, verify_cert=True, **kwargs): ''' Add a container device name : Name of the container device_name : The devic...
def container_device_add(name, device_name, device_type='disk', remote_addr=None, cert=None, key=None, verify_cert=True, **kwargs): ''' Add a container device name : Name of the container device_name : The devic...
[ "Add", "a", "container", "device" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L1398-L1449
[ "def", "container_device_add", "(", "name", ",", "device_name", ",", "device_type", "=", "'disk'", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ",", "*", "*", "kwargs", ")", ":", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
container_device_delete
Delete a container device name : Name of the container device_name : The device name to delete remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.lan:...
salt/modules/lxd.py
def container_device_delete(name, device_name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Delete a container device name : Name of the container device_name : The device name to delete remote_addr : An URL to a remote Server, ...
def container_device_delete(name, device_name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Delete a container device name : Name of the container device_name : The device name to delete remote_addr : An URL to a remote Server, ...
[ "Delete", "a", "container", "device" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L1452-L1494
[ "def", "container_device_delete", "(", "name", ",", "device_name", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "container", "=", "container_get", "(", "name", ",", "remote_a...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
container_file_put
Put a file into a container name : Name of the container src : The source file or directory dst : The destination file or directory recursive : Decent into src directory overwrite : Replace destination if it exists mode : Set file mode to oct...
salt/modules/lxd.py
def container_file_put(name, src, dst, recursive=False, overwrite=False, mode=None, uid=None, gid=None, saltenv='base', remote_addr=None, cert=None, key=None, verify_cert=True): ''' Put a file into a container name : Name of the c...
def container_file_put(name, src, dst, recursive=False, overwrite=False, mode=None, uid=None, gid=None, saltenv='base', remote_addr=None, cert=None, key=None, verify_cert=True): ''' Put a file into a container name : Name of the c...
[ "Put", "a", "file", "into", "a", "container" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L1497-L1722
[ "def", "container_file_put", "(", "name", ",", "src", ",", "dst", ",", "recursive", "=", "False", ",", "overwrite", "=", "False", ",", "mode", "=", "None", ",", "uid", "=", "None", ",", "gid", "=", "None", ",", "saltenv", "=", "'base'", ",", "remote_...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
container_file_get
Get a file from a container name : Name of the container src : The source file or directory dst : The destination file or directory mode : Set file mode to octal number uid : Set file uid (owner) gid : Set file gid (group) remote_addr : ...
salt/modules/lxd.py
def container_file_get(name, src, dst, overwrite=False, mode=None, uid=None, gid=None, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Get a file from a container name : Name of the container src : The source file or directory...
def container_file_get(name, src, dst, overwrite=False, mode=None, uid=None, gid=None, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Get a file from a container name : Name of the container src : The source file or directory...
[ "Get", "a", "file", "from", "a", "container" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L1725-L1833
[ "def", "container_file_get", "(", "name", ",", "src", ",", "dst", ",", "overwrite", "=", "False", ",", "mode", "=", "None", ",", "uid", "=", "None", ",", "gid", "=", "None", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "="...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
container_execute
Execute a command list on a container. name : Name of the container cmd : Command to be executed (as a list) Example : '["ls", "-l"]' remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP A...
salt/modules/lxd.py
def container_execute(name, cmd, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Execute a command list on a container. name : Name of the container cmd : Command to be executed (as a list) Example : '["ls", "-l"]' remote_ad...
def container_execute(name, cmd, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Execute a command list on a container. name : Name of the container cmd : Command to be executed (as a list) Example : '["ls", "-l"]' remote_ad...
[ "Execute", "a", "command", "list", "on", "a", "container", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L1836-L1911
[ "def", "container_execute", "(", "name", ",", "cmd", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "container", "=", "container_get", "(", "name", ",", "remote_addr", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
profile_list
Lists all profiles from the LXD. list_names : Return a list of names instead of full blown dicts. remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: ht...
salt/modules/lxd.py
def profile_list(list_names=False, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Lists all profiles from the LXD. list_names : Return a list of names instead of full blown dicts. remote_addr : An URL to a remote Server, you also have to giv...
def profile_list(list_names=False, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Lists all profiles from the LXD. list_names : Return a list of names instead of full blown dicts. remote_addr : An URL to a remote Server, you also have to giv...
[ "Lists", "all", "profiles", "from", "the", "LXD", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L1917-L1964
[ "def", "profile_list", "(", "list_names", "=", "False", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "client", "=", "pylxd_client_get", "(", "remote_addr", ",", "cert", ","...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
profile_create
Creates a profile. name : The name of the profile to get. config : A config dict or None (None = unset). Can also be a list: [{'key': 'boot.autostart', 'value': 1}, {'key': 'security.privileged', 'value': '1'}] devices : ...
salt/modules/lxd.py
def profile_create(name, config=None, devices=None, description=None, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Creates a profile. name : The name of the profile to get. config : A config dict or None (None = unset)....
def profile_create(name, config=None, devices=None, description=None, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Creates a profile. name : The name of the profile to get. config : A config dict or None (None = unset)....
[ "Creates", "a", "profile", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L1967-L2040
[ "def", "profile_create", "(", "name", ",", "config", "=", "None", ",", "devices", "=", "None", ",", "description", "=", "None", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
profile_get
Gets a profile from the LXD name : The name of the profile to get. remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.lan:8443 ...
salt/modules/lxd.py
def profile_get(name, remote_addr=None, cert=None, key=None, verify_cert=True, _raw=False): ''' Gets a profile from the LXD name : The name of the profile to get. remote_addr : An URL to a remote Server, you also have to give cert and key if you ...
def profile_get(name, remote_addr=None, cert=None, key=None, verify_cert=True, _raw=False): ''' Gets a profile from the LXD name : The name of the profile to get. remote_addr : An URL to a remote Server, you also have to give cert and key if you ...
[ "Gets", "a", "profile", "from", "the", "LXD" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L2043-L2097
[ "def", "profile_get", "(", "name", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ",", "_raw", "=", "False", ")", ":", "client", "=", "pylxd_client_get", "(", "remote_addr", ",", "ce...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
profile_delete
Deletes a profile. name : The name of the profile to delete. remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.lan:8443 ...
salt/modules/lxd.py
def profile_delete(name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Deletes a profile. name : The name of the profile to delete. remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remo...
def profile_delete(name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Deletes a profile. name : The name of the profile to delete. remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remo...
[ "Deletes", "a", "profile", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L2100-L2148
[ "def", "profile_delete", "(", "name", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "profile", "=", "profile_get", "(", "name", ",", "remote_addr", ",", "cert", ",", "key"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
profile_config_get
Get a profile config item. name : The name of the profile to get the config item from. config_key : The key for the item to retrieve. remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its ...
salt/modules/lxd.py
def profile_config_get(name, config_key, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Get a profile config item. name : The name of the profile to get the config item from. config_key : The key for the item to retrieve. remot...
def profile_config_get(name, config_key, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Get a profile config item. name : The name of the profile to get the config item from. config_key : The key for the item to retrieve. remot...
[ "Get", "a", "profile", "config", "item", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L2151-L2201
[ "def", "profile_config_get", "(", "name", ",", "config_key", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "profile", "=", "profile_get", "(", "name", ",", "remote_addr", ",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
profile_config_set
Set a profile config item. name : The name of the profile to set the config item to. config_key : The items key. config_value : Its items value. remote_addr : An URL to a remote Server, you also have to give cert and key if ...
salt/modules/lxd.py
def profile_config_set(name, config_key, config_value, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Set a profile config item. name : The name of the profile to set the config item to. config_key : The items key...
def profile_config_set(name, config_key, config_value, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Set a profile config item. name : The name of the profile to set the config item to. config_key : The items key...
[ "Set", "a", "profile", "config", "item", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L2204-L2260
[ "def", "profile_config_set", "(", "name", ",", "config_key", ",", "config_value", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "profile", "=", "profile_get", "(", "name", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
profile_config_delete
Delete a profile config item. name : The name of the profile to delete the config item. config_key : The config key for the value to retrieve. remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr...
salt/modules/lxd.py
def profile_config_delete(name, config_key, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Delete a profile config item. name : The name of the profile to delete the config item. config_key : The config key for the value to retrieve....
def profile_config_delete(name, config_key, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Delete a profile config item. name : The name of the profile to delete the config item. config_key : The config key for the value to retrieve....
[ "Delete", "a", "profile", "config", "item", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L2263-L2315
[ "def", "profile_config_delete", "(", "name", ",", "config_key", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "profile", "=", "profile_get", "(", "name", ",", "remote_addr", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
profile_device_get
Get a profile device. name : The name of the profile to get the device from. device_name : The name of the device to retrieve. remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP A...
salt/modules/lxd.py
def profile_device_get(name, device_name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Get a profile device. name : The name of the profile to get the device from. device_name : The name of the device to retrieve. remote_addr...
def profile_device_get(name, device_name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Get a profile device. name : The name of the profile to get the device from. device_name : The name of the device to retrieve. remote_addr...
[ "Get", "a", "profile", "device", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L2318-L2368
[ "def", "profile_device_get", "(", "name", ",", "device_name", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "profile", "=", "profile_get", "(", "name", ",", "remote_addr", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
profile_device_set
Set a profile device. name : The name of the profile to set the device to. device_name : The name of the device to set. remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address!...
salt/modules/lxd.py
def profile_device_set(name, device_name, device_type='disk', remote_addr=None, cert=None, key=None, verify_cert=True, **kwargs): ''' Set a profile device. name : The name of the profile to set the device to. device_n...
def profile_device_set(name, device_name, device_type='disk', remote_addr=None, cert=None, key=None, verify_cert=True, **kwargs): ''' Set a profile device. name : The name of the profile to set the device to. device_n...
[ "Set", "a", "profile", "device", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L2371-L2430
[ "def", "profile_device_set", "(", "name", ",", "device_name", ",", "device_type", "=", "'disk'", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ",", "*", "*", "kwargs", ")", ":", "pr...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
profile_device_delete
Delete a profile device. name : The name of the profile to delete the device. device_name : The name of the device to delete. remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Ad...
salt/modules/lxd.py
def profile_device_delete(name, device_name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Delete a profile device. name : The name of the profile to delete the device. device_name : The name of the device to delete. remote...
def profile_device_delete(name, device_name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Delete a profile device. name : The name of the profile to delete the device. device_name : The name of the device to delete. remote...
[ "Delete", "a", "profile", "device", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L2433-L2486
[ "def", "profile_device_delete", "(", "name", ",", "device_name", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "profile", "=", "profile_get", "(", "name", ",", "remote_addr", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
image_list
Lists all images from the LXD. list_aliases : Return a dict with the fingerprint as key and a list of aliases as value instead. remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address!...
salt/modules/lxd.py
def image_list(list_aliases=False, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Lists all images from the LXD. list_aliases : Return a dict with the fingerprint as key and a list of aliases as value instead. remote_addr : An URL ...
def image_list(list_aliases=False, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Lists all images from the LXD. list_aliases : Return a dict with the fingerprint as key and a list of aliases as value instead. remote_addr : An URL ...
[ "Lists", "all", "images", "from", "the", "LXD", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L2492-L2539
[ "def", "image_list", "(", "list_aliases", "=", "False", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "client", "=", "pylxd_client_get", "(", "remote_addr", ",", "cert", ","...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
image_get
Get an image by its fingerprint fingerprint : The fingerprint of the image to retrieve remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserv...
salt/modules/lxd.py
def image_get(fingerprint, remote_addr=None, cert=None, key=None, verify_cert=True, _raw=False): ''' Get an image by its fingerprint fingerprint : The fingerprint of the image to retrieve remote_addr : An...
def image_get(fingerprint, remote_addr=None, cert=None, key=None, verify_cert=True, _raw=False): ''' Get an image by its fingerprint fingerprint : The fingerprint of the image to retrieve remote_addr : An...
[ "Get", "an", "image", "by", "its", "fingerprint" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L2542-L2600
[ "def", "image_get", "(", "fingerprint", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ",", "_raw", "=", "False", ")", ":", "client", "=", "pylxd_client_get", "(", "remote_addr", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
image_get_by_alias
Get an image by an alias alias : The alias of the image to retrieve remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.lan:8443 ...
salt/modules/lxd.py
def image_get_by_alias(alias, remote_addr=None, cert=None, key=None, verify_cert=True, _raw=False): ''' Get an image by an alias alias : The alias of the image to retrieve ...
def image_get_by_alias(alias, remote_addr=None, cert=None, key=None, verify_cert=True, _raw=False): ''' Get an image by an alias alias : The alias of the image to retrieve ...
[ "Get", "an", "image", "by", "an", "alias" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L2603-L2661
[ "def", "image_get_by_alias", "(", "alias", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ",", "_raw", "=", "False", ")", ":", "client", "=", "pylxd_client_get", "(", "remote_addr", ",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
image_delete
Delete an image by an alias or fingerprint name : The alias or fingerprint of the image to delete, can be a obj for the states. remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! ...
salt/modules/lxd.py
def image_delete(image, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Delete an image by an alias or fingerprint name : The alias or fingerprint of the image to delete, can be a obj for the states. ...
def image_delete(image, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Delete an image by an alias or fingerprint name : The alias or fingerprint of the image to delete, can be a obj for the states. ...
[ "Delete", "an", "image", "by", "an", "alias", "or", "fingerprint" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L2664-L2710
[ "def", "image_delete", "(", "image", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "image", "=", "_verify_image", "(", "image", ",", "remote_addr", ",", "cert", ",", "key"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
image_from_simplestreams
Create an image from simplestreams server : Simplestreams server URI alias : The alias of the image to retrieve remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! ...
salt/modules/lxd.py
def image_from_simplestreams(server, alias, remote_addr=None, cert=None, key=None, verify_cert=True, aliases=None, pu...
def image_from_simplestreams(server, alias, remote_addr=None, cert=None, key=None, verify_cert=True, aliases=None, pu...
[ "Create", "an", "image", "from", "simplestreams" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L2713-L2793
[ "def", "image_from_simplestreams", "(", "server", ",", "alias", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ",", "aliases", "=", "None", ",", "public", "=", "False", ",", "auto_upda...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
image_from_file
Create an image from a file filename : The filename of the rootfs remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.lan:8443 ...
salt/modules/lxd.py
def image_from_file(filename, remote_addr=None, cert=None, key=None, verify_cert=True, aliases=None, public=False, saltenv='base', _raw=False): ''' Create a...
def image_from_file(filename, remote_addr=None, cert=None, key=None, verify_cert=True, aliases=None, public=False, saltenv='base', _raw=False): ''' Create a...
[ "Create", "an", "image", "from", "a", "file" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L2875-L2954
[ "def", "image_from_file", "(", "filename", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ",", "aliases", "=", "None", ",", "public", "=", "False", ",", "saltenv", "=", "'base'", ","...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
image_copy_lxd
Copy an image from another LXD instance source : An alias or a fingerprint of the source. src_remote_addr : An URL to the source remote daemon Examples: https://mysourceserver.lan:8443 src_cert : PEM Formatted SSL Certificate for the source Examples: ...
salt/modules/lxd.py
def image_copy_lxd(source, src_remote_addr, src_cert, src_key, src_verify_cert, remote_addr, cert, key, verify_cert=True, aliases=None, ...
def image_copy_lxd(source, src_remote_addr, src_cert, src_key, src_verify_cert, remote_addr, cert, key, verify_cert=True, aliases=None, ...
[ "Copy", "an", "image", "from", "another", "LXD", "instance" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L2957-L3074
[ "def", "image_copy_lxd", "(", "source", ",", "src_remote_addr", ",", "src_cert", ",", "src_key", ",", "src_verify_cert", ",", "remote_addr", ",", "cert", ",", "key", ",", "verify_cert", "=", "True", ",", "aliases", "=", "None", ",", "public", "=", "None", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
image_alias_add
Create an alias on the given image image : An image alias, a fingerprint or a image object alias : The alias to add description : Description of the alias remote_addr : An URL to a remote Server, you also have to give cert and key if ...
salt/modules/lxd.py
def image_alias_add(image, alias, description='', remote_addr=None, cert=None, key=None, verify_cert=True): ''' Create an alias on the given image image : An image alias, a fi...
def image_alias_add(image, alias, description='', remote_addr=None, cert=None, key=None, verify_cert=True): ''' Create an alias on the given image image : An image alias, a fi...
[ "Create", "an", "alias", "on", "the", "given", "image" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L3077-L3133
[ "def", "image_alias_add", "(", "image", ",", "alias", ",", "description", "=", "''", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "image", "=", "_verify_image", "(", "ima...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
image_alias_delete
Delete an alias (this is currently not restricted to the image) image : An image alias, a fingerprint or a image object alias : The alias to delete remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote...
salt/modules/lxd.py
def image_alias_delete(image, alias, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Delete an alias (this is currently not restricted to the image) image : An image ...
def image_alias_delete(image, alias, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Delete an alias (this is currently not restricted to the image) image : An image ...
[ "Delete", "an", "alias", "(", "this", "is", "currently", "not", "restricted", "to", "the", "image", ")" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L3136-L3188
[ "def", "image_alias_delete", "(", "image", ",", "alias", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "image", "=", "_verify_image", "(", "image", ",", "remote_addr", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
snapshots_all
Get all snapshots for a container container : The name of the container to get. remote_addr : An URL to a remote server. The 'cert' and 'key' fields must also be provided if 'remote_addr' is defined. Examples: https://myserver.lan:8443 /var/lib/mysocket...
salt/modules/lxd.py
def snapshots_all(container, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Get all snapshots for a container container : The name of the container to get. remote_addr : An URL to a remote server. The 'cert' and 'key' fields must also be provided if 'remote_addr'...
def snapshots_all(container, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Get all snapshots for a container container : The name of the container to get. remote_addr : An URL to a remote server. The 'cert' and 'key' fields must also be provided if 'remote_addr'...
[ "Get", "all", "snapshots", "for", "a", "container" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L3195-L3241
[ "def", "snapshots_all", "(", "container", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "containers", "=", "container_get", "(", "container", ",", "remote_addr", ",", "cert", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
snapshots_create
Create a snapshot for a container container : The name of the container to get. name : The name of the snapshot. remote_addr : An URL to a remote server. The 'cert' and 'key' fields must also be provided if 'remote_addr' is defined. Examples: https://m...
salt/modules/lxd.py
def snapshots_create(container, name=None, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Create a snapshot for a container container : The name of the container to get. name : The name of the snapshot. remote_addr : An URL to a remote s...
def snapshots_create(container, name=None, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Create a snapshot for a container container : The name of the container to get. name : The name of the snapshot. remote_addr : An URL to a remote s...
[ "Create", "a", "snapshot", "for", "a", "container" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L3244-L3296
[ "def", "snapshots_create", "(", "container", ",", "name", "=", "None", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "cont", "=", "container_get", "(", "container", ",", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
snapshots_delete
Delete a snapshot for a container container : The name of the container to get. name : The name of the snapshot. remote_addr : An URL to a remote server. The 'cert' and 'key' fields must also be provided if 'remote_addr' is defined. Examples: https://m...
salt/modules/lxd.py
def snapshots_delete(container, name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Delete a snapshot for a container container : The name of the container to get. name : The name of the snapshot. remote_addr : An URL to a remote server...
def snapshots_delete(container, name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Delete a snapshot for a container container : The name of the container to get. name : The name of the snapshot. remote_addr : An URL to a remote server...
[ "Delete", "a", "snapshot", "for", "a", "container" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L3299-L3351
[ "def", "snapshots_delete", "(", "container", ",", "name", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "cont", "=", "container_get", "(", "container", ",", "remote_addr", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
snapshots_get
Get information about snapshot for a container container : The name of the container to get. name : The name of the snapshot. remote_addr : An URL to a remote server. The 'cert' and 'key' fields must also be provided if 'remote_addr' is defined. Examples: ...
salt/modules/lxd.py
def snapshots_get(container, name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Get information about snapshot for a container container : The name of the container to get. name : The name of the snapshot. remote_addr : An URL to a remote...
def snapshots_get(container, name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Get information about snapshot for a container container : The name of the container to get. name : The name of the snapshot. remote_addr : An URL to a remote...
[ "Get", "information", "about", "snapshot", "for", "a", "container" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L3354-L3397
[ "def", "snapshots_get", "(", "container", ",", "name", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "container", "=", "container_get", "(", "container", ",", "remote_addr", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
normalize_input_values
normalize config input so returns can be put into mongodb, which doesn't like `.` This is not meant to be used on the commandline. CLI Examples: .. code-block:: bash salt '*' lxd.normalize_input_values config={} devices={}
salt/modules/lxd.py
def normalize_input_values(config, devices): ''' normalize config input so returns can be put into mongodb, which doesn't like `.` This is not meant to be used on the commandline. CLI Examples: .. code-block:: bash salt '*' lxd.normalize_input_values config={} devices={} ''' if i...
def normalize_input_values(config, devices): ''' normalize config input so returns can be put into mongodb, which doesn't like `.` This is not meant to be used on the commandline. CLI Examples: .. code-block:: bash salt '*' lxd.normalize_input_values config={} devices={} ''' if i...
[ "normalize", "config", "input", "so", "returns", "can", "be", "put", "into", "mongodb", "which", "doesn", "t", "like", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L3404-L3443
[ "def", "normalize_input_values", "(", "config", ",", "devices", ")", ":", "if", "isinstance", "(", "config", ",", "list", ")", ":", "if", "(", "config", "and", "'key'", "in", "config", "[", "0", "]", "and", "'value'", "in", "config", "[", "0", "]", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
sync_config_devices
Syncs the given config and devices with the object (a profile or a container) returns a changes dict with all changes made. obj : The object to sync with / or just test with. newconfig: The new config to check with the obj. newdevices: The n...
salt/modules/lxd.py
def sync_config_devices(obj, newconfig, newdevices, test=False): ''' Syncs the given config and devices with the object (a profile or a container) returns a changes dict with all changes made. obj : The object to sync with / or just test with. newconfig: The...
def sync_config_devices(obj, newconfig, newdevices, test=False): ''' Syncs the given config and devices with the object (a profile or a container) returns a changes dict with all changes made. obj : The object to sync with / or just test with. newconfig: The...
[ "Syncs", "the", "given", "config", "and", "devices", "with", "the", "object", "(", "a", "profile", "or", "a", "container", ")", "returns", "a", "changes", "dict", "with", "all", "changes", "made", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L3446-L3604
[ "def", "sync_config_devices", "(", "obj", ",", "newconfig", ",", "newdevices", ",", "test", "=", "False", ")", ":", "changes", "=", "{", "}", "#", "# config changes", "#", "if", "newconfig", "is", "None", ":", "newconfig", "=", "{", "}", "newconfig", "="...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_set_property_dict_item
Sets the dict item key of the attr from obj. Basicaly it does getattr(obj, prop)[key] = value. For the disk device we added some checks to make device changes on the CLI saver.
salt/modules/lxd.py
def _set_property_dict_item(obj, prop, key, value): ''' Sets the dict item key of the attr from obj. Basicaly it does getattr(obj, prop)[key] = value. For the disk device we added some checks to make device changes on the CLI saver. ''' attr = getattr(obj, prop) if prop == 'de...
def _set_property_dict_item(obj, prop, key, value): ''' Sets the dict item key of the attr from obj. Basicaly it does getattr(obj, prop)[key] = value. For the disk device we added some checks to make device changes on the CLI saver. ''' attr = getattr(obj, prop) if prop == 'de...
[ "Sets", "the", "dict", "item", "key", "of", "the", "attr", "from", "obj", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L3607-L3643
[ "def", "_set_property_dict_item", "(", "obj", ",", "prop", ",", "key", ",", "value", ")", ":", "attr", "=", "getattr", "(", "obj", ",", "prop", ")", "if", "prop", "==", "'devices'", ":", "device_type", "=", "value", "[", "'type'", "]", "if", "device_ty...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_pylxd_model_to_dict
Translates a plyxd model object to a dict
salt/modules/lxd.py
def _pylxd_model_to_dict(obj): '''Translates a plyxd model object to a dict''' marshalled = {} for key in obj.__attributes__.keys(): if hasattr(obj, key): marshalled[key] = getattr(obj, key) return marshalled
def _pylxd_model_to_dict(obj): '''Translates a plyxd model object to a dict''' marshalled = {} for key in obj.__attributes__.keys(): if hasattr(obj, key): marshalled[key] = getattr(obj, key) return marshalled
[ "Translates", "a", "plyxd", "model", "object", "to", "a", "dict" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L3699-L3705
[ "def", "_pylxd_model_to_dict", "(", "obj", ")", ":", "marshalled", "=", "{", "}", "for", "key", "in", "obj", ".", "__attributes__", ".", "keys", "(", ")", ":", "if", "hasattr", "(", "obj", ",", "key", ")", ":", "marshalled", "[", "key", "]", "=", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
set_ftp_proxy
Sets the ftp proxy settings server The proxy server to use port The port used by the proxy server user The username to use for the proxy server if required password The password to use if required by the server network_service The network service to apply...
salt/modules/proxy.py
def set_ftp_proxy(server, port, user=None, password=None, network_service="Ethernet", bypass_hosts=None): ''' Sets the ftp proxy settings server The proxy server to use port The port used by the p...
def set_ftp_proxy(server, port, user=None, password=None, network_service="Ethernet", bypass_hosts=None): ''' Sets the ftp proxy settings server The proxy server to use port The port used by the p...
[ "Sets", "the", "ftp", "proxy", "settings" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/proxy.py#L306-L352
[ "def", "set_ftp_proxy", "(", "server", ",", "port", ",", "user", "=", "None", ",", "password", "=", "None", ",", "network_service", "=", "\"Ethernet\"", ",", "bypass_hosts", "=", "None", ")", ":", "if", "__grains__", "[", "'os'", "]", "==", "'Windows'", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_proxy_bypass
Returns the current domains that can bypass the proxy network_service The network service to get the bypass domains from, this is only necessary on macOS CLI Example: .. code-block:: bash salt '*' proxy.get_proxy_bypass
salt/modules/proxy.py
def get_proxy_bypass(network_service="Ethernet"): ''' Returns the current domains that can bypass the proxy network_service The network service to get the bypass domains from, this is only necessary on macOS CLI Example: .. code-block:: bash salt '*' proxy.get_proxy_bypas...
def get_proxy_bypass(network_service="Ethernet"): ''' Returns the current domains that can bypass the proxy network_service The network service to get the bypass domains from, this is only necessary on macOS CLI Example: .. code-block:: bash salt '*' proxy.get_proxy_bypas...
[ "Returns", "the", "current", "domains", "that", "can", "bypass", "the", "proxy" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/proxy.py#L355-L384
[ "def", "get_proxy_bypass", "(", "network_service", "=", "\"Ethernet\"", ")", ":", "if", "__grains__", "[", "'os'", "]", "==", "'Windows'", ":", "reg_val", "=", "__utils__", "[", "'reg.read_value'", "]", "(", "hive", "=", "'HKEY_CURRENT_USER'", ",", "key", "=",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
set_proxy_bypass
Sets the domains that can bypass the proxy domains An array of domains allowed to bypass the proxy network_service The network service to apply the changes to, this only necessary on macOS CLI Example: .. code-block:: bash salt '*' proxy.set_proxy_bypass "['127.0.0.1...
salt/modules/proxy.py
def set_proxy_bypass(domains, network_service="Ethernet"): ''' Sets the domains that can bypass the proxy domains An array of domains allowed to bypass the proxy network_service The network service to apply the changes to, this only necessary on macOS CLI Example: .. ...
def set_proxy_bypass(domains, network_service="Ethernet"): ''' Sets the domains that can bypass the proxy domains An array of domains allowed to bypass the proxy network_service The network service to apply the changes to, this only necessary on macOS CLI Example: .. ...
[ "Sets", "the", "domains", "that", "can", "bypass", "the", "proxy" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/proxy.py#L387-L409
[ "def", "set_proxy_bypass", "(", "domains", ",", "network_service", "=", "\"Ethernet\"", ")", ":", "servers_str", "=", "' '", ".", "join", "(", "domains", ")", "cmd", "=", "'networksetup -setproxybypassdomains {0} {1}'", ".", "format", "(", "network_service", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
set_proxy_win
Sets the http proxy settings, only works with Windows. server The proxy server to use password The password to use if required by the server types The types of proxy connections should be setup with this server. Valid types are: - ``http`` - ``http...
salt/modules/proxy.py
def set_proxy_win(server, port, types=None, bypass_hosts=None): ''' Sets the http proxy settings, only works with Windows. server The proxy server to use password The password to use if required by the server types The types of proxy connections should be setup with this s...
def set_proxy_win(server, port, types=None, bypass_hosts=None): ''' Sets the http proxy settings, only works with Windows. server The proxy server to use password The password to use if required by the server types The types of proxy connections should be setup with this s...
[ "Sets", "the", "http", "proxy", "settings", "only", "works", "with", "Windows", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/proxy.py#L412-L443
[ "def", "set_proxy_win", "(", "server", ",", "port", ",", "types", "=", "None", ",", "bypass_hosts", "=", "None", ")", ":", "if", "__grains__", "[", "'os'", "]", "==", "'Windows'", ":", "return", "_set_proxy_windows", "(", "server", "=", "server", ",", "p...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_conn
Get an SMB connection
salt/utils/smb.py
def get_conn(host='', username=None, password=None, port=445): ''' Get an SMB connection ''' if HAS_IMPACKET and not HAS_SMBPROTOCOL: salt.utils.versions.warn_until( 'Sodium', 'Support of impacket has been depricated and will be ' 'removed in Sodium. Please in...
def get_conn(host='', username=None, password=None, port=445): ''' Get an SMB connection ''' if HAS_IMPACKET and not HAS_SMBPROTOCOL: salt.utils.versions.warn_until( 'Sodium', 'Support of impacket has been depricated and will be ' 'removed in Sodium. Please in...
[ "Get", "an", "SMB", "connection" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/smb.py#L176-L192
[ "def", "get_conn", "(", "host", "=", "''", ",", "username", "=", "None", ",", "password", "=", "None", ",", "port", "=", "445", ")", ":", "if", "HAS_IMPACKET", "and", "not", "HAS_SMBPROTOCOL", ":", "salt", ".", "utils", ".", "versions", ".", "warn_unti...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_mkdirs_impacket
Recursively create a directory structure on an SMB share Paths should be passed in with forward-slash delimiters, and should not start with a forward-slash.
salt/utils/smb.py
def _mkdirs_impacket(path, share='C$', conn=None, host=None, username=None, password=None): ''' Recursively create a directory structure on an SMB share Paths should be passed in with forward-slash delimiters, and should not start with a forward-slash. ''' if conn is None: conn = get_co...
def _mkdirs_impacket(path, share='C$', conn=None, host=None, username=None, password=None): ''' Recursively create a directory structure on an SMB share Paths should be passed in with forward-slash delimiters, and should not start with a forward-slash. ''' if conn is None: conn = get_co...
[ "Recursively", "create", "a", "directory", "structure", "on", "an", "SMB", "share" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/smb.py#L195-L217
[ "def", "_mkdirs_impacket", "(", "path", ",", "share", "=", "'C$'", ",", "conn", "=", "None", ",", "host", "=", "None", ",", "username", "=", "None", ",", "password", "=", "None", ")", ":", "if", "conn", "is", "None", ":", "conn", "=", "get_conn", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
put_str
Wrapper around impacket.smbconnection.putFile() that allows a string to be uploaded, without first writing it as a local file
salt/utils/smb.py
def put_str(content, path, share='C$', conn=None, host=None, username=None, password=None): ''' Wrapper around impacket.smbconnection.putFile() that allows a string to be uploaded, without first writing it as a local file ''' if HAS_SMBPROTOCOL: return _put_str_smbprotocol( conte...
def put_str(content, path, share='C$', conn=None, host=None, username=None, password=None): ''' Wrapper around impacket.smbconnection.putFile() that allows a string to be uploaded, without first writing it as a local file ''' if HAS_SMBPROTOCOL: return _put_str_smbprotocol( conte...
[ "Wrapper", "around", "impacket", ".", "smbconnection", ".", "putFile", "()", "that", "allows", "a", "string", "to", "be", "uploaded", "without", "first", "writing", "it", "as", "a", "local", "file" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/smb.py#L281-L295
[ "def", "put_str", "(", "content", ",", "path", ",", "share", "=", "'C$'", ",", "conn", "=", "None", ",", "host", "=", "None", ",", "username", "=", "None", ",", "password", "=", "None", ")", ":", "if", "HAS_SMBPROTOCOL", ":", "return", "_put_str_smbpro...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_put_file_impacket
Wrapper around impacket.smbconnection.putFile() that allows a file to be uploaded Example usage: import salt.utils.smb smb_conn = salt.utils.smb.get_conn('10.0.0.45', 'vagrant', 'vagrant') salt.utils.smb.put_file('/root/test.pdf', 'temp\\myfiles\\test1.pdf', conn=smb_conn)
salt/utils/smb.py
def _put_file_impacket(local_path, path, share='C$', conn=None, host=None, username=None, password=None): ''' Wrapper around impacket.smbconnection.putFile() that allows a file to be uploaded Example usage: import salt.utils.smb smb_conn = salt.utils.smb.get_conn('10.0.0.45', 'vagrant'...
def _put_file_impacket(local_path, path, share='C$', conn=None, host=None, username=None, password=None): ''' Wrapper around impacket.smbconnection.putFile() that allows a file to be uploaded Example usage: import salt.utils.smb smb_conn = salt.utils.smb.get_conn('10.0.0.45', 'vagrant'...
[ "Wrapper", "around", "impacket", ".", "smbconnection", ".", "putFile", "()", "that", "allows", "a", "file", "to", "be", "uploaded" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/smb.py#L298-L319
[ "def", "_put_file_impacket", "(", "local_path", ",", "path", ",", "share", "=", "'C$'", ",", "conn", "=", "None", ",", "host", "=", "None", ",", "username", "=", "None", ",", "password", "=", "None", ")", ":", "if", "conn", "is", "None", ":", "conn",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
put_file
Wrapper around impacket.smbconnection.putFile() that allows a file to be uploaded Example usage: import salt.utils.smb smb_conn = salt.utils.smb.get_conn('10.0.0.45', 'vagrant', 'vagrant') salt.utils.smb.put_file('/root/test.pdf', 'temp\\myfiles\\test1.pdf', conn=smb_conn)
salt/utils/smb.py
def put_file(local_path, path, share='C$', conn=None, host=None, username=None, password=None): ''' Wrapper around impacket.smbconnection.putFile() that allows a file to be uploaded Example usage: import salt.utils.smb smb_conn = salt.utils.smb.get_conn('10.0.0.45', 'vagrant', 'vagrant...
def put_file(local_path, path, share='C$', conn=None, host=None, username=None, password=None): ''' Wrapper around impacket.smbconnection.putFile() that allows a file to be uploaded Example usage: import salt.utils.smb smb_conn = salt.utils.smb.get_conn('10.0.0.45', 'vagrant', 'vagrant...
[ "Wrapper", "around", "impacket", ".", "smbconnection", ".", "putFile", "()", "that", "allows", "a", "file", "to", "be", "uploaded" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/smb.py#L345-L366
[ "def", "put_file", "(", "local_path", ",", "path", ",", "share", "=", "'C$'", ",", "conn", "=", "None", ",", "host", "=", "None", ",", "username", "=", "None", ",", "password", "=", "None", ")", ":", "if", "HAS_SMBPROTOCOL", ":", "return", "_put_file_s...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
StrHandle.string
Looks like a file handle
salt/utils/smb.py
def string(self, writesize=None): ''' Looks like a file handle ''' if not self.finished: self.finished = True return self.content return ''
def string(self, writesize=None): ''' Looks like a file handle ''' if not self.finished: self.finished = True return self.content return ''
[ "Looks", "like", "a", "file", "handle" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/smb.py#L150-L157
[ "def", "string", "(", "self", ",", "writesize", "=", "None", ")", ":", "if", "not", "self", ".", "finished", ":", "self", ".", "finished", "=", "True", "return", "self", ".", "content", "return", "''" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_get_template
Get the contents of a template file and provide it as a module type :param path: path to the template.yml file :type path: ``str`` :param option_key: The unique key of this template :type option_key: ``str`` :returns: Details about the template :rtype: ``tuple``
salt/utils/extend.py
def _get_template(path, option_key): ''' Get the contents of a template file and provide it as a module type :param path: path to the template.yml file :type path: ``str`` :param option_key: The unique key of this template :type option_key: ``str`` :returns: Details about the template ...
def _get_template(path, option_key): ''' Get the contents of a template file and provide it as a module type :param path: path to the template.yml file :type path: ``str`` :param option_key: The unique key of this template :type option_key: ``str`` :returns: Details about the template ...
[ "Get", "the", "contents", "of", "a", "template", "file", "and", "provide", "it", "as", "a", "module", "type" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/extend.py#L45-L61
[ "def", "_get_template", "(", "path", ",", "option_key", ")", ":", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "path", ",", "'r'", ")", "as", "template_f", ":", "template", "=", "deserialize", "(", "template_f", ")", "info", "=", "(",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_fetch_templates
Fetch all of the templates in the src directory :param src: The source path :type src: ``str`` :rtype: ``list`` of ``tuple`` :returns: ``list`` of ('key', 'description')
salt/utils/extend.py
def _fetch_templates(src): ''' Fetch all of the templates in the src directory :param src: The source path :type src: ``str`` :rtype: ``list`` of ``tuple`` :returns: ``list`` of ('key', 'description') ''' templates = [] log.debug('Listing contents of %s', src) for item in os.l...
def _fetch_templates(src): ''' Fetch all of the templates in the src directory :param src: The source path :type src: ``str`` :rtype: ``list`` of ``tuple`` :returns: ``list`` of ('key', 'description') ''' templates = [] log.debug('Listing contents of %s', src) for item in os.l...
[ "Fetch", "all", "of", "the", "templates", "in", "the", "src", "directory" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/extend.py#L64-L85
[ "def", "_fetch_templates", "(", "src", ")", ":", "templates", "=", "[", "]", "log", ".", "debug", "(", "'Listing contents of %s'", ",", "src", ")", "for", "item", "in", "os", ".", "listdir", "(", "src", ")", ":", "s", "=", "os", ".", "path", ".", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_mergetree
Akin to shutils.copytree but over existing directories, does a recursive merge copy. :param src: The source path :type src: ``str`` :param dst: The destination path :type dst: ``str``
salt/utils/extend.py
def _mergetree(src, dst): ''' Akin to shutils.copytree but over existing directories, does a recursive merge copy. :param src: The source path :type src: ``str`` :param dst: The destination path :type dst: ``str`` ''' for item in os.listdir(src): s = os.path.join(src, item) ...
def _mergetree(src, dst): ''' Akin to shutils.copytree but over existing directories, does a recursive merge copy. :param src: The source path :type src: ``str`` :param dst: The destination path :type dst: ``str`` ''' for item in os.listdir(src): s = os.path.join(src, item) ...
[ "Akin", "to", "shutils", ".", "copytree", "but", "over", "existing", "directories", "does", "a", "recursive", "merge", "copy", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/extend.py#L88-L109
[ "def", "_mergetree", "(", "src", ",", "dst", ")", ":", "for", "item", "in", "os", ".", "listdir", "(", "src", ")", ":", "s", "=", "os", ".", "path", ".", "join", "(", "src", ",", "item", ")", "d", "=", "os", ".", "path", ".", "join", "(", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_mergetreejinja
Merge directory A to directory B, apply Jinja2 templating to both the file/folder names AND to the contents of the files :param src: The source path :type src: ``str`` :param dst: The destination path :type dst: ``str`` :param context: The dictionary to inject into the Jinja template as con...
salt/utils/extend.py
def _mergetreejinja(src, dst, context): ''' Merge directory A to directory B, apply Jinja2 templating to both the file/folder names AND to the contents of the files :param src: The source path :type src: ``str`` :param dst: The destination path :type dst: ``str`` :param context: The...
def _mergetreejinja(src, dst, context): ''' Merge directory A to directory B, apply Jinja2 templating to both the file/folder names AND to the contents of the files :param src: The source path :type src: ``str`` :param dst: The destination path :type dst: ``str`` :param context: The...
[ "Merge", "directory", "A", "to", "directory", "B", "apply", "Jinja2", "templating", "to", "both", "the", "file", "/", "folder", "names", "AND", "to", "the", "contents", "of", "the", "files" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/extend.py#L112-L144
[ "def", "_mergetreejinja", "(", "src", ",", "dst", ",", "context", ")", ":", "for", "item", "in", "os", ".", "listdir", "(", "src", ")", ":", "s", "=", "os", ".", "path", ".", "join", "(", "src", ",", "item", ")", "d", "=", "os", ".", "path", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_prompt_choice
Prompt the user to choose between a list of options, index each one by adding an enumerator based on https://github.com/audreyr/cookiecutter/blob/master/cookiecutter/prompt.py#L51 :param var_name: The question to ask the user :type var_name: ``str`` :param options: A list of options :type option...
salt/utils/extend.py
def _prompt_choice(var_name, options): ''' Prompt the user to choose between a list of options, index each one by adding an enumerator based on https://github.com/audreyr/cookiecutter/blob/master/cookiecutter/prompt.py#L51 :param var_name: The question to ask the user :type var_name: ``str`` ...
def _prompt_choice(var_name, options): ''' Prompt the user to choose between a list of options, index each one by adding an enumerator based on https://github.com/audreyr/cookiecutter/blob/master/cookiecutter/prompt.py#L51 :param var_name: The question to ask the user :type var_name: ``str`` ...
[ "Prompt", "the", "user", "to", "choose", "between", "a", "list", "of", "options", "index", "each", "one", "by", "adding", "an", "enumerator", "based", "on", "https", ":", "//", "github", ".", "com", "/", "audreyr", "/", "cookiecutter", "/", "blob", "/", ...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/extend.py#L163-L193
[ "def", "_prompt_choice", "(", "var_name", ",", "options", ")", ":", "choice_map", "=", "OrderedDict", "(", "(", "'{0}'", ".", "format", "(", "i", ")", ",", "value", ")", "for", "i", ",", "value", "in", "enumerate", "(", "options", ",", "1", ")", "if"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
run
A template factory for extending the salt ecosystem :param extension: The extension type, e.g. 'module', 'state', if omitted, user will be prompted :type extension: ``str`` :param name: Python-friendly name for the module, if omitted, user will be prompted :type name: ``str`` :param description...
salt/utils/extend.py
def run(extension=None, name=None, description=None, salt_dir=None, merge=False, temp_dir=None): ''' A template factory for extending the salt ecosystem :param extension: The extension type, e.g. 'module', 'state', if omitted, user will be prompted :type extension: ``str`` :param name: Python-fri...
def run(extension=None, name=None, description=None, salt_dir=None, merge=False, temp_dir=None): ''' A template factory for extending the salt ecosystem :param extension: The extension type, e.g. 'module', 'state', if omitted, user will be prompted :type extension: ``str`` :param name: Python-fri...
[ "A", "template", "factory", "for", "extending", "the", "salt", "ecosystem" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/extend.py#L213-L304
[ "def", "run", "(", "extension", "=", "None", ",", "name", "=", "None", ",", "description", "=", "None", ",", "salt_dir", "=", "None", ",", "merge", "=", "False", ",", "temp_dir", "=", "None", ")", ":", "if", "not", "HAS_CLICK", ":", "print", "(", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
agent_settings
Manage the SNMP sysContact, sysLocation, and sysServices settings. :param str contact: The SNMP contact. :param str location: The SNMP location. :param str services: A list of selected services. Example of usage: .. code-block:: yaml snmp-agent-settings: win_snmp.agent_settin...
salt/states/win_snmp.py
def agent_settings(name, contact, location, services=None): ''' Manage the SNMP sysContact, sysLocation, and sysServices settings. :param str contact: The SNMP contact. :param str location: The SNMP location. :param str services: A list of selected services. Example of usage: .. code-bloc...
def agent_settings(name, contact, location, services=None): ''' Manage the SNMP sysContact, sysLocation, and sysServices settings. :param str contact: The SNMP contact. :param str location: The SNMP location. :param str services: A list of selected services. Example of usage: .. code-bloc...
[ "Manage", "the", "SNMP", "sysContact", "sysLocation", "and", "sysServices", "settings", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/win_snmp.py#L24-L92
[ "def", "agent_settings", "(", "name", ",", "contact", ",", "location", ",", "services", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'comment'", ":", "six", ".", "text_type", "(", ")", ",", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
auth_traps_enabled
Manage the sending of authentication traps. :param bool status: The enabled status. Example of usage: .. code-block:: yaml snmp-auth-traps: win_snmp.auth_traps_enabled: - status: True
salt/states/win_snmp.py
def auth_traps_enabled(name, status=True): ''' Manage the sending of authentication traps. :param bool status: The enabled status. Example of usage: .. code-block:: yaml snmp-auth-traps: win_snmp.auth_traps_enabled: - status: True ''' ret = {'name': na...
def auth_traps_enabled(name, status=True): ''' Manage the sending of authentication traps. :param bool status: The enabled status. Example of usage: .. code-block:: yaml snmp-auth-traps: win_snmp.auth_traps_enabled: - status: True ''' ret = {'name': na...
[ "Manage", "the", "sending", "of", "authentication", "traps", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/win_snmp.py#L95-L130
[ "def", "auth_traps_enabled", "(", "name", ",", "status", "=", "True", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'comment'", ":", "six", ".", "text_type", "(", ")", ",", "'result'", ":", "None", "}", "v...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
community_names
Manage the SNMP accepted community names and their permissions. :param str communities: A dictionary of SNMP communities and permissions. Example of usage: .. code-block:: yaml snmp-community-names: win_snmp.community_names: - communities: TestComm...
salt/states/win_snmp.py
def community_names(name, communities=None): ''' Manage the SNMP accepted community names and their permissions. :param str communities: A dictionary of SNMP communities and permissions. Example of usage: .. code-block:: yaml snmp-community-names: win_snmp.community_names: ...
def community_names(name, communities=None): ''' Manage the SNMP accepted community names and their permissions. :param str communities: A dictionary of SNMP communities and permissions. Example of usage: .. code-block:: yaml snmp-community-names: win_snmp.community_names: ...
[ "Manage", "the", "SNMP", "accepted", "community", "names", "and", "their", "permissions", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/win_snmp.py#L133-L215
[ "def", "community_names", "(", "name", ",", "communities", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "dict", "(", ")", ",", "'comment'", ":", "six", ".", "text_type", "(", ")", ",", "'result'", ":", "None",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_check_valid_version
Check the version of npm to ensure this module will work. Currently npm must be at least version 1.2.
salt/modules/npm.py
def _check_valid_version(): ''' Check the version of npm to ensure this module will work. Currently npm must be at least version 1.2. ''' # Locate the full path to npm npm_path = salt.utils.path.which('npm') # pylint: disable=no-member res = salt.modules.cmdmod.run('{npm} --version'.fo...
def _check_valid_version(): ''' Check the version of npm to ensure this module will work. Currently npm must be at least version 1.2. ''' # Locate the full path to npm npm_path = salt.utils.path.which('npm') # pylint: disable=no-member res = salt.modules.cmdmod.run('{npm} --version'.fo...
[ "Check", "the", "version", "of", "npm", "to", "ensure", "this", "module", "will", "work", ".", "Currently", "npm", "must", "be", "at", "least", "version", "1", ".", "2", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/npm.py#L47-L65
[ "def", "_check_valid_version", "(", ")", ":", "# Locate the full path to npm", "npm_path", "=", "salt", ".", "utils", ".", "path", ".", "which", "(", "'npm'", ")", "# pylint: disable=no-member", "res", "=", "salt", ".", "modules", ".", "cmdmod", ".", "run", "(...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
install
Install an NPM package. If no directory is specified, the package will be installed globally. If no package is specified, the dependencies (from package.json) of the package in the given directory will be installed. pkg A package name in any format accepted by NPM, including a version ...
salt/modules/npm.py
def install(pkg=None, pkgs=None, dir=None, runas=None, registry=None, env=None, dry_run=False, silent=True): ''' Install an NPM package. If no directory is specified, the package will be installed globally. If no packag...
def install(pkg=None, pkgs=None, dir=None, runas=None, registry=None, env=None, dry_run=False, silent=True): ''' Install an NPM package. If no directory is specified, the package will be installed globally. If no packag...
[ "Install", "an", "NPM", "package", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/npm.py#L68-L182
[ "def", "install", "(", "pkg", "=", "None", ",", "pkgs", "=", "None", ",", "dir", "=", "None", ",", "runas", "=", "None", ",", "registry", "=", "None", ",", "env", "=", "None", ",", "dry_run", "=", "False", ",", "silent", "=", "True", ")", ":", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
uninstall
Uninstall an NPM package. If no directory is specified, the package will be uninstalled globally. pkg A package name in any format accepted by NPM dir The target directory from which to uninstall the package, or None for global installation runas The user to run NPM w...
salt/modules/npm.py
def uninstall(pkg, dir=None, runas=None, env=None): ''' Uninstall an NPM package. If no directory is specified, the package will be uninstalled globally. pkg A package name in any format accepted by NPM dir The target directory from which to uninstall the package, or None for ...
def uninstall(pkg, dir=None, runas=None, env=None): ''' Uninstall an NPM package. If no directory is specified, the package will be uninstalled globally. pkg A package name in any format accepted by NPM dir The target directory from which to uninstall the package, or None for ...
[ "Uninstall", "an", "NPM", "package", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/npm.py#L185-L237
[ "def", "uninstall", "(", "pkg", ",", "dir", "=", "None", ",", "runas", "=", "None", ",", "env", "=", "None", ")", ":", "# Protect against injection", "if", "pkg", ":", "pkg", "=", "_cmd_quote", "(", "pkg", ")", "env", "=", "env", "or", "{", "}", "i...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_
List installed NPM packages. If no directory is specified, this will return the list of globally- installed packages. pkg Limit package listing by name dir The directory whose packages will be listed, or None for global installation runas The user to run NPM with ...
salt/modules/npm.py
def list_(pkg=None, dir=None, runas=None, env=None, depth=None): ''' List installed NPM packages. If no directory is specified, this will return the list of globally- installed packages. pkg Limit package listing by name dir The directory whose packages will be listed, or None...
def list_(pkg=None, dir=None, runas=None, env=None, depth=None): ''' List installed NPM packages. If no directory is specified, this will return the list of globally- installed packages. pkg Limit package listing by name dir The directory whose packages will be listed, or None...
[ "List", "installed", "NPM", "packages", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/npm.py#L240-L309
[ "def", "list_", "(", "pkg", "=", "None", ",", "dir", "=", "None", ",", "runas", "=", "None", ",", "env", "=", "None", ",", "depth", "=", "None", ")", ":", "env", "=", "env", "or", "{", "}", "if", "runas", ":", "uid", "=", "salt", ".", "utils"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
cache_clean
Clean cached NPM packages. If no path for a specific package is provided the entire cache will be cleared. path The cache subpath to delete, or None to clear the entire cache runas The user to run NPM with env Environment variables to set when invoking npm. Uses the same ``en...
salt/modules/npm.py
def cache_clean(path=None, runas=None, env=None, force=False): ''' Clean cached NPM packages. If no path for a specific package is provided the entire cache will be cleared. path The cache subpath to delete, or None to clear the entire cache runas The user to run NPM with env...
def cache_clean(path=None, runas=None, env=None, force=False): ''' Clean cached NPM packages. If no path for a specific package is provided the entire cache will be cleared. path The cache subpath to delete, or None to clear the entire cache runas The user to run NPM with env...
[ "Clean", "cached", "NPM", "packages", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/npm.py#L312-L361
[ "def", "cache_clean", "(", "path", "=", "None", ",", "runas", "=", "None", ",", "env", "=", "None", ",", "force", "=", "False", ")", ":", "env", "=", "env", "or", "{", "}", "if", "runas", ":", "uid", "=", "salt", ".", "utils", ".", "user", ".",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
cache_list
List NPM cached packages. If no path for a specific package is provided this will list all the cached packages. path The cache subpath to list, or None to list the entire cache runas The user to run NPM with env Environment variables to set when invoking npm. Uses the same ``...
salt/modules/npm.py
def cache_list(path=None, runas=None, env=None): ''' List NPM cached packages. If no path for a specific package is provided this will list all the cached packages. path The cache subpath to list, or None to list the entire cache runas The user to run NPM with env Env...
def cache_list(path=None, runas=None, env=None): ''' List NPM cached packages. If no path for a specific package is provided this will list all the cached packages. path The cache subpath to list, or None to list the entire cache runas The user to run NPM with env Env...
[ "List", "NPM", "cached", "packages", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/npm.py#L364-L406
[ "def", "cache_list", "(", "path", "=", "None", ",", "runas", "=", "None", ",", "env", "=", "None", ")", ":", "env", "=", "env", "or", "{", "}", "if", "runas", ":", "uid", "=", "salt", ".", "utils", ".", "user", ".", "get_uid", "(", "runas", ")"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
cache_path
List path of the NPM cache directory. runas The user to run NPM with env Environment variables to set when invoking npm. Uses the same ``env`` format as the :py:func:`cmd.run <salt.modules.cmdmod.run>` execution function. CLI Example: .. code-block:: bash sal...
salt/modules/npm.py
def cache_path(runas=None, env=None): ''' List path of the NPM cache directory. runas The user to run NPM with env Environment variables to set when invoking npm. Uses the same ``env`` format as the :py:func:`cmd.run <salt.modules.cmdmod.run>` execution function. C...
def cache_path(runas=None, env=None): ''' List path of the NPM cache directory. runas The user to run NPM with env Environment variables to set when invoking npm. Uses the same ``env`` format as the :py:func:`cmd.run <salt.modules.cmdmod.run>` execution function. C...
[ "List", "path", "of", "the", "NPM", "cache", "directory", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/npm.py#L409-L440
[ "def", "cache_path", "(", "runas", "=", "None", ",", "env", "=", "None", ")", ":", "env", "=", "env", "or", "{", "}", "if", "runas", ":", "uid", "=", "salt", ".", "utils", ".", "user", ".", "get_uid", "(", "runas", ")", "if", "uid", ":", "env",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
raw_command
Send raw ipmi command This allows arbitrary IPMI bytes to be issued. This is commonly used for certain vendor specific commands. :param netfn: Net function number :param command: Command value :param bridge_request: The target slave address and channel number for the bridg...
salt/modules/ipmi.py
def raw_command(netfn, command, bridge_request=None, data=(), retry=True, delay_xmit=None, **kwargs): ''' Send raw ipmi command This allows arbitrary IPMI bytes to be issued. This is commonly used for certain vendor specific commands. :param netfn: Net function number :param command: Command ...
def raw_command(netfn, command, bridge_request=None, data=(), retry=True, delay_xmit=None, **kwargs): ''' Send raw ipmi command This allows arbitrary IPMI bytes to be issued. This is commonly used for certain vendor specific commands. :param netfn: Net function number :param command: Command ...
[ "Send", "raw", "ipmi", "command" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ipmi.py#L121-L156
[ "def", "raw_command", "(", "netfn", ",", "command", ",", "bridge_request", "=", "None", ",", "data", "=", "(", ")", ",", "retry", "=", "True", ",", "delay_xmit", "=", "None", ",", "*", "*", "kwargs", ")", ":", "with", "_IpmiSession", "(", "*", "*", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
set_channel_access
Set channel access :param channel: number [1:7] :param access_update_mode: - 'dont_change' = don't set or change Channel Access - 'non_volatile' = set non-volatile Channel Access - 'volatile' = set volatile (active) setting of Channel Access :param alerting: PEF Alert...
salt/modules/ipmi.py
def set_channel_access(channel=14, access_update_mode='non_volatile', alerting=False, per_msg_auth=False, user_level_auth=False, access_mode='always', privilege_update_mode='non_volatile', privilege_level='administrator', **kwargs): ''' Set ch...
def set_channel_access(channel=14, access_update_mode='non_volatile', alerting=False, per_msg_auth=False, user_level_auth=False, access_mode='always', privilege_update_mode='non_volatile', privilege_level='administrator', **kwargs): ''' Set ch...
[ "Set", "channel", "access" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ipmi.py#L189-L277
[ "def", "set_channel_access", "(", "channel", "=", "14", ",", "access_update_mode", "=", "'non_volatile'", ",", "alerting", "=", "False", ",", "per_msg_auth", "=", "False", ",", "user_level_auth", "=", "False", ",", "access_mode", "=", "'always'", ",", "privilege...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_channel_access
:param kwargs:api_host='127.0.0.1' api_user='admin' api_pass='example' api_port=623 :param channel: number [1:7] :param read_mode: - non_volatile = get non-volatile Channel Access - volatile = get present volatile (active) setting of Channel Access :param kwargs: - api_host=...
salt/modules/ipmi.py
def get_channel_access(channel=14, read_mode='non_volatile', **kwargs): ''' :param kwargs:api_host='127.0.0.1' api_user='admin' api_pass='example' api_port=623 :param channel: number [1:7] :param read_mode: - non_volatile = get non-volatile Channel Access - volatile = get present...
def get_channel_access(channel=14, read_mode='non_volatile', **kwargs): ''' :param kwargs:api_host='127.0.0.1' api_user='admin' api_pass='example' api_port=623 :param channel: number [1:7] :param read_mode: - non_volatile = get non-volatile Channel Access - volatile = get present...
[ ":", "param", "kwargs", ":", "api_host", "=", "127", ".", "0", ".", "0", ".", "1", "api_user", "=", "admin", "api_pass", "=", "example", "api_port", "=", "623" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ipmi.py#L280-L329
[ "def", "get_channel_access", "(", "channel", "=", "14", ",", "read_mode", "=", "'non_volatile'", ",", "*", "*", "kwargs", ")", ":", "with", "_IpmiCommand", "(", "*", "*", "kwargs", ")", "as", "s", ":", "return", "s", ".", "get_channel_access", "(", "chan...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
set_user_access
Set user access :param uid: user number [1:16] :param channel: number [1:7] :param callback: User Restricted to Callback - False = User Privilege Limit is determined by the User Privilege Limit parameter, below, for both callback and non-callback connections. - True = ...
salt/modules/ipmi.py
def set_user_access(uid, channel=14, callback=True, link_auth=True, ipmi_msg=True, privilege_level='administrator', **kwargs): ''' Set user access :param uid: user number [1:16] :param channel: number [1:7] :param callback: User Restricted to Callback - False ...
def set_user_access(uid, channel=14, callback=True, link_auth=True, ipmi_msg=True, privilege_level='administrator', **kwargs): ''' Set user access :param uid: user number [1:16] :param channel: number [1:7] :param callback: User Restricted to Callback - False ...
[ "Set", "user", "access" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ipmi.py#L366-L429
[ "def", "set_user_access", "(", "uid", ",", "channel", "=", "14", ",", "callback", "=", "True", ",", "link_auth", "=", "True", ",", "ipmi_msg", "=", "True", ",", "privilege_level", "=", "'administrator'", ",", "*", "*", "kwargs", ")", ":", "with", "_IpmiC...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_user_access
Get user access :param uid: user number [1:16] :param channel: number [1:7] :param kwargs: - api_host=127.0.0.1 - api_user=admin - api_pass=example - api_port=623 - api_kg=None Return Data .. code-block:: none channel_info: - max_user_c...
salt/modules/ipmi.py
def get_user_access(uid, channel=14, **kwargs): ''' Get user access :param uid: user number [1:16] :param channel: number [1:7] :param kwargs: - api_host=127.0.0.1 - api_user=admin - api_pass=example - api_port=623 - api_kg=None Return Data .. code-...
def get_user_access(uid, channel=14, **kwargs): ''' Get user access :param uid: user number [1:16] :param channel: number [1:7] :param kwargs: - api_host=127.0.0.1 - api_user=admin - api_pass=example - api_port=623 - api_kg=None Return Data .. code-...
[ "Get", "user", "access" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ipmi.py#L432-L468
[ "def", "get_user_access", "(", "uid", ",", "channel", "=", "14", ",", "*", "*", "kwargs", ")", ":", "## user access available during call-in or callback direct connection", "with", "_IpmiCommand", "(", "*", "*", "kwargs", ")", "as", "s", ":", "return", "s", ".",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
set_user_name
Set user name :param uid: user number [1:16] :param name: username (limit of 16bytes) :param kwargs: - api_host=127.0.0.1 - api_user=admin - api_pass=example - api_port=623 - api_kg=None CLI Examples: .. code-block:: bash salt-call ipmi.set_user_na...
salt/modules/ipmi.py
def set_user_name(uid, name, **kwargs): ''' Set user name :param uid: user number [1:16] :param name: username (limit of 16bytes) :param kwargs: - api_host=127.0.0.1 - api_user=admin - api_pass=example - api_port=623 - api_kg=None CLI Examples: .. c...
def set_user_name(uid, name, **kwargs): ''' Set user name :param uid: user number [1:16] :param name: username (limit of 16bytes) :param kwargs: - api_host=127.0.0.1 - api_user=admin - api_pass=example - api_port=623 - api_kg=None CLI Examples: .. c...
[ "Set", "user", "name" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ipmi.py#L471-L491
[ "def", "set_user_name", "(", "uid", ",", "name", ",", "*", "*", "kwargs", ")", ":", "with", "_IpmiCommand", "(", "*", "*", "kwargs", ")", "as", "s", ":", "return", "s", ".", "set_user_name", "(", "uid", ",", "name", ")" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_user_name
Get user name :param uid: user number [1:16] :param return_none_on_error: return None on error :param kwargs: - api_host=127.0.0.1 - api_user=admin - api_pass=example - api_port=623 - api_kg=None CLI Examples: .. code-block:: bash salt-call ipmi.ge...
salt/modules/ipmi.py
def get_user_name(uid, return_none_on_error=True, **kwargs): ''' Get user name :param uid: user number [1:16] :param return_none_on_error: return None on error :param kwargs: - api_host=127.0.0.1 - api_user=admin - api_pass=example - api_port=623 - api_kg=Non...
def get_user_name(uid, return_none_on_error=True, **kwargs): ''' Get user name :param uid: user number [1:16] :param return_none_on_error: return None on error :param kwargs: - api_host=127.0.0.1 - api_user=admin - api_pass=example - api_port=623 - api_kg=Non...
[ "Get", "user", "name" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ipmi.py#L494-L514
[ "def", "get_user_name", "(", "uid", ",", "return_none_on_error", "=", "True", ",", "*", "*", "kwargs", ")", ":", "with", "_IpmiCommand", "(", "*", "*", "kwargs", ")", "as", "s", ":", "return", "s", ".", "get_user_name", "(", "uid", ",", "return_none_on_e...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
set_user_password
Set user password and (modes) :param uid: id number of user. see: get_names_uid()['name'] :param mode: - disable = disable user connections - enable = enable user connections - set_password = set or ensure password - test_password = test password is correct :...
salt/modules/ipmi.py
def set_user_password(uid, mode='set_password', password=None, **kwargs): ''' Set user password and (modes) :param uid: id number of user. see: get_names_uid()['name'] :param mode: - disable = disable user connections - enable = enable user connections - set_passw...
def set_user_password(uid, mode='set_password', password=None, **kwargs): ''' Set user password and (modes) :param uid: id number of user. see: get_names_uid()['name'] :param mode: - disable = disable user connections - enable = enable user connections - set_passw...
[ "Set", "user", "password", "and", "(", "modes", ")" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ipmi.py#L517-L551
[ "def", "set_user_password", "(", "uid", ",", "mode", "=", "'set_password'", ",", "password", "=", "None", ",", "*", "*", "kwargs", ")", ":", "with", "_IpmiCommand", "(", "*", "*", "kwargs", ")", "as", "s", ":", "s", ".", "set_user_password", "(", "uid"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_sensor_data
Get sensor readings Iterates sensor reading objects :param kwargs: - api_host=127.0.0.1 - api_user=admin - api_pass=example - api_port=623 - api_kg=None CLI Example: .. code-block:: bash salt-call ipmi.get_sensor_data api_host=127.0.0.1 api_user=admin...
salt/modules/ipmi.py
def get_sensor_data(**kwargs): ''' Get sensor readings Iterates sensor reading objects :param kwargs: - api_host=127.0.0.1 - api_user=admin - api_pass=example - api_port=623 - api_kg=None CLI Example: .. code-block:: bash salt-call ipmi.get_se...
def get_sensor_data(**kwargs): ''' Get sensor readings Iterates sensor reading objects :param kwargs: - api_host=127.0.0.1 - api_user=admin - api_pass=example - api_port=623 - api_kg=None CLI Example: .. code-block:: bash salt-call ipmi.get_se...
[ "Get", "sensor", "readings" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ipmi.py#L605-L631
[ "def", "get_sensor_data", "(", "*", "*", "kwargs", ")", ":", "import", "ast", "with", "_IpmiCommand", "(", "*", "*", "kwargs", ")", "as", "s", ":", "data", "=", "{", "}", "for", "reading", "in", "s", ".", "get_sensor_data", "(", ")", ":", "if", "re...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
set_power
Request power state change :param name: * power_on -- system turn on * power_off -- system turn off (without waiting for OS) * shutdown -- request OS proper shutdown * reset -- reset (without waiting for OS) * boot -- If system is off, then 'on', else 'reset' :param ens...
salt/modules/ipmi.py
def set_power(state='power_on', wait=True, **kwargs): ''' Request power state change :param name: * power_on -- system turn on * power_off -- system turn off (without waiting for OS) * shutdown -- request OS proper shutdown * reset -- reset (without waiting for OS) *...
def set_power(state='power_on', wait=True, **kwargs): ''' Request power state change :param name: * power_on -- system turn on * power_off -- system turn off (without waiting for OS) * shutdown -- request OS proper shutdown * reset -- reset (without waiting for OS) *...
[ "Request", "power", "state", "change" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ipmi.py#L660-L695
[ "def", "set_power", "(", "state", "=", "'power_on'", ",", "wait", "=", "True", ",", "*", "*", "kwargs", ")", ":", "if", "state", "is", "True", "or", "state", "==", "'power_on'", ":", "state", "=", "'on'", "if", "state", "is", "False", "or", "state", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
set_bootdev
Set boot device to use on next reboot :param bootdev: - network: Request network boot - hd: Boot from hard drive - safe: Boot from hard drive, requesting 'safe mode' - optical: boot from CD/DVD/BD drive - setup: Boot into setup utility - default: remove any IPMI dire...
salt/modules/ipmi.py
def set_bootdev(bootdev='default', persist=False, uefiboot=False, **kwargs): ''' Set boot device to use on next reboot :param bootdev: - network: Request network boot - hd: Boot from hard drive - safe: Boot from hard drive, requesting 'safe mode' - optical: boot from CD/DVD/...
def set_bootdev(bootdev='default', persist=False, uefiboot=False, **kwargs): ''' Set boot device to use on next reboot :param bootdev: - network: Request network boot - hd: Boot from hard drive - safe: Boot from hard drive, requesting 'safe mode' - optical: boot from CD/DVD/...
[ "Set", "boot", "device", "to", "use", "on", "next", "reboot" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ipmi.py#L698-L737
[ "def", "set_bootdev", "(", "bootdev", "=", "'default'", ",", "persist", "=", "False", ",", "uefiboot", "=", "False", ",", "*", "*", "kwargs", ")", ":", "with", "_IpmiCommand", "(", "*", "*", "kwargs", ")", "as", "s", ":", "return", "s", ".", "set_boo...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
set_identify
Request identify light Request the identify light to turn off, on for a duration, or on indefinitely. Other than error exceptions, :param on: Set to True to force on or False to force off :param duration: Set if wanting to request turn on for a duration in seconds, None = indefini...
salt/modules/ipmi.py
def set_identify(on=True, duration=600, **kwargs): ''' Request identify light Request the identify light to turn off, on for a duration, or on indefinitely. Other than error exceptions, :param on: Set to True to force on or False to force off :param duration: Set if wanting to request turn on...
def set_identify(on=True, duration=600, **kwargs): ''' Request identify light Request the identify light to turn off, on for a duration, or on indefinitely. Other than error exceptions, :param on: Set to True to force on or False to force off :param duration: Set if wanting to request turn on...
[ "Request", "identify", "light" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ipmi.py#L740-L764
[ "def", "set_identify", "(", "on", "=", "True", ",", "duration", "=", "600", ",", "*", "*", "kwargs", ")", ":", "with", "_IpmiCommand", "(", "*", "*", "kwargs", ")", "as", "s", ":", "return", "s", ".", "set_identify", "(", "on", "=", "on", ",", "d...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_channel_max_user_count
Get max users in channel :param channel: number [1:7] :param kwargs: - api_host=127.0.0.1 - api_user=admin - api_pass=example - api_port=623 - api_kg=None :return: int -- often 16 CLI Examples: .. code-block:: bash salt-call ipmi.get_channel_max_us...
salt/modules/ipmi.py
def get_channel_max_user_count(channel=14, **kwargs): ''' Get max users in channel :param channel: number [1:7] :param kwargs: - api_host=127.0.0.1 - api_user=admin - api_pass=example - api_port=623 - api_kg=None :return: int -- often 16 CLI Examples: ...
def get_channel_max_user_count(channel=14, **kwargs): ''' Get max users in channel :param channel: number [1:7] :param kwargs: - api_host=127.0.0.1 - api_user=admin - api_pass=example - api_port=623 - api_kg=None :return: int -- often 16 CLI Examples: ...
[ "Get", "max", "users", "in", "channel" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ipmi.py#L767-L787
[ "def", "get_channel_max_user_count", "(", "channel", "=", "14", ",", "*", "*", "kwargs", ")", ":", "access", "=", "get_user_access", "(", "channel", "=", "channel", ",", "uid", "=", "1", ",", "*", "*", "kwargs", ")", "return", "access", "[", "'channel_in...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_user
Get user from uid and access on channel :param uid: user number [1:16] :param channel: number [1:7] :param kwargs: - api_host=127.0.0.1 - api_user=admin - api_pass=example - api_port=623 - api_kg=None Return Data .. code-block:: none name: (str) ...
salt/modules/ipmi.py
def get_user(uid, channel=14, **kwargs): ''' Get user from uid and access on channel :param uid: user number [1:16] :param channel: number [1:7] :param kwargs: - api_host=127.0.0.1 - api_user=admin - api_pass=example - api_port=623 - api_kg=None Return D...
def get_user(uid, channel=14, **kwargs): ''' Get user from uid and access on channel :param uid: user number [1:16] :param channel: number [1:7] :param kwargs: - api_host=127.0.0.1 - api_user=admin - api_pass=example - api_port=623 - api_kg=None Return D...
[ "Get", "user", "from", "uid", "and", "access", "on", "channel" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ipmi.py#L790-L826
[ "def", "get_user", "(", "uid", ",", "channel", "=", "14", ",", "*", "*", "kwargs", ")", ":", "name", "=", "get_user_name", "(", "uid", ",", "*", "*", "kwargs", ")", "access", "=", "get_user_access", "(", "uid", ",", "channel", ",", "*", "*", "kwarg...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_user
create/ensure a user is created with provided settings. :param privilege_level: User Privilege Limit. (Determines the maximum privilege level that the user is allowed to switch to on the specified channel.) * callback * user * operator * administrator * propr...
salt/modules/ipmi.py
def create_user(uid, name, password, channel=14, callback=False, link_auth=True, ipmi_msg=True, privilege_level='administrator', **kwargs): ''' create/ensure a user is created with provided settings. :param privilege_level: User Privilege Limit. (Determines the maximum privilege lev...
def create_user(uid, name, password, channel=14, callback=False, link_auth=True, ipmi_msg=True, privilege_level='administrator', **kwargs): ''' create/ensure a user is created with provided settings. :param privilege_level: User Privilege Limit. (Determines the maximum privilege lev...
[ "create", "/", "ensure", "a", "user", "is", "created", "with", "provided", "settings", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ipmi.py#L863-L892
[ "def", "create_user", "(", "uid", ",", "name", ",", "password", ",", "channel", "=", "14", ",", "callback", "=", "False", ",", "link_auth", "=", "True", ",", "ipmi_msg", "=", "True", ",", "privilege_level", "=", "'administrator'", ",", "*", "*", "kwargs"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
user_delete
Delete user (helper) :param uid: user number [1:16] :param channel: number [1:7] :param kwargs: - api_host=127.0.0.1 - api_user=admin - api_pass=example - api_port=623 - api_kg=None CLI Examples: .. code-block:: bash salt-call ipmi.user_delete uid=...
salt/modules/ipmi.py
def user_delete(uid, channel=14, **kwargs): ''' Delete user (helper) :param uid: user number [1:16] :param channel: number [1:7] :param kwargs: - api_host=127.0.0.1 - api_user=admin - api_pass=example - api_port=623 - api_kg=None CLI Examples: .. co...
def user_delete(uid, channel=14, **kwargs): ''' Delete user (helper) :param uid: user number [1:16] :param channel: number [1:7] :param kwargs: - api_host=127.0.0.1 - api_user=admin - api_pass=example - api_port=623 - api_kg=None CLI Examples: .. co...
[ "Delete", "user", "(", "helper", ")" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ipmi.py#L895-L915
[ "def", "user_delete", "(", "uid", ",", "channel", "=", "14", ",", "*", "*", "kwargs", ")", ":", "with", "_IpmiCommand", "(", "*", "*", "kwargs", ")", "as", "c", ":", "return", "c", ".", "user_delete", "(", "uid", ",", "channel", ")" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
train
valid_certificate
Verify that a TLS certificate is valid now and (optionally) will be valid for the time specified through weeks, days, hours, minutes, and seconds.
salt/states/tls.py
def valid_certificate(name, weeks=0, days=0, hours=0, minutes=0, seconds=0): ''' Verify that a TLS certificate is valid now and (optionally) will be valid for the time specified through weeks, days,...
def valid_certificate(name, weeks=0, days=0, hours=0, minutes=0, seconds=0): ''' Verify that a TLS certificate is valid now and (optionally) will be valid for the time specified through weeks, days,...
[ "Verify", "that", "a", "TLS", "certificate", "is", "valid", "now", "and", "(", "optionally", ")", "will", "be", "valid", "for", "the", "time", "specified", "through", "weeks", "days", "hours", "minutes", "and", "seconds", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/tls.py#L25-L75
[ "def", "valid_certificate", "(", "name", ",", "weeks", "=", "0", ",", "days", "=", "0", ",", "hours", "=", "0", ",", "minutes", "=", "0", ",", "seconds", "=", "0", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_compare
Compares two objects and return a boolean value when there's a match.
salt/beacons/napalm_beacon.py
def _compare(cur_cmp, cur_struct): ''' Compares two objects and return a boolean value when there's a match. ''' if isinstance(cur_cmp, dict) and isinstance(cur_struct, dict): log.debug('Comparing dict to dict') for cmp_key, cmp_value in six.iteritems(cur_cmp): if cmp_key...
def _compare(cur_cmp, cur_struct): ''' Compares two objects and return a boolean value when there's a match. ''' if isinstance(cur_cmp, dict) and isinstance(cur_struct, dict): log.debug('Comparing dict to dict') for cmp_key, cmp_value in six.iteritems(cur_cmp): if cmp_key...
[ "Compares", "two", "objects", "and", "return", "a", "boolean", "value", "when", "there", "s", "a", "match", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/beacons/napalm_beacon.py#L203-L278
[ "def", "_compare", "(", "cur_cmp", ",", "cur_struct", ")", ":", "if", "isinstance", "(", "cur_cmp", ",", "dict", ")", "and", "isinstance", "(", "cur_struct", ",", "dict", ")", ":", "log", ".", "debug", "(", "'Comparing dict to dict'", ")", "for", "cmp_key"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
validate
Validate the beacon configuration.
salt/beacons/napalm_beacon.py
def validate(config): ''' Validate the beacon configuration. ''' # Must be a list of dicts. if not isinstance(config, list): return False, 'Configuration for napalm beacon must be a list.' for mod in config: fun = mod.keys()[0] fun_cfg = mod.values()[0] if not isi...
def validate(config): ''' Validate the beacon configuration. ''' # Must be a list of dicts. if not isinstance(config, list): return False, 'Configuration for napalm beacon must be a list.' for mod in config: fun = mod.keys()[0] fun_cfg = mod.values()[0] if not isi...
[ "Validate", "the", "beacon", "configuration", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/beacons/napalm_beacon.py#L281-L295
[ "def", "validate", "(", "config", ")", ":", "# Must be a list of dicts.", "if", "not", "isinstance", "(", "config", ",", "list", ")", ":", "return", "False", ",", "'Configuration for napalm beacon must be a list.'", "for", "mod", "in", "config", ":", "fun", "=", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
beacon
Watch napalm function and fire events.
salt/beacons/napalm_beacon.py
def beacon(config): ''' Watch napalm function and fire events. ''' log.debug('Executing napalm beacon with config:') log.debug(config) ret = [] for mod in config: if not mod: continue event = {} fun = mod.keys()[0] fun_cfg = mod.values()[0] ...
def beacon(config): ''' Watch napalm function and fire events. ''' log.debug('Executing napalm beacon with config:') log.debug(config) ret = [] for mod in config: if not mod: continue event = {} fun = mod.keys()[0] fun_cfg = mod.values()[0] ...
[ "Watch", "napalm", "function", "and", "fire", "events", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/beacons/napalm_beacon.py#L298-L345
[ "def", "beacon", "(", "config", ")", ":", "log", ".", "debug", "(", "'Executing napalm beacon with config:'", ")", "log", ".", "debug", "(", "config", ")", "ret", "=", "[", "]", "for", "mod", "in", "config", ":", "if", "not", "mod", ":", "continue", "e...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
__execute_cmd
Execute ilom commands
salt/modules/ilo.py
def __execute_cmd(name, xml): ''' Execute ilom commands ''' ret = {name.replace('_', ' '): {}} id_num = 0 tmp_dir = os.path.join(__opts__['cachedir'], 'tmp') if not os.path.isdir(tmp_dir): os.mkdir(tmp_dir) with tempfile.NamedTemporaryFile(dir=tmp_dir, ...
def __execute_cmd(name, xml): ''' Execute ilom commands ''' ret = {name.replace('_', ' '): {}} id_num = 0 tmp_dir = os.path.join(__opts__['cachedir'], 'tmp') if not os.path.isdir(tmp_dir): os.mkdir(tmp_dir) with tempfile.NamedTemporaryFile(dir=tmp_dir, ...
[ "Execute", "ilom", "commands" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ilo.py#L32-L75
[ "def", "__execute_cmd", "(", "name", ",", "xml", ")", ":", "ret", "=", "{", "name", ".", "replace", "(", "'_'", ",", "' '", ")", ":", "{", "}", "}", "id_num", "=", "0", "tmp_dir", "=", "os", ".", "path", ".", "join", "(", "__opts__", "[", "'cac...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
set_http_port
Configure the port HTTP should listen on CLI Example: .. code-block:: bash salt '*' ilo.set_http_port 8080
salt/modules/ilo.py
def set_http_port(port=80): ''' Configure the port HTTP should listen on CLI Example: .. code-block:: bash salt '*' ilo.set_http_port 8080 ''' _current = global_settings() if _current['Global Settings']['HTTP_PORT']['VALUE'] == port: return True _xml = """<RIBCL VERS...
def set_http_port(port=80): ''' Configure the port HTTP should listen on CLI Example: .. code-block:: bash salt '*' ilo.set_http_port 8080 ''' _current = global_settings() if _current['Global Settings']['HTTP_PORT']['VALUE'] == port: return True _xml = """<RIBCL VERS...
[ "Configure", "the", "port", "HTTP", "should", "listen", "on" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ilo.py#L100-L125
[ "def", "set_http_port", "(", "port", "=", "80", ")", ":", "_current", "=", "global_settings", "(", ")", "if", "_current", "[", "'Global Settings'", "]", "[", "'HTTP_PORT'", "]", "[", "'VALUE'", "]", "==", "port", ":", "return", "True", "_xml", "=", "\"\"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
set_https_port
Configure the port HTTPS should listen on CLI Example: .. code-block:: bash salt '*' ilo.set_https_port 4334
salt/modules/ilo.py
def set_https_port(port=443): ''' Configure the port HTTPS should listen on CLI Example: .. code-block:: bash salt '*' ilo.set_https_port 4334 ''' _current = global_settings() if _current['Global Settings']['HTTP_PORT']['VALUE'] == port: return True _xml = """<RIBCL ...
def set_https_port(port=443): ''' Configure the port HTTPS should listen on CLI Example: .. code-block:: bash salt '*' ilo.set_https_port 4334 ''' _current = global_settings() if _current['Global Settings']['HTTP_PORT']['VALUE'] == port: return True _xml = """<RIBCL ...
[ "Configure", "the", "port", "HTTPS", "should", "listen", "on" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ilo.py#L128-L153
[ "def", "set_https_port", "(", "port", "=", "443", ")", ":", "_current", "=", "global_settings", "(", ")", "if", "_current", "[", "'Global Settings'", "]", "[", "'HTTP_PORT'", "]", "[", "'VALUE'", "]", "==", "port", ":", "return", "True", "_xml", "=", "\"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
set_ssh_port
Enable SSH on a user defined port CLI Example: .. code-block:: bash salt '*' ilo.set_ssh_port 2222
salt/modules/ilo.py
def set_ssh_port(port=22): ''' Enable SSH on a user defined port CLI Example: .. code-block:: bash salt '*' ilo.set_ssh_port 2222 ''' _current = global_settings() if _current['Global Settings']['SSH_PORT']['VALUE'] == port: return True _xml = """<RIBCL VERSION="2.0">...
def set_ssh_port(port=22): ''' Enable SSH on a user defined port CLI Example: .. code-block:: bash salt '*' ilo.set_ssh_port 2222 ''' _current = global_settings() if _current['Global Settings']['SSH_PORT']['VALUE'] == port: return True _xml = """<RIBCL VERSION="2.0">...
[ "Enable", "SSH", "on", "a", "user", "defined", "port" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ilo.py#L212-L237
[ "def", "set_ssh_port", "(", "port", "=", "22", ")", ":", "_current", "=", "global_settings", "(", ")", "if", "_current", "[", "'Global Settings'", "]", "[", "'SSH_PORT'", "]", "[", "'VALUE'", "]", "==", "port", ":", "return", "True", "_xml", "=", "\"\"\"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_user
Create user CLI Example: .. code-block:: bash salt '*' ilo.create_user damian secretagent VIRTUAL_MEDIA_PRIV If no permissions are specify the user will only have a read-only account. Supported privelges: * ADMIN_PRIV Enables the user to administer user accounts. * REMOTE_CO...
salt/modules/ilo.py
def create_user(name, password, *privileges): ''' Create user CLI Example: .. code-block:: bash salt '*' ilo.create_user damian secretagent VIRTUAL_MEDIA_PRIV If no permissions are specify the user will only have a read-only account. Supported privelges: * ADMIN_PRIV Enab...
def create_user(name, password, *privileges): ''' Create user CLI Example: .. code-block:: bash salt '*' ilo.create_user damian secretagent VIRTUAL_MEDIA_PRIV If no permissions are specify the user will only have a read-only account. Supported privelges: * ADMIN_PRIV Enab...
[ "Create", "user" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ilo.py#L333-L384
[ "def", "create_user", "(", "name", ",", "password", ",", "*", "privileges", ")", ":", "_priv", "=", "[", "'ADMIN_PRIV'", ",", "'REMOTE_CONS_PRIV'", ",", "'RESET_SERVER_PRIV'", ",", "'VIRTUAL_MEDIA_PRIV'", ",", "'CONFIG_ILO_PRIV'", "]", "_xml", "=", "\"\"\"<RIBCL v...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
configure_network
Configure Network Interface CLI Example: .. code-block:: bash salt '*' ilo.configure_network [IP ADDRESS] [NETMASK] [GATEWAY]
salt/modules/ilo.py
def configure_network(ip, netmask, gateway): ''' Configure Network Interface CLI Example: .. code-block:: bash salt '*' ilo.configure_network [IP ADDRESS] [NETMASK] [GATEWAY] ''' current = network() # Check to see if the network is already configured if (ip in current['Networ...
def configure_network(ip, netmask, gateway): ''' Configure Network Interface CLI Example: .. code-block:: bash salt '*' ilo.configure_network [IP ADDRESS] [NETMASK] [GATEWAY] ''' current = network() # Check to see if the network is already configured if (ip in current['Networ...
[ "Configure", "Network", "Interface" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ilo.py#L497-L527
[ "def", "configure_network", "(", "ip", ",", "netmask", ",", "gateway", ")", ":", "current", "=", "network", "(", ")", "# Check to see if the network is already configured", "if", "(", "ip", "in", "current", "[", "'Network Settings'", "]", "[", "'IP_ADDRESS'", "]",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
configure_snmp
Configure SNMP CLI Example: .. code-block:: bash salt '*' ilo.configure_snmp [COMMUNITY STRING] [SNMP PORT] [SNMP TRAP PORT]
salt/modules/ilo.py
def configure_snmp(community, snmp_port=161, snmp_trapport=161): ''' Configure SNMP CLI Example: .. code-block:: bash salt '*' ilo.configure_snmp [COMMUNITY STRING] [SNMP PORT] [SNMP TRAP PORT] ''' _xml = """<RIBCL VERSION="2.2"> <LOGIN USER_LOGIN="x" PASSWORD="y"> ...
def configure_snmp(community, snmp_port=161, snmp_trapport=161): ''' Configure SNMP CLI Example: .. code-block:: bash salt '*' ilo.configure_snmp [COMMUNITY STRING] [SNMP PORT] [SNMP TRAP PORT] ''' _xml = """<RIBCL VERSION="2.2"> <LOGIN USER_LOGIN="x" PASSWORD="y"> ...
[ "Configure", "SNMP" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ilo.py#L586-L617
[ "def", "configure_snmp", "(", "community", ",", "snmp_port", "=", "161", ",", "snmp_trapport", "=", "161", ")", ":", "_xml", "=", "\"\"\"<RIBCL VERSION=\"2.2\">\n <LOGIN USER_LOGIN=\"x\" PASSWORD=\"y\">\n <RIB_INFO mode=\"write\">\n ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
enabled
Enable the RDP service and make sure access to the RDP port is allowed in the firewall configuration
salt/states/rdp.py
def enabled(name): ''' Enable the RDP service and make sure access to the RDP port is allowed in the firewall configuration ''' ret = {'name': name, 'result': True, 'changes': {}, 'comment': ''} stat = __salt__['rdp.status']() if not stat: if __opts...
def enabled(name): ''' Enable the RDP service and make sure access to the RDP port is allowed in the firewall configuration ''' ret = {'name': name, 'result': True, 'changes': {}, 'comment': ''} stat = __salt__['rdp.status']() if not stat: if __opts...
[ "Enable", "the", "RDP", "service", "and", "make", "sure", "access", "to", "the", "RDP", "port", "is", "allowed", "in", "the", "firewall", "configuration" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/rdp.py#L15-L38
[ "def", "enabled", "(", "name", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "True", ",", "'changes'", ":", "{", "}", ",", "'comment'", ":", "''", "}", "stat", "=", "__salt__", "[", "'rdp.status'", "]", "(", ")", "if", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
disabled
Disable the RDP service
salt/states/rdp.py
def disabled(name): ''' Disable the RDP service ''' ret = {'name': name, 'result': True, 'changes': {}, 'comment': ''} stat = __salt__['rdp.status']() if stat: if __opts__['test']: ret['result'] = None ret['comment'] = 'RDP will ...
def disabled(name): ''' Disable the RDP service ''' ret = {'name': name, 'result': True, 'changes': {}, 'comment': ''} stat = __salt__['rdp.status']() if stat: if __opts__['test']: ret['result'] = None ret['comment'] = 'RDP will ...
[ "Disable", "the", "RDP", "service" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/rdp.py#L41-L63
[ "def", "disabled", "(", "name", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "True", ",", "'changes'", ":", "{", "}", ",", "'comment'", ":", "''", "}", "stat", "=", "__salt__", "[", "'rdp.status'", "]", "(", ")", "if", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
task_present
Ensure that a task is present and up-to-date in Kapacitor. name Name of the task. tick_script Path to the TICK script for the task. Can be a salt:// source. task_type Task type. Defaults to 'stream' dbrps A list of databases and retention policies in "dbname"."rpname"...
salt/states/kapacitor.py
def task_present(name, tick_script, task_type='stream', database=None, retention_policy='default', enable=True, dbrps=None): ''' Ensure that a task is present and up-to-date in Kapacitor. name Name...
def task_present(name, tick_script, task_type='stream', database=None, retention_policy='default', enable=True, dbrps=None): ''' Ensure that a task is present and up-to-date in Kapacitor. name Name...
[ "Ensure", "that", "a", "task", "is", "present", "and", "up", "-", "to", "-", "date", "in", "Kapacitor", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/kapacitor.py#L32-L171
[ "def", "task_present", "(", "name", ",", "tick_script", ",", "task_type", "=", "'stream'", ",", "database", "=", "None", ",", "retention_policy", "=", "'default'", ",", "enable", "=", "True", ",", "dbrps", "=", "None", ")", ":", "comments", "=", "[", "]"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
task_absent
Ensure that a task is absent from Kapacitor. name Name of the task.
salt/states/kapacitor.py
def task_absent(name): ''' Ensure that a task is absent from Kapacitor. name Name of the task. ''' ret = {'name': name, 'changes': {}, 'result': True, 'comment': ''} task = __salt__['kapacitor.get_task'](name) if task: if __opts__['test']: ret['result'] = None ...
def task_absent(name): ''' Ensure that a task is absent from Kapacitor. name Name of the task. ''' ret = {'name': name, 'changes': {}, 'result': True, 'comment': ''} task = __salt__['kapacitor.get_task'](name) if task: if __opts__['test']: ret['result'] = None ...
[ "Ensure", "that", "a", "task", "is", "absent", "from", "Kapacitor", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/kapacitor.py#L174-L202
[ "def", "task_absent", "(", "name", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", "}", "task", "=", "__salt__", "[", "'kapacitor.get_task'", "]", "(", "nam...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
set_servers
Set Windows to use a list of NTP servers CLI Example: .. code-block:: bash salt '*' ntp.set_servers 'pool.ntp.org' 'us.pool.ntp.org'
salt/modules/win_ntp.py
def set_servers(*servers): ''' Set Windows to use a list of NTP servers CLI Example: .. code-block:: bash salt '*' ntp.set_servers 'pool.ntp.org' 'us.pool.ntp.org' ''' service_name = 'w32time' if not __salt__['service.status'](service_name): if not __salt__['service.start'...
def set_servers(*servers): ''' Set Windows to use a list of NTP servers CLI Example: .. code-block:: bash salt '*' ntp.set_servers 'pool.ntp.org' 'us.pool.ntp.org' ''' service_name = 'w32time' if not __salt__['service.status'](service_name): if not __salt__['service.start'...
[ "Set", "Windows", "to", "use", "a", "list", "of", "NTP", "servers" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_ntp.py#L30-L57
[ "def", "set_servers", "(", "*", "servers", ")", ":", "service_name", "=", "'w32time'", "if", "not", "__salt__", "[", "'service.status'", "]", "(", "service_name", ")", ":", "if", "not", "__salt__", "[", "'service.start'", "]", "(", "service_name", ")", ":", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_servers
Get list of configured NTP servers CLI Example: .. code-block:: bash salt '*' ntp.get_servers
salt/modules/win_ntp.py
def get_servers(): ''' Get list of configured NTP servers CLI Example: .. code-block:: bash salt '*' ntp.get_servers ''' cmd = ['w32tm', '/query', '/configuration'] lines = __salt__['cmd.run'](cmd, python_shell=False).splitlines() for line in lines: try: if...
def get_servers(): ''' Get list of configured NTP servers CLI Example: .. code-block:: bash salt '*' ntp.get_servers ''' cmd = ['w32tm', '/query', '/configuration'] lines = __salt__['cmd.run'](cmd, python_shell=False).splitlines() for line in lines: try: if...
[ "Get", "list", "of", "configured", "NTP", "servers" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_ntp.py#L60-L79
[ "def", "get_servers", "(", ")", ":", "cmd", "=", "[", "'w32tm'", ",", "'/query'", ",", "'/configuration'", "]", "lines", "=", "__salt__", "[", "'cmd.run'", "]", "(", "cmd", ",", "python_shell", "=", "False", ")", ".", "splitlines", "(", ")", "for", "li...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
facts_refresh
Reload the facts dictionary from the device. Usually only needed if, the device configuration is changed by some other actor. This function will also refresh the facts stored in the salt grains. CLI Example: .. code-block:: bash salt 'device_name' junos.facts_refresh
salt/modules/junos.py
def facts_refresh(): ''' Reload the facts dictionary from the device. Usually only needed if, the device configuration is changed by some other actor. This function will also refresh the facts stored in the salt grains. CLI Example: .. code-block:: bash salt 'device_name' junos.facts_...
def facts_refresh(): ''' Reload the facts dictionary from the device. Usually only needed if, the device configuration is changed by some other actor. This function will also refresh the facts stored in the salt grains. CLI Example: .. code-block:: bash salt 'device_name' junos.facts_...
[ "Reload", "the", "facts", "dictionary", "from", "the", "device", ".", "Usually", "only", "needed", "if", "the", "device", "configuration", "is", "changed", "by", "some", "other", "actor", ".", "This", "function", "will", "also", "refresh", "the", "facts", "s...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/junos.py#L106-L134
[ "def", "facts_refresh", "(", ")", ":", "conn", "=", "__proxy__", "[", "'junos.conn'", "]", "(", ")", "ret", "=", "{", "}", "ret", "[", "'out'", "]", "=", "True", "try", ":", "conn", ".", "facts_refresh", "(", ")", "except", "Exception", "as", "except...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
facts
Displays the facts gathered during the connection. These facts are also stored in Salt grains. CLI Example: .. code-block:: bash salt 'device_name' junos.facts
salt/modules/junos.py
def facts(): ''' Displays the facts gathered during the connection. These facts are also stored in Salt grains. CLI Example: .. code-block:: bash salt 'device_name' junos.facts ''' ret = {} try: ret['facts'] = __proxy__['junos.get_serialized_facts']() ret['out'...
def facts(): ''' Displays the facts gathered during the connection. These facts are also stored in Salt grains. CLI Example: .. code-block:: bash salt 'device_name' junos.facts ''' ret = {} try: ret['facts'] = __proxy__['junos.get_serialized_facts']() ret['out'...
[ "Displays", "the", "facts", "gathered", "during", "the", "connection", ".", "These", "facts", "are", "also", "stored", "in", "Salt", "grains", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/junos.py#L137-L156
[ "def", "facts", "(", ")", ":", "ret", "=", "{", "}", "try", ":", "ret", "[", "'facts'", "]", "=", "__proxy__", "[", "'junos.get_serialized_facts'", "]", "(", ")", "ret", "[", "'out'", "]", "=", "True", "except", "Exception", "as", "exception", ":", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
rpc
This function executes the RPC provided as arguments on the junos device. The returned data can be stored in a file. cmd The RPC to be executed dest Destination file where the RPC output is stored. Note that the file will be stored on the proxy minion. To push the files to the mast...
salt/modules/junos.py
def rpc(cmd=None, dest=None, **kwargs): ''' This function executes the RPC provided as arguments on the junos device. The returned data can be stored in a file. cmd The RPC to be executed dest Destination file where the RPC output is stored. Note that the file will be store...
def rpc(cmd=None, dest=None, **kwargs): ''' This function executes the RPC provided as arguments on the junos device. The returned data can be stored in a file. cmd The RPC to be executed dest Destination file where the RPC output is stored. Note that the file will be store...
[ "This", "function", "executes", "the", "RPC", "provided", "as", "arguments", "on", "the", "junos", "device", ".", "The", "returned", "data", "can", "be", "stored", "in", "a", "file", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/junos.py#L160-L275
[ "def", "rpc", "(", "cmd", "=", "None", ",", "dest", "=", "None", ",", "*", "*", "kwargs", ")", ":", "conn", "=", "__proxy__", "[", "'junos.conn'", "]", "(", ")", "ret", "=", "{", "}", "ret", "[", "'out'", "]", "=", "True", "if", "cmd", "is", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
set_hostname
Set the device's hostname hostname The name to be set comment Provide a comment to the commit dev_timeout : 30 The NETCONF RPC timeout (in seconds) confirm Provide time in minutes for commit confirmation. If this option is specified, the commit will be rolled back...
salt/modules/junos.py
def set_hostname(hostname=None, **kwargs): ''' Set the device's hostname hostname The name to be set comment Provide a comment to the commit dev_timeout : 30 The NETCONF RPC timeout (in seconds) confirm Provide time in minutes for commit confirmation. If this op...
def set_hostname(hostname=None, **kwargs): ''' Set the device's hostname hostname The name to be set comment Provide a comment to the commit dev_timeout : 30 The NETCONF RPC timeout (in seconds) confirm Provide time in minutes for commit confirmation. If this op...
[ "Set", "the", "device", "s", "hostname" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/junos.py#L279-L353
[ "def", "set_hostname", "(", "hostname", "=", "None", ",", "*", "*", "kwargs", ")", ":", "conn", "=", "__proxy__", "[", "'junos.conn'", "]", "(", ")", "ret", "=", "{", "}", "if", "hostname", "is", "None", ":", "ret", "[", "'message'", "]", "=", "'Pl...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
commit
To commit the changes loaded in the candidate configuration. dev_timeout : 30 The NETCONF RPC timeout (in seconds) comment Provide a comment for the commit confirm Provide time in minutes for commit confirmation. If this option is specified, the commit will be rolled back in the...
salt/modules/junos.py
def commit(**kwargs): ''' To commit the changes loaded in the candidate configuration. dev_timeout : 30 The NETCONF RPC timeout (in seconds) comment Provide a comment for the commit confirm Provide time in minutes for commit confirmation. If this option is specified, the...
def commit(**kwargs): ''' To commit the changes loaded in the candidate configuration. dev_timeout : 30 The NETCONF RPC timeout (in seconds) comment Provide a comment for the commit confirm Provide time in minutes for commit confirmation. If this option is specified, the...
[ "To", "commit", "the", "changes", "loaded", "in", "the", "candidate", "configuration", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/junos.py#L357-L440
[ "def", "commit", "(", "*", "*", "kwargs", ")", ":", "conn", "=", "__proxy__", "[", "'junos.conn'", "]", "(", ")", "ret", "=", "{", "}", "op", "=", "dict", "(", ")", "if", "'__pub_arg'", "in", "kwargs", ":", "if", "kwargs", "[", "'__pub_arg'", "]", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
rollback
Roll back the last committed configuration changes and commit id : 0 The rollback ID value (0-49) dev_timeout : 30 The NETCONF RPC timeout (in seconds) comment Provide a comment for the commit confirm Provide time in minutes for commit confirmation. If this option is ...
salt/modules/junos.py
def rollback(**kwargs): ''' Roll back the last committed configuration changes and commit id : 0 The rollback ID value (0-49) dev_timeout : 30 The NETCONF RPC timeout (in seconds) comment Provide a comment for the commit confirm Provide time in minutes for commit ...
def rollback(**kwargs): ''' Roll back the last committed configuration changes and commit id : 0 The rollback ID value (0-49) dev_timeout : 30 The NETCONF RPC timeout (in seconds) comment Provide a comment for the commit confirm Provide time in minutes for commit ...
[ "Roll", "back", "the", "last", "committed", "configuration", "changes", "and", "commit" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/junos.py#L444-L531
[ "def", "rollback", "(", "*", "*", "kwargs", ")", ":", "id_", "=", "kwargs", ".", "pop", "(", "'id'", ",", "0", ")", "ret", "=", "{", "}", "conn", "=", "__proxy__", "[", "'junos.conn'", "]", "(", ")", "op", "=", "dict", "(", ")", "if", "'__pub_a...
e8541fd6e744ab0df786c0f76102e41631f45d46