Ejemplo n.º 1
0
    def test_recursive(self):

        sid = 'lala'
        c = DataIslandManagerClient(hostname)
        c.createSession(sid)

        # invalid dropspec, app doesn't exist
        # This is not checked at the DIM level but only at the NM level
        # The exception should still pass through though
        with self.assertRaises(exceptions.SubManagerException) as cm:
            c.addGraphSpec(sid, [{
                'oid': 'a',
                'type': 'app',
                'app': 'doesnt.exist',
                'node': hostname
            }])
        ex = cm.exception
        self.assertTrue(hostname in ex.args[0])
        self.assertTrue(isinstance(ex.args[0][hostname],
                                   InvalidGraphException))