Code stringlengths 103 85.9k | Summary listlengths 0 94 |
|---|---|
Please provide a description of the function:def build_interface(iface, iface_type, enabled, **settings):
'''
Build an interface script for a network interface.
CLI Example:
.. code-block:: bash
salt '*' ip.build_interface eth0 eth <settings>
'''
if __grains__['os'] == 'Fedora':
... | [] |
Please provide a description of the function:def build_routes(iface, **settings):
'''
Build a route script for a network interface.
CLI Example:
.. code-block:: bash
salt '*' ip.build_routes eth0 <settings>
'''
template = 'rh6_route_eth.jinja'
try:
if int(__grains__['osre... | [] |
Please provide a description of the function:def get_bond(iface):
'''
Return the content of a bond script
CLI Example:
.. code-block:: bash
salt '*' ip.get_bond bond0
'''
path = os.path.join(_RH_NETWORK_CONF_FILES, '{0}.conf'.format(iface))
return _read_file(path) | [] |
Please provide a description of the function:def get_interface(iface):
'''
Return the contents of an interface script
CLI Example:
.. code-block:: bash
salt '*' ip.get_interface eth0
'''
path = os.path.join(_RH_NETWORK_SCRIPT_DIR, 'ifcfg-{0}'.format(iface))
return _read_file(path) | [] |
Please provide a description of the function:def get_routes(iface):
'''
Return the contents of the interface routes script.
CLI Example:
.. code-block:: bash
salt '*' ip.get_routes eth0
'''
path = os.path.join(_RH_NETWORK_SCRIPT_DIR, 'route-{0}'.format(iface))
path6 = os.path.join... | [] |
Please provide a description of the function:def apply_network_settings(**settings):
'''
Apply global network configuration.
CLI Example:
.. code-block:: bash
salt '*' ip.apply_network_settings
'''
if 'require_reboot' not in settings:
settings['require_reboot'] = False
if... | [] |
Please provide a description of the function:def build_network_settings(**settings):
'''
Build the global network script.
CLI Example:
.. code-block:: bash
salt '*' ip.build_network_settings <settings>
'''
# Read current configuration and store default values
current_network_setti... | [] |
Please provide a description of the function:def setIdleDelay(delaySeconds, **kwargs):
'''
Set the current idle delay setting in seconds
CLI Example:
.. code-block:: bash
salt '*' gnome.setIdleDelay <seconds> user=<username>
'''
_gsession = _GSettings(user=kwargs.get('user'),
... | [] |
Please provide a description of the function:def setClockFormat(clockFormat, **kwargs):
'''
Set the clock format, either 12h or 24h format.
CLI Example:
.. code-block:: bash
salt '*' gnome.setClockFormat <12h|24h> user=<username>
'''
if clockFormat != '12h' and clockFormat != '24h':
... | [] |
Please provide a description of the function:def setClockShowDate(kvalue, **kwargs):
'''
Set whether the date is visible in the clock
CLI Example:
.. code-block:: bash
salt '*' gnome.setClockShowDate <True|False> user=<username>
'''
if kvalue is not True and kvalue is not False:
... | [] |
Please provide a description of the function:def getIdleActivation(**kwargs):
'''
Get whether the idle activation is enabled
CLI Example:
.. code-block:: bash
salt '*' gnome.getIdleActivation user=<username>
'''
_gsession = _GSettings(user=kwargs.get('user'),
... | [] |
Please provide a description of the function:def get(schema=None, key=None, user=None, **kwargs):
'''
Get key in a particular GNOME schema
CLI Example:
.. code-block:: bash
salt '*' gnome.get user=<username> schema=org.gnome.desktop.screensaver key=idle-activation-enabled
'''
_gsessi... | [] |
Please provide a description of the function:def set_(schema=None, key=None, user=None, value=None, **kwargs):
'''
Set key in a particular GNOME schema
CLI Example:
.. code-block:: bash
salt '*' gnome.set user=<username> schema=org.gnome.desktop.screensaver key=idle-activation-enabled value=F... | [] |
Please provide a description of the function:def _get(self):
'''
get the value for user in gsettings
'''
user = self.USER
try:
uid = pwd.getpwnam(user).pw_uid
except KeyError:
log.info('User does not exist')
return False
cmd =... | [] |
Please provide a description of the function:def _set(self, value):
'''
set the value for user in gsettings
'''
user = self.USER
try:
uid = pwd.getpwnam(user).pw_uid
except KeyError:
log.info('User does not exist')
result = {}
... | [] |
Please provide a description of the function:def bin_pkg_info(path, saltenv='base'):
'''
.. versionadded:: 2015.8.0
Parses RPM metadata and returns a dictionary of information about the
package (name, version, etc.).
path
Path to the file. Can either be an absolute path to a file on the
... | [] |
Please provide a description of the function:def list_pkgs(*packages, **kwargs):
'''
List the packages currently installed in a dict::
{'<package_name>': '<version>'}
root
use root as top level directory (default: "/")
CLI Example:
.. code-block:: bash
salt '*' lowpkg.li... | [] |
Please provide a description of the function:def verify(*packages, **kwargs):
'''
Runs an rpm -Va on a system, and returns the results in a dict
root
use root as top level directory (default: "/")
Files with an attribute of config, doc, ghost, license or readme in the
package header can be... | [] |
Please provide a description of the function:def modified(*packages, **flags):
'''
List the modified files that belong to a package. Not specifying any packages
will return a list of _all_ modified files on the system's RPM database.
.. versionadded:: 2015.5.0
root
use root as top level di... | [] |
Please provide a description of the function:def file_list(*packages, **kwargs):
'''
List the files that belong to a package. Not specifying any packages will
return a list of _every_ file on the system's rpm database (not generally
recommended).
root
use root as top level directory (defaul... | [] |
Please provide a description of the function:def file_dict(*packages, **kwargs):
'''
List the files that belong to a package, sorted by group. Not specifying
any packages will return a list of _every_ file on the system's rpm
database (not generally recommended).
root
use root as top level ... | [] |
Please provide a description of the function:def owner(*paths, **kwargs):
'''
Return the name of the package that owns the file. Multiple file paths can
be passed. If a single path is passed, a string will be returned,
and if multiple paths are passed, a dictionary of file/package name pairs
will be... | [] |
Please provide a description of the function:def diff(package_path, path):
'''
Return a formatted diff between current file and original in a package.
NOTE: this function includes all files (configuration and not), but does
not work on binary content.
:param package: Full pack of the RPM file
:... | [] |
Please provide a description of the function:def info(*packages, **kwargs):
'''
Return a detailed package(s) summary information.
If no packages specified, all packages will be returned.
:param packages:
:param attr:
Comma-separated package attributes. If no 'attr' is specified, all availa... | [] |
Please provide a description of the function:def version_cmp(ver1, ver2, ignore_epoch=False):
'''
.. versionadded:: 2015.8.9
Do a cmp-style comparison on two packages. Return -1 if ver1 < ver2, 0 if
ver1 == ver2, and 1 if ver1 > ver2. Return None if there was a problem
making the comparison.
i... | [] |
Please provide a description of the function:def checksum(*paths, **kwargs):
'''
Return if the signature of a RPM file is valid.
root
use root as top level directory (default: "/")
CLI Example:
.. code-block:: bash
salt '*' lowpkg.checksum /path/to/package1.rpm
salt '*' l... | [] |
Please provide a description of the function:def _get_conn(socket=DEFAULT_SOCKET_URL):
'''
Get connection to haproxy socket.
'''
assert os.path.exists(socket), '{0} does not exist.'.format(socket)
issock = os.stat(socket).st_mode
assert stat.S_ISSOCK(issock), '{0} is not a socket.'.format(socket... | [] |
Please provide a description of the function:def list_servers(backend, socket=DEFAULT_SOCKET_URL, objectify=False):
'''
List servers in haproxy backend.
backend
haproxy backend
socket
haproxy stats socket, default ``/var/run/haproxy.sock``
CLI Example:
.. code-block:: bash
... | [] |
Please provide a description of the function:def enable_server(name, backend, socket=DEFAULT_SOCKET_URL):
'''
Enable Server in haproxy
name
Server to enable
backend
haproxy backend, or all backends if "*" is supplied
socket
haproxy stats socket, default ``/var/run/haproxy.... | [] |
Please provide a description of the function:def get_weight(name, backend, socket=DEFAULT_SOCKET_URL):
'''
Get server weight
name
Server name
backend
haproxy backend
socket
haproxy stats socket, default ``/var/run/haproxy.sock``
CLI Example:
.. code-block:: bash
... | [] |
Please provide a description of the function:def set_state(name, backend, state, socket=DEFAULT_SOCKET_URL):
'''
Force a server's administrative state to a new state. This can be useful to
disable load balancing and/or any traffic to a server. Setting the state to
"ready" puts the server in normal mode,... | [
"Set server state command."
] |
Please provide a description of the function:def show_frontends(socket=DEFAULT_SOCKET_URL):
'''
Show HaProxy frontends
socket
haproxy stats socket, default ``/var/run/haproxy.sock``
CLI Example:
.. code-block:: bash
salt '*' haproxy.show_frontends
'''
ha_conn = _get_conn(... | [] |
Please provide a description of the function:def show_backends(socket=DEFAULT_SOCKET_URL):
'''
Show HaProxy Backends
socket
haproxy stats socket, default ``/var/run/haproxy.sock``
CLI Example:
.. code-block:: bash
salt '*' haproxy.show_backends
'''
ha_conn = _get_conn(soc... | [] |
Please provide a description of the function:def get_sessions(name, backend, socket=DEFAULT_SOCKET_URL):
'''
.. versionadded:: 2016.11.0
Get number of current sessions on server in backend (scur)
name
Server name
backend
haproxy backend
socket
haproxy stats socket, de... | [] |
Please provide a description of the function:def present(name,
save=False,
**kwargs):
'''
Ensure beacon is configured with the included beacon data.
Args:
name (str):
The name of the beacon ensure is configured.
save (bool):
``True`` updates... | [] |
Please provide a description of the function:def _connect(**kwargs):
'''
Initialise netscaler connection
'''
connargs = dict()
# Shamelessy ripped from the mysql module
def __connarg(name, key=None, default=None):
'''
Add key to connargs, only if name exists in our kwargs or as
... | [] |
Please provide a description of the function:def _servicegroup_get(sg_name, **connection_args):
'''
Return a service group ressource or None
'''
nitro = _connect(**connection_args)
if nitro is None:
return None
sg = NSServiceGroup()
sg.set_servicegroupname(sg_name)
try:
s... | [] |
Please provide a description of the function:def _servicegroup_get_servers(sg_name, **connection_args):
'''
Returns a list of members of a servicegroup or None
'''
nitro = _connect(**connection_args)
if nitro is None:
return None
sg = NSServiceGroup()
sg.set_servicegroupname(sg_name)... | [] |
Please provide a description of the function:def _servicegroup_get_server(sg_name, s_name, s_port=None, **connection_args):
'''
Returns a member of a service group or None
'''
ret = None
servers = _servicegroup_get_servers(sg_name, **connection_args)
if servers is None:
return None
f... | [] |
Please provide a description of the function:def servicegroup_exists(sg_name, sg_type=None, **connection_args):
'''
Checks if a service group exists
CLI Example:
.. code-block:: bash
salt '*' netscaler.servicegroup_exists 'serviceGroupName'
'''
sg = _servicegroup_get(sg_name, **connec... | [] |
Please provide a description of the function:def servicegroup_add(sg_name, sg_type='HTTP', **connection_args):
'''
Add a new service group
If no service type is specified, HTTP will be used.
Most common service types: HTTP, SSL, and SSL_BRIDGE
CLI Example:
.. code-block:: bash
salt '*... | [] |
Please provide a description of the function:def servicegroup_delete(sg_name, **connection_args):
'''
Delete a new service group
CLI Example:
.. code-block:: bash
salt '*' netscaler.servicegroup_delete 'serviceGroupName'
'''
ret = True
sg = _servicegroup_get(sg_name, **connection_... | [] |
Please provide a description of the function:def servicegroup_server_exists(sg_name, s_name, s_port=None, **connection_args):
'''
Check if a server:port combination is a member of a servicegroup
CLI Example:
.. code-block:: bash
salt '*' netscaler.servicegroup_server_exists 'serviceGroupName'... | [] |
Please provide a description of the function:def servicegroup_server_up(sg_name, s_name, s_port, **connection_args):
'''
Check if a server:port combination is in state UP in a servicegroup
CLI Example:
.. code-block:: bash
salt '*' netscaler.servicegroup_server_up 'serviceGroupName' 'serverNa... | [] |
Please provide a description of the function:def servicegroup_server_enable(sg_name, s_name, s_port, **connection_args):
'''
Enable a server:port member of a servicegroup
CLI Example:
.. code-block:: bash
salt '*' netscaler.servicegroup_server_enable 'serviceGroupName' 'serverName' 'serverPor... | [] |
Please provide a description of the function:def servicegroup_server_add(sg_name, s_name, s_port, **connection_args):
'''
Add a server:port member to a servicegroup
CLI Example:
.. code-block:: bash
salt '*' netscaler.servicegroup_server_add 'serviceGroupName' 'serverName' 'serverPort'
''... | [] |
Please provide a description of the function:def _service_get(s_name, **connection_args):
'''
Returns a service ressource or None
'''
nitro = _connect(**connection_args)
if nitro is None:
return None
service = NSService()
service.set_name(s_name)
try:
service = NSService.... | [] |
Please provide a description of the function:def service_up(s_name, **connection_args):
'''
Checks if a service is UP
CLI Example:
.. code-block:: bash
salt '*' netscaler.service_up 'serviceName'
'''
service = _service_get(s_name, **connection_args)
return service is not None and ... | [] |
Please provide a description of the function:def service_enable(s_name, **connection_args):
'''
Enable a service
CLI Example:
.. code-block:: bash
salt '*' netscaler.service_enable 'serviceName'
'''
ret = True
service = _service_get(s_name, **connection_args)
if service is No... | [] |
Please provide a description of the function:def service_disable(s_name, s_delay=None, **connection_args):
'''
Disable a service
CLI Example:
.. code-block:: bash
salt '*' netscaler.service_disable 'serviceName'
salt '*' netscaler.service_disable 'serviceName' 'delayInSeconds'
'''... | [] |
Please provide a description of the function:def server_exists(s_name, ip=None, s_state=None, **connection_args):
'''
Checks if a server exists
CLI Example:
.. code-block:: bash
salt '*' netscaler.server_exists 'serverName'
'''
server = _server_get(s_name, **connection_args)
if se... | [] |
Please provide a description of the function:def server_add(s_name, s_ip, s_state=None, **connection_args):
'''
Add a server
Note: The default server state is ENABLED
CLI Example:
.. code-block:: bash
salt '*' netscaler.server_add 'serverName' 'serverIpAddress'
salt '*' netscaler.... | [] |
Please provide a description of the function:def server_delete(s_name, **connection_args):
'''
Delete a server
CLI Example:
.. code-block:: bash
salt '*' netscaler.server_delete 'serverName'
'''
ret = True
server = _server_get(s_name, **connection_args)
if server is None:
... | [] |
Please provide a description of the function:def server_update(s_name, s_ip, **connection_args):
'''
Update a server's attributes
CLI Example:
.. code-block:: bash
salt '*' netscaler.server_update 'serverName' 'serverIP'
'''
altered = False
cur_server = _server_get(s_name, **connect... | [] |
Please provide a description of the function:def server_enabled(s_name, **connection_args):
'''
Check if a server is enabled globally
CLI Example:
.. code-block:: bash
salt '*' netscaler.server_enabled 'serverName'
'''
server = _server_get(s_name, **connection_args)
return server ... | [] |
Please provide a description of the function:def server_enable(s_name, **connection_args):
'''
Enables a server globally
CLI Example:
.. code-block:: bash
salt '*' netscaler.server_enable 'serverName'
'''
ret = True
server = _server_get(s_name, **connection_args)
if server is ... | [] |
Please provide a description of the function:def vserver_exists(v_name, v_ip=None, v_port=None, v_type=None, **connection_args):
'''
Checks if a vserver exists
CLI Example:
.. code-block:: bash
salt '*' netscaler.vserver_exists 'vserverName'
'''
vserver = _vserver_get(v_name, **connec... | [] |
Please provide a description of the function:def vserver_add(v_name, v_ip, v_port, v_type, **connection_args):
'''
Add a new lb vserver
CLI Example:
.. code-block:: bash
salt '*' netscaler.vserver_add 'vserverName' 'vserverIP' 'vserverPort' 'vserverType'
salt '*' netscaler.vserver_add... | [] |
Please provide a description of the function:def vserver_delete(v_name, **connection_args):
'''
Delete a lb vserver
CLI Example:
.. code-block:: bash
salt '*' netscaler.vserver_delete 'vserverName'
'''
ret = True
vserver = _vserver_get(v_name, **connection_args)
if vserver is ... | [] |
Please provide a description of the function:def vserver_servicegroup_add(v_name, sg_name, **connection_args):
'''
Bind a servicegroup to a vserver
CLI Example:
.. code-block:: bash
salt '*' netscaler.vserver_servicegroup_add 'vserverName' 'serviceGroupName'
'''
ret = True
if vser... | [] |
Please provide a description of the function:def vserver_sslcert_add(v_name, sc_name, **connection_args):
'''
Binds a SSL certificate to a vserver
CLI Example:
.. code-block:: bash
salt '*' netscaler.vserver_sslcert_add 'vserverName' 'sslCertificateName'
'''
ret = True
if vserver_... | [] |
Please provide a description of the function:def list_zones(profile):
'''
List zones for the given profile
:param profile: The profile key
:type profile: ``str``
CLI Example:
.. code-block:: bash
salt myminion libcloud_dns.list_zones profile1
'''
conn = _get_driver(profile=p... | [] |
Please provide a description of the function:def list_records(zone_id, profile, type=None):
'''
List records for the given zone_id on the given profile
:param zone_id: Zone to export.
:type zone_id: ``str``
:param profile: The profile key
:type profile: ``str``
:param type: The record t... | [] |
Please provide a description of the function:def get_zone(zone_id, profile):
'''
Get zone information for the given zone_id on the given profile
:param zone_id: Zone to export.
:type zone_id: ``str``
:param profile: The profile key
:type profile: ``str``
CLI Example:
.. code-block:... | [] |
Please provide a description of the function:def get_record(zone_id, record_id, profile):
'''
Get record information for the given zone_id on the given profile
:param zone_id: Zone to export.
:type zone_id: ``str``
:param record_id: Record to delete.
:type record_id: ``str``
:param prof... | [] |
Please provide a description of the function:def create_zone(domain, profile, type='master', ttl=None):
'''
Create a new zone.
:param domain: Zone domain name (e.g. example.com)
:type domain: ``str``
:param profile: The profile key
:type profile: ``str``
:param type: Zone type (master / ... | [] |
Please provide a description of the function:def update_zone(zone_id, domain, profile, type='master', ttl=None):
'''
Update an existing zone.
:param zone_id: Zone ID to update.
:type zone_id: ``str``
:param domain: Zone domain name (e.g. example.com)
:type domain: ``str``
:param profile... | [] |
Please provide a description of the function:def create_record(name, zone_id, type, data, profile):
'''
Create a new record.
:param name: Record name without the domain name (e.g. www).
Note: If you want to create a record for a base domain
name, you should specify empty s... | [] |
Please provide a description of the function:def delete_zone(zone_id, profile):
'''
Delete a zone.
:param zone_id: Zone to delete.
:type zone_id: ``str``
:param profile: The profile key
:type profile: ``str``
:rtype: ``bool``
CLI Example:
.. code-block:: bash
salt mym... | [] |
Please provide a description of the function:def delete_record(zone_id, record_id, profile):
'''
Delete a record.
:param zone_id: Zone to delete.
:type zone_id: ``str``
:param record_id: Record to delete.
:type record_id: ``str``
:param profile: The profile key
:type profile: ``str... | [] |
Please provide a description of the function:def get_bind_data(zone_id, profile):
'''
Export Zone to the BIND compatible format.
:param zone_id: Zone to export.
:type zone_id: ``str``
:param profile: The profile key
:type profile: ``str``
:return: Zone data in BIND compatible format.
... | [] |
Please provide a description of the function:def extra(method, profile, **libcloud_kwargs):
'''
Call an extended method on the driver
:param method: Driver's method name
:type method: ``str``
:param profile: The profile key
:type profile: ``str``
:param libcloud_kwargs: Extra arguments ... | [] |
Please provide a description of the function:def _string_to_record_type(string):
'''
Return a string representation of a DNS record type to a
libcloud RecordType ENUM.
:param string: A record type, e.g. A, TXT, NS
:type string: ``str``
:rtype: :class:`RecordType`
'''
string = string.u... | [] |
Please provide a description of the function:def _query(event=None,
method='GET',
args=None,
header_dict=None,
data=None):
'''
Make a web call to IFTTT.
'''
secret_key = __salt__['config.get']('ifttt.secret_key') or \
__salt__['config.get']('ifttt:secr... | [] |
Please provide a description of the function:def trigger_event(event=None, **kwargs):
'''
Trigger a configured event in IFTTT.
:param event: The name of the event to trigger.
:return: A dictionary with status, text, and error if result was failure.
'''
res = {'result': False, 'messag... | [] |
Please provide a description of the function:def init(opts):
'''
Opens the connection with the network device.
'''
NETWORK_DEVICE.update(salt.utils.napalm.get_device(opts))
DETAILS['initialized'] = True
return True | [] |
Please provide a description of the function:def alive(opts):
'''
Return the connection status with the remote device.
.. versionadded:: 2017.7.0
'''
if salt.utils.napalm.not_always_alive(opts):
return True # don't force reconnection for not-always alive proxies
# or regular minion... | [] |
Please provide a description of the function:def shutdown(opts):
'''
Closes connection with the device.
'''
try:
if not NETWORK_DEVICE.get('UP', False):
raise Exception('not connected!')
NETWORK_DEVICE.get('DRIVER').close()
except Exception as error:
port = NETWOR... | [] |
Please provide a description of the function:def call(method, *args, **kwargs):
'''
Calls a specific method from the network driver instance.
Please check the readthedocs_ page for the updated list of getters.
.. _readthedocs: http://napalm.readthedocs.org/en/latest/support/index.html#getters-support-m... | [] |
Please provide a description of the function:def info():
'''
Return information about the license, if the license is not
correctly activated this will return None.
CLI Example:
.. code-block:: bash
salt '*' license.info
'''
cmd = r'cscript C:\Windows\System32\slmgr.vbs /dli'
o... | [] |
Please provide a description of the function:def present(name, api_name, swagger_file, stage_name, api_key_required,
lambda_integration_role, lambda_region=None, stage_variables=None,
region=None, key=None, keyid=None, profile=None,
lambda_funcname_format='{stage}_{api}_{resource}_{m... | [] |
Please provide a description of the function:def _get_stage_variables(stage_variables):
'''
Helper function to retrieve stage variables from pillars/options, if the
input is a string
'''
ret = dict()
if stage_variables is None:
return ret
if isinstance(stage_variables, six.string_ty... | [] |
Please provide a description of the function:def absent(name, api_name, stage_name, nuke_api=False, region=None, key=None, keyid=None, profile=None):
'''
Ensure the stage_name associated with the given api_name deployed by boto_apigateway's
present state is removed. If the currently associated deployment t... | [] |
Please provide a description of the function:def _gen_md5_filehash(fname, *args):
'''
helper function to generate a md5 hash of the swagger definition file
any extra argument passed to the function is converted to a string
and participates in the hash calculation
'''
_hash = hashlib.md5()
wi... | [] |
Please provide a description of the function:def _dict_to_json_pretty(d, sort_keys=True):
'''
helper function to generate pretty printed json output
'''
return salt.utils.json.dumps(d, indent=4, separators=(',', ': '), sort_keys=sort_keys) | [] |
Please provide a description of the function:def _name_matches(name, matches):
'''
Helper function to see if given name has any of the patterns in given matches
'''
for m in matches:
if name.endswith(m):
return True
if name.lower().endswith('_' + m.lower()):
retur... | [] |
Please provide a description of the function:def _object_reducer(o, names=('id', 'name', 'path', 'httpMethod',
'statusCode', 'Created', 'Deleted',
'Updated', 'Flushed', 'Associated', 'Disassociated')):
'''
Helper function to reduce the amount of inform... | [] |
Please provide a description of the function:def _log_changes(ret, changekey, changevalue):
'''
For logging create/update/delete operations to AWS ApiGateway
'''
cl = ret['changes'].get('new', [])
cl.append({changekey: _object_reducer(changevalue)})
ret['changes']['new'] = cl
return ret | [] |
Please provide a description of the function:def _log_error_and_abort(ret, obj):
'''
helper function to update errors in the return structure
'''
ret['result'] = False
ret['abort'] = True
if 'error' in obj:
ret['comment'] = '{0}'.format(obj.get('error'))
return ret | [] |
Please provide a description of the function:def usage_plan_present(name, plan_name, description=None, throttle=None, quota=None, region=None, key=None, keyid=None,
profile=None):
'''
Ensure the spcifieda usage plan with the corresponding metrics is deployed
.. versionadded:: 2017.7.... | [] |
Please provide a description of the function:def usage_plan_absent(name, plan_name, region=None, key=None, keyid=None, profile=None):
'''
Ensures usage plan identified by name is no longer present
.. versionadded:: 2017.7.0
name
name of the state
plan_name
name of the plan to remo... | [] |
Please provide a description of the function:def usage_plan_association_present(name, plan_name, api_stages, region=None, key=None, keyid=None, profile=None):
'''
Ensures usage plan identified by name is added to provided api_stages
.. versionadded:: 2017.7.0
name
name of the state
plan_n... | [] |
Please provide a description of the function:def _validate_error_response_model(self, paths, mods):
'''
Helper function to help validate the convention established in the swagger file on how
to handle response code mapping/integration
'''
for path, ops in paths:
for o... | [] |
Please provide a description of the function:def _validate_lambda_funcname_format(self):
'''
Checks if the lambda function name format contains only known elements
:return: True on success, ValueError raised on error
'''
try:
if self._lambda_funcname_format:
... | [] |
Please provide a description of the function:def _validate_swagger_file(self):
'''
High level check/validation of the input swagger file based on
https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md
This is not a full schema compliance check, but rather make sure that... | [] |
Please provide a description of the function:def models(self):
'''
generator to return the tuple of model and its schema to create on aws.
'''
model_dict = self._build_all_dependencies()
while True:
model = self._get_model_without_dependencies(model_dict)
... | [] |
Please provide a description of the function:def paths(self):
'''
returns an iterator for the relative resource paths specified in the swagger file
'''
paths = self._cfg.get('paths')
if not paths:
raise ValueError('Paths Object has no values, You need to define them i... | [] |
Please provide a description of the function:def deployment_label(self):
'''
this property returns the deployment label dictionary (mainly used by
stage description)
'''
label = dict()
label['swagger_info_object'] = self.info
label['api_name'] = self.rest_api_nam... | [] |
Please provide a description of the function:def _one_or_more_stages_remain(self, deploymentId):
'''
Helper function to find whether there are other stages still associated with a deployment
'''
stages = __salt__['boto_apigateway.describe_api_stages'](restApiId=self.restApiId,
... | [] |
Please provide a description of the function:def no_more_deployments_remain(self):
'''
Helper function to find whether there are deployments left with stages associated
'''
no_more_deployments = True
deployments = __salt__['boto_apigateway.describe_api_deployments'](restApiId=sel... | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.