Search is not available for this dataset
text stringlengths 75 104k |
|---|
def change_password(name, password, runas=None):
'''
Changes a user's password.
CLI Example:
.. code-block:: bash
salt '*' rabbitmq.change_password rabbit_user password
'''
if runas is None and not salt.utils.platform.is_windows():
runas = salt.utils.user.get_user()
if sal... |
def check_password(name, password, runas=None):
'''
.. versionadded:: 2016.3.0
Checks if a user's password is valid.
CLI Example:
.. code-block:: bash
salt '*' rabbitmq.check_password rabbit_user password
'''
# try to get the rabbitmq-version - adapted from _get_rabbitmq_plugin
... |
def add_vhost(vhost, runas=None):
'''
Adds a vhost via rabbitmqctl add_vhost.
CLI Example:
.. code-block:: bash
salt '*' rabbitmq add_vhost '<vhost_name>'
'''
if runas is None and not salt.utils.platform.is_windows():
runas = salt.utils.user.get_user()
res = __salt__['cmd.... |
def set_permissions(vhost, user, conf='.*', write='.*', read='.*', runas=None):
'''
Sets permissions for vhost via rabbitmqctl set_permissions
CLI Example:
.. code-block:: bash
salt '*' rabbitmq.set_permissions myvhost myuser
'''
if runas is None and not salt.utils.platform.is_windows... |
def list_permissions(vhost, runas=None):
'''
Lists permissions for vhost via rabbitmqctl list_permissions
CLI Example:
.. code-block:: bash
salt '*' rabbitmq.list_permissions /myvhost
'''
if runas is None and not salt.utils.platform.is_windows():
runas = salt.utils.user.get_us... |
def list_user_permissions(name, runas=None):
'''
List permissions for a user via rabbitmqctl list_user_permissions
CLI Example:
.. code-block:: bash
salt '*' rabbitmq.list_user_permissions user
'''
if runas is None and not salt.utils.platform.is_windows():
runas = salt.utils.u... |
def set_user_tags(name, tags, runas=None):
'''Add user tags via rabbitmqctl set_user_tags
CLI Example:
.. code-block:: bash
salt '*' rabbitmq.set_user_tags myadmin administrator
'''
if runas is None and not salt.utils.platform.is_windows():
runas = salt.utils.user.get_user()
... |
def join_cluster(host, user='rabbit', ram_node=None, runas=None):
'''
Join a rabbit cluster
CLI Example:
.. code-block:: bash
salt '*' rabbitmq.join_cluster rabbit.example.com rabbit
'''
cmd = [RABBITMQCTL, 'join_cluster']
if ram_node:
cmd.append('--ram')
cmd.append('{... |
def list_queues(runas=None, *args):
'''
Returns queue details of the / virtual host
CLI Example:
.. code-block:: bash
salt '*' rabbitmq.list_queues messages consumers
'''
if runas is None and not salt.utils.platform.is_windows():
runas = salt.utils.user.get_user()
cmd = [R... |
def list_policies(vhost="/", runas=None):
'''
Return a dictionary of policies nested by vhost and name
based on the data returned from rabbitmqctl list_policies.
Reference: http://www.rabbitmq.com/ha.html
CLI Example:
.. code-block:: bash
salt '*' rabbitmq.list_policies
'''
r... |
def set_policy(vhost,
name,
pattern,
definition,
priority=None,
runas=None,
apply_to=None):
'''
Set a policy based on rabbitmqctl set_policy.
Reference: http://www.rabbitmq.com/ha.html
CLI Example:
.. code-b... |
def delete_policy(vhost, name, runas=None):
'''
Delete a policy based on rabbitmqctl clear_policy.
Reference: http://www.rabbitmq.com/ha.html
CLI Example:
.. code-block:: bash
salt '*' rabbitmq.delete_policy / HA
'''
if runas is None and not salt.utils.platform.is_windows():
... |
def policy_exists(vhost, name, runas=None):
'''
Return whether the policy exists based on rabbitmqctl list_policies.
Reference: http://www.rabbitmq.com/ha.html
CLI Example:
.. code-block:: bash
salt '*' rabbitmq.policy_exists / HA
'''
if runas is None and not salt.utils.platform.... |
def list_available_plugins(runas=None):
'''
Returns a list of the names of all available plugins (enabled and disabled).
CLI Example:
.. code-block:: bash
salt '*' rabbitmq.list_available_plugins
'''
if runas is None and not salt.utils.platform.is_windows():
... |
def plugin_is_enabled(name, runas=None):
'''
Return whether the plugin is enabled.
CLI Example:
.. code-block:: bash
salt '*' rabbitmq.plugin_is_enabled rabbitmq_plugin_name
'''
if runas is None and not salt.utils.platform.is_windows():
runas = salt.utils.user.get_user()
r... |
def enable_plugin(name, runas=None):
'''
Enable a RabbitMQ plugin via the rabbitmq-plugins command.
CLI Example:
.. code-block:: bash
salt '*' rabbitmq.enable_plugin foo
'''
if runas is None and not salt.utils.platform.is_windows():
runas = salt.utils.user.get_user()
cmd =... |
def _check_cygwin_installed(cyg_arch='x86_64'):
'''
Return True or False if cygwin is installed.
Use the cygcheck executable to check install. It is installed as part of
the base package, and we use it to check packages
'''
path_to_cygcheck = os.sep.join(['C:',
... |
def _get_all_packages(mirror=DEFAULT_MIRROR,
cyg_arch='x86_64'):
'''
Return the list of packages based on the mirror provided.
'''
if 'cyg.all_packages' not in __context__:
__context__['cyg.all_packages'] = {}
if mirror not in __context__['cyg.all_packages']:
__... |
def check_valid_package(package,
cyg_arch='x86_64',
mirrors=None):
'''
Check if the package is valid on the given mirrors.
Args:
package: The name of the package
cyg_arch: The cygwin architecture
mirrors: any mirrors to check
Retu... |
def _run_silent_cygwin(cyg_arch='x86_64',
args=None,
mirrors=None):
'''
Retrieve the correct setup.exe.
Run it with the correct arguments to get the bare minimum cygwin
installation up and running.
'''
cyg_cache_dir = os.sep.join(['c:', 'cygcache'])... |
def _cygcheck(args, cyg_arch='x86_64'):
'''
Run the cygcheck executable.
'''
cmd = ' '.join([
os.sep.join(['c:', _get_cyg_dir(cyg_arch), 'bin', 'cygcheck']),
'-c', args])
ret = __salt__['cmd.run_all'](cmd)
if ret['retcode'] == 0:
return ret['stdout']
else:
r... |
def install(packages=None,
cyg_arch='x86_64',
mirrors=None):
'''
Install one or several packages.
packages : None
The packages to install
cyg_arch : x86_64
Specify the architecture to install the package under
Current options are x86 and x86_64
CLI ... |
def uninstall(packages,
cyg_arch='x86_64',
mirrors=None):
'''
Uninstall one or several packages.
packages
The packages to uninstall.
cyg_arch : x86_64
Specify the architecture to remove the package from
Current options are x86 and x86_64
CLI Exa... |
def update(cyg_arch='x86_64', mirrors=None):
'''
Update all packages.
cyg_arch : x86_64
Specify the cygwin architecture update
Current options are x86 and x86_64
CLI Example:
.. code-block:: bash
salt '*' cyg.update
salt '*' cyg.update dos2unix mirrors="[{'http://... |
def list_(package='', cyg_arch='x86_64'):
'''
List locally installed packages.
package : ''
package name to check. else all
cyg_arch :
Cygwin architecture to use
Options are x86 and x86_64
CLI Example:
.. code-block:: bash
salt '*' cyg.list
'''
pkgs =... |
def targets(tgt, tgt_type='glob', **kwargs): # pylint: disable=W0613
'''
Return the targets from the flat yaml file, checks opts for location but
defaults to /etc/salt/roster
'''
ret = {}
cloud_opts = salt.config.cloud_config(
os.path.join(os.path.dirname(__opts__['conf_file']), 'cloud... |
def extract_ipv4(roster_order, ipv4):
'''
Extract the preferred IP address from the ipv4 grain
'''
for ip_type in roster_order:
for ip_ in ipv4:
if ':' in ip_:
continue
if not salt.utils.validate.net.ipv4_addr(ip_):
continue
if ... |
def _prepare_connection(**nxos_api_kwargs):
'''
Prepare the connection with the remote network device, and clean up the key
value pairs, removing the args used for the connection init.
'''
nxos_api_kwargs = clean_kwargs(**nxos_api_kwargs)
init_kwargs = {}
# Clean up any arguments that are no... |
def rpc(commands,
method='cli',
**kwargs):
'''
Execute an arbitrary RPC request via the Nexus API.
commands
The commands to be executed.
method: ``cli``
The type of the response, i.e., raw text (``cli_ascii``) or structured
document (``cli``). Defaults to ``cli`... |
def render_reaction(self, glob_ref, tag, data):
'''
Execute the render system against a single reaction file and return
the data structure
'''
react = {}
if glob_ref.startswith('salt://'):
glob_ref = self.minion.functions['cp.cache_file'](glob_ref) or ''
... |
def list_reactors(self, tag):
'''
Take in the tag from an event and return a list of the reactors to
process
'''
log.debug('Gathering reactors for tag %s', tag)
reactors = []
if isinstance(self.opts['reactor'], six.string_types):
try:
w... |
def list_all(self):
'''
Return a list of the reactors
'''
if isinstance(self.minion.opts['reactor'], six.string_types):
log.debug('Reading reactors from yaml %s', self.opts['reactor'])
try:
with salt.utils.files.fopen(self.opts['reactor']) as fp_:
... |
def add_reactor(self, tag, reaction):
'''
Add a reactor
'''
reactors = self.list_all()
for reactor in reactors:
_tag = next(six.iterkeys(reactor))
if _tag == tag:
return {'status': False, 'comment': 'Reactor already exists.'}
self.... |
def delete_reactor(self, tag):
'''
Delete a reactor
'''
reactors = self.list_all()
for reactor in reactors:
_tag = next(six.iterkeys(reactor))
if _tag == tag:
self.minion.opts['reactor'].remove(reactor)
return {'status': Tru... |
def resolve_aliases(self, chunks):
'''
Preserve backward compatibility by rewriting the 'state' key in the low
chunks if it is using a legacy type.
'''
for idx, _ in enumerate(chunks):
new_state = self.aliases.get(chunks[idx]['state'])
if new_state is not ... |
def reactions(self, tag, data, reactors):
'''
Render a list of reactor files and returns a reaction struct
'''
log.debug('Compiling reactions for tag %s', tag)
high = {}
chunks = []
try:
for fn_ in reactors:
high.update(self.render_reac... |
def run(self):
'''
Enter into the server loop
'''
salt.utils.process.appendproctitle(self.__class__.__name__)
# instantiate some classes inside our new process
self.event = salt.utils.event.get_event(
self.opts['__role'],
self.opts['sock_d... |
def populate_client_cache(self, low):
'''
Populate the client cache with an instance of the specified type
'''
reaction_type = low['state']
if reaction_type not in self.client_cache:
log.debug('Reactor is populating %s client cache', reaction_type)
if reac... |
def run(self, low):
'''
Execute a reaction by invoking the proper wrapper func
'''
self.populate_client_cache(low)
try:
l_fun = getattr(self, low['state'])
except AttributeError:
log.error(
'ReactWrap is missing a wrapper function f... |
def runner(self, fun, **kwargs):
'''
Wrap RunnerClient for executing :ref:`runner modules <all-salt.runners>`
'''
return self.pool.fire_async(self.client_cache['runner'].low, args=(fun, kwargs)) |
def local(self, fun, tgt, **kwargs):
'''
Wrap LocalClient for running :ref:`execution modules <all-salt.modules>`
'''
self.client_cache['local'].cmd_async(tgt, fun, **kwargs) |
def caller(self, fun, **kwargs):
'''
Wrap LocalCaller to execute remote exec functions locally on the Minion
'''
self.client_cache['caller'].cmd(fun, *kwargs['arg'], **kwargs['kwarg']) |
def mk_token(**load):
r'''
Create an eauth token using provided credentials
Non-root users may specify an expiration date -- if allowed via the
:conf_master:`token_expire_user_override` setting -- by passing an
additional ``token_expire`` param. This overrides the
:conf_master:`token_expire` se... |
def del_token(token):
'''
Delete an eauth token by name
CLI Example:
.. code-block:: shell
salt-run auth.del_token 6556760736e4077daa601baec2b67c24
'''
token_path = os.path.join(__opts__['token_dir'], token)
if os.path.exists(token_path):
return os.remove(token_path) is No... |
def cmd(
name,
func=None,
arg=(),
**kwargs):
'''
Execute a runner asynchronous:
USAGE:
.. code-block:: yaml
run_cloud:
runner.cmd:
- func: cloud.create
- arg:
- my-ec2-config
- myinstance
... |
def deserialize(stream_or_string, **options):
'''
Deserialize any string or stream like object into a Python data structure.
:param stream_or_string: stream or string to deserialize.
:param options: options given to lower configparser module.
'''
if six.PY3:
cp = configparser.ConfigPar... |
def serialize(obj, **options):
'''
Serialize Python data to a configparser formatted string or file.
:param obj: the data structure to serialize
:param options: options given to lower configparser module.
'''
try:
if not isinstance(obj, dict):
raise TypeError("configparser ... |
def _read_dict(cp, dictionary):
'''
Cribbed from python3's ConfigParser.read_dict function.
'''
for section, keys in dictionary.items():
section = six.text_type(section)
if _is_defaultsect(section):
if six.PY2:
section = configparser.DEFAULTSECT
else:... |
def object_present(
name,
source=None,
hash_type=None,
extra_args=None,
extra_args_from_pillar='boto_s3_object_extra_args',
region=None,
key=None,
keyid=None,
profile=None,
):
'''
Ensure object exists in S3.
name
The name of the state definition.
This wil... |
def installed(name,
version=None,
defaults=False,
force=False,
preferred_state='stable'):
'''
.. versionadded:: 0.17.0
Make sure that a pecl extension is installed.
name
The pecl extension name to install
version
The pecl ext... |
def removed(name):
'''
Make sure that a pecl extension is not installed.
name
The pecl extension name to uninstall
'''
ret = {'name': name, 'result': None, 'comment': '', 'changes': {}}
if name not in __salt__['pecl.list']():
ret['result'] = True
ret['comment'] = 'Pecl e... |
def key_present(
name,
policy,
description=None,
key_usage=None,
grants=None,
manage_grants=False,
key_rotation=False,
enabled=True,
region=None,
key=None,
keyid=None,
profile=None):
'''
Ensure the KMS key exists. KM... |
def get_roster_file(options):
'''
Find respective roster file.
:param options:
:return:
'''
template = None
# The __disable_custom_roster is always True if Salt SSH Client comes
# from Salt API. In that case no way to define own 'roster_file', instead
# this file needs to be chosen ... |
def _gen_back(self):
'''
Return a list of loaded roster backends
'''
back = set()
if self.backends:
for backend in self.backends:
fun = '{0}.targets'.format(backend)
if fun in self.rosters:
back.add(backend)
... |
def targets(self, tgt, tgt_type):
'''
Return a dict of {'id': {'ipv4': <ipaddr>}} data sets to be used as
targets given the passed tgt and tgt_type
'''
targets = {}
for back in self._gen_back():
f_str = '{0}.targets'.format(back)
if f_str not in se... |
def clean_kwargs(**kwargs):
'''
Return a dict without any of the __pub* keys (or any other keys starting
with a dunder) from the kwargs dict passed into the execution module
functions. These keys are useful for tracking what was used to invoke
the function call, but they may not be desirable to have... |
def invalid_kwargs(invalid_kwargs, raise_exc=True):
'''
Raise a SaltInvocationError if invalid_kwargs is non-empty
'''
if invalid_kwargs:
if isinstance(invalid_kwargs, dict):
new_invalid = [
'{0}={1}'.format(x, y)
for x, y in six.iteritems(invalid_kwar... |
def condition_input(args, kwargs):
'''
Return a single arg structure for the publisher to safely use
'''
ret = []
for arg in args:
if (six.PY3 and isinstance(arg, six.integer_types) and salt.utils.jid.is_jid(six.text_type(arg))) or \
(six.PY2 and isinstance(arg, long)): # pylint: di... |
def parse_input(args, kwargs=None, condition=True, no_parse=None):
'''
Parse out the args and kwargs from a list of input values. Optionally,
return the args and kwargs without passing them to condition_input().
Don't pull args with key=val apart if it has a newline in it.
'''
if no_parse is No... |
def yamlify_arg(arg):
'''
yaml.safe_load the arg
'''
if not isinstance(arg, six.string_types):
return arg
if arg.strip() == '':
# Because YAML loads empty (or all whitespace) strings as None, we
# return the original string
# >>> import yaml
# >>> yaml.load('... |
def get_function_argspec(func, is_class_method=None):
'''
A small wrapper around getargspec that also supports callable classes
:param is_class_method: Pass True if you are sure that the function being passed
is a class method. The reason for this is that on Python 3
... |
def shlex_split(s, **kwargs):
'''
Only split if variable is a string
'''
if isinstance(s, six.string_types):
# On PY2, shlex.split will fail with unicode types if there are
# non-ascii characters in the string. So, we need to make sure we
# invoke it with a str type, and then dec... |
def arg_lookup(fun, aspec=None):
'''
Return a dict containing the arguments and default arguments to the
function.
'''
ret = {'kwargs': {}}
if aspec is None:
aspec = get_function_argspec(fun)
if aspec.defaults:
ret['kwargs'] = dict(zip(aspec.args[::-1], aspec.defaults[::-1]))... |
def argspec_report(functions, module=''):
'''
Pass in a functions dict as it is returned from the loader and return the
argspec function signatures
'''
ret = {}
if '*' in module or '.' in module:
for fun in fnmatch.filter(functions, module):
try:
aspec = get_f... |
def split_input(val, mapper=None):
'''
Take an input value and split it into a list, returning the resulting list
'''
if mapper is None:
mapper = lambda x: x
if isinstance(val, list):
return list(map(mapper, val))
try:
return list(map(mapper, [x.strip() for x in val.split... |
def format_call(fun,
data,
initial_ret=None,
expected_extra_kws=(),
is_class_method=None):
'''
Build the required arguments and keyword arguments required for the passed
function.
:param fun: The function to get the argspec from
:param... |
def parse_function(s):
'''
Parse a python-like function call syntax.
For example: module.function(arg, arg, kw=arg, kw=arg)
This function takes care only about the function name and arguments list carying on quoting
and bracketing. It doesn't perform identifiers and other syntax validity check.
... |
def prepare_kwargs(all_kwargs, class_init_kwargs):
'''
Filter out the kwargs used for the init of the class and the kwargs used to
invoke the command required.
all_kwargs
All the kwargs the Execution Function has been invoked.
class_init_kwargs
The kwargs of the ``__init__`` of the... |
def _check_pkg(target):
'''
Return name, version and if rpm package for specified target
'''
ret = {}
cmd = ['/usr/bin/lslpp', '-Lc', target]
lines = __salt__['cmd.run'](
cmd,
python_shell=False).splitlines()
name = ''
version_num = ''
rpmpkg = False
for ... |
def list_pkgs(versions_as_list=False, **kwargs):
'''
List the filesets/rpm packages currently installed as a dict:
.. code-block:: python
{'<package_name>': '<version>'}
CLI Example:
.. code-block:: bash
salt '*' pkg.list_pkgs
'''
ret = {}
versions_as_list = salt.uti... |
def install(name=None, refresh=False, pkgs=None, version=None, test=False, **kwargs):
'''
Install the named fileset(s)/rpm package(s).
name
The name of the fileset or rpm package to be installed.
refresh
Whether or not to update the yum database before executing.
Multiple Package... |
def remove(name=None, pkgs=None, **kwargs):
'''
Remove specified fileset(s)/rpm package(s).
name
The name of the fileset or rpm package to be deleted.
Multiple Package Options:
pkgs
A list of filesets and/or rpm packages to delete.
Must be passed as a python list. The ``n... |
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:
os.remove(os.path.join(__opts__['cachedir'], 'datastore'))
except (IOError, OSError):
pass
retur... |
def load():
'''
Return all of the data in the minion datastore
CLI Example:
.. code-block:: bash
salt '*' data.load
'''
serial = salt.payload.Serial(__opts__)
try:
datastore_path = os.path.join(__opts__['cachedir'], 'datastore')
with salt.utils.files.fopen(datasto... |
def dump(new_data):
'''
Replace the entire datastore with a passed data structure
CLI Example:
.. code-block:: bash
salt '*' data.dump '{'eggs': 'spam'}'
'''
if not isinstance(new_data, dict):
if isinstance(ast.literal_eval(new_data), dict):
new_data = ast.literal_... |
def update(key, value):
'''
Update a key with a value in the minion datastore
CLI Example:
.. code-block:: bash
salt '*' data.update <key> <value>
'''
store = load()
store[key] = value
dump(store)
return True |
def cas(key, value, old_value):
'''
Check and set a value in the minion datastore
CLI Example:
.. code-block:: bash
salt '*' data.cas <key> <value> <old_value>
'''
store = load()
if key not in store:
return False
if store[key] != old_value:
return False
s... |
def pop(key, default=None):
'''
Pop (return & delete) a value from the minion datastore
.. versionadded:: 2015.5.2
CLI Example:
.. code-block:: bash
salt '*' data.pop <key> "there was no val"
'''
store = load()
val = store.pop(key, default)
dump(store)
return val |
def get(key, default=None):
'''
Get a (list of) value(s) from the minion datastore
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt '*' data.get key
salt '*' data.get '["key1", "key2"]'
'''
store = load()
if isinstance(key, six.string_types):
... |
def compare_changes(obj, **kwargs):
'''
Compare two dicts returning only keys that exist in the first dict and are
different in the second one
'''
changes = {}
for k, v in obj.items():
if k in kwargs:
if v != kwargs[k]:
changes[k] = kwargs[k]
return change... |
def get_entity(ent_type, **kwargs):
'''
Attempt to query Keystone for more information about an entity
'''
try:
func = 'keystoneng.{}_get'.format(ent_type)
ent = __salt__[func](**kwargs)
except OpenStackCloudException as e:
# NOTE(SamYaple): If this error was something other ... |
def _clean_kwargs(keep_name=False, **kwargs):
'''
Sanatize the the arguments for use with shade
'''
if 'name' in kwargs and not keep_name:
kwargs['name_or_id'] = kwargs.pop('name')
return __utils__['args.clean_kwargs'](**kwargs) |
def get_operator_cloud(auth=None):
'''
Return an operator_cloud
'''
if auth is None:
auth = __salt__['config.option']('keystone', {})
if 'shade_opcloud' in __context__:
if __context__['shade_opcloud'].auth == auth:
return __context__['shade_opcloud']
__context__['shad... |
def get_openstack_cloud(auth=None):
'''
Return an openstack_cloud
'''
if auth is None:
auth = __salt__['config.option']('keystone', {})
if 'shade_oscloud' in __context__:
if __context__['shade_oscloud'].auth == auth:
return __context__['shade_oscloud']
__context__['sh... |
def group_create(auth=None, **kwargs):
'''
Create a group
CLI Example:
.. code-block:: bash
salt '*' keystoneng.group_create name=group1
salt '*' keystoneng.group_create name=group2 domain=domain1 description='my group2'
'''
cloud = get_operator_cloud(auth)
kwargs = _clean... |
def group_delete(auth=None, **kwargs):
'''
Delete a group
CLI Example:
.. code-block:: bash
salt '*' keystoneng.group_delete name=group1
salt '*' keystoneng.group_delete name=group2 domain_id=b62e76fbeeff4e8fb77073f591cf211e
salt '*' keystoneng.group_delete name=0e4febc2a5ab4f... |
def group_update(auth=None, **kwargs):
'''
Update a group
CLI Example:
.. code-block:: bash
salt '*' keystoneng.group_update name=group1 description='new description'
salt '*' keystoneng.group_create name=group2 domain_id=b62e76fbeeff4e8fb77073f591cf211e new_name=newgroupname
... |
def group_list(auth=None, **kwargs):
'''
List groups
CLI Example:
.. code-block:: bash
salt '*' keystoneng.group_list
salt '*' keystoneng.group_list domain_id=b62e76fbeeff4e8fb77073f591cf211e
'''
cloud = get_operator_cloud(auth)
kwargs = _clean_kwargs(**kwargs)
return ... |
def group_search(auth=None, **kwargs):
'''
Search for groups
CLI Example:
.. code-block:: bash
salt '*' keystoneng.group_search name=group1
salt '*' keystoneng.group_search domain_id=b62e76fbeeff4e8fb77073f591cf211e
'''
cloud = get_operator_cloud(auth)
kwargs = _clean_kwar... |
def group_get(auth=None, **kwargs):
'''
Get a single group
CLI Example:
.. code-block:: bash
salt '*' keystoneng.group_get name=group1
salt '*' keystoneng.group_get name=group2 domain_id=b62e76fbeeff4e8fb77073f591cf211e
salt '*' keystoneng.group_get name=0e4febc2a5ab4f2c8f374b... |
def project_create(auth=None, **kwargs):
'''
Create a project
CLI Example:
.. code-block:: bash
salt '*' keystoneng.project_create name=project1
salt '*' keystoneng.project_create name=project2 domain_id=b62e76fbeeff4e8fb77073f591cf211e
salt '*' keystoneng.project_create name=... |
def project_delete(auth=None, **kwargs):
'''
Delete a project
CLI Example:
.. code-block:: bash
salt '*' keystoneng.project_delete name=project1
salt '*' keystoneng.project_delete name=project2 domain_id=b62e76fbeeff4e8fb77073f591cf211e
salt '*' keystoneng.project_delete name=... |
def project_update(auth=None, **kwargs):
'''
Update a project
CLI Example:
.. code-block:: bash
salt '*' keystoneng.project_update name=project1 new_name=newproject
salt '*' keystoneng.project_update name=project2 enabled=False description='new description'
'''
cloud = get_ope... |
def project_list(auth=None, **kwargs):
'''
List projects
CLI Example:
.. code-block:: bash
salt '*' keystoneng.project_list
salt '*' keystoneng.project_list domain_id=b62e76fbeeff4e8fb77073f591cf211e
'''
cloud = get_openstack_cloud(auth)
kwargs = _clean_kwargs(**kwargs)
... |
def project_search(auth=None, **kwargs):
'''
Search projects
CLI Example:
.. code-block:: bash
salt '*' keystoneng.project_search
salt '*' keystoneng.project_search name=project1
salt '*' keystoneng.project_search domain_id=b62e76fbeeff4e8fb77073f591cf211e
'''
cloud = ... |
def project_get(auth=None, **kwargs):
'''
Get a single project
CLI Example:
.. code-block:: bash
salt '*' keystoneng.project_get name=project1
salt '*' keystoneng.project_get name=project2 domain_id=b62e76fbeeff4e8fb77073f591cf211e
salt '*' keystoneng.project_get name=f315afcf... |
def domain_create(auth=None, **kwargs):
'''
Create a domain
CLI Example:
.. code-block:: bash
salt '*' keystoneng.domain_create name=domain1
'''
cloud = get_operator_cloud(auth)
kwargs = _clean_kwargs(keep_name=True, **kwargs)
return cloud.create_domain(**kwargs) |
def domain_delete(auth=None, **kwargs):
'''
Delete a domain
CLI Example:
.. code-block:: bash
salt '*' keystoneng.domain_delete name=domain1
salt '*' keystoneng.domain_delete name=b62e76fbeeff4e8fb77073f591cf211e
'''
cloud = get_operator_cloud(auth)
kwargs = _clean_kwargs(... |
def domain_update(auth=None, **kwargs):
'''
Update a domain
CLI Example:
.. code-block:: bash
salt '*' keystoneng.domain_update name=domain1 new_name=newdomain
salt '*' keystoneng.domain_update name=domain1 enabled=True description='new description'
'''
cloud = get_operator_cl... |
def domain_list(auth=None, **kwargs):
'''
List domains
CLI Example:
.. code-block:: bash
salt '*' keystoneng.domain_list
'''
cloud = get_operator_cloud(auth)
kwargs = _clean_kwargs(**kwargs)
return cloud.list_domains(**kwargs) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.