summaryrefslogtreecommitdiffstats
path: root/test/csit/tests/dcaegen2/prh_testcases/resources/PrhLibrary.py
blob: 72f491efe5d9e31bfd41c82b5f657f9797d596a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import docker

class PrhLibrary(object):
    
    def __init__(self):
        pass

    def check_log_for_missing_IP(self):
        client = docker.from_env()
        container = client.containers.get('prh')
        for line in container.logs(stream=True):
            if "org.onap.dcaegen2.services.prh.exceptions.DmaapNotFoundException: IPV4 and IPV6 are empty" in line.strip():
                return True
        else:
            return False