code
stringlengths
114
1.05M
path
stringlengths
3
312
quality_prob
float64
0.5
0.99
learning_prob
float64
0.2
1
filename
stringlengths
3
168
kind
stringclasses
1 value
import logging class Logger(object): """ A wrapped logger class that allows us to implement a singleton. """ class __Logger: """ Class that enables singleton behaviour """ def __init__(self, logger_name): """ Initialise singleton ...
/salt-shaker-1.0.4.tar.gz/salt-shaker-1.0.4/shaker/libs/logger.py
0.887717
0.211478
logger.py
pypi
import shaker.libs.logger import paramiko import pygit2 class Pygit2SSHUnsupportedError(Exception): pass class Pygit2KepairFromAgentUnsupportedError(Exception): pass class Pygit2SSHAgentMissingKeysError(Exception): pass link_installation = "http://www.pygit2.org/install.html" error_message_ssh_suppo...
/salt-shaker-1.0.4.tar.gz/salt-shaker-1.0.4/shaker/libs/pygit2_utils.py
0.492188
0.16944
pygit2_utils.py
pypi
# Salt Integration Testing (SIT) [![Build Status](https://travis-ci.org/dandb/salt-integration-testing.svg)](https://travis-ci.org/dandb/salt-integration-testing) [![Coverage Status](https://coveralls.io/repos/dandb/salt-integration-testing/badge.svg?branch=master&service=github)](https://coveralls.io/github/dandb/salt...
/salt-sit-0.0.3.tar.gz/salt-sit-0.0.3/README.md
0.866104
0.911456
README.md
pypi
# Import Python libs from __future__ import absolute_import, print_function, unicode_literals import copy import json import logging # Import Salt libs from salt.roster import get_roster_file try: from salt.utils.path import which as utils_which from salt.utils.stringutils import to_str as utils_to_str except...
/salt-sproxy-2023.8.0.tar.gz/salt-sproxy-2023.8.0/salt_sproxy/_roster/ansible.py
0.64131
0.164819
ansible.py
pypi
# Contributor Covenant Code of Conduct ## Our Pledge We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of...
/salt-ssh-9000.tar.gz/salt-ssh-9000/CODE_OF_CONDUCT.md
0.577495
0.685755
CODE_OF_CONDUCT.md
pypi
.. _glossary: ======== Glossary ======== .. glossary:: Auto-Order The evaluation of states in the order that they are defined in a SLS file. *See also*: :ref:`ordering <ordering_auto_order>`. Bootstrap A stand-alone Salt project which can download and install a Salt master an...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/glossary.rst
0.930561
0.730972
glossary.rst
pypi
=============================== SLS Template Variable Reference =============================== .. warning:: In the 3005 release ``sls_path``, ``tplfile``, and ``tpldir`` have had some significant improvements which have the potential to break states that rely on old and broken functionality. The template ...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/ref/states/vars.rst
0.814422
0.690331
vars.rst
pypi
.. _compiler-ordering: ===================================== Understanding State Compiler Ordering ===================================== .. note:: This tutorial is an intermediate level tutorial. Some basic understanding of the state system and writing Salt Formulas is assumed. Salt's state system is built ...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/ref/states/compiler_ordering.rst
0.904661
0.669924
compiler_ordering.rst
pypi
.. _state-system-reference: ====================== State System Reference ====================== Salt offers an interface to manage the configuration or "state" of the Salt minions. This interface is a fully capable mechanism used to enforce the state of systems from a central manager. .. toctree:: :glob: ...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/ref/states/index.rst
0.778144
0.878419
index.rst
pypi
.. _requisites: =========================================== Requisites and Other Global State Arguments =========================================== Requisites ========== The Salt requisite system is used to create relationships between states. This provides a method to easily define inter-dependencies between states...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/ref/states/requisites.rst
0.882731
0.739422
requisites.rst
pypi
.. _ordering: =============== Ordering States =============== The way in which configuration management systems are executed is a hotly debated topic in the configuration management world. Two major philosophies exist on the subject, to either execute in an imperative fashion where things are executed in the order in...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/ref/states/ordering.rst
0.924308
0.763726
ordering.rst
pypi
.. _file-server: ================ Salt File Server ================ Salt comes with a simple file server suitable for distributing files to the Salt minions. The file server is a stateless ZeroMQ server that is built into the Salt master. The main intent of the Salt file server is to present files for use in the Sal...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/ref/file_server/index.rst
0.840652
0.785391
index.rst
pypi
.. _delta-proxy-information: .. _delta-proxy-intro: =================== Delta proxy minions =================== Welcome to the delta proxy minion installation guide. This installation guide explains the process for installing and using delta proxy minion which is available beginning in version 3004. This guide is i...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/ref/configuration/delta_proxy.rst
0.943034
0.726717
delta_proxy.rst
pypi
import re from docutils import nodes from docutils.parsers.rst.roles import set_classes from pygments.lexer import RegexLexer, bygroups from pygments.lexers import get_lexer_by_name from pygments.token import Keyword, Literal, Name, Number, Operator, Text from pygments.util import ClassNotFound from sphinx import addn...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/_ext/httpdomain.py
0.732687
0.205475
httpdomain.py
pypi
.. _salt-system-architecture: ======================== Salt system architecture ======================== Overview ======== This page provides a high-level overview of the Salt system architecture and its different components. What is Salt? ============= Salt is a Python-based open-source remote execution framework ...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/salt_system_architecture.rst
0.923178
0.824533
salt_system_architecture.rst
pypi
.. _release-2015-5-0: ============================================== Salt 2015.5.0 Release Notes - Codename Lithium ============================================== The 2015.5.0 feature release of Salt is focused on hardening Salt and mostly on improving existing systems. A few major additions are present, primarily th...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/releases/2015.5.0.rst
0.794982
0.764935
2015.5.0.rst
pypi
=========================== Salt 2016.3.5 Release Notes =========================== Version 2016.3.5 is a bugfix release for :ref:`2016.3.0 <release-2016-3-0>`. Statistics ========== - Total Merges: **190** - Total Issue References: **112** - Total PR References: **281** - Contributors: **74** (`Ch3LL`_, `DmitryKu...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/releases/2016.3.5.rst
0.824533
0.675711
2016.3.5.rst
pypi
======================== Salt 0.9.8 Release Notes ======================== :release: 2012-03-21 Salt 0.9.8 is a big step forward, with many additions and enhancements, as well as a number of precursors to advanced future developments. This version of Salt adds much more power to the command line, making the old hard...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/releases/0.9.8.rst
0.715325
0.705252
0.9.8.rst
pypi
======================== Salt 0.9.5 Release Notes ======================== :release: 2012-01-15 Salt 0.9.5 is one of the largest steps forward in the development of Salt. 0.9.5 comes with many milestones, this release has seen the community of developers grow out to an international team of 46 code contributors and ...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/releases/0.9.5.rst
0.829216
0.770896
0.9.5.rst
pypi
========================= Salt 0.11.0 Release Notes ========================= :release: 2012-12-14 Salt 0.11.0 is here, with some highly sought after and exciting features. These features include the new overstate system, the reactor system, a new state run scope component called __context__, the beginning of the sea...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/releases/0.11.0.rst
0.705988
0.656183
0.11.0.rst
pypi
========================= Salt 0.15.0 Release Notes ========================= :release: 2013-05-03 The many new features of Salt 0.15.0 have arrived! Salt 0.15.0 comes with many smaller features and a few larger ones. These features range from better debugging tools to the new Salt Mine system. Major Features =====...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/releases/0.15.0.rst
0.720958
0.736874
0.15.0.rst
pypi
======================== Salt 0.9.7 Release Notes ======================== :release: 2012-02-15 Salt 0.9.7 is here! The latest iteration of Salt brings more features and many fixes. This release is a great refinement over 0.9.6, adding many conveniences under the hood, as well as some features that make working with ...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/releases/0.9.7.rst
0.729038
0.907885
0.9.7.rst
pypi
.. _release-0-17-0: ========================= Salt 0.17.0 Release Notes ========================= :release: 2013-09-26 The 0.17.0 release is a very exciting release of Salt, this brings to Salt some very powerful new features and advances. The advances range from the state system to the test suite, covering new tran...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/releases/0.17.0.rst
0.745954
0.713478
0.17.0.rst
pypi
.. _release-3005: ============================================= Salt 3005 release notes - Codename Phosphorus ============================================= Python 3.5 and 3.6 deprecation ------------------------------ This will be the last release we will support Python versions 3.5 and 3.6. In Salt release 3006, w...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/releases/3005.rst
0.746046
0.785884
3005.rst
pypi
.. _beacons: ======= Beacons ======= Beacons let you use the Salt event system to monitor non-Salt processes. The beacon system allows the minion to hook into a variety of system processes and continually monitor these processes. When monitored activity occurs in a system process, an event is sent on the Salt event b...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/beacons/index.rst
0.608361
0.694526
index.rst
pypi
.. _pillar: ================================= Storing Static Data in the Pillar ================================= Pillar is an interface for Salt designed to offer global values that can be distributed to minions. Pillar data is managed in a similar way as the Salt State Tree. Pillar was added to Salt in version 0.9...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/pillar/index.rst
0.892545
0.750324
index.rst
pypi
.. _external-job-cache: ========================================= Storing Job Results in an External System ========================================= After a job executes, job results are returned to the Salt Master by each Salt Minion. These results are stored in the :ref:`Default Job Cache <default_job_cache>`. In...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/jobs/external_cache.rst
0.886445
0.696894
external_cache.rst
pypi
.. _spm-development: ===================== SPM Development Guide ===================== This document discusses developing additional code for SPM. SPM-Specific Loader Modules =========================== SPM was designed to behave like traditional package managers, which apply files to the filesystem and store packag...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/spm/dev.rst
0.833833
0.855248
dev.rst
pypi
.. _spm-formula: ============ FORMULA File ============ In addition to the formula itself, a ``FORMULA`` file must exist which describes the package. An example of this file is: .. code-block:: yaml name: apache os: RedHat, Debian, Ubuntu, SUSE, FreeBSD os_family: RedHat, Debian, Suse, FreeBSD versi...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/spm/spm_formula.rst
0.759761
0.802285
spm_formula.rst
pypi
.. _pull_requests: Pull Requests ============= Salt is a large software project with many developers working together. We encourage all Salt users to contribute new features, bug fixes and documentation fixes. For those who haven't contributed to a large software project before we encourage you to consider the follow...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/development/pull_requests.rst
0.604632
0.740937
pull_requests.rst
pypi
================================ Using the Salt Modules for Cloud ================================ In addition to the ``salt-cloud`` command, Salt Cloud can be called from Salt, in a variety of different ways. Most users will be interested in either the execution module or the state module, but it is also possible to ...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/cloud/salt.rst
0.903784
0.686817
salt.rst
pypi
.. _salt-cloud-feature-matrix: ============== Feature Matrix ============== A number of features are available in most cloud hosts, but not all are available everywhere. This may be because the feature isn't supported by the cloud host itself, or it may only be that the feature has not yet been added to Salt Cloud. I...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/cloud/features.rst
0.782953
0.668322
features.rst
pypi
.. _grains: ====== Grains ====== Salt comes with an interface to derive information about the underlying system. This is called the grains interface, because it presents salt with grains of information. Grains are collected for the operating system, domain name, IP address, kernel, OS type, memory, and many other sys...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/grains/index.rst
0.900645
0.697297
index.rst
pypi
.. _syndic: =========== Salt Syndic =========== The most basic or typical Salt topology consists of a single Master node controlling a group of Minion nodes. An intermediate node type, called Syndic, when used offers greater structural flexibility and scalability in the construction of Salt topologies than topologie...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/topology/syndic.rst
0.801042
0.800731
syndic.rst
pypi
.. _tutorial-macos-walk-through: ====================================================================== The macOS (Maverick) Developer Step By Step Guide To Salt Installation ====================================================================== This document provides a step-by-step guide to installing a Salt cluster...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/tutorials/walkthrough_macosx.rst
0.818737
0.660258
walkthrough_macosx.rst
pypi
.. _tutorial-salt-at-scale: =================== Using Salt at scale =================== The focus of this tutorial will be building a Salt infrastructure for handling large numbers of minions. This will include tuning, topology, and best practices. For how to install the Salt Master, see the `Salt install guide <htt...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/tutorials/intro_scale.rst
0.890559
0.790732
intro_scale.rst
pypi
.. _pillar-walk-through: ================== Pillar Walkthrough ================== .. note:: This walkthrough assumes that the reader has already completed the initial Salt :ref:`walkthrough <tutorial-salt-walk-through>`. Pillars are tree-like structures of data defined on the Salt Master and passed through ...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/tutorials/pillar.rst
0.894176
0.663492
pillar.rst
pypi
.. _starting-states: ========================= How Do I Use Salt States? ========================= Simplicity, Simplicity, Simplicity Many of the most powerful and useful engineering solutions are founded on simple principles. Salt States strive to do just that: K.I.S.S. (Keep It Stupidly Simple) The core of the Sa...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/tutorials/starting_states.rst
0.880065
0.752468
starting_states.rst
pypi
.. _tutorial-multi-master: ===================== Multi Master Tutorial ===================== As of Salt 0.16.0, the ability to connect minions to multiple masters has been made available. The multi-master system allows for redundancy of Salt masters and facilitates multiple points of communication out to minions. Whe...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/tutorials/multimaster.rst
0.72526
0.906073
multimaster.rst
pypi
.. _tutorial-multi-master-pki: ======================================= Multi-Master-PKI Tutorial With Failover ======================================= This tutorial will explain, how to run a salt-environment where a single minion can have multiple masters and fail-over between them if its current master fails. The ...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/tutorials/multimaster_pki.rst
0.740737
0.779154
multimaster_pki.rst
pypi
.. _tutorial-states-part-2: ========================================================= States tutorial, part 2 - More Complex States, Requisites ========================================================= .. note:: This tutorial builds on topics covered in :ref:`part 1 <states-tutorial>`. It is recommended that...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/tutorials/states_pt2.rst
0.897412
0.729158
states_pt2.rst
pypi
.. _tutorial-http: HTTP Modules ============ This tutorial demonstrates using the various HTTP modules available in Salt. These modules wrap the Python ``tornado``, ``urllib2``, and ``requests`` libraries, extending them in a manner that is more consistent with Salt workflows. The ``salt.utils.http`` Library -------...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/tutorials/http.rst
0.882174
0.904482
http.rst
pypi
.. _states-tutorial: ===================================== States tutorial, part 1 - Basic Usage ===================================== The purpose of this tutorial is to demonstrate how quickly you can configure a system to be managed by Salt States. For detailed information about the state system please refer to the...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/tutorials/states_pt1.rst
0.920196
0.736164
states_pt1.rst
pypi
.. _troubleshooting: =============== Troubleshooting =============== The intent of the troubleshooting section is to introduce solutions to a number of common issues encountered by users and the tools that are available to aid in developing States and Salt code. Troubleshooting the Salt Master ======================...
/salt-ssh-9000.tar.gz/salt-ssh-9000/doc/topics/troubleshooting/index.rst
0.794584
0.686541
index.rst
pypi
import logging # Import salt modules import salt.output log = logging.getLogger(__name__) __virtualname__ = "out" __proxyenabled__ = ["*"] def __virtual__(): return __virtualname__ def out_format(data, out="nested", opts=None, **kwargs): """ Return the formatted outputter string for the Python objec...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/out.py
0.845704
0.201087
out.py
pypi
import salt.utils.path def __virtual__(): """ Only load if the mfs commands are installed """ if salt.utils.path.which("mfsgetgoal"): return "moosefs" return ( False, "The moosefs execution module cannot be loaded: the mfsgetgoal binary is not in" " the path.", ...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/moosefs.py
0.532425
0.232473
moosefs.py
pypi
import salt.utils.platform # Define the module's virtual name __virtualname__ = "shadow" def __virtual__(): """ Only works on Windows systems """ if salt.utils.platform.is_windows(): return __virtualname__ return (False, "Module win_shadow: module only works on Windows systems.") def in...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/win_shadow.py
0.772574
0.241109
win_shadow.py
pypi
import salt.utils.files import salt.utils.stringutils from salt.exceptions import CommandExecutionError, SaltInvocationError try: import pwd except ImportError: pass try: import salt.utils.pycrypto HAS_CRYPT = True except ImportError: HAS_CRYPT = False # Define the module's virtual name __virtua...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/bsd_shadow.py
0.623262
0.1929
bsd_shadow.py
pypi
import logging import os import re import salt.utils.platform from salt.exceptions import CommandExecutionError log = logging.getLogger(__name__) __virtualname__ = "certutil" def __virtual__(): """ Only works on Windows """ if salt.utils.platform.is_windows(): return __virtualname__ retu...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/win_certutil.py
0.675444
0.22007
win_certutil.py
pypi
import datetime import logging import os import salt.utils.path from salt.exceptions import SaltInvocationError log = logging.getLogger(__name__) LEA = salt.utils.path.which_bin( [ "certbot", "letsencrypt", "certbot-auto", "letsencrypt-auto", "/opt/letsencrypt/letsencrypt-...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/acme.py
0.569853
0.180035
acme.py
pypi
import logging log = logging.getLogger(__name__) def _analyse_overview_field(content): """ Split the field in drbd-overview """ if "(" in content: # Output like "Connected(2*)" or "UpToDate(2*)" return content.split("(")[0], content.split("(")[0] elif "/" in content: # Out...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/drbd.py
0.619817
0.23725
drbd.py
pypi
import re import salt.utils.platform import salt.utils.win_lgpo_netsh from salt.exceptions import CommandExecutionError # Define the module's virtual name __virtualname__ = "firewall" def __virtual__(): """ Only works on Windows systems """ if not salt.utils.platform.is_windows(): return Fal...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/win_firewall.py
0.798344
0.204183
win_firewall.py
pypi
import logging import os import re import salt.utils.path from salt.exceptions import CommandExecutionError, SaltInvocationError # Set up logger log = logging.getLogger(__name__) # Define a function alias in order not to shadow built-in's __func_alias__ = {"list_": "list"} # Define the module's virtual name __virt...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/mdadm_raid.py
0.488283
0.178956
mdadm_raid.py
pypi
import logging import time import salt.proxy.panos import salt.utils.platform from salt.exceptions import CommandExecutionError log = logging.getLogger(__name__) __virtualname__ = "panos" def __virtual__(): """ Will load for the panos proxy minions. """ try: if salt.utils.platform.is_proxy(...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/panos.py
0.692538
0.199776
panos.py
pypi
import copy import salt.utils.data import salt.utils.functools import salt.utils.pkg import salt.utils.versions from salt.exceptions import CommandExecutionError, MinionError # Define the module's virtual name __virtualname__ = "pkgutil" def __virtual__(): """ Set the virtual pkg module if the os is Solaris...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/pkgutil.py
0.498535
0.155848
pkgutil.py
pypi
import logging import xml.etree.ElementTree as ET log = logging.getLogger(__name__) # Define the module's virtual name __virtualname__ = "xml" def __virtual__(): """ Only load the module if all modules are imported correctly. """ return __virtualname__ def get_value(file, element): """ Re...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/xml.py
0.683525
0.178383
xml.py
pypi
import ast import logging import os import salt.payload import salt.utils.files log = logging.getLogger(__name__) def clear(): """ Clear out all of the data in the minion datastore, this function is destructive! CLI Example: .. code-block:: bash salt '*' data.clear """ try: ...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/data.py
0.604049
0.327077
data.py
pypi
import logging import salt.utils.args try: import jira HAS_JIRA = True except ImportError: HAS_JIRA = False log = logging.getLogger(__name__) __virtualname__ = "jira" __proxyenabled__ = ["*"] JIRA = None def __virtual__(): return ( __virtualname__ if HAS_JIRA else (False,...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/jira_mod.py
0.652352
0.221172
jira_mod.py
pypi
import logging import os import sys import traceback from collections.abc import Mapping import salt.channel.client import salt.crypt import salt.payload import salt.utils.event import salt.utils.zeromq __proxyenabled__ = ["*"] log = logging.getLogger(__name__) def _dict_subset(keys, master_dict): """ Retur...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/event.py
0.447943
0.15428
event.py
pypi
from datetime import datetime import salt.utils.mac_utils import salt.utils.platform from salt.exceptions import SaltInvocationError __virtualname__ = "timezone" def __virtual__(): """ Only for macOS """ if not salt.utils.platform.is_darwin(): return ( False, "The mac...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/mac_timezone.py
0.856122
0.1929
mac_timezone.py
pypi
import logging try: import grp except ImportError: pass log = logging.getLogger(__name__) # Define the module's virtual name __virtualname__ = "group" def __virtual__(): """ Set the group module if the kernel is AIX """ if __grains__["kernel"] == "AIX": return __virtualname__ re...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/aix_group.py
0.552902
0.165492
aix_group.py
pypi
import copy import fnmatch import logging import salt.utils.dictupdate # Import salt modules import salt.utils.napalm from salt.defaults import DEFAULT_TARGET_DELIM from salt.utils.data import traverse_dict_and_list as _traverse_dict_and_list __proxyenabled__ = ["*"] __virtualname__ = "napalm_formula" log = logging...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/napalm_formula.py
0.674158
0.231745
napalm_formula.py
pypi
import binascii import hashlib import logging import re import shlex import salt.modules.cmdmod import salt.utils.path log = logging.getLogger(__name__) # Define the module's virtual name __virtualname__ = "pdbedit" # Function aliases __func_alias__ = { "list_users": "list", "get_user": "get", } def __vir...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/pdbedit.py
0.42656
0.17892
pdbedit.py
pypi
import salt.utils.args try: import redis HAS_REDIS = True except ImportError: HAS_REDIS = False __virtualname__ = "redis" def __virtual__(): """ Only load this module if redis python module is installed """ if HAS_REDIS: return __virtualname__ else: return ( ...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/redismod.py
0.729809
0.177347
redismod.py
pypi
HAS_SHADE = False try: import shade from shade.exc import OpenStackCloudException HAS_SHADE = True except ImportError: pass __virtualname__ = "keystoneng" def __virtual__(): """ Only load this module if shade python module is installed """ if HAS_SHADE: return __virtualname__...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/keystoneng.py
0.622115
0.154567
keystoneng.py
pypi
import logging import salt.utils.path log = logging.getLogger(__name__) def __virtual__(): """ Only work on Gentoo systems with eselect installed """ if __grains__["os"] == "Gentoo" and salt.utils.path.which("eselect"): return "eselect" return ( False, "The eselect execut...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/eselect.py
0.725551
0.221067
eselect.py
pypi
import salt.utils.decorators as decorators import salt.utils.path from salt.exceptions import SaltException __func_alias__ = {"list_": "list"} # Cache the output of running which('ipvsadm') @decorators.memoize def __detect_os(): return salt.utils.path.which("ipvsadm") def __virtual__(): """ Only load i...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/lvs.py
0.681197
0.167389
lvs.py
pypi
import re import salt.utils.path # Function alias to make sure not to shadow built-in's __func_alias__ = { "id_": "id", "reload_": "reload", } def __virtual__(): if salt.utils.path.which("monit") is not None: # The monit binary exists, let the module load return True return ( ...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/monit.py
0.586286
0.252885
monit.py
pypi
import logging import re import salt.utils.platform log = logging.getLogger(__name__) __virtualname__ = "license" def __virtual__(): """ Only work on Windows """ if salt.utils.platform.is_windows(): return __virtualname__ return (False, "Module win_license: module only works on Windows s...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/win_license.py
0.666931
0.175609
win_license.py
pypi
HAS_SHADE = False try: import shade HAS_SHADE = True except ImportError: pass __virtualname__ = "neutronng" def __virtual__(): """ Only load this module if shade python module is installed """ if HAS_SHADE: return __virtualname__ return ( False, "The neutronng...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/neutronng.py
0.742235
0.184345
neutronng.py
pypi
import logging import salt.utils.compat import salt.utils.json import salt.utils.versions from salt.exceptions import SaltInvocationError from salt.utils.decorators import depends try: # Disable unused import-errors as these are only used for dependency checking # pylint: disable=unused-import import bo...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/boto3_elasticsearch.py
0.677474
0.202838
boto3_elasticsearch.py
pypi
import logging import salt.utils.json import salt.utils.mattermost from salt.exceptions import SaltInvocationError log = logging.getLogger(__name__) __virtualname__ = "mattermost" def __virtual__(): """ Return virtual name of the module. :return: The virtual name of the module. """ return __vi...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/mattermost.py
0.842669
0.188922
mattermost.py
pypi
import salt.utils.path __authorized_modules__ = ["version", "namenode", "dfsadmin", "dfs", "fs"] def __virtual__(): """ Check if hadoop is present, then load the module """ if salt.utils.path.which("hadoop") or salt.utils.path.which("hdfs"): return "hadoop" return ( False, ...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/hadoop.py
0.554229
0.168515
hadoop.py
pypi
import logging from datetime import datetime import salt.utils.mac_utils import salt.utils.platform from salt.exceptions import CommandExecutionError try: import pwd HAS_PWD = True except ImportError: HAS_PWD = False log = logging.getLogger(__name__) # Start logging __virtualname__ = "shadow" def ...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/mac_shadow.py
0.603581
0.177847
mac_shadow.py
pypi
import copy import logging import os import salt.fileclient import salt.utils.data import salt.utils.dictupdate as dictupdate import salt.utils.files import salt.utils.json import salt.utils.url import salt.utils.yaml __virtualname__ = "defaults" log = logging.getLogger(__name__) def _mk_client(): """ Crea...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/defaults.py
0.603348
0.201381
defaults.py
pypi
import datetime import logging import re import time import salt.utils.files import salt.utils.path import salt.utils.platform import salt.utils.stringutils log = logging.getLogger(__name__) __virtualname__ = "at" def __virtual__(): """ We only deal with Solaris' specific version of at """ if not sa...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/at_solaris.py
0.483161
0.196768
at_solaris.py
pypi
import salt.utils.path def __virtual__(): """ Only available on systems with Riak installed. """ if salt.utils.path.which("riak"): return True return ( False, "The riak execution module failed to load: the riak binary is not in the path.", ) def __execute_cmd(name, cm...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/riak.py
0.645567
0.220154
riak.py
pypi
import salt.utils.nacl __virtualname__ = "nacl" def __virtual__(): if __opts__["fips_mode"] is True: return False, "nacl module not available in FIPS mode" return salt.utils.nacl.check_requirements() def keygen(sk_file=None, pk_file=None, **kwargs): """ Use libnacl to generate a keypair. ...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/nacl.py
0.743354
0.171546
nacl.py
pypi
import logging as logger import salt.utils.http import salt.utils.json import salt.utils.path # Import Salt lobs from salt.utils.decorators import memoize # Setup the logger log = logger.getLogger(__name__) def __virtual__(): if salt.utils.path.which("kapacitor"): return "kapacitor" else: r...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/kapacitor.py
0.484868
0.189259
kapacitor.py
pypi
import logging import os import re # Import salt libraries import salt.utils.files import salt.utils.platform import salt.utils.stringutils from salt.exceptions import CommandExecutionError # Set up logger log = logging.getLogger(__name__) # Define the module's virtual name __virtualname__ = "cryptdev" def __virt...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/cryptdev.py
0.583441
0.241037
cryptdev.py
pypi
import functools import logging import re try: from salt.utils.versions import LooseVersion as _LooseVersion from salt.exceptions import CommandExecutionError HAS_REQUIRED_LIBS = True except ImportError: HAS_REQUIRED_LIBS = False log = logging.getLogger(__name__) __virtualname__ = "kernelpkg" def...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/kernelpkg_linux_apt.py
0.725162
0.196094
kernelpkg_linux_apt.py
pypi
import fnmatch import logging import re import salt.utils.platform log = logging.getLogger(__name__) __func_alias__ = {"list_": "list"} # Define the module's virtual name __virtualname__ = "service" def __virtual__(): """ Only work on systems that are a proxy minion """ try: if ( ...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/ssh_service.py
0.647352
0.199133
ssh_service.py
pypi
import logging # Import salt modules try: import scp import paramiko HAS_SCP = True except ImportError: HAS_SCP = False __proxyenabled__ = ["*"] __virtualname__ = "scp" log = logging.getLogger(__name__) def __virtual__(): if not HAS_SCP: return False, "Please install SCP for this modu...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/scp_mod.py
0.610221
0.161353
scp_mod.py
pypi
import logging import salt.utils.path log = logging.getLogger(__name__) def __virtual__(): """ Only works with systemd or on supported POSIX-like systems """ if salt.utils.path.which("localectl") or __grains__["os_family"] in ( "RedHat", "Debian", "Gentoo", ): ret...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/keyboard.py
0.421314
0.161684
keyboard.py
pypi
import logging import salt.utils.platform log = logging.getLogger(__name__) __virtualname__ = "macdefaults" def __virtual__(): """ Only work on Mac OS """ if salt.utils.platform.is_darwin(): return __virtualname__ return False def write(domain, key, value, type="string", user=None): ...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/macdefaults.py
0.492188
0.214733
macdefaults.py
pypi
import logging CAN_USE_NAMECHEAP = True try: import salt.utils.namecheap except ImportError: CAN_USE_NAMECHEAP = False log = logging.getLogger(__name__) def __virtual__(): """ Check to make sure requests and xml are installed and requests """ if CAN_USE_NAMECHEAP: return "namecheap...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/namecheap_domains.py
0.596903
0.219149
namecheap_domains.py
pypi
import os def running_service_owners( exclude=("/dev", "/home", "/media", "/proc", "/run", "/sys/", "/tmp", "/var") ): """ Determine which packages own the currently running services. By default, excludes files whose full path starts with ``/dev``, ``/home``, ``/media``, ``/proc``, ``/run``, ``/sy...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/introspect.py
0.545286
0.249068
introspect.py
pypi
import fnmatch import logging import os import re import salt.utils.data import salt.utils.files log = logging.getLogger(__name__) # XXX enable/disable support would be nice # Define the module's virtual name __virtualname__ = "service" __func_alias__ = {"reload_": "reload"} def __virtual__(): """ Only w...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/openbsdservice.py
0.55941
0.153486
openbsdservice.py
pypi
import logging import os import pprint import shlex import uuid import salt.syspaths import salt.utils.kickstart import salt.utils.path import salt.utils.preseed import salt.utils.stringutils import salt.utils.validate.path import salt.utils.yast from salt.exceptions import SaltInvocationError log = logging.getLogger...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/genesis.py
0.505127
0.174129
genesis.py
pypi
import os import sys import time import salt.key import salt.utils.data # Don't shadow built-ins. __func_alias__ = {"list_": "list"} def list_(): """ Return a list of accepted, denied, unaccepted and rejected keys. This is the same output as `salt-key -L` CLI Example: .. code-block:: bash ...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/minion.py
0.488039
0.229622
minion.py
pypi
import logging import salt.utils.decorators as decorators import salt.utils.path import salt.utils.platform log = logging.getLogger(__name__) # Function aliases __func_alias__ = { "list_": "list", "get_": "get", "put_": "put", "delete_": "delete", } # Define the module's virtual name __virtualname__...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/mdata.py
0.547222
0.226057
mdata.py
pypi
import logging import re import salt.utils.path log = logging.getLogger(__name__) # Define the module's virtual name __virtualname__ = "varnish" def __virtual__(): """ Only load the module if varnish is installed """ if salt.utils.path.which("varnishd") and salt.utils.path.which("varnishadm"): ...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/varnish.py
0.547706
0.182062
varnish.py
pypi
import time import salt.utils.http from salt.exceptions import CommandExecutionError def query(url, **kwargs): """ .. versionadded:: 2015.5.0 Query a resource, and decode the return data Passes through all the parameters described in the :py:func:`utils.http.query function <salt.utils.http.quer...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/http.py
0.737347
0.237167
http.py
pypi
import logging import re from salt.exceptions import CommandExecutionError try: import pynetbox HAS_PYNETBOX = True except ImportError: HAS_PYNETBOX = False log = logging.getLogger(__name__) AUTH_ENDPOINTS = ("secrets",) __func_alias__ = {"filter_": "filter", "get_": "get"} def __virtual__(): ""...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/netbox.py
0.604282
0.150528
netbox.py
pypi
import logging import salt.utils.compat import salt.utils.json import salt.utils.versions from salt.exceptions import SaltInvocationError log = logging.getLogger(__name__) # pylint: disable=import-error try: # pylint: disable=unused-import import boto import boto3 # pylint: enable=unused-import ...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/boto_elasticsearch_domain.py
0.586641
0.200558
boto_elasticsearch_domain.py
pypi
import logging try: import ethtool HAS_ETHTOOL = True except ImportError: HAS_ETHTOOL = False log = logging.getLogger(__name__) ethtool_coalesce_map = { "pkt_rate_high": "pkt_rate_high", "pkt_rate_low": "pkt_rate_low", "sample_interval": "rate_sample_interval", "rx_usecs": "rx_coalesce_u...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/ethtool.py
0.528533
0.237167
ethtool.py
pypi
CAN_USE_NAMECHEAP = True try: import salt.utils.namecheap except ImportError: CAN_USE_NAMECHEAP = False __virtualname__ = "namecheap_domains_dns" def __virtual__(): """ Check to make sure requests and xml are installed and requests """ if CAN_USE_NAMECHEAP: return "namecheap_domains...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/namecheap_domains_dns.py
0.705379
0.156427
namecheap_domains_dns.py
pypi
import copy import logging import salt.utils.args import salt.utils.data import salt.utils.user from salt.exceptions import CommandExecutionError try: import pwd HAS_PWD = True except ImportError: HAS_PWD = False log = logging.getLogger(__name__) # Define the module's virtual name __virtualname__ = ...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/pw_user.py
0.438785
0.171998
pw_user.py
pypi
import salt.utils.functools import salt.utils.json import salt.utils.pagerduty def __virtual__(): """ No dependencies outside of what Salt itself requires """ return True def list_services(profile=None, api_key=None): """ List services belonging to this account CLI Example: .. code...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/pagerduty.py
0.699768
0.184951
pagerduty.py
pypi
import fnmatch import glob import logging import os import re import shlex import salt.utils.systemd __func_alias__ = {"reload_": "reload"} # Define the module's virtual name __virtualname__ = "service" log = logging.getLogger(__name__) def __virtual__(): """ Only work on Debian and when systemd isn't run...
/salt-ssh-9000.tar.gz/salt-ssh-9000/salt/modules/debian_service.py
0.604282
0.173849
debian_service.py
pypi