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
find_lines
Return all the lines (as text) that match the expression in the ``regex`` argument. config The configuration sent as text. .. note:: This argument is ignored when ``config_path`` is specified. config_path The absolute or remote path to the file with the configuration t...
salt/modules/ciscoconfparse_mod.py
def find_lines(config=None, config_path=None, regex=None, saltenv='base'): ''' Return all the lines (as text) that match the expression in the ``regex`` argument. config The configuration sent as text. .. note:: This argument is ignored when ``config_path`` is specified. ...
def find_lines(config=None, config_path=None, regex=None, saltenv='base'): ''' Return all the lines (as text) that match the expression in the ``regex`` argument. config The configuration sent as text. .. note:: This argument is ignored when ``config_path`` is specified. ...
[ "Return", "all", "the", "lines", "(", "as", "text", ")", "that", "match", "the", "expression", "in", "the", "regex", "argument", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ciscoconfparse_mod.py#L114-L156
[ "def", "find_lines", "(", "config", "=", "None", ",", "config_path", "=", "None", ",", "regex", "=", "None", ",", "saltenv", "=", "'base'", ")", ":", "lines", "=", "find_objects", "(", "config", "=", "config", ",", "config_path", "=", "config_path", ",",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
find_lines_w_child
r''' Return a list of parent lines (as text) matching the regular expression ``parent_regex`` that have children lines matching ``child_regex``. config The configuration sent as text. .. note:: This argument is ignored when ``config_path`` is specified. config_path ...
salt/modules/ciscoconfparse_mod.py
def find_lines_w_child(config=None, config_path=None, parent_regex=None, child_regex=None, ignore_ws=False, saltenv='base'): r''' Return a list of parent lines (as text) matching the regular expre...
def find_lines_w_child(config=None, config_path=None, parent_regex=None, child_regex=None, ignore_ws=False, saltenv='base'): r''' Return a list of parent lines (as text) matching the regular expre...
[ "r", "Return", "a", "list", "of", "parent", "lines", "(", "as", "text", ")", "matching", "the", "regular", "expression", "parent_regex", "that", "have", "children", "lines", "matching", "child_regex", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ciscoconfparse_mod.py#L214-L261
[ "def", "find_lines_w_child", "(", "config", "=", "None", ",", "config_path", "=", "None", ",", "parent_regex", "=", "None", ",", "child_regex", "=", "None", ",", "ignore_ws", "=", "False", ",", "saltenv", "=", "'base'", ")", ":", "lines", "=", "find_object...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
find_objects_wo_child
Return a list of parent ``ciscoconfparse.IOSCfgLine`` objects, which matched the ``parent_regex`` and whose children did *not* match ``child_regex``. Only the parent ``ciscoconfparse.IOSCfgLine`` objects will be returned. For simplicity, this method only finds oldest ancestors without immediate children...
salt/modules/ciscoconfparse_mod.py
def find_objects_wo_child(config=None, config_path=None, parent_regex=None, child_regex=None, ignore_ws=False, saltenv='base'): ''' Return a list of parent ``ciscoconfparse.IOSCfgLin...
def find_objects_wo_child(config=None, config_path=None, parent_regex=None, child_regex=None, ignore_ws=False, saltenv='base'): ''' Return a list of parent ``ciscoconfparse.IOSCfgLin...
[ "Return", "a", "list", "of", "parent", "ciscoconfparse", ".", "IOSCfgLine", "objects", "which", "matched", "the", "parent_regex", "and", "whose", "children", "did", "*", "not", "*", "match", "child_regex", ".", "Only", "the", "parent", "ciscoconfparse", ".", "...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ciscoconfparse_mod.py#L264-L319
[ "def", "find_objects_wo_child", "(", "config", "=", "None", ",", "config_path", "=", "None", ",", "parent_regex", "=", "None", ",", "child_regex", "=", "None", ",", "ignore_ws", "=", "False", ",", "saltenv", "=", "'base'", ")", ":", "ccp", "=", "_get_ccp",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
find_lines_wo_child
Return a list of parent ``ciscoconfparse.IOSCfgLine`` lines as text, which matched the ``parent_regex`` and whose children did *not* match ``child_regex``. Only the parent ``ciscoconfparse.IOSCfgLine`` text lines will be returned. For simplicity, this method only finds oldest ancestors without immediate ...
salt/modules/ciscoconfparse_mod.py
def find_lines_wo_child(config=None, config_path=None, parent_regex=None, child_regex=None, ignore_ws=False, saltenv='base'): ''' Return a list of parent ``ciscoconfparse.IOSCfgLine`` lines as...
def find_lines_wo_child(config=None, config_path=None, parent_regex=None, child_regex=None, ignore_ws=False, saltenv='base'): ''' Return a list of parent ``ciscoconfparse.IOSCfgLine`` lines as...
[ "Return", "a", "list", "of", "parent", "ciscoconfparse", ".", "IOSCfgLine", "lines", "as", "text", "which", "matched", "the", "parent_regex", "and", "whose", "children", "did", "*", "not", "*", "match", "child_regex", ".", "Only", "the", "parent", "ciscoconfpa...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ciscoconfparse_mod.py#L322-L371
[ "def", "find_lines_wo_child", "(", "config", "=", "None", ",", "config_path", "=", "None", ",", "parent_regex", "=", "None", ",", "child_regex", "=", "None", ",", "ignore_ws", "=", "False", ",", "saltenv", "=", "'base'", ")", ":", "lines", "=", "find_objec...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
filter_lines
Return a list of detailed matches, for the configuration blocks (parent-child relationship) whose parent respects the regular expressions configured via the ``parent_regex`` argument, and the child matches the ``child_regex`` regular expression. The result is a list of dictionaries with the following ke...
salt/modules/ciscoconfparse_mod.py
def filter_lines(config=None, config_path=None, parent_regex=None, child_regex=None, saltenv='base'): ''' Return a list of detailed matches, for the configuration blocks (parent-child relationship) whose parent respects the regular expressi...
def filter_lines(config=None, config_path=None, parent_regex=None, child_regex=None, saltenv='base'): ''' Return a list of detailed matches, for the configuration blocks (parent-child relationship) whose parent respects the regular expressi...
[ "Return", "a", "list", "of", "detailed", "matches", "for", "the", "configuration", "blocks", "(", "parent", "-", "child", "relationship", ")", "whose", "parent", "respects", "the", "regular", "expressions", "configured", "via", "the", "parent_regex", "argument", ...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ciscoconfparse_mod.py#L374-L443
[ "def", "filter_lines", "(", "config", "=", "None", ",", "config_path", "=", "None", ",", "parent_regex", "=", "None", ",", "child_regex", "=", "None", ",", "saltenv", "=", "'base'", ")", ":", "ret", "=", "[", "]", "ccp", "=", "_get_ccp", "(", "config",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
profile
This state module allows you to modify system tuned parameters Example tuned.sls file to set profile to virtual-guest tuned: tuned: - profile - name: virtual-guest name tuned profile name to set the system to To see a valid list of states call execution module: ...
salt/states/tuned.py
def profile(name): ''' This state module allows you to modify system tuned parameters Example tuned.sls file to set profile to virtual-guest tuned: tuned: - profile - name: virtual-guest name tuned profile name to set the system to To see a valid list of states ...
def profile(name): ''' This state module allows you to modify system tuned parameters Example tuned.sls file to set profile to virtual-guest tuned: tuned: - profile - name: virtual-guest name tuned profile name to set the system to To see a valid list of states ...
[ "This", "state", "module", "allows", "you", "to", "modify", "system", "tuned", "parameters" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/tuned.py#L18-L86
[ "def", "profile", "(", "name", ")", ":", "# create data-structure to return with default value", "ret", "=", "{", "'name'", ":", "''", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", "}", "ret", "[", "name", "]"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
delete_probes
Removes RPM/SLA probes from the network device. Calls the configuration template 'delete_probes' from the NAPALM library, providing as input a rich formatted dictionary with the configuration details of the probes to be removed from the configuration of the device. :param probes: Dictionary with a simi...
salt/modules/napalm_probes.py
def delete_probes(probes, test=False, commit=True, **kwargs): # pylint: disable=unused-argument ''' Removes RPM/SLA probes from the network device. Calls the configuration template 'delete_probes' from the NAPALM library, providing as input a rich formatted dictionary with the configuration details of...
def delete_probes(probes, test=False, commit=True, **kwargs): # pylint: disable=unused-argument ''' Removes RPM/SLA probes from the network device. Calls the configuration template 'delete_probes' from the NAPALM library, providing as input a rich formatted dictionary with the configuration details of...
[ "Removes", "RPM", "/", "SLA", "probes", "from", "the", "network", "device", ".", "Calls", "the", "configuration", "template", "delete_probes", "from", "the", "NAPALM", "library", "providing", "as", "input", "a", "rich", "formatted", "dictionary", "with", "the", ...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/napalm_probes.py#L273-L320
[ "def", "delete_probes", "(", "probes", ",", "test", "=", "False", ",", "commit", "=", "True", ",", "*", "*", "kwargs", ")", ":", "# pylint: disable=unused-argument", "return", "__salt__", "[", "'net.load_template'", "]", "(", "'delete_probes'", ",", "probes", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_get_connection
Global function to access the couchbase connection (and make it if its closed)
salt/returners/couchbase_return.py
def _get_connection(): ''' Global function to access the couchbase connection (and make it if its closed) ''' global COUCHBASE_CONN if COUCHBASE_CONN is None: opts = _get_options() if opts['password']: COUCHBASE_CONN = couchbase.Couchbase.connect(host=opts['host'], ...
def _get_connection(): ''' Global function to access the couchbase connection (and make it if its closed) ''' global COUCHBASE_CONN if COUCHBASE_CONN is None: opts = _get_options() if opts['password']: COUCHBASE_CONN = couchbase.Couchbase.connect(host=opts['host'], ...
[ "Global", "function", "to", "access", "the", "couchbase", "connection", "(", "and", "make", "it", "if", "its", "closed", ")" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchbase_return.py#L106-L123
[ "def", "_get_connection", "(", ")", ":", "global", "COUCHBASE_CONN", "if", "COUCHBASE_CONN", "is", "None", ":", "opts", "=", "_get_options", "(", ")", "if", "opts", "[", "'password'", "]", ":", "COUCHBASE_CONN", "=", "couchbase", ".", "Couchbase", ".", "conn...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_verify_views
Verify that you have the views you need. This can be disabled by adding couchbase.skip_verify_views: True in config
salt/returners/couchbase_return.py
def _verify_views(): ''' Verify that you have the views you need. This can be disabled by adding couchbase.skip_verify_views: True in config ''' global VERIFIED_VIEWS if VERIFIED_VIEWS or __opts__.get('couchbase.skip_verify_views', False): return cb_ = _get_connection() ddoc = {...
def _verify_views(): ''' Verify that you have the views you need. This can be disabled by adding couchbase.skip_verify_views: True in config ''' global VERIFIED_VIEWS if VERIFIED_VIEWS or __opts__.get('couchbase.skip_verify_views', False): return cb_ = _get_connection() ddoc = {...
[ "Verify", "that", "you", "have", "the", "views", "you", "need", ".", "This", "can", "be", "disabled", "by", "adding", "couchbase", ".", "skip_verify_views", ":", "True", "in", "config" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchbase_return.py#L126-L150
[ "def", "_verify_views", "(", ")", ":", "global", "VERIFIED_VIEWS", "if", "VERIFIED_VIEWS", "or", "__opts__", ".", "get", "(", "'couchbase.skip_verify_views'", ",", "False", ")", ":", "return", "cb_", "=", "_get_connection", "(", ")", "ddoc", "=", "{", "'views'...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
prep_jid
Return a job id and prepare the job id directory This is the function responsible for making sure jids don't collide (unless its passed a jid) So do what you have to do to make sure that stays the case
salt/returners/couchbase_return.py
def prep_jid(nocache=False, passed_jid=None): ''' Return a job id and prepare the job id directory This is the function responsible for making sure jids don't collide (unless its passed a jid) So do what you have to do to make sure that stays the case ''' if passed_jid is None: jid =...
def prep_jid(nocache=False, passed_jid=None): ''' Return a job id and prepare the job id directory This is the function responsible for making sure jids don't collide (unless its passed a jid) So do what you have to do to make sure that stays the case ''' if passed_jid is None: jid =...
[ "Return", "a", "job", "id", "and", "prepare", "the", "job", "id", "directory", "This", "is", "the", "function", "responsible", "for", "making", "sure", "jids", "don", "t", "collide", "(", "unless", "its", "passed", "a", "jid", ")", "So", "do", "what", ...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchbase_return.py#L161-L185
[ "def", "prep_jid", "(", "nocache", "=", "False", ",", "passed_jid", "=", "None", ")", ":", "if", "passed_jid", "is", "None", ":", "jid", "=", "salt", ".", "utils", ".", "jid", ".", "gen_jid", "(", "__opts__", ")", "else", ":", "jid", "=", "passed_jid...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
returner
Return data to couchbase bucket
salt/returners/couchbase_return.py
def returner(load): ''' Return data to couchbase bucket ''' cb_ = _get_connection() hn_key = '{0}/{1}'.format(load['jid'], load['id']) try: ret_doc = {'return': load['return'], 'full_ret': salt.utils.json.dumps(load)} cb_.add(hn_key, ret_doc, ...
def returner(load): ''' Return data to couchbase bucket ''' cb_ = _get_connection() hn_key = '{0}/{1}'.format(load['jid'], load['id']) try: ret_doc = {'return': load['return'], 'full_ret': salt.utils.json.dumps(load)} cb_.add(hn_key, ret_doc, ...
[ "Return", "data", "to", "couchbase", "bucket" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchbase_return.py#L188-L208
[ "def", "returner", "(", "load", ")", ":", "cb_", "=", "_get_connection", "(", ")", "hn_key", "=", "'{0}/{1}'", ".", "format", "(", "load", "[", "'jid'", "]", ",", "load", "[", "'id'", "]", ")", "try", ":", "ret_doc", "=", "{", "'return'", ":", "loa...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
save_load
Save the load to the specified jid
salt/returners/couchbase_return.py
def save_load(jid, clear_load, minion=None): ''' Save the load to the specified jid ''' cb_ = _get_connection() try: jid_doc = cb_.get(six.text_type(jid)) except couchbase.exceptions.NotFoundError: cb_.add(six.text_type(jid), {}, ttl=_get_ttl()) jid_doc = cb_.get(six.tex...
def save_load(jid, clear_load, minion=None): ''' Save the load to the specified jid ''' cb_ = _get_connection() try: jid_doc = cb_.get(six.text_type(jid)) except couchbase.exceptions.NotFoundError: cb_.add(six.text_type(jid), {}, ttl=_get_ttl()) jid_doc = cb_.get(six.tex...
[ "Save", "the", "load", "to", "the", "specified", "jid" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchbase_return.py#L211-L235
[ "def", "save_load", "(", "jid", ",", "clear_load", ",", "minion", "=", "None", ")", ":", "cb_", "=", "_get_connection", "(", ")", "try", ":", "jid_doc", "=", "cb_", ".", "get", "(", "six", ".", "text_type", "(", "jid", ")", ")", "except", "couchbase"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
save_minions
Save/update the minion list for a given jid. The syndic_id argument is included for API compatibility only.
salt/returners/couchbase_return.py
def save_minions(jid, minions, syndic_id=None): # pylint: disable=unused-argument ''' Save/update the minion list for a given jid. The syndic_id argument is included for API compatibility only. ''' cb_ = _get_connection() try: jid_doc = cb_.get(six.text_type(jid)) except couchbase....
def save_minions(jid, minions, syndic_id=None): # pylint: disable=unused-argument ''' Save/update the minion list for a given jid. The syndic_id argument is included for API compatibility only. ''' cb_ = _get_connection() try: jid_doc = cb_.get(six.text_type(jid)) except couchbase....
[ "Save", "/", "update", "the", "minion", "list", "for", "a", "given", "jid", ".", "The", "syndic_id", "argument", "is", "included", "for", "API", "compatibility", "only", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchbase_return.py#L238-L258
[ "def", "save_minions", "(", "jid", ",", "minions", ",", "syndic_id", "=", "None", ")", ":", "# pylint: disable=unused-argument", "cb_", "=", "_get_connection", "(", ")", "try", ":", "jid_doc", "=", "cb_", ".", "get", "(", "six", ".", "text_type", "(", "jid...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_load
Return the load data that marks a specified jid
salt/returners/couchbase_return.py
def get_load(jid): ''' Return the load data that marks a specified jid ''' cb_ = _get_connection() try: jid_doc = cb_.get(six.text_type(jid)) except couchbase.exceptions.NotFoundError: return {} ret = {} try: ret = jid_doc.value['load'] ret['Minions'] = ...
def get_load(jid): ''' Return the load data that marks a specified jid ''' cb_ = _get_connection() try: jid_doc = cb_.get(six.text_type(jid)) except couchbase.exceptions.NotFoundError: return {} ret = {} try: ret = jid_doc.value['load'] ret['Minions'] = ...
[ "Return", "the", "load", "data", "that", "marks", "a", "specified", "jid" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchbase_return.py#L261-L279
[ "def", "get_load", "(", "jid", ")", ":", "cb_", "=", "_get_connection", "(", ")", "try", ":", "jid_doc", "=", "cb_", ".", "get", "(", "six", ".", "text_type", "(", "jid", ")", ")", "except", "couchbase", ".", "exceptions", ".", "NotFoundError", ":", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_jid
Return the information returned when the specified job id was executed
salt/returners/couchbase_return.py
def get_jid(jid): ''' Return the information returned when the specified job id was executed ''' cb_ = _get_connection() _verify_views() ret = {} for result in cb_.query(DESIGN_NAME, 'jid_returns', key=six.text_type(jid), include_docs=True): ret[result.value] = result.doc.value ...
def get_jid(jid): ''' Return the information returned when the specified job id was executed ''' cb_ = _get_connection() _verify_views() ret = {} for result in cb_.query(DESIGN_NAME, 'jid_returns', key=six.text_type(jid), include_docs=True): ret[result.value] = result.doc.value ...
[ "Return", "the", "information", "returned", "when", "the", "specified", "job", "id", "was", "executed" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchbase_return.py#L282-L294
[ "def", "get_jid", "(", "jid", ")", ":", "cb_", "=", "_get_connection", "(", ")", "_verify_views", "(", ")", "ret", "=", "{", "}", "for", "result", "in", "cb_", ".", "query", "(", "DESIGN_NAME", ",", "'jid_returns'", ",", "key", "=", "six", ".", "text...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_jids
Return a list of all job ids
salt/returners/couchbase_return.py
def get_jids(): ''' Return a list of all job ids ''' cb_ = _get_connection() _verify_views() ret = {} for result in cb_.query(DESIGN_NAME, 'jids', include_docs=True): ret[result.key] = _format_jid_instance(result.key, result.doc.value['load']) return ret
def get_jids(): ''' Return a list of all job ids ''' cb_ = _get_connection() _verify_views() ret = {} for result in cb_.query(DESIGN_NAME, 'jids', include_docs=True): ret[result.key] = _format_jid_instance(result.key, result.doc.value['load']) return ret
[ "Return", "a", "list", "of", "all", "job", "ids" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchbase_return.py#L297-L309
[ "def", "get_jids", "(", ")", ":", "cb_", "=", "_get_connection", "(", ")", "_verify_views", "(", ")", "ret", "=", "{", "}", "for", "result", "in", "cb_", ".", "query", "(", "DESIGN_NAME", ",", "'jids'", ",", "include_docs", "=", "True", ")", ":", "re...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_format_jid_instance
Return a properly formatted jid dict
salt/returners/couchbase_return.py
def _format_jid_instance(jid, job): ''' Return a properly formatted jid dict ''' ret = _format_job_instance(job) ret.update({'StartTime': salt.utils.jid.jid_to_time(jid)}) return ret
def _format_jid_instance(jid, job): ''' Return a properly formatted jid dict ''' ret = _format_job_instance(job) ret.update({'StartTime': salt.utils.jid.jid_to_time(jid)}) return ret
[ "Return", "a", "properly", "formatted", "jid", "dict" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchbase_return.py#L332-L338
[ "def", "_format_jid_instance", "(", "jid", ",", "job", ")", ":", "ret", "=", "_format_job_instance", "(", "job", ")", "ret", ".", "update", "(", "{", "'StartTime'", ":", "salt", ".", "utils", ".", "jid", ".", "jid_to_time", "(", "jid", ")", "}", ")", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_get_redis_cache_opts
Return the Redis server connection details from the __opts__.
salt/cache/redis_cache.py
def _get_redis_cache_opts(): ''' Return the Redis server connection details from the __opts__. ''' return { 'host': __opts__.get('cache.redis.host', 'localhost'), 'port': __opts__.get('cache.redis.port', 6379), 'unix_socket_path': __opts__.get('cache.redis.unix_socket_path', None...
def _get_redis_cache_opts(): ''' Return the Redis server connection details from the __opts__. ''' return { 'host': __opts__.get('cache.redis.host', 'localhost'), 'port': __opts__.get('cache.redis.port', 6379), 'unix_socket_path': __opts__.get('cache.redis.unix_socket_path', None...
[ "Return", "the", "Redis", "server", "connection", "details", "from", "the", "__opts__", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/redis_cache.py#L205-L218
[ "def", "_get_redis_cache_opts", "(", ")", ":", "return", "{", "'host'", ":", "__opts__", ".", "get", "(", "'cache.redis.host'", ",", "'localhost'", ")", ",", "'port'", ":", "__opts__", ".", "get", "(", "'cache.redis.port'", ",", "6379", ")", ",", "'unix_sock...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_get_redis_server
Return the Redis server instance. Caching the object instance.
salt/cache/redis_cache.py
def _get_redis_server(opts=None): ''' Return the Redis server instance. Caching the object instance. ''' global REDIS_SERVER if REDIS_SERVER: return REDIS_SERVER if not opts: opts = _get_redis_cache_opts() if opts['cluster_mode']: REDIS_SERVER = StrictRedisCluste...
def _get_redis_server(opts=None): ''' Return the Redis server instance. Caching the object instance. ''' global REDIS_SERVER if REDIS_SERVER: return REDIS_SERVER if not opts: opts = _get_redis_cache_opts() if opts['cluster_mode']: REDIS_SERVER = StrictRedisCluste...
[ "Return", "the", "Redis", "server", "instance", ".", "Caching", "the", "object", "instance", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/redis_cache.py#L221-L241
[ "def", "_get_redis_server", "(", "opts", "=", "None", ")", ":", "global", "REDIS_SERVER", "if", "REDIS_SERVER", ":", "return", "REDIS_SERVER", "if", "not", "opts", ":", "opts", "=", "_get_redis_cache_opts", "(", ")", "if", "opts", "[", "'cluster_mode'", "]", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_get_redis_keys_opts
Build the key opts based on the user options.
salt/cache/redis_cache.py
def _get_redis_keys_opts(): ''' Build the key opts based on the user options. ''' return { 'bank_prefix': __opts__.get('cache.redis.bank_prefix', _BANK_PREFIX), 'bank_keys_prefix': __opts__.get('cache.redis.bank_keys_prefix', _BANK_KEYS_PREFIX), 'key_prefix': __opts__.get('cache....
def _get_redis_keys_opts(): ''' Build the key opts based on the user options. ''' return { 'bank_prefix': __opts__.get('cache.redis.bank_prefix', _BANK_PREFIX), 'bank_keys_prefix': __opts__.get('cache.redis.bank_keys_prefix', _BANK_KEYS_PREFIX), 'key_prefix': __opts__.get('cache....
[ "Build", "the", "key", "opts", "based", "on", "the", "user", "options", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/redis_cache.py#L244-L253
[ "def", "_get_redis_keys_opts", "(", ")", ":", "return", "{", "'bank_prefix'", ":", "__opts__", ".", "get", "(", "'cache.redis.bank_prefix'", ",", "_BANK_PREFIX", ")", ",", "'bank_keys_prefix'", ":", "__opts__", ".", "get", "(", "'cache.redis.bank_keys_prefix'", ",",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_get_bank_redis_key
Return the Redis key for the bank given the name.
salt/cache/redis_cache.py
def _get_bank_redis_key(bank): ''' Return the Redis key for the bank given the name. ''' opts = _get_redis_keys_opts() return '{prefix}{separator}{bank}'.format( prefix=opts['bank_prefix'], separator=opts['separator'], bank=bank )
def _get_bank_redis_key(bank): ''' Return the Redis key for the bank given the name. ''' opts = _get_redis_keys_opts() return '{prefix}{separator}{bank}'.format( prefix=opts['bank_prefix'], separator=opts['separator'], bank=bank )
[ "Return", "the", "Redis", "key", "for", "the", "bank", "given", "the", "name", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/redis_cache.py#L256-L265
[ "def", "_get_bank_redis_key", "(", "bank", ")", ":", "opts", "=", "_get_redis_keys_opts", "(", ")", "return", "'{prefix}{separator}{bank}'", ".", "format", "(", "prefix", "=", "opts", "[", "'bank_prefix'", "]", ",", "separator", "=", "opts", "[", "'separator'", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_get_key_redis_key
Return the Redis key given the bank name and the key name.
salt/cache/redis_cache.py
def _get_key_redis_key(bank, key): ''' Return the Redis key given the bank name and the key name. ''' opts = _get_redis_keys_opts() return '{prefix}{separator}{bank}/{key}'.format( prefix=opts['key_prefix'], separator=opts['separator'], bank=bank, key=key )
def _get_key_redis_key(bank, key): ''' Return the Redis key given the bank name and the key name. ''' opts = _get_redis_keys_opts() return '{prefix}{separator}{bank}/{key}'.format( prefix=opts['key_prefix'], separator=opts['separator'], bank=bank, key=key )
[ "Return", "the", "Redis", "key", "given", "the", "bank", "name", "and", "the", "key", "name", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/redis_cache.py#L268-L278
[ "def", "_get_key_redis_key", "(", "bank", ",", "key", ")", ":", "opts", "=", "_get_redis_keys_opts", "(", ")", "return", "'{prefix}{separator}{bank}/{key}'", ".", "format", "(", "prefix", "=", "opts", "[", "'key_prefix'", "]", ",", "separator", "=", "opts", "[...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_get_bank_keys_redis_key
Return the Redis key for the SET of keys under a certain bank, given the bank name.
salt/cache/redis_cache.py
def _get_bank_keys_redis_key(bank): ''' Return the Redis key for the SET of keys under a certain bank, given the bank name. ''' opts = _get_redis_keys_opts() return '{prefix}{separator}{bank}'.format( prefix=opts['bank_keys_prefix'], separator=opts['separator'], bank=bank ...
def _get_bank_keys_redis_key(bank): ''' Return the Redis key for the SET of keys under a certain bank, given the bank name. ''' opts = _get_redis_keys_opts() return '{prefix}{separator}{bank}'.format( prefix=opts['bank_keys_prefix'], separator=opts['separator'], bank=bank ...
[ "Return", "the", "Redis", "key", "for", "the", "SET", "of", "keys", "under", "a", "certain", "bank", "given", "the", "bank", "name", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/redis_cache.py#L281-L290
[ "def", "_get_bank_keys_redis_key", "(", "bank", ")", ":", "opts", "=", "_get_redis_keys_opts", "(", ")", "return", "'{prefix}{separator}{bank}'", ".", "format", "(", "prefix", "=", "opts", "[", "'bank_keys_prefix'", "]", ",", "separator", "=", "opts", "[", "'sep...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_build_bank_hier
Build the bank hierarchy from the root of the tree. If already exists, it won't rewrite. It's using the Redis pipeline, so there will be only one interaction with the remote server.
salt/cache/redis_cache.py
def _build_bank_hier(bank, redis_pipe): ''' Build the bank hierarchy from the root of the tree. If already exists, it won't rewrite. It's using the Redis pipeline, so there will be only one interaction with the remote server. ''' bank_list = bank.split('/') parent_bank_path = bank_list[0...
def _build_bank_hier(bank, redis_pipe): ''' Build the bank hierarchy from the root of the tree. If already exists, it won't rewrite. It's using the Redis pipeline, so there will be only one interaction with the remote server. ''' bank_list = bank.split('/') parent_bank_path = bank_list[0...
[ "Build", "the", "bank", "hierarchy", "from", "the", "root", "of", "the", "tree", ".", "If", "already", "exists", "it", "won", "t", "rewrite", ".", "It", "s", "using", "the", "Redis", "pipeline", "so", "there", "will", "be", "only", "one", "interaction", ...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/redis_cache.py#L293-L310
[ "def", "_build_bank_hier", "(", "bank", ",", "redis_pipe", ")", ":", "bank_list", "=", "bank", ".", "split", "(", "'/'", ")", "parent_bank_path", "=", "bank_list", "[", "0", "]", "for", "bank_name", "in", "bank_list", "[", "1", ":", "]", ":", "prev_bank_...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_get_banks_to_remove
A simple tree tarversal algorithm that builds the list of banks to remove, starting from an arbitrary node in the tree.
salt/cache/redis_cache.py
def _get_banks_to_remove(redis_server, bank, path=''): ''' A simple tree tarversal algorithm that builds the list of banks to remove, starting from an arbitrary node in the tree. ''' current_path = bank if not path else '{path}/{bank}'.format(path=path, bank=bank) bank_paths_to_remove = [current...
def _get_banks_to_remove(redis_server, bank, path=''): ''' A simple tree tarversal algorithm that builds the list of banks to remove, starting from an arbitrary node in the tree. ''' current_path = bank if not path else '{path}/{bank}'.format(path=path, bank=bank) bank_paths_to_remove = [current...
[ "A", "simple", "tree", "tarversal", "algorithm", "that", "builds", "the", "list", "of", "banks", "to", "remove", "starting", "from", "an", "arbitrary", "node", "in", "the", "tree", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/redis_cache.py#L313-L330
[ "def", "_get_banks_to_remove", "(", "redis_server", ",", "bank", ",", "path", "=", "''", ")", ":", "current_path", "=", "bank", "if", "not", "path", "else", "'{path}/{bank}'", ".", "format", "(", "path", "=", "path", ",", "bank", "=", "bank", ")", "bank_...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
store
Store the data in a Redis key.
salt/cache/redis_cache.py
def store(bank, key, data): ''' Store the data in a Redis key. ''' redis_server = _get_redis_server() redis_pipe = redis_server.pipeline() redis_key = _get_key_redis_key(bank, key) redis_bank_keys = _get_bank_keys_redis_key(bank) try: _build_bank_hier(bank, redis_pipe) va...
def store(bank, key, data): ''' Store the data in a Redis key. ''' redis_server = _get_redis_server() redis_pipe = redis_server.pipeline() redis_key = _get_key_redis_key(bank, key) redis_bank_keys = _get_bank_keys_redis_key(bank) try: _build_bank_hier(bank, redis_pipe) va...
[ "Store", "the", "data", "in", "a", "Redis", "key", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/redis_cache.py#L337-L357
[ "def", "store", "(", "bank", ",", "key", ",", "data", ")", ":", "redis_server", "=", "_get_redis_server", "(", ")", "redis_pipe", "=", "redis_server", ".", "pipeline", "(", ")", "redis_key", "=", "_get_key_redis_key", "(", "bank", ",", "key", ")", "redis_b...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
fetch
Fetch data from the Redis cache.
salt/cache/redis_cache.py
def fetch(bank, key): ''' Fetch data from the Redis cache. ''' redis_server = _get_redis_server() redis_key = _get_key_redis_key(bank, key) redis_value = None try: redis_value = redis_server.get(redis_key) except (RedisConnectionError, RedisResponseError) as rerr: mesg = ...
def fetch(bank, key): ''' Fetch data from the Redis cache. ''' redis_server = _get_redis_server() redis_key = _get_key_redis_key(bank, key) redis_value = None try: redis_value = redis_server.get(redis_key) except (RedisConnectionError, RedisResponseError) as rerr: mesg = ...
[ "Fetch", "data", "from", "the", "Redis", "cache", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/redis_cache.py#L360-L376
[ "def", "fetch", "(", "bank", ",", "key", ")", ":", "redis_server", "=", "_get_redis_server", "(", ")", "redis_key", "=", "_get_key_redis_key", "(", "bank", ",", "key", ")", "redis_value", "=", "None", "try", ":", "redis_value", "=", "redis_server", ".", "g...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
flush
Remove the key from the cache bank with all the key content. If no key is specified, remove the entire bank with all keys and sub-banks inside. This function is using the Redis pipelining for best performance. However, when removing a whole bank, in order to re-create the tree, there are a couple of req...
salt/cache/redis_cache.py
def flush(bank, key=None): ''' Remove the key from the cache bank with all the key content. If no key is specified, remove the entire bank with all keys and sub-banks inside. This function is using the Redis pipelining for best performance. However, when removing a whole bank, in order to re-cre...
def flush(bank, key=None): ''' Remove the key from the cache bank with all the key content. If no key is specified, remove the entire bank with all keys and sub-banks inside. This function is using the Redis pipelining for best performance. However, when removing a whole bank, in order to re-cre...
[ "Remove", "the", "key", "from", "the", "cache", "bank", "with", "all", "the", "key", "content", ".", "If", "no", "key", "is", "specified", "remove", "the", "entire", "bank", "with", "all", "keys", "and", "sub", "-", "banks", "inside", ".", "This", "fun...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/redis_cache.py#L379-L471
[ "def", "flush", "(", "bank", ",", "key", "=", "None", ")", ":", "redis_server", "=", "_get_redis_server", "(", ")", "redis_pipe", "=", "redis_server", ".", "pipeline", "(", ")", "if", "key", "is", "None", ":", "# will remove all bank keys", "bank_paths_to_remo...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_
Lists entries stored in the specified bank.
salt/cache/redis_cache.py
def list_(bank): ''' Lists entries stored in the specified bank. ''' redis_server = _get_redis_server() bank_redis_key = _get_bank_redis_key(bank) try: banks = redis_server.smembers(bank_redis_key) except (RedisConnectionError, RedisResponseError) as rerr: mesg = 'Cannot list...
def list_(bank): ''' Lists entries stored in the specified bank. ''' redis_server = _get_redis_server() bank_redis_key = _get_bank_redis_key(bank) try: banks = redis_server.smembers(bank_redis_key) except (RedisConnectionError, RedisResponseError) as rerr: mesg = 'Cannot list...
[ "Lists", "entries", "stored", "in", "the", "specified", "bank", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/redis_cache.py#L474-L489
[ "def", "list_", "(", "bank", ")", ":", "redis_server", "=", "_get_redis_server", "(", ")", "bank_redis_key", "=", "_get_bank_redis_key", "(", "bank", ")", "try", ":", "banks", "=", "redis_server", ".", "smembers", "(", "bank_redis_key", ")", "except", "(", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
contains
Checks if the specified bank contains the specified key.
salt/cache/redis_cache.py
def contains(bank, key): ''' Checks if the specified bank contains the specified key. ''' redis_server = _get_redis_server() bank_redis_key = _get_bank_redis_key(bank) try: return redis_server.sismember(bank_redis_key, key) except (RedisConnectionError, RedisResponseError) as rerr: ...
def contains(bank, key): ''' Checks if the specified bank contains the specified key. ''' redis_server = _get_redis_server() bank_redis_key = _get_bank_redis_key(bank) try: return redis_server.sismember(bank_redis_key, key) except (RedisConnectionError, RedisResponseError) as rerr: ...
[ "Checks", "if", "the", "specified", "bank", "contains", "the", "specified", "key", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/redis_cache.py#L492-L504
[ "def", "contains", "(", "bank", ",", "key", ")", ":", "redis_server", "=", "_get_redis_server", "(", ")", "bank_redis_key", "=", "_get_bank_redis_key", "(", "bank", ")", "try", ":", "return", "redis_server", ".", "sismember", "(", "bank_redis_key", ",", "key",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
check_vpc
Check whether a VPC with the given name or id exists. Returns the vpc_id or None. Raises SaltInvocationError if both vpc_id and vpc_name are None. Optionally raise a CommandExecutionError if the VPC does not exist. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt mym...
salt/modules/boto_vpc.py
def check_vpc(vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Check whether a VPC with the given name or id exists. Returns the vpc_id or None. Raises SaltInvocationError if both vpc_id and vpc_name are None. Optionally raise a CommandExecutionError if...
def check_vpc(vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Check whether a VPC with the given name or id exists. Returns the vpc_id or None. Raises SaltInvocationError if both vpc_id and vpc_name are None. Optionally raise a CommandExecutionError if...
[ "Check", "whether", "a", "VPC", "with", "the", "given", "name", "or", "id", "exists", ".", "Returns", "the", "vpc_id", "or", "None", ".", "Raises", "SaltInvocationError", "if", "both", "vpc_id", "and", "vpc_name", "are", "None", ".", "Optionally", "raise", ...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L201-L228
[ "def", "check_vpc", "(", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "if", "not", "_exactly_one", "(", "(", "vpc_name", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_create_resource
Create a VPC resource. Returns the resource id if created, or False if not created.
salt/modules/boto_vpc.py
def _create_resource(resource, name=None, tags=None, region=None, key=None, keyid=None, profile=None, **kwargs): ''' Create a VPC resource. Returns the resource id if created, or False if not created. ''' try: try: conn = _get_conn(region=region, key=key, ke...
def _create_resource(resource, name=None, tags=None, region=None, key=None, keyid=None, profile=None, **kwargs): ''' Create a VPC resource. Returns the resource id if created, or False if not created. ''' try: try: conn = _get_conn(region=region, key=key, ke...
[ "Create", "a", "VPC", "resource", ".", "Returns", "the", "resource", "id", "if", "created", "or", "False", "if", "not", "created", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L231-L278
[ "def", "_create_resource", "(", "resource", ",", "name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "*", "*", "kwargs", ")", ":", "try", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_delete_resource
Delete a VPC resource. Returns True if successful, otherwise False.
salt/modules/boto_vpc.py
def _delete_resource(resource, name=None, resource_id=None, region=None, key=None, keyid=None, profile=None, **kwargs): ''' Delete a VPC resource. Returns True if successful, otherwise False. ''' if not _exactly_one((name, resource_id)): raise SaltInvocationError('One (but ...
def _delete_resource(resource, name=None, resource_id=None, region=None, key=None, keyid=None, profile=None, **kwargs): ''' Delete a VPC resource. Returns True if successful, otherwise False. ''' if not _exactly_one((name, resource_id)): raise SaltInvocationError('One (but ...
[ "Delete", "a", "VPC", "resource", ".", "Returns", "True", "if", "successful", "otherwise", "False", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L281-L322
[ "def", "_delete_resource", "(", "resource", ",", "name", "=", "None", ",", "resource_id", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "*", "*", "kwargs", ")", ":", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_get_resource
Get a VPC resource based on resource type and name or id. Cache the id if name was provided.
salt/modules/boto_vpc.py
def _get_resource(resource, name=None, resource_id=None, region=None, key=None, keyid=None, profile=None): ''' Get a VPC resource based on resource type and name or id. Cache the id if name was provided. ''' if not _exactly_one((name, resource_id)): raise SaltInvocationErr...
def _get_resource(resource, name=None, resource_id=None, region=None, key=None, keyid=None, profile=None): ''' Get a VPC resource based on resource type and name or id. Cache the id if name was provided. ''' if not _exactly_one((name, resource_id)): raise SaltInvocationErr...
[ "Get", "a", "VPC", "resource", "based", "on", "resource", "type", "and", "name", "or", "id", ".", "Cache", "the", "id", "if", "name", "was", "provided", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L325-L370
[ "def", "_get_resource", "(", "resource", ",", "name", "=", "None", ",", "resource_id", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "if", "not", "_exactly_one", "(...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_find_resources
Get VPC resources based on resource type and name, id, or tags.
salt/modules/boto_vpc.py
def _find_resources(resource, name=None, resource_id=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Get VPC resources based on resource type and name, id, or tags. ''' if all((resource_id, name)): raise SaltInvocationError('Only one of name or id may ...
def _find_resources(resource, name=None, resource_id=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Get VPC resources based on resource type and name, id, or tags. ''' if all((resource_id, name)): raise SaltInvocationError('Only one of name or id may ...
[ "Get", "VPC", "resources", "based", "on", "resource", "type", "and", "name", "id", "or", "tags", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L373-L409
[ "def", "_find_resources", "(", "resource", ",", "name", "=", "None", ",", "resource_id", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_get_resource_id
Get an AWS id for a VPC resource by type and name.
salt/modules/boto_vpc.py
def _get_resource_id(resource, name, region=None, key=None, keyid=None, profile=None): ''' Get an AWS id for a VPC resource by type and name. ''' _id = _cache_id(name, sub_resource=resource, region=region, key=key, keyid=keyid, profile=profil...
def _get_resource_id(resource, name, region=None, key=None, keyid=None, profile=None): ''' Get an AWS id for a VPC resource by type and name. ''' _id = _cache_id(name, sub_resource=resource, region=region, key=key, keyid=keyid, profile=profil...
[ "Get", "an", "AWS", "id", "for", "a", "VPC", "resource", "by", "type", "and", "name", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L412-L428
[ "def", "_get_resource_id", "(", "resource", ",", "name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "_id", "=", "_cache_id", "(", "name", ",", "sub_resource", "=", "resource", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_resource_id
Get an AWS id for a VPC resource by type and name. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt myminion boto_vpc.get_resource_id internet_gateway myigw
salt/modules/boto_vpc.py
def get_resource_id(resource, name=None, resource_id=None, region=None, key=None, keyid=None, profile=None): ''' Get an AWS id for a VPC resource by type and name. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt myminion boto_vpc.get_resource_id inte...
def get_resource_id(resource, name=None, resource_id=None, region=None, key=None, keyid=None, profile=None): ''' Get an AWS id for a VPC resource by type and name. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt myminion boto_vpc.get_resource_id inte...
[ "Get", "an", "AWS", "id", "for", "a", "VPC", "resource", "by", "type", "and", "name", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L431-L450
[ "def", "get_resource_id", "(", "resource", ",", "name", "=", "None", ",", "resource_id", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "return", "{", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
resource_exists
Given a resource type and name, return {exists: true} if it exists, {exists: false} if it does not exist, or {error: {message: error text} on error. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt myminion boto_vpc.resource_exists internet_gateway myigw
salt/modules/boto_vpc.py
def resource_exists(resource, name=None, resource_id=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given a resource type and name, return {exists: true} if it exists, {exists: false} if it does not exist, or {error: {message: error text} on error. .. ver...
def resource_exists(resource, name=None, resource_id=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given a resource type and name, return {exists: true} if it exists, {exists: false} if it does not exist, or {error: {message: error text} on error. .. ver...
[ "Given", "a", "resource", "type", "and", "name", "return", "{", "exists", ":", "true", "}", "if", "it", "exists", "{", "exists", ":", "false", "}", "if", "it", "does", "not", "exist", "or", "{", "error", ":", "{", "message", ":", "error", "text", "...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L453-L477
[ "def", "resource_exists", "(", "resource", ",", "name", "=", "None", ",", "resource_id", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_get_id
Given VPC properties, return the VPC id if a match is found.
salt/modules/boto_vpc.py
def _get_id(vpc_name=None, cidr=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given VPC properties, return the VPC id if a match is found. ''' if vpc_name and not any((cidr, tags)): vpc_id = _cache_id(vpc_name, region=region, key=k...
def _get_id(vpc_name=None, cidr=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given VPC properties, return the VPC id if a match is found. ''' if vpc_name and not any((cidr, tags)): vpc_id = _cache_id(vpc_name, region=region, key=k...
[ "Given", "VPC", "properties", "return", "the", "VPC", "id", "if", "a", "match", "is", "found", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L521-L549
[ "def", "_get_id", "(", "vpc_name", "=", "None", ",", "cidr", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "if", "vpc_name", "and", "n...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_id
Given VPC properties, return the VPC id if a match is found. CLI Example: .. code-block:: bash salt myminion boto_vpc.get_id myvpc
salt/modules/boto_vpc.py
def get_id(name=None, cidr=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given VPC properties, return the VPC id if a match is found. CLI Example: .. code-block:: bash salt myminion boto_vpc.get_id myvpc ''' try: return {'id': _get_id(vpc_...
def get_id(name=None, cidr=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given VPC properties, return the VPC id if a match is found. CLI Example: .. code-block:: bash salt myminion boto_vpc.get_id myvpc ''' try: return {'id': _get_id(vpc_...
[ "Given", "VPC", "properties", "return", "the", "VPC", "id", "if", "a", "match", "is", "found", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L552-L569
[ "def", "get_id", "(", "name", "=", "None", ",", "cidr", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "return", "{", "'i...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
exists
Given a VPC ID, check to see if the given VPC ID exists. Returns True if the given VPC ID exists and returns False if the given VPC ID does not exist. CLI Example: .. code-block:: bash salt myminion boto_vpc.exists myvpc
salt/modules/boto_vpc.py
def exists(vpc_id=None, name=None, cidr=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given a VPC ID, check to see if the given VPC ID exists. Returns True if the given VPC ID exists and returns False if the given VPC ID does not exist. CLI Example: .. code...
def exists(vpc_id=None, name=None, cidr=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given a VPC ID, check to see if the given VPC ID exists. Returns True if the given VPC ID exists and returns False if the given VPC ID does not exist. CLI Example: .. code...
[ "Given", "a", "VPC", "ID", "check", "to", "see", "if", "the", "given", "VPC", "ID", "exists", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L572-L598
[ "def", "exists", "(", "vpc_id", "=", "None", ",", "name", "=", "None", ",", "cidr", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "t...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create
Given a valid CIDR block, create a VPC. An optional instance_tenancy argument can be provided. If provided, the valid values are 'default' or 'dedicated' An optional vpc_name argument can be provided. Returns {created: true} if the VPC was created and returns {created: False} if the VPC was not c...
salt/modules/boto_vpc.py
def create(cidr_block, instance_tenancy=None, vpc_name=None, enable_dns_support=None, enable_dns_hostnames=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given a valid CIDR block, create a VPC. An optional instance_tenancy argument can be provided. If provided,...
def create(cidr_block, instance_tenancy=None, vpc_name=None, enable_dns_support=None, enable_dns_hostnames=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given a valid CIDR block, create a VPC. An optional instance_tenancy argument can be provided. If provided,...
[ "Given", "a", "valid", "CIDR", "block", "create", "a", "VPC", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L601-L642
[ "def", "create", "(", "cidr_block", ",", "instance_tenancy", "=", "None", ",", "vpc_name", "=", "None", ",", "enable_dns_support", "=", "None", ",", "enable_dns_hostnames", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
delete
Given a VPC ID or VPC name, delete the VPC. Returns {deleted: true} if the VPC was deleted and returns {deleted: false} if the VPC was not deleted. CLI Example: .. code-block:: bash salt myminion boto_vpc.delete vpc_id='vpc-6b1fe402' salt myminion boto_vpc.delete name='myvpc'
salt/modules/boto_vpc.py
def delete(vpc_id=None, name=None, vpc_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given a VPC ID or VPC name, delete the VPC. Returns {deleted: true} if the VPC was deleted and returns {deleted: false} if the VPC was not deleted. CLI Example: .. cod...
def delete(vpc_id=None, name=None, vpc_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given a VPC ID or VPC name, delete the VPC. Returns {deleted: true} if the VPC was deleted and returns {deleted: false} if the VPC was not deleted. CLI Example: .. cod...
[ "Given", "a", "VPC", "ID", "or", "VPC", "name", "delete", "the", "VPC", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L645-L692
[ "def", "delete", "(", "vpc_id", "=", "None", ",", "name", "=", "None", ",", "vpc_name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
describe
Given a VPC ID describe its properties. Returns a dictionary of interesting properties. .. versionchanged:: 2015.8.0 Added vpc_name argument CLI Example: .. code-block:: bash salt myminion boto_vpc.describe vpc_id=vpc-123456 salt myminion boto_vpc.describe vpc_name=myvpc
salt/modules/boto_vpc.py
def describe(vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a VPC ID describe its properties. Returns a dictionary of interesting properties. .. versionchanged:: 2015.8.0 Added vpc_name argument CLI Example: .. code-block:: bash ...
def describe(vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a VPC ID describe its properties. Returns a dictionary of interesting properties. .. versionchanged:: 2015.8.0 Added vpc_name argument CLI Example: .. code-block:: bash ...
[ "Given", "a", "VPC", "ID", "describe", "its", "properties", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L695-L747
[ "def", "describe", "(", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "if", "not", "any", "(", "(", "vpc_id", ",", "vpc_...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
describe_vpcs
Describe all VPCs, matching the filter criteria if provided. Returns a list of dictionaries with interesting properties. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt myminion boto_vpc.describe_vpcs
salt/modules/boto_vpc.py
def describe_vpcs(vpc_id=None, name=None, cidr=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Describe all VPCs, matching the filter criteria if provided. Returns a list of dictionaries with interesting properties. .. versionadded:: 2015.8.0 CLI Example: ...
def describe_vpcs(vpc_id=None, name=None, cidr=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Describe all VPCs, matching the filter criteria if provided. Returns a list of dictionaries with interesting properties. .. versionadded:: 2015.8.0 CLI Example: ...
[ "Describe", "all", "VPCs", "matching", "the", "filter", "criteria", "if", "provided", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L750-L805
[ "def", "describe_vpcs", "(", "vpc_id", "=", "None", ",", "name", "=", "None", ",", "cidr", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_find_subnets
Given subnet properties, find and return matching subnet ids
salt/modules/boto_vpc.py
def _find_subnets(subnet_name=None, vpc_id=None, cidr=None, tags=None, conn=None): ''' Given subnet properties, find and return matching subnet ids ''' if not any([subnet_name, tags, cidr]): raise SaltInvocationError('At least one of the following must be ' 'sp...
def _find_subnets(subnet_name=None, vpc_id=None, cidr=None, tags=None, conn=None): ''' Given subnet properties, find and return matching subnet ids ''' if not any([subnet_name, tags, cidr]): raise SaltInvocationError('At least one of the following must be ' 'sp...
[ "Given", "subnet", "properties", "find", "and", "return", "matching", "subnet", "ids" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L808-L839
[ "def", "_find_subnets", "(", "subnet_name", "=", "None", ",", "vpc_id", "=", "None", ",", "cidr", "=", "None", ",", "tags", "=", "None", ",", "conn", "=", "None", ")", ":", "if", "not", "any", "(", "[", "subnet_name", ",", "tags", ",", "cidr", "]",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_subnet
Given a valid VPC ID or Name and a CIDR block, create a subnet for the VPC. An optional availability zone argument can be provided. Returns True if the VPC subnet was created and returns False if the VPC subnet was not created. .. versionchanged:: 2015.8.0 Added vpc_name argument CLI Example...
salt/modules/boto_vpc.py
def create_subnet(vpc_id=None, cidr_block=None, vpc_name=None, availability_zone=None, subnet_name=None, tags=None, region=None, key=None, keyid=None, profile=None, auto_assign_public_ipv4=False): ''' Given a valid VPC ID or Name and a CIDR block, create a subnet for the VPC....
def create_subnet(vpc_id=None, cidr_block=None, vpc_name=None, availability_zone=None, subnet_name=None, tags=None, region=None, key=None, keyid=None, profile=None, auto_assign_public_ipv4=False): ''' Given a valid VPC ID or Name and a CIDR block, create a subnet for the VPC....
[ "Given", "a", "valid", "VPC", "ID", "or", "Name", "and", "a", "CIDR", "block", "create", "a", "subnet", "for", "the", "VPC", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L842-L880
[ "def", "create_subnet", "(", "vpc_id", "=", "None", ",", "cidr_block", "=", "None", ",", "vpc_name", "=", "None", ",", "availability_zone", "=", "None", ",", "subnet_name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
delete_subnet
Given a subnet ID or name, delete the subnet. Returns True if the subnet was deleted and returns False if the subnet was not deleted. .. versionchanged:: 2015.8.0 Added subnet_name argument CLI Example: .. code-block:: bash salt myminion boto_vpc.delete_subnet 'subnet-6a1fe403'
salt/modules/boto_vpc.py
def delete_subnet(subnet_id=None, subnet_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a subnet ID or name, delete the subnet. Returns True if the subnet was deleted and returns False if the subnet was not deleted. .. versionchanged:: 2015.8.0 Added s...
def delete_subnet(subnet_id=None, subnet_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a subnet ID or name, delete the subnet. Returns True if the subnet was deleted and returns False if the subnet was not deleted. .. versionchanged:: 2015.8.0 Added s...
[ "Given", "a", "subnet", "ID", "or", "name", "delete", "the", "subnet", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L883-L903
[ "def", "delete_subnet", "(", "subnet_id", "=", "None", ",", "subnet_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "return", "_delete_resource", "(", "resource", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
subnet_exists
Check if a subnet exists. Returns True if the subnet exists, otherwise returns False. .. versionchanged:: 2015.8.0 Added subnet_name argument Deprecated name argument CLI Example: .. code-block:: bash salt myminion boto_vpc.subnet_exists subnet_id='subnet-6a1fe403'
salt/modules/boto_vpc.py
def subnet_exists(subnet_id=None, name=None, subnet_name=None, cidr=None, tags=None, zones=None, region=None, key=None, keyid=None, profile=None): ''' Check if a subnet exists. Returns True if the subnet exists, otherwise returns False. .. versionchanged:: 2015.8.0 ...
def subnet_exists(subnet_id=None, name=None, subnet_name=None, cidr=None, tags=None, zones=None, region=None, key=None, keyid=None, profile=None): ''' Check if a subnet exists. Returns True if the subnet exists, otherwise returns False. .. versionchanged:: 2015.8.0 ...
[ "Check", "if", "a", "subnet", "exists", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L906-L969
[ "def", "subnet_exists", "(", "subnet_id", "=", "None", ",", "name", "=", "None", ",", "subnet_name", "=", "None", ",", "cidr", "=", "None", ",", "tags", "=", "None", ",", "zones", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_subnet_association
Given a subnet (aka: a vpc zone identifier) or list of subnets, returns vpc association. Returns a VPC ID if the given subnets are associated with the same VPC ID. Returns False on an error or if the given subnets are associated with different VPC IDs. CLI Examples: .. code-block:: bash ...
salt/modules/boto_vpc.py
def get_subnet_association(subnets, region=None, key=None, keyid=None, profile=None): ''' Given a subnet (aka: a vpc zone identifier) or list of subnets, returns vpc association. Returns a VPC ID if the given subnets are associated with the same VPC ID. Returns False on a...
def get_subnet_association(subnets, region=None, key=None, keyid=None, profile=None): ''' Given a subnet (aka: a vpc zone identifier) or list of subnets, returns vpc association. Returns a VPC ID if the given subnets are associated with the same VPC ID. Returns False on a...
[ "Given", "a", "subnet", "(", "aka", ":", "a", "vpc", "zone", "identifier", ")", "or", "list", "of", "subnets", "returns", "vpc", "association", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L972-L1015
[ "def", "get_subnet_association", "(", "subnets", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
describe_subnet
Given a subnet id or name, describe its properties. Returns a dictionary of interesting properties. .. versionadded:: 2015.8.0 CLI Examples: .. code-block:: bash salt myminion boto_vpc.describe_subnet subnet_id=subnet-123456 salt myminion boto_vpc.describe_subnet subnet_name=mysubne...
salt/modules/boto_vpc.py
def describe_subnet(subnet_id=None, subnet_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a subnet id or name, describe its properties. Returns a dictionary of interesting properties. .. versionadded:: 2015.8.0 CLI Examples: .. code-block:: bash ...
def describe_subnet(subnet_id=None, subnet_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a subnet id or name, describe its properties. Returns a dictionary of interesting properties. .. versionadded:: 2015.8.0 CLI Examples: .. code-block:: bash ...
[ "Given", "a", "subnet", "id", "or", "name", "describe", "its", "properties", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1018-L1053
[ "def", "describe_subnet", "(", "subnet_id", "=", "None", ",", "subnet_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "subnet", "=", "_get_resource",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
describe_subnets
Given a VPC ID or subnet CIDR, returns a list of associated subnets and their details. Return all subnets if VPC ID or CIDR are not provided. If a subnet id or CIDR is provided, only its associated subnet details will be returned. .. versionadded:: 2015.8.0 CLI Examples: .. code-block:: bash ...
salt/modules/boto_vpc.py
def describe_subnets(subnet_ids=None, subnet_names=None, vpc_id=None, cidr=None, region=None, key=None, keyid=None, profile=None): ''' Given a VPC ID or subnet CIDR, returns a list of associated subnets and their details. Return all subnets if VPC ID or CIDR are not provided. If a s...
def describe_subnets(subnet_ids=None, subnet_names=None, vpc_id=None, cidr=None, region=None, key=None, keyid=None, profile=None): ''' Given a VPC ID or subnet CIDR, returns a list of associated subnets and their details. Return all subnets if VPC ID or CIDR are not provided. If a s...
[ "Given", "a", "VPC", "ID", "or", "subnet", "CIDR", "returns", "a", "list", "of", "associated", "subnets", "and", "their", "details", ".", "Return", "all", "subnets", "if", "VPC", "ID", "or", "CIDR", "are", "not", "provided", ".", "If", "a", "subnet", "...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1056-L1120
[ "def", "describe_subnets", "(", "subnet_ids", "=", "None", ",", "subnet_names", "=", "None", ",", "vpc_id", "=", "None", ",", "cidr", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "N...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_internet_gateway
Create an Internet Gateway, optionally attaching it to an existing VPC. Returns the internet gateway id if the internet gateway was created and returns False if the internet gateways was not created. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt myminion boto_vpc.cre...
salt/modules/boto_vpc.py
def create_internet_gateway(internet_gateway_name=None, vpc_id=None, vpc_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Create an Internet Gateway, optionally attaching it to an existing VPC. Returns the internet gateway i...
def create_internet_gateway(internet_gateway_name=None, vpc_id=None, vpc_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Create an Internet Gateway, optionally attaching it to an existing VPC. Returns the internet gateway i...
[ "Create", "an", "Internet", "Gateway", "optionally", "attaching", "it", "to", "an", "existing", "VPC", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1123-L1162
[ "def", "create_internet_gateway", "(", "internet_gateway_name", "=", "None", ",", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
delete_internet_gateway
Delete an internet gateway (by name or id). Returns True if the internet gateway was deleted and otherwise False. .. versionadded:: 2015.8.0 CLI Examples: .. code-block:: bash salt myminion boto_vpc.delete_internet_gateway internet_gateway_id=igw-1a2b3c salt myminion boto_vpc.delete...
salt/modules/boto_vpc.py
def delete_internet_gateway(internet_gateway_id=None, internet_gateway_name=None, detach=False, region=None, key=None, keyid=None, profile=None): ''' Delete an internet gateway (by name or id). Returns True if the internet ...
def delete_internet_gateway(internet_gateway_id=None, internet_gateway_name=None, detach=False, region=None, key=None, keyid=None, profile=None): ''' Delete an internet gateway (by name or id). Returns True if the internet ...
[ "Delete", "an", "internet", "gateway", "(", "by", "name", "or", "id", ")", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1165-L1216
[ "def", "delete_internet_gateway", "(", "internet_gateway_id", "=", "None", ",", "internet_gateway_name", "=", "None", ",", "detach", "=", "False", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_find_nat_gateways
Given gateway properties, find and return matching nat gateways
salt/modules/boto_vpc.py
def _find_nat_gateways(nat_gateway_id=None, subnet_id=None, subnet_name=None, vpc_id=None, vpc_name=None, states=('pending', 'available'), region=None, key=None, keyid=None, profile=None): ''' Given gateway properties, find and return matching nat gateways ''' ...
def _find_nat_gateways(nat_gateway_id=None, subnet_id=None, subnet_name=None, vpc_id=None, vpc_name=None, states=('pending', 'available'), region=None, key=None, keyid=None, profile=None): ''' Given gateway properties, find and return matching nat gateways ''' ...
[ "Given", "gateway", "properties", "find", "and", "return", "matching", "nat", "gateways" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1219-L1269
[ "def", "_find_nat_gateways", "(", "nat_gateway_id", "=", "None", ",", "subnet_id", "=", "None", ",", "subnet_name", "=", "None", ",", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "states", "=", "(", "'pending'", ",", "'available'", ")", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
nat_gateway_exists
Checks if a nat gateway exists. This function requires boto3 to be installed. .. versionadded:: 2016.11.0 CLI Example: .. code-block:: bash salt myminion boto_vpc.nat_gateway_exists nat_gateway_id='nat-03b02643b43216fe7' salt myminion boto_vpc.nat_gateway_exists subnet_id='subnet-5b...
salt/modules/boto_vpc.py
def nat_gateway_exists(nat_gateway_id=None, subnet_id=None, subnet_name=None, vpc_id=None, vpc_name=None, states=('pending', 'available'), region=None, key=None, keyid=None, profile=None): ''' Checks if a nat gateway exists. This function...
def nat_gateway_exists(nat_gateway_id=None, subnet_id=None, subnet_name=None, vpc_id=None, vpc_name=None, states=('pending', 'available'), region=None, key=None, keyid=None, profile=None): ''' Checks if a nat gateway exists. This function...
[ "Checks", "if", "a", "nat", "gateway", "exists", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1272-L1299
[ "def", "nat_gateway_exists", "(", "nat_gateway_id", "=", "None", ",", "subnet_id", "=", "None", ",", "subnet_name", "=", "None", ",", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "states", "=", "(", "'pending'", ",", "'available'", ")", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
describe_nat_gateways
Return a description of nat gateways matching the selection criteria This function requires boto3 to be installed. CLI Example: .. code-block:: bash salt myminion boto_vpc.describe_nat_gateways nat_gateway_id='nat-03b02643b43216fe7' salt myminion boto_vpc.describe_nat_gateways subnet_id=...
salt/modules/boto_vpc.py
def describe_nat_gateways(nat_gateway_id=None, subnet_id=None, subnet_name=None, vpc_id=None, vpc_name=None, states=('pending', 'available'), region=None, key=None, keyid=None, profile=None): ''' Return a description of nat gateways matching t...
def describe_nat_gateways(nat_gateway_id=None, subnet_id=None, subnet_name=None, vpc_id=None, vpc_name=None, states=('pending', 'available'), region=None, key=None, keyid=None, profile=None): ''' Return a description of nat gateways matching t...
[ "Return", "a", "description", "of", "nat", "gateways", "matching", "the", "selection", "criteria" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1302-L1327
[ "def", "describe_nat_gateways", "(", "nat_gateway_id", "=", "None", ",", "subnet_id", "=", "None", ",", "subnet_name", "=", "None", ",", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "states", "=", "(", "'pending'", ",", "'available'", ")", ","...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_nat_gateway
Create a NAT Gateway within an existing subnet. If allocation_id is specified, the elastic IP address it references is associated with the gateway. Otherwise, a new allocation_id is created and used. This function requires boto3 to be installed. Returns the nat gateway id if the nat gateway was create...
salt/modules/boto_vpc.py
def create_nat_gateway(subnet_id=None, subnet_name=None, allocation_id=None, region=None, key=None, keyid=None, profile=None): ''' Create a NAT Gateway within an existing subnet. If allocation_id is specified, the elastic IP address it references is associated w...
def create_nat_gateway(subnet_id=None, subnet_name=None, allocation_id=None, region=None, key=None, keyid=None, profile=None): ''' Create a NAT Gateway within an existing subnet. If allocation_id is specified, the elastic IP address it references is associated w...
[ "Create", "a", "NAT", "Gateway", "within", "an", "existing", "subnet", ".", "If", "allocation_id", "is", "specified", "the", "elastic", "IP", "address", "it", "references", "is", "associated", "with", "the", "gateway", ".", "Otherwise", "a", "new", "allocation...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1330-L1380
[ "def", "create_nat_gateway", "(", "subnet_id", "=", "None", ",", "subnet_name", "=", "None", ",", "allocation_id", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
delete_nat_gateway
Delete a nat gateway (by id). Returns True if the internet gateway was deleted and otherwise False. This function requires boto3 to be installed. .. versionadded:: 2016.11.0 nat_gateway_id Id of the NAT Gateway releaes_eips whether to release the elastic IPs associated with the ...
salt/modules/boto_vpc.py
def delete_nat_gateway(nat_gateway_id, release_eips=False, region=None, key=None, keyid=None, profile=None, wait_for_delete=False, wait_for_delete_retries=5): ''' Delete a nat gateway (by id). Returns True if the internet gateway was dele...
def delete_nat_gateway(nat_gateway_id, release_eips=False, region=None, key=None, keyid=None, profile=None, wait_for_delete=False, wait_for_delete_retries=5): ''' Delete a nat gateway (by id). Returns True if the internet gateway was dele...
[ "Delete", "a", "nat", "gateway", "(", "by", "id", ")", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1383-L1456
[ "def", "delete_nat_gateway", "(", "nat_gateway_id", ",", "release_eips", "=", "False", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "wait_for_delete", "=", "False", ",", "wait_for_delete_re...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_customer_gateway
Given a valid VPN connection type, a static IP address and a customer gateway’s Border Gateway Protocol (BGP) Autonomous System Number, create a customer gateway. Returns the customer gateway id if the customer gateway was created and returns False if the customer gateway was not created. CLI Exam...
salt/modules/boto_vpc.py
def create_customer_gateway(vpn_connection_type, ip_address, bgp_asn, customer_gateway_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given a valid VPN connection type, a static IP address and a customer gateway’s Border Ga...
def create_customer_gateway(vpn_connection_type, ip_address, bgp_asn, customer_gateway_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given a valid VPN connection type, a static IP address and a customer gateway’s Border Ga...
[ "Given", "a", "valid", "VPN", "connection", "type", "a", "static", "IP", "address", "and", "a", "customer", "gateway’s", "Border", "Gateway", "Protocol", "(", "BGP", ")", "Autonomous", "System", "Number", "create", "a", "customer", "gateway", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1459-L1482
[ "def", "create_customer_gateway", "(", "vpn_connection_type", ",", "ip_address", ",", "bgp_asn", ",", "customer_gateway_name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profil...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
delete_customer_gateway
Given a customer gateway ID or name, delete the customer gateway. Returns True if the customer gateway was deleted and returns False if the customer gateway was not deleted. .. versionchanged:: 2015.8.0 Added customer_gateway_name argument CLI Example: .. code-block:: bash salt mymi...
salt/modules/boto_vpc.py
def delete_customer_gateway(customer_gateway_id=None, customer_gateway_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a customer gateway ID or name, delete the customer gateway. Returns True if the customer gateway was deleted and returns False if the cus...
def delete_customer_gateway(customer_gateway_id=None, customer_gateway_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a customer gateway ID or name, delete the customer gateway. Returns True if the customer gateway was deleted and returns False if the cus...
[ "Given", "a", "customer", "gateway", "ID", "or", "name", "delete", "the", "customer", "gateway", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1485-L1507
[ "def", "delete_customer_gateway", "(", "customer_gateway_id", "=", "None", ",", "customer_gateway_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "return", "_delete_re...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
customer_gateway_exists
Given a customer gateway ID, check if the customer gateway ID exists. Returns True if the customer gateway ID exists; Returns False otherwise. CLI Example: .. code-block:: bash salt myminion boto_vpc.customer_gateway_exists cgw-b6a247df salt myminion boto_vpc.customer_gateway_exists cust...
salt/modules/boto_vpc.py
def customer_gateway_exists(customer_gateway_id=None, customer_gateway_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a customer gateway ID, check if the customer gateway ID exists. Returns True if the customer gateway ID exists; Returns False otherwise. ...
def customer_gateway_exists(customer_gateway_id=None, customer_gateway_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a customer gateway ID, check if the customer gateway ID exists. Returns True if the customer gateway ID exists; Returns False otherwise. ...
[ "Given", "a", "customer", "gateway", "ID", "check", "if", "the", "customer", "gateway", "ID", "exists", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1510-L1528
[ "def", "customer_gateway_exists", "(", "customer_gateway_id", "=", "None", ",", "customer_gateway_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "return", "resource_e...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_dhcp_options
Given valid DHCP options, create a DHCP options record, optionally associating it with an existing VPC. Returns True if the DHCP options record was created and returns False if the DHCP options record was not deleted. .. versionchanged:: 2015.8.0 Added vpc_name and vpc_id arguments CLI Exampl...
salt/modules/boto_vpc.py
def create_dhcp_options(domain_name=None, domain_name_servers=None, ntp_servers=None, netbios_name_servers=None, netbios_node_type=None, dhcp_options_name=None, tags=None, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None)...
def create_dhcp_options(domain_name=None, domain_name_servers=None, ntp_servers=None, netbios_name_servers=None, netbios_node_type=None, dhcp_options_name=None, tags=None, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None)...
[ "Given", "valid", "DHCP", "options", "create", "a", "DHCP", "options", "record", "optionally", "associating", "it", "with", "an", "existing", "VPC", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1531-L1577
[ "def", "create_dhcp_options", "(", "domain_name", "=", "None", ",", "domain_name_servers", "=", "None", ",", "ntp_servers", "=", "None", ",", "netbios_name_servers", "=", "None", ",", "netbios_node_type", "=", "None", ",", "dhcp_options_name", "=", "None", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_dhcp_options
Return a dict with the current values of the requested DHCP options set CLI Example: .. code-block:: bash salt myminion boto_vpc.get_dhcp_options 'myfunnydhcpoptionsname' .. versionadded:: 2016.3.0
salt/modules/boto_vpc.py
def get_dhcp_options(dhcp_options_name=None, dhcp_options_id=None, region=None, key=None, keyid=None, profile=None): ''' Return a dict with the current values of the requested DHCP options set CLI Example: .. code-block:: bash salt myminion boto_vpc.get_dhcp_options 'myfu...
def get_dhcp_options(dhcp_options_name=None, dhcp_options_id=None, region=None, key=None, keyid=None, profile=None): ''' Return a dict with the current values of the requested DHCP options set CLI Example: .. code-block:: bash salt myminion boto_vpc.get_dhcp_options 'myfu...
[ "Return", "a", "dict", "with", "the", "current", "values", "of", "the", "requested", "DHCP", "options", "set" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1580-L1616
[ "def", "get_dhcp_options", "(", "dhcp_options_name", "=", "None", ",", "dhcp_options_id", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "if", "not", "any", "(", "(", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
delete_dhcp_options
Delete dhcp options by id or name. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt myminion boto_vpc.delete_dhcp_options 'dopt-b6a247df'
salt/modules/boto_vpc.py
def delete_dhcp_options(dhcp_options_id=None, dhcp_options_name=None, region=None, key=None, keyid=None, profile=None): ''' Delete dhcp options by id or name. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt myminion boto_vpc.delete_dhcp_options '...
def delete_dhcp_options(dhcp_options_id=None, dhcp_options_name=None, region=None, key=None, keyid=None, profile=None): ''' Delete dhcp options by id or name. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt myminion boto_vpc.delete_dhcp_options '...
[ "Delete", "dhcp", "options", "by", "id", "or", "name", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1619-L1638
[ "def", "delete_dhcp_options", "(", "dhcp_options_id", "=", "None", ",", "dhcp_options_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "return", "_delete_resource", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
associate_dhcp_options_to_vpc
Given valid DHCP options id and a valid VPC id, associate the DHCP options record with the VPC. Returns True if the DHCP options record were associated and returns False if the DHCP options record was not associated. CLI Example: .. code-block:: bash salt myminion boto_vpc.associate_dhcp_options...
salt/modules/boto_vpc.py
def associate_dhcp_options_to_vpc(dhcp_options_id, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Given valid DHCP options id and a valid VPC id, associate the DHCP options record with the VPC. Returns True if the DHCP options record were...
def associate_dhcp_options_to_vpc(dhcp_options_id, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Given valid DHCP options id and a valid VPC id, associate the DHCP options record with the VPC. Returns True if the DHCP options record were...
[ "Given", "valid", "DHCP", "options", "id", "and", "a", "valid", "VPC", "id", "associate", "the", "DHCP", "options", "record", "with", "the", "VPC", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1641-L1671
[ "def", "associate_dhcp_options_to_vpc", "(", "dhcp_options_id", ",", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
dhcp_options_exists
Check if a dhcp option exists. Returns True if the dhcp option exists; Returns False otherwise. CLI Example: .. code-block:: bash salt myminion boto_vpc.dhcp_options_exists dhcp_options_id='dhcp-a0bl34pp'
salt/modules/boto_vpc.py
def dhcp_options_exists(dhcp_options_id=None, name=None, dhcp_options_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Check if a dhcp option exists. Returns True if the dhcp option exists; Returns False otherwise. CLI Example: .. code-block:: ba...
def dhcp_options_exists(dhcp_options_id=None, name=None, dhcp_options_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Check if a dhcp option exists. Returns True if the dhcp option exists; Returns False otherwise. CLI Example: .. code-block:: ba...
[ "Check", "if", "a", "dhcp", "option", "exists", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1674-L1697
[ "def", "dhcp_options_exists", "(", "dhcp_options_id", "=", "None", ",", "name", "=", "None", ",", "dhcp_options_name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_network_acl
Given a vpc_id, creates a network acl. Returns the network acl id if successful, otherwise returns False. .. versionchanged:: 2015.8.0 Added vpc_name, subnet_id, and subnet_name arguments CLI Example: .. code-block:: bash salt myminion boto_vpc.create_network_acl 'vpc-6b1fe402'
salt/modules/boto_vpc.py
def create_network_acl(vpc_id=None, vpc_name=None, network_acl_name=None, subnet_id=None, subnet_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given a vpc_id, creates a network acl. Returns the network acl id if successful, otherwi...
def create_network_acl(vpc_id=None, vpc_name=None, network_acl_name=None, subnet_id=None, subnet_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given a vpc_id, creates a network acl. Returns the network acl id if successful, otherwi...
[ "Given", "a", "vpc_id", "creates", "a", "network", "acl", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1700-L1757
[ "def", "create_network_acl", "(", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "network_acl_name", "=", "None", ",", "subnet_id", "=", "None", ",", "subnet_name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
delete_network_acl
Delete a network acl based on the network_acl_id or network_acl_name provided. CLI Examples: .. code-block:: bash salt myminion boto_vpc.delete_network_acl network_acl_id='acl-5fb85d36' \\ disassociate=false .. code-block:: bash salt myminion boto_vpc.delete_network_acl ...
salt/modules/boto_vpc.py
def delete_network_acl(network_acl_id=None, network_acl_name=None, disassociate=False, region=None, key=None, keyid=None, profile=None): ''' Delete a network acl based on the network_acl_id or network_acl_name provided. CLI Examples: .. code-block:: bash salt myminion b...
def delete_network_acl(network_acl_id=None, network_acl_name=None, disassociate=False, region=None, key=None, keyid=None, profile=None): ''' Delete a network acl based on the network_acl_id or network_acl_name provided. CLI Examples: .. code-block:: bash salt myminion b...
[ "Delete", "a", "network", "acl", "based", "on", "the", "network_acl_id", "or", "network_acl_name", "provided", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1760-L1793
[ "def", "delete_network_acl", "(", "network_acl_id", "=", "None", ",", "network_acl_name", "=", "None", ",", "disassociate", "=", "False", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
network_acl_exists
Checks if a network acl exists. Returns True if the network acl exists or returns False if it doesn't exist. CLI Example: .. code-block:: bash salt myminion boto_vpc.network_acl_exists network_acl_id='acl-5fb85d36'
salt/modules/boto_vpc.py
def network_acl_exists(network_acl_id=None, name=None, network_acl_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Checks if a network acl exists. Returns True if the network acl exists or returns False if it doesn't exist. CLI ...
def network_acl_exists(network_acl_id=None, name=None, network_acl_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Checks if a network acl exists. Returns True if the network acl exists or returns False if it doesn't exist. CLI ...
[ "Checks", "if", "a", "network", "acl", "exists", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1796-L1819
[ "def", "network_acl_exists", "(", "network_acl_id", "=", "None", ",", "name", "=", "None", ",", "network_acl_name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
associate_network_acl_to_subnet
Given a network acl and subnet ids or names, associate a network acl to a subnet. CLI Example: .. code-block:: bash salt myminion boto_vpc.associate_network_acl_to_subnet \\ network_acl_id='acl-5fb85d36' subnet_id='subnet-6a1fe403' .. code-block:: bash salt myminion boto...
salt/modules/boto_vpc.py
def associate_network_acl_to_subnet(network_acl_id=None, subnet_id=None, network_acl_name=None, subnet_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a network acl and subnet ids o...
def associate_network_acl_to_subnet(network_acl_id=None, subnet_id=None, network_acl_name=None, subnet_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a network acl and subnet ids o...
[ "Given", "a", "network", "acl", "and", "subnet", "ids", "or", "names", "associate", "a", "network", "acl", "to", "a", "subnet", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1822-L1870
[ "def", "associate_network_acl_to_subnet", "(", "network_acl_id", "=", "None", ",", "subnet_id", "=", "None", ",", "network_acl_name", "=", "None", ",", "subnet_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
disassociate_network_acl
Given a subnet ID, disassociates a network acl. CLI Example: .. code-block:: bash salt myminion boto_vpc.disassociate_network_acl 'subnet-6a1fe403'
salt/modules/boto_vpc.py
def disassociate_network_acl(subnet_id=None, vpc_id=None, subnet_name=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a subnet ID, disassociates a network acl. CLI Example: .. code-block:: bash salt myminion boto_vpc.disassociate_n...
def disassociate_network_acl(subnet_id=None, vpc_id=None, subnet_name=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a subnet ID, disassociates a network acl. CLI Example: .. code-block:: bash salt myminion boto_vpc.disassociate_n...
[ "Given", "a", "subnet", "ID", "disassociates", "a", "network", "acl", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1873-L1909
[ "def", "disassociate_network_acl", "(", "subnet_id", "=", "None", ",", "vpc_id", "=", "None", ",", "subnet_name", "=", "None", ",", "vpc_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_network_acl_entry
Creates a network acl entry. CLI Example: .. code-block:: bash salt myminion boto_vpc.create_network_acl_entry 'acl-5fb85d36' '32767' \\ 'all' 'deny' '0.0.0.0/0' egress=true
salt/modules/boto_vpc.py
def create_network_acl_entry(network_acl_id=None, rule_number=None, protocol=None, rule_action=None, cidr_block=None, egress=None, network_acl_name=None, icmp_code=None, icmp_type=None, port_range_from=None, port_range_to=None, ...
def create_network_acl_entry(network_acl_id=None, rule_number=None, protocol=None, rule_action=None, cidr_block=None, egress=None, network_acl_name=None, icmp_code=None, icmp_type=None, port_range_from=None, port_range_to=None, ...
[ "Creates", "a", "network", "acl", "entry", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1965-L1983
[ "def", "create_network_acl_entry", "(", "network_acl_id", "=", "None", ",", "rule_number", "=", "None", ",", "protocol", "=", "None", ",", "rule_action", "=", "None", ",", "cidr_block", "=", "None", ",", "egress", "=", "None", ",", "network_acl_name", "=", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
delete_network_acl_entry
Deletes a network acl entry. CLI Example: .. code-block:: bash salt myminion boto_vpc.delete_network_acl_entry 'acl-5fb85d36' '32767'
salt/modules/boto_vpc.py
def delete_network_acl_entry(network_acl_id=None, rule_number=None, egress=None, network_acl_name=None, region=None, key=None, keyid=None, profile=None): ''' Deletes a network acl entry. CLI Example: .. code-block:: bash salt myminion ...
def delete_network_acl_entry(network_acl_id=None, rule_number=None, egress=None, network_acl_name=None, region=None, key=None, keyid=None, profile=None): ''' Deletes a network acl entry. CLI Example: .. code-block:: bash salt myminion ...
[ "Deletes", "a", "network", "acl", "entry", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2008-L2045
[ "def", "delete_network_acl_entry", "(", "network_acl_id", "=", "None", ",", "rule_number", "=", "None", ",", "egress", "=", "None", ",", "network_acl_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_route_table
Creates a route table. .. versionchanged:: 2015.8.0 Added vpc_name argument CLI Examples: .. code-block:: bash salt myminion boto_vpc.create_route_table vpc_id='vpc-6b1fe402' \\ route_table_name='myroutetable' salt myminion boto_vpc.create_route_table vpc_name='my...
salt/modules/boto_vpc.py
def create_route_table(vpc_id=None, vpc_name=None, route_table_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Creates a route table. .. versionchanged:: 2015.8.0 Added vpc_name argument CLI Examples: .. code-block:: bash salt my...
def create_route_table(vpc_id=None, vpc_name=None, route_table_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Creates a route table. .. versionchanged:: 2015.8.0 Added vpc_name argument CLI Examples: .. code-block:: bash salt my...
[ "Creates", "a", "route", "table", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2048-L2071
[ "def", "create_route_table", "(", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "route_table_name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
delete_route_table
Deletes a route table. CLI Examples: .. code-block:: bash salt myminion boto_vpc.delete_route_table route_table_id='rtb-1f382e7d' salt myminion boto_vpc.delete_route_table route_table_name='myroutetable'
salt/modules/boto_vpc.py
def delete_route_table(route_table_id=None, route_table_name=None, region=None, key=None, keyid=None, profile=None): ''' Deletes a route table. CLI Examples: .. code-block:: bash salt myminion boto_vpc.delete_route_table route_table_id='rtb-1f382e7d' salt mymini...
def delete_route_table(route_table_id=None, route_table_name=None, region=None, key=None, keyid=None, profile=None): ''' Deletes a route table. CLI Examples: .. code-block:: bash salt myminion boto_vpc.delete_route_table route_table_id='rtb-1f382e7d' salt mymini...
[ "Deletes", "a", "route", "table", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2074-L2089
[ "def", "delete_route_table", "(", "route_table_id", "=", "None", ",", "route_table_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "return", "_delete_resource", "(",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
route_table_exists
Checks if a route table exists. CLI Example: .. code-block:: bash salt myminion boto_vpc.route_table_exists route_table_id='rtb-1f382e7d'
salt/modules/boto_vpc.py
def route_table_exists(route_table_id=None, name=None, route_table_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Checks if a route table exists. CLI Example: .. code-block:: bash salt myminion boto_vpc.route_table_exists route_table_id='rtb...
def route_table_exists(route_table_id=None, name=None, route_table_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Checks if a route table exists. CLI Example: .. code-block:: bash salt myminion boto_vpc.route_table_exists route_table_id='rtb...
[ "Checks", "if", "a", "route", "table", "exists", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2092-L2113
[ "def", "route_table_exists", "(", "route_table_id", "=", "None", ",", "name", "=", "None", ",", "route_table_name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
route_exists
Checks if a route exists. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt myminion boto_vpc.route_exists destination_cidr_block='10.0.0.0/20' gateway_id='local' route_table_name='test'
salt/modules/boto_vpc.py
def route_exists(destination_cidr_block, route_table_name=None, route_table_id=None, gateway_id=None, instance_id=None, interface_id=None, tags=None, region=None, key=None, keyid=None, profile=None, vpc_peering_connection_id=None): ''' Checks if a route exists. .. versiona...
def route_exists(destination_cidr_block, route_table_name=None, route_table_id=None, gateway_id=None, instance_id=None, interface_id=None, tags=None, region=None, key=None, keyid=None, profile=None, vpc_peering_connection_id=None): ''' Checks if a route exists. .. versiona...
[ "Checks", "if", "a", "route", "exists", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2116-L2181
[ "def", "route_exists", "(", "destination_cidr_block", ",", "route_table_name", "=", "None", ",", "route_table_id", "=", "None", ",", "gateway_id", "=", "None", ",", "instance_id", "=", "None", ",", "interface_id", "=", "None", ",", "tags", "=", "None", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
associate_route_table
Given a route table and subnet name or id, associates the route table with the subnet. CLI Example: .. code-block:: bash salt myminion boto_vpc.associate_route_table 'rtb-1f382e7d' 'subnet-6a1fe403' .. code-block:: bash salt myminion boto_vpc.associate_route_table route_table_name='myrt...
salt/modules/boto_vpc.py
def associate_route_table(route_table_id=None, subnet_id=None, route_table_name=None, subnet_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a route table and subnet name or id, associates the route table with t...
def associate_route_table(route_table_id=None, subnet_id=None, route_table_name=None, subnet_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a route table and subnet name or id, associates the route table with t...
[ "Given", "a", "route", "table", "and", "subnet", "name", "or", "id", "associates", "the", "route", "table", "with", "the", "subnet", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2184-L2233
[ "def", "associate_route_table", "(", "route_table_id", "=", "None", ",", "subnet_id", "=", "None", ",", "route_table_name", "=", "None", ",", "subnet_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
disassociate_route_table
Dissassociates a route table. association_id The Route Table Association ID to disassociate CLI Example: .. code-block:: bash salt myminion boto_vpc.disassociate_route_table 'rtbassoc-d8ccddba'
salt/modules/boto_vpc.py
def disassociate_route_table(association_id, region=None, key=None, keyid=None, profile=None): ''' Dissassociates a route table. association_id The Route Table Association ID to disassociate CLI Example: .. code-block:: bash salt myminion boto_vpc.disassociate_route_table 'rtbass...
def disassociate_route_table(association_id, region=None, key=None, keyid=None, profile=None): ''' Dissassociates a route table. association_id The Route Table Association ID to disassociate CLI Example: .. code-block:: bash salt myminion boto_vpc.disassociate_route_table 'rtbass...
[ "Dissassociates", "a", "route", "table", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2236-L2260
[ "def", "disassociate_route_table", "(", "association_id", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "k...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
replace_route_table_association
Replaces a route table association. CLI Example: .. code-block:: bash salt myminion boto_vpc.replace_route_table_association 'rtbassoc-d8ccddba' 'rtb-1f382e7d'
salt/modules/boto_vpc.py
def replace_route_table_association(association_id, route_table_id, region=None, key=None, keyid=None, profile=None): ''' Replaces a route table association. CLI Example: .. code-block:: bash salt myminion boto_vpc.replace_route_table_association 'rtbassoc-d8ccddba' 'rtb-1f382e7d' ''' ...
def replace_route_table_association(association_id, route_table_id, region=None, key=None, keyid=None, profile=None): ''' Replaces a route table association. CLI Example: .. code-block:: bash salt myminion boto_vpc.replace_route_table_association 'rtbassoc-d8ccddba' 'rtb-1f382e7d' ''' ...
[ "Replaces", "a", "route", "table", "association", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2263-L2282
[ "def", "replace_route_table_association", "(", "association_id", ",", "route_table_id", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "regio...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_route
Creates a route. If a nat gateway is specified, boto3 must be installed CLI Example: .. code-block:: bash salt myminion boto_vpc.create_route 'rtb-1f382e7d' '10.0.0.0/16' gateway_id='vgw-a1b2c3'
salt/modules/boto_vpc.py
def create_route(route_table_id=None, destination_cidr_block=None, route_table_name=None, gateway_id=None, internet_gateway_name=None, instance_id=None, interface_id=None, vpc_peering_connection_id=None, vpc_peering_connection_name=None, ...
def create_route(route_table_id=None, destination_cidr_block=None, route_table_name=None, gateway_id=None, internet_gateway_name=None, instance_id=None, interface_id=None, vpc_peering_connection_id=None, vpc_peering_connection_name=None, ...
[ "Creates", "a", "route", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2285-L2379
[ "def", "create_route", "(", "route_table_id", "=", "None", ",", "destination_cidr_block", "=", "None", ",", "route_table_name", "=", "None", ",", "gateway_id", "=", "None", ",", "internet_gateway_name", "=", "None", ",", "instance_id", "=", "None", ",", "interfa...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
delete_route
Deletes a route. CLI Example: .. code-block:: bash salt myminion boto_vpc.delete_route 'rtb-1f382e7d' '10.0.0.0/16'
salt/modules/boto_vpc.py
def delete_route(route_table_id=None, destination_cidr_block=None, route_table_name=None, region=None, key=None, keyid=None, profile=None): ''' Deletes a route. CLI Example: .. code-block:: bash salt myminion boto_vpc.delete_route 'rtb-1f382e7d' '10.0.0.0/16'...
def delete_route(route_table_id=None, destination_cidr_block=None, route_table_name=None, region=None, key=None, keyid=None, profile=None): ''' Deletes a route. CLI Example: .. code-block:: bash salt myminion boto_vpc.delete_route 'rtb-1f382e7d' '10.0.0.0/16'...
[ "Deletes", "a", "route", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2382-L2417
[ "def", "delete_route", "(", "route_table_id", "=", "None", ",", "destination_cidr_block", "=", "None", ",", "route_table_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
replace_route
Replaces a route. CLI Example: .. code-block:: bash salt myminion boto_vpc.replace_route 'rtb-1f382e7d' '10.0.0.0/16' gateway_id='vgw-a1b2c3'
salt/modules/boto_vpc.py
def replace_route(route_table_id=None, destination_cidr_block=None, route_table_name=None, gateway_id=None, instance_id=None, interface_id=None, region=None, key=None, keyid=None, profile=None, vpc_peering_connection_id=None): ''' Replaces ...
def replace_route(route_table_id=None, destination_cidr_block=None, route_table_name=None, gateway_id=None, instance_id=None, interface_id=None, region=None, key=None, keyid=None, profile=None, vpc_peering_connection_id=None): ''' Replaces ...
[ "Replaces", "a", "route", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2420-L2468
[ "def", "replace_route", "(", "route_table_id", "=", "None", ",", "destination_cidr_block", "=", "None", ",", "route_table_name", "=", "None", ",", "gateway_id", "=", "None", ",", "instance_id", "=", "None", ",", "interface_id", "=", "None", ",", "region", "=",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
describe_route_table
Given route table properties, return route table details if matching table(s) exist. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt myminion boto_vpc.describe_route_table route_table_id='rtb-1f382e7d'
salt/modules/boto_vpc.py
def describe_route_table(route_table_id=None, route_table_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given route table properties, return route table details if matching table(s) exist. .. versionadded:: 2015.8.0 CLI Ex...
def describe_route_table(route_table_id=None, route_table_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given route table properties, return route table details if matching table(s) exist. .. versionadded:: 2015.8.0 CLI Ex...
[ "Given", "route", "table", "properties", "return", "route", "table", "details", "if", "matching", "table", "(", "s", ")", "exist", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2471-L2529
[ "def", "describe_route_table", "(", "route_table_id", "=", "None", ",", "route_table_name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "s...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
describe_route_tables
Given route table properties, return details of all matching route tables. This function requires boto3 to be installed. .. versionadded:: 2016.11.0 CLI Example: .. code-block:: bash salt myminion boto_vpc.describe_route_tables vpc_id='vpc-a6a9efc3'
salt/modules/boto_vpc.py
def describe_route_tables(route_table_id=None, route_table_name=None, vpc_id=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given route table properties, return details of all matching route tables. This func...
def describe_route_tables(route_table_id=None, route_table_name=None, vpc_id=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given route table properties, return details of all matching route tables. This func...
[ "Given", "route", "table", "properties", "return", "details", "of", "all", "matching", "route", "tables", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2532-L2615
[ "def", "describe_route_tables", "(", "route_table_id", "=", "None", ",", "route_table_name", "=", "None", ",", "vpc_id", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_get_subnet_explicit_route_table
helper function to find subnet explicit route table associations .. versionadded:: 2016.11.0
salt/modules/boto_vpc.py
def _get_subnet_explicit_route_table(subnet_id, vpc_id, conn=None, region=None, key=None, keyid=None, profile=None): ''' helper function to find subnet explicit route table associations .. versionadded:: 2016.11.0 ''' if not conn: conn = _get_conn(region=region, key=key, keyid=keyid, profil...
def _get_subnet_explicit_route_table(subnet_id, vpc_id, conn=None, region=None, key=None, keyid=None, profile=None): ''' helper function to find subnet explicit route table associations .. versionadded:: 2016.11.0 ''' if not conn: conn = _get_conn(region=region, key=key, keyid=keyid, profil...
[ "helper", "function", "to", "find", "subnet", "explicit", "route", "table", "associations" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2694-L2708
[ "def", "_get_subnet_explicit_route_table", "(", "subnet_id", ",", "vpc_id", ",", "conn", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "if", "not", "conn", ":", "conn...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
request_vpc_peering_connection
Request a VPC peering connection between two VPCs. .. versionadded:: 2016.11.0 requester_vpc_id ID of the requesting VPC. Exclusive with requester_vpc_name. requester_vpc_name Name tag of the requesting VPC. Exclusive with requester_vpc_id. peer_vpc_id ID of the VPC to creat...
salt/modules/boto_vpc.py
def request_vpc_peering_connection(requester_vpc_id=None, requester_vpc_name=None, peer_vpc_id=None, peer_vpc_name=None, name=None, peer_owner_id=None, peer_region=None, region=None, key=None, keyid=None, profile=No...
def request_vpc_peering_connection(requester_vpc_id=None, requester_vpc_name=None, peer_vpc_id=None, peer_vpc_name=None, name=None, peer_owner_id=None, peer_region=None, region=None, key=None, keyid=None, profile=No...
[ "Request", "a", "VPC", "peering", "connection", "between", "two", "VPCs", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2711-L2826
[ "def", "request_vpc_peering_connection", "(", "requester_vpc_id", "=", "None", ",", "requester_vpc_name", "=", "None", ",", "peer_vpc_id", "=", "None", ",", "peer_vpc_name", "=", "None", ",", "name", "=", "None", ",", "peer_owner_id", "=", "None", ",", "peer_reg...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_get_peering_connection_ids
:param name: The name of the VPC peering connection. :type name: String :param conn: The boto aws ec2 connection. :return: The id associated with this peering connection Returns the VPC peering connection ids given the VPC peering connection name.
salt/modules/boto_vpc.py
def _get_peering_connection_ids(name, conn): ''' :param name: The name of the VPC peering connection. :type name: String :param conn: The boto aws ec2 connection. :return: The id associated with this peering connection Returns the VPC peering connection ids given the VPC peering connection ...
def _get_peering_connection_ids(name, conn): ''' :param name: The name of the VPC peering connection. :type name: String :param conn: The boto aws ec2 connection. :return: The id associated with this peering connection Returns the VPC peering connection ids given the VPC peering connection ...
[ ":", "param", "name", ":", "The", "name", "of", "the", "VPC", "peering", "connection", ".", ":", "type", "name", ":", "String", ":", "param", "conn", ":", "The", "boto", "aws", "ec2", "connection", ".", ":", "return", ":", "The", "id", "associated", ...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2829-L2850
[ "def", "_get_peering_connection_ids", "(", "name", ",", "conn", ")", ":", "filters", "=", "[", "{", "'Name'", ":", "'tag:Name'", ",", "'Values'", ":", "[", "name", "]", ",", "}", ",", "{", "'Name'", ":", "'status-code'", ",", "'Values'", ":", "[", "ACT...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
describe_vpc_peering_connection
Returns any VPC peering connection id(s) for the given VPC peering connection name. VPC peering connection ids are only returned for connections that are in the ``active``, ``pending-acceptance`` or ``provisioning`` state. .. versionadded:: 2016.11.0 :param name: The string name for this VPC ...
salt/modules/boto_vpc.py
def describe_vpc_peering_connection(name, region=None, key=None, keyid=None, profile=None): ''' Returns any VPC peering connection id(s) for the given VPC peering c...
def describe_vpc_peering_connection(name, region=None, key=None, keyid=None, profile=None): ''' Returns any VPC peering connection id(s) for the given VPC peering c...
[ "Returns", "any", "VPC", "peering", "connection", "id", "(", "s", ")", "for", "the", "given", "VPC", "peering", "connection", "name", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2853-L2888
[ "def", "describe_vpc_peering_connection", "(", "name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn3", "(", "region", "=", "region", ",", "key", "=", "key...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
accept_vpc_peering_connection
Request a VPC peering connection between two VPCs. .. versionadded:: 2016.11.0 :param conn_id: The ID to use. String type. :param name: The name of this VPC peering connection. String type. :param region: The AWS region to use. Type string. :param key: The key to use for this connection. Type stri...
salt/modules/boto_vpc.py
def accept_vpc_peering_connection( # pylint: disable=too-many-arguments conn_id='', name='', region=None, key=None, keyid=None, ...
def accept_vpc_peering_connection( # pylint: disable=too-many-arguments conn_id='', name='', region=None, key=None, keyid=None, ...
[ "Request", "a", "VPC", "peering", "connection", "between", "two", "VPCs", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2891-L2953
[ "def", "accept_vpc_peering_connection", "(", "# pylint: disable=too-many-arguments", "conn_id", "=", "''", ",", "name", "=", "''", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "dry_run", "=...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_vpc_peering_conn_id_for_name
Get the ID associated with this name
salt/modules/boto_vpc.py
def _vpc_peering_conn_id_for_name(name, conn): ''' Get the ID associated with this name ''' log.debug('Retrieving VPC peering connection id') ids = _get_peering_connection_ids(name, conn) if not ids: ids = [None] # Let callers handle the case where we have no id elif len(ids) > 1: ...
def _vpc_peering_conn_id_for_name(name, conn): ''' Get the ID associated with this name ''' log.debug('Retrieving VPC peering connection id') ids = _get_peering_connection_ids(name, conn) if not ids: ids = [None] # Let callers handle the case where we have no id elif len(ids) > 1: ...
[ "Get", "the", "ID", "associated", "with", "this", "name" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2956-L2972
[ "def", "_vpc_peering_conn_id_for_name", "(", "name", ",", "conn", ")", ":", "log", ".", "debug", "(", "'Retrieving VPC peering connection id'", ")", "ids", "=", "_get_peering_connection_ids", "(", "name", ",", "conn", ")", "if", "not", "ids", ":", "ids", "=", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
delete_vpc_peering_connection
Delete a VPC peering connection. .. versionadded:: 2016.11.0 conn_id The connection ID to check. Exclusive with conn_name. conn_name The connection name to check. Exclusive with conn_id. region Region to connect to. key Secret key to be used. keyid ...
salt/modules/boto_vpc.py
def delete_vpc_peering_connection(conn_id=None, conn_name=None, region=None, key=None, keyid=None, profile=None, dry_run=False): ''' Delete a VPC peering connection. .. versionadded:: 2016.11.0 conn_id The connection ID to check. Exclusive with conn_name. ...
def delete_vpc_peering_connection(conn_id=None, conn_name=None, region=None, key=None, keyid=None, profile=None, dry_run=False): ''' Delete a VPC peering connection. .. versionadded:: 2016.11.0 conn_id The connection ID to check. Exclusive with conn_name. ...
[ "Delete", "a", "VPC", "peering", "connection", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2975-L3033
[ "def", "delete_vpc_peering_connection", "(", "conn_id", "=", "None", ",", "conn_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "dry_run", "=", "False", ")", ":", "if...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
is_peering_connection_pending
Check if a VPC peering connection is in the pending state. .. versionadded:: 2016.11.0 conn_id The connection ID to check. Exclusive with conn_name. conn_name The connection name to check. Exclusive with conn_id. region Region to connect to. key Secret key to b...
salt/modules/boto_vpc.py
def is_peering_connection_pending(conn_id=None, conn_name=None, region=None, key=None, keyid=None, profile=None): ''' Check if a VPC peering connection is in the pending state. .. versionadded:: 2016.11.0 conn_id The connection ID to check. Exclusive with con...
def is_peering_connection_pending(conn_id=None, conn_name=None, region=None, key=None, keyid=None, profile=None): ''' Check if a VPC peering connection is in the pending state. .. versionadded:: 2016.11.0 conn_id The connection ID to check. Exclusive with con...
[ "Check", "if", "a", "VPC", "peering", "connection", "is", "in", "the", "pending", "state", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L3036-L3094
[ "def", "is_peering_connection_pending", "(", "conn_id", "=", "None", ",", "conn_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "if", "not", "_exactly_one", "(", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
peering_connection_pending_from_vpc
Check if a VPC peering connection is in the pending state, and requested from the given VPC. .. versionadded:: 2016.11.0 conn_id The connection ID to check. Exclusive with conn_name. conn_name The connection name to check. Exclusive with conn_id. vpc_id Is this the ID of th...
salt/modules/boto_vpc.py
def peering_connection_pending_from_vpc(conn_id=None, conn_name=None, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Check if a VPC peering connection is in the pending state, and requested from th...
def peering_connection_pending_from_vpc(conn_id=None, conn_name=None, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Check if a VPC peering connection is in the pending state, and requested from th...
[ "Check", "if", "a", "VPC", "peering", "connection", "is", "in", "the", "pending", "state", "and", "requested", "from", "the", "given", "VPC", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L3097-L3168
[ "def", "peering_connection_pending_from_vpc", "(", "conn_id", "=", "None", ",", "conn_name", "=", "None", ",", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "prof...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
cache_id
Cache, invalidate, or retrieve an AWS resource id keyed by name. .. code-block:: python __utils__['boto.cache_id']('ec2', 'myinstance', 'i-a1b2c3', profile='custom_profile')
salt/utils/botomod.py
def cache_id(service, name, sub_resource=None, resource_id=None, invalidate=False, region=None, key=None, keyid=None, profile=None): ''' Cache, invalidate, or retrieve an AWS resource id keyed by name. .. code-block:: python __utils__['boto.cache_id']('ec2', 'myinstance',...
def cache_id(service, name, sub_resource=None, resource_id=None, invalidate=False, region=None, key=None, keyid=None, profile=None): ''' Cache, invalidate, or retrieve an AWS resource id keyed by name. .. code-block:: python __utils__['boto.cache_id']('ec2', 'myinstance',...
[ "Cache", "invalidate", "or", "retrieve", "an", "AWS", "resource", "id", "keyed", "by", "name", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/botomod.py#L115-L150
[ "def", "cache_id", "(", "service", ",", "name", ",", "sub_resource", "=", "None", ",", "resource_id", "=", "None", ",", "invalidate", "=", "False", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_connection
Return a boto connection for the service. .. code-block:: python conn = __utils__['boto.get_connection']('ec2', profile='custom_profile')
salt/utils/botomod.py
def get_connection(service, module=None, region=None, key=None, keyid=None, profile=None): ''' Return a boto connection for the service. .. code-block:: python conn = __utils__['boto.get_connection']('ec2', profile='custom_profile') ''' # future lint: disable=blackliste...
def get_connection(service, module=None, region=None, key=None, keyid=None, profile=None): ''' Return a boto connection for the service. .. code-block:: python conn = __utils__['boto.get_connection']('ec2', profile='custom_profile') ''' # future lint: disable=blackliste...
[ "Return", "a", "boto", "connection", "for", "the", "service", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/botomod.py#L166-L201
[ "def", "get_connection", "(", "service", ",", "module", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "# future lint: disable=blacklisted-function", "module", "=", "str", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
exactly_n
Tests that exactly N items in an iterable are "truthy" (neither None, False, nor 0).
salt/utils/botomod.py
def exactly_n(l, n=1): ''' Tests that exactly N items in an iterable are "truthy" (neither None, False, nor 0). ''' i = iter(l) return all(any(i) for j in range(n)) and not any(i)
def exactly_n(l, n=1): ''' Tests that exactly N items in an iterable are "truthy" (neither None, False, nor 0). ''' i = iter(l) return all(any(i) for j in range(n)) and not any(i)
[ "Tests", "that", "exactly", "N", "items", "in", "an", "iterable", "are", "truthy", "(", "neither", "None", "False", "nor", "0", ")", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/botomod.py#L243-L249
[ "def", "exactly_n", "(", "l", ",", "n", "=", "1", ")", ":", "i", "=", "iter", "(", "l", ")", "return", "all", "(", "any", "(", "i", ")", "for", "j", "in", "range", "(", "n", ")", ")", "and", "not", "any", "(", "i", ")" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
train
assign_funcs
Assign _get_conn and _cache_id functions to the named module. .. code-block:: python __utils__['boto.assign_partials'](__name__, 'ec2')
salt/utils/botomod.py
def assign_funcs(modname, service, module=None, pack=None): ''' Assign _get_conn and _cache_id functions to the named module. .. code-block:: python __utils__['boto.assign_partials'](__name__, 'ec2') ''' if pack: global __salt__ # pylint: disable=W0601 __salt__ = pack ...
def assign_funcs(modname, service, module=None, pack=None): ''' Assign _get_conn and _cache_id functions to the named module. .. code-block:: python __utils__['boto.assign_partials'](__name__, 'ec2') ''' if pack: global __salt__ # pylint: disable=W0601 __salt__ = pack ...
[ "Assign", "_get_conn", "and", "_cache_id", "functions", "to", "the", "named", "module", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/botomod.py#L256-L273
[ "def", "assign_funcs", "(", "modname", ",", "service", ",", "module", "=", "None", ",", "pack", "=", "None", ")", ":", "if", "pack", ":", "global", "__salt__", "# pylint: disable=W0601", "__salt__", "=", "pack", "mod", "=", "sys", ".", "modules", "[", "m...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
match
Matches based on IP address or CIDR notation
salt/matchers/ipcidr_match.py
def match(tgt, opts=None): ''' Matches based on IP address or CIDR notation ''' if not opts: opts = __opts__ try: # Target is an address? tgt = ipaddress.ip_address(tgt) except: # pylint: disable=bare-except try: # Target is a network? tg...
def match(tgt, opts=None): ''' Matches based on IP address or CIDR notation ''' if not opts: opts = __opts__ try: # Target is an address? tgt = ipaddress.ip_address(tgt) except: # pylint: disable=bare-except try: # Target is a network? tg...
[ "Matches", "based", "on", "IP", "address", "or", "CIDR", "notation" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/matchers/ipcidr_match.py#L20-L48
[ "def", "match", "(", "tgt", ",", "opts", "=", "None", ")", ":", "if", "not", "opts", ":", "opts", "=", "__opts__", "try", ":", "# Target is an address?", "tgt", "=", "ipaddress", ".", "ip_address", "(", "tgt", ")", "except", ":", "# pylint: disable=bare-ex...
e8541fd6e744ab0df786c0f76102e41631f45d46