def show(ns):
    try:
        r = ns.LMI_RealmdService.first_instance()
        if (r.Domain != None):
            print r.Domain
        else:
            print "No domain joined"
    except CIMError as e:
        if (e.args[0] == wbem.CIM_ERR_INVALID_CLASS
                or e.args[0] == wbem.CIM_ERR_NOT_SUPPORTED):
            LOG().error('The realmd provider not found or incorrect version installed,'
                    ' class LMI_RealmdService not available.')
        else:
            raise
    except Exception as e:
        raise LmiFailed(e)
Show the joined domain.
dataset/ETHPy150Open openlmi/openlmi-scripts/commands/realmd/lmi/scripts/realmd/__init__.py/show