Пример #1
0
 def do_get_dependencies(self):
     """Génère les dépendances de cette instance."""
     # Insère les noms d'états dans la base de données.
     ModelTest.do_get_dependencies(self)
     host = functions.add_host(u'myhost')
     service = functions.add_lowlevelservice(host, u'myservice')
     return dict(idsupitem=service.idservice)
Пример #2
0
 def do_get_dependencies(self):
     """Generate some data for the test"""
     ModelTest.do_get_dependencies(self)
     host = functions.add_host(u"myhost")
     service = functions.add_lowlevelservice(host, u"myservice")
     event = functions.add_event(service, u"OK", u"Foo")
     return dict(idcause=event.idevent)
Пример #3
0
 def do_get_dependencies(self):
     """Generate some data for the test"""
     ModelTest.do_get_dependencies(self)
     host = functions.add_host(u'myhost')
     service = functions.add_lowlevelservice(host, u'myservice')
     event = functions.add_event(service, u'OK', u'Foo')
     return dict(idevent=event.idevent)
Пример #4
0
    def do_get_dependencies(self):
        """Generate some data for the test"""
        ModelTest.do_get_dependencies(self)
        host = functions.add_host(u'myhost')
        vs = functions.add_vigiloserver(u'supserver.example.com')
        app = functions.add_application(u'app')

        return dict(host=host, vigiloserver=vs, application=app)
Пример #5
0
 def do_get_dependencies(self):
     """Création des dépendances du test."""
     ModelTest.do_get_dependencies(self)
     hls = functions.add_highlevelservice(u'HLS')
     host = functions.add_host(u'myhost')
     path = ImpactedPath(supitem=host)
     DBSession.add(path)
     DBSession.flush()
     return dict(path=path, hls=hls)
Пример #6
0
    def do_get_dependencies(self):
        """Generate some data for the test"""
        ModelTest.do_get_dependencies(self)

        # Création du groupe de cartes racine.
        functions.add_mapgroup(u'Root')

        # Création des objets nécessaires  aux relations.
        new_map = functions.add_map(u'Carte 1')
        service = functions.add_highlevelservice(u'myservice')
        return dict(map=new_map, service=service)
Пример #7
0
    def do_get_dependencies(self):
        """Generate some data for the test"""
        ModelTest.do_get_dependencies(self)

        # Création du groupe de cartes racine.
        functions.add_mapgroup(u'Root')

        # Création des objets nécessaires  aux relations.
        new_map = functions.add_map(u'Carte 1')
        host = functions.add_host(u'host1.example.com')
        return dict(map=new_map, host=host)
Пример #8
0
    def do_get_dependencies(self):
        """Generate some data for the test"""
        ModelTest.do_get_dependencies(self)
        host = functions.add_host(u'myhost')
        service = functions.add_lowlevelservice(host, u'myservice')
        depgroup = functions.add_dependency_group(
                        host, service, u'topology', u'+')

        return dict(
            idgroup=depgroup,
            supitem=service,
        )
Пример #9
0
 def do_get_dependencies(self):
     """Generate some data for the test"""
     ModelTest.do_get_dependencies(self)
     host = Host(
         name=u"myhost",
         snmpcommunity=u"public",
         description=u"My Host",
         hosttpl=u"template",
         address=u"127.0.0.1",
         snmpport=1234,
         weight=42,
     )
     DBSession.add(host)
     return dict(hosts=[host])
Пример #10
0
    def do_get_dependencies(self):
        """Generate some data for the test"""
        ModelTest.do_get_dependencies(self)

        # Création du groupe de cartes racine.
        functions.add_mapgroup(u'Root')

        # Création des objets nécessaires  aux relations.
        new_map = functions.add_map(u'Carte 1')
        host1 = functions.add_host(u'host1.example.com')
        host2 = functions.add_host(u'host2.example.com')
        reference = functions.add_lowlevelservice(host1, u'myservice')
        from_node = functions.add_node_host(host1, u'Host 1', new_map)
        to_node = functions.add_node_host(host2, u'Host 2', new_map)
        return dict(from_node=from_node,
                    to_node=to_node,
                    map=new_map,
                    reference=reference)
Пример #11
0
    def do_get_dependencies(self):
        """Génère les dépendances de cette instance."""
        # Insère les noms d'états dans la base de données.
        ModelTest.do_get_dependencies(self)

        host = Host(
            name=u'myhost',
            snmpcommunity=u'public',
            description=u'My Host',
            hosttpl=u'template',
            address=u'127.0.0.1',
            snmpport=u'1234',
            weight=42,
        )
        DBSession.add(host)

        DBSession.flush()
        return dict(idsupitem=host.idhost)
Пример #12
0
 def __init__(self):
     """Initialise le test."""
     ModelTest.__init__(self)
Пример #13
0
 def do_get_dependencies(self):
     """Generate some data for the test"""
     ModelTest.do_get_dependencies(self)
     host = functions.add_host(u'myhost')
     return dict(host=host)
Пример #14
0
 def __init__(self):
     ModelTest.__init__(self)
Пример #15
0
 def do_get_dependencies(self):
     """Generate some data for the test"""
     ModelTest.do_get_dependencies(self)
     # Création de l'hôte physique sur lequel portera la dépendance.
     host = functions.add_host(u'myhost')
     return dict(host=host)
Пример #16
0
 def do_get_dependencies(self):
     """Insertion de données dans la base préalable aux tests."""
     ModelTest.do_get_dependencies(self)
     host = functions.add_host(u'myhost')
     return dict(supitem=host)
Пример #17
0
 def do_get_dependencies(self):
     """Insertion de données dans la base préalable aux tests."""
     ModelTest.do_get_dependencies(self)
     host = functions.add_host(u'myhost')
     service = functions.add_lowlevelservice(host, u'myservice')
     return dict(supitem=service)
Пример #18
0
 def __init__(self):
     """Initialisation du test."""
     ModelTest.__init__(self)
Пример #19
0
 def do_get_dependencies(self):
     """Création des dépendances du test."""
     ModelTest.do_get_dependencies(self)
     host = functions.add_host(u'myhost')
     return dict(supitem=host)