def get_service_status(dut, service):
    """
    @summary: Get the ActiveState and SubState of a service. This function uses the systemctl tool to get the
        ActiveState and SubState of specified service.
    @param dut: The AnsibleHost object of DUT. For interacting with DUT.
    @param service: Service name.
    @return: Returns a dictionary containing ActiveState and SubState of the specified service, for example:
        {
            "ActivateState": "active",
            "SubState": "running"
        }
    """
    output = dut.command("systemctl -p ActiveState -p SubState show %s" % service)
    result = {}
    for line in output["stdout_lines"]:
        fields = line.split("=")
        if len(fields) >= 2:
            result[fields[0]] = fields[1]
    return result