Пример #1
0
from flux.bundles import API
from flux.engine.workflow import Layout, Workflow as WorkflowElement, reverse_enumerate
from flux.engine.rule import RuleList
from flux.models import Run, Workflow

adhoc_configure({
    'schema:flux': {
        'url': 'postgresql://postgres@localhost/flux'
    },
    'mesh:flux': {
        'url': 'http://localhost:9997/',
        'bundle': 'flux.API',
    },
    'mesh:docket': {
        'url': 'http://localhost:9998/',
        'specification': 'flux.bindings.docket.specification',
    },
    'mesh:platoon': {
        'url': 'http://localhost:4321/',
        'specification': 'flux.bindings.platoon.specification',
    },
    'mesh:truss': {
        'url': 'http://localhost:9999/api',
        'specification': 'flux.bindings.truss.specification',
    },
})


class TestDependency(Unit):
    schema = SchemaDependency('flux')
Пример #2
0
from flux.models import Run, Workflow
from nose import SkipTest
from unittest import TestCase


adhoc_configure({
    'schema:flux': {
        'url': 'postgresql://postgres@localhost/flux',
    },
    'mesh:docket': {
        'url': 'http://localhost:9996/',
        'specification': 'enamel.bindings.docket.specification',
    },
    'mesh:docket.entity': {
        'url': 'http://localhost:9996/',
        'introspect': True,
    },
    'mesh:platoon': {
        'url': 'http://localhost:9998/',
        'specification': 'enamel.bindings.platoon.specification',
    },
    'mesh:flux': {
        'url': 'http://localhost:9999/',
        'bundle': 'flux.API',
    },
})


class TestDependency(Unit):
    schema = SchemaDependency('flux')
Пример #3
0
from spire.core import adhoc_configure, Unit
from spire.schema import SchemaDependency
from mesh.testing import MeshTestCase
from mesh.exceptions import GoneError, InvalidError, OperationError

from flux.bundles import API
from flux.engine.rule import RuleList
from flux.models import Workflow, Run

adhoc_configure({
    'schema:flux': {
        'url': 'postgresql://postgres@localhost/flux'
    },
    'mesh:flux': {
        'url': 'http://localhost:9995/',
        'bundle': 'flux.API',
    },
    'mesh:platoon': {
        'url': 'http://localhost:9998/',
        'specification': 'flux.bindings.platoon.specification',
    },
})


class TestDependency(Unit):
    schema = SchemaDependency('flux')


class BaseTestCase(MeshTestCase):
    bundle = API
    maxDiff = None
Пример #4
0
from flux.bundles import API
from flux.engine.rule import RuleList
from flux.models import Workflow, Run


adhoc_configure({
    'schema:flux': {
        'url': 'postgresql://postgres@localhost/flux'
    },
    'mesh:flux': {
        'url': 'http://localhost:9997/',
        'bundle': 'flux.API',
    },
    'mesh:docket': {
        'url': 'http://localhost:9998/',
        'specification': 'flux.bindings.docket.specification',
    },
    'mesh:platoon': {
        'url': 'http://localhost:4321/',
        'specification': 'flux.bindings.platoon.specification',
    },
    'mesh:truss': {
        'url': 'http://localhost:9999/api',
        'specification': 'flux.bindings.truss.specification',
    },
})


class TestDependency(Unit):
    schema = SchemaDependency('flux')
Пример #5
0
adhoc_configure({
    'schema:enamel': {
        'url': 'postgresql://postgres@localhost/enamel',
    },
    'schema:docket': {
        'url': 'postgresql://postgres@localhost/docket',
    },
    'schema:flux': {
        'url': 'postgresql://postgres@localhost/flux',
    },
    'mesh:enamel': {
        'url': 'http://localhost:9999/api.enamel',
        'bundle': 'enamel.API'
    },
    'mesh:narrative': {
        'url': 'http://localhost:9993/',
        'bundle': 'narrative.API'
    },
    'mesh:docket': {
        'url': 'http://localhost:9998/',
        'bundle': 'docket.API',
    },
    'mesh:docket.entity': {
        'url': 'http://localhost:9998/',
        'introspect': True,
    },
    'mesh:tidings': {
         'bundle': 'tidings.API',
         'url': 'http://localhost:9996/api',
    },
})
Пример #6
0
from spire.schema import SchemaDependency
from mesh.testing import MeshTestCase
from mesh.exceptions import GoneError, InvalidError, OperationError

from flux.bundles import API
from flux.engine.rule import RuleList
from flux.models import Operation, Run, Workflow


adhoc_configure({
    'schema:flux': {
        'url': 'postgresql://postgres@localhost/flux'
    },
    'mesh:flux': {
        'url': 'http://localhost:9995/',
        'bundle': 'flux.API',
    },
    'mesh:platoon': {
        'url': 'http://localhost:9998/',
        'specification': 'flux.bindings.platoon.specification',
    },
})


class TestDependency(Unit):
    schema = SchemaDependency('flux')


class BaseTestCase(MeshTestCase):
    bundle = API
    maxDiff = None
Пример #7
0
from spire.core import Unit, Dependency, adhoc_configure
from spire.support.logs import LogHelper
from mesh.constants import OK, DELETE, POST, PUT, GONE
from mesh.exceptions import AuditCreateError, RequestError
from audit.constants import *
from audit.auditconfiguration import AuditConfigParms, AuditConfiguration
from scheme.timezone import current_timestamp
from scheme.util import format_structure
from bastion.security.constants import CONTEXT_CREDENTIAL_USERNAME, CONTEXT_CREDENTIAL_TYPE

log = LogHelper(__name__)

# mesh dependency configuration
adhoc_configure({
    'mesh:audit': {
        'bundle': 'audit.API',
        'url': 'http://localhost:9986/api'
    }
})

# ToolDependency class
class ToolDependency(Unit):
    from spire.mesh.units import MeshDependency
    audit = MeshDependency('audit')


__all__ = ('Configurable', 'Registry')

class Auditable(object):
    """ A mixin class which indicates that subclasses are collecting audit information
        and provides basic implementations for the necessary methods
    """