This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(salt)Johan-van-den-Dorpes-Macbook-Pro:tests johan$ python ./runtests.py -n unit.lint_test | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
* Transplanting configuration files to '/tmp/salt-tests-tmpdir/config' | |
* Current Directory: /Users/johan/git/salt/tests | |
* Test suite is running under PID 58310 | |
* Logging tests on /var/folders/h6/sf9lyr_54s54ymw_qkyf0dxw0000gn/T/salt-runtests.log | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
Starting unit.lint_test Tests | |
~~~~~~~~~~~~~~~~~~~~~~~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
haproxy: reload is not a valid argument for service.running |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo ./scripts/salt-call --local --file-root=/Users/johan/dneg/salt/formula/ state.validate_sls test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
import salt.config | |
import salt.loader | |
import salt.utils | |
__opts__ = salt.config.minion_config('/etc/salt/minion') | |
__salt__ = salt.loader.minion_mods(__opts__) | |
statemods = salt.loader.states(__opts__, __salt__) | |
print sorted(list(statemods.keys())) | |
>>> ['alias.absent', 'alias.present', 'alternatives.auto', 'alternatives.install', 'alternatives.remove', 'alternatives.set', 'apache.configfile', 'archive.closing', 'archive.extracted', 'at.absent', 'at.present', 'blockdev.formatted', 'blockdev.tuned', 'boto_asg.absent', 'boto_asg.present', 'boto_cloudwatch_alarm.absent', 'boto_cloudwatch_alarm.present', 'boto_elasticache.absent', 'boto_elasticache.present', 'boto_elb.absent', 'boto_elb.present', 'boto_iam_role.absent', 'boto_iam_role.present', 'boto_lc.absent', 'boto_lc.present', 'boto_route53.absent', 'boto_route53.present', 'boto_secgroup.absent', 'boto_secgroup.present', 'boto_sqs.absent', 'boto_sqs.present', 'buildout.installed', 'cloud.absent', 'cloud.present', 'cloud.profile', 'cloud.volum |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [1]: import salt.config | |
In [2]: import salt.loader | |
In [3]: import salt.renderers.yaml | |
In [4]: | |
In [4]: content = open('test.sls').read() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
logstash(search) - hits for search string | |
logstash(search,field,facet) - return stats on a field - facets are count, min, max, total, mean. | |
logstashGroup(search, group, field, facet) - return stats on a field, grouped by a value. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Example of getting size of fields: | |
SELECT id, length(raw), length(cooked) FROM posts ORDER BY length(cooked) DESC limit 100; | |
Truncate table: | |
truncate table <table>; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Player | |
def play_turn(warrior) | |
@warrior = warrior | |
@health ||= warrior.health | |
@direction ||= :forward | |
attack || look || retreat || wall || captive || rest || walk | |
@health = warrior.health | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FPM=/usr/bin/fpm | |
if [ ! -d BUILD ] | |
then | |
mkdir -p BUILD | |
fi | |
for gem in `cat gem-list | grep -v "#" ` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# MYNAME DESCRIPTION | |
# | |
# chkconfig: 345 95 5 | |
# description: DESCRIPTION | |
# | |
### BEGIN INIT INFO | |
# Provides: NAME |