def status(jboss_config, host=None, server_config=None):
    '''
    Get status of running jboss instance.

    jboss_config
        Configuration dictionary with properties specified above.
    host
        The name of the host. JBoss domain mode only - and required if running in domain mode.
        The host name is the "name" attribute of the "host" element in host.xml
    server_config
        The name of the Server Configuration. JBoss Domain mode only - and required
        if running in domain mode.

    CLI Example:

    .. code-block:: bash

        salt '*' jboss7.status '{"cli_path": "integration.modules.sysmod.SysModuleTest.test_valid_docs", "controller": "10.11.12.13:9999", "cli_user": "jbossadm", "cli_password": "jbossadm"}'

       '''
    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