

def status(jboss_config, host=None, server_config=None):
    '\n    Get status of running jboss instance.\n\n    jboss_config\n        Configuration dictionary with properties specified above.\n    host\n        The name of the host. JBoss domain mode only - and required if running in domain mode.\n        The host name is the "name" attribute of the "host" element in host.xml\n    server_config\n        The name of the Server Configuration. JBoss Domain mode only - and required\n        if running in domain mode.\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt \'*\' jboss7.status \'{"cli_path": "integration.modules.sysmod.SysModuleTest.test_valid_docs", "controller": "10.11.12.13:9999", "cli_user": "jbossadm", "cli_password": "jbossadm"}\'\n\n       '
    log.debug('======================== MODULE FUNCTION: jboss7.status')
    if ((host is None) and (server_config is None)):
        operation = ':read-attribute(name=server-state)'
    elif ((host is not None) and (server_config is not None)):
        operation = '/host="{host}"/server-config="{server_config}"/:read-attribute(name=status)'.format(host=host, server_config=server_config)
    else:
        raise SaltInvocationError('Invalid parameters. Must either pass both host and server_config or neither')
    return __salt__['jboss7_cli.run_operation'](jboss_config, operation, fail_on_error=False, retries=0)

dataset/ETHPy150Open saltstack/salt/salt/modules/jboss7.py status/original