Merge branch 'master' into dry-run

This commit is contained in:
Przemyslaw Kaminski 2015-07-15 10:25:26 +02:00
commit 1ab3d2ae93
2 changed files with 17 additions and 0 deletions

View File

@ -11,6 +11,20 @@ from solar.core.handlers.base import BaseHandler
from solar.core.provider import GitProvider
# TODO:
# puppet wont always return 0 on error, example:
# http://unix.stackexchange.com/questions/165333/how-to-get-non-zero-exit-code-from-puppet-when-configuration-cannot-be-applied
# in fuel there is special handler based on puppet summary, but i think we can also use --detailed-exitcode
# https://docs.puppetlabs.com/references/3.6.2/man/agent.html
# --detailed-exitcodes
# Provide transaction information via exit codes. If this is enabled, an exit
# code of '2' means there were changes, an exit code of '4' means there were
# failures during the transaction, and an exit code of '6' means there were
# both changes and failures.
class ResourceSSHMixin(object):
@staticmethod
def _ssh_command(resource, *args, **kwargs):

View File

@ -75,6 +75,9 @@ def _construct_jsonschema(schema, definition_base=''):
if schema == 'int' or schema == 'int!':
return {'type': 'number'}, {}
if schema == 'bool' or schema == 'bool!':
return {'type': 'boolean'}, {}
if isinstance(schema, list):
items, definitions = _construct_jsonschema(schema[0], definition_base=definition_base)