Beispiel #1
0
 def test_1(self):
     """
     Tests simple application create and delete
     """
     a1 = Application("testapp")
     a1.create()
     a1.delete()
Beispiel #2
0
 def test_2(self):
     """
     Test assertion when application name exists
     """
     a1 = Application("testapp")
     a2 = Application("testapp")
     a1.create()
     with self.assertRaises(AXKubeApiException):
         a2.create()
     a1.delete()
Beispiel #3
0
def axmon_application_delete(applicationname):
    """
    Delete the application. This has an optional query parameter:
    timeout: In seconds.
    Returns: A json dict with the status of the request in the following format
        { 'result': 'ok' }
    """
    timeout = request.args.get('timeout', None)
    if timeout is not None:
        timeout = int(timeout)
    application = Application(applicationname)
    application.delete(timeout=timeout)
    return jsonify(result="ok")
Beispiel #4
0
 def test_3(self):
     """
     Test deletion of app that does not exists
     """
     a1 = Application("testappdoesnotexist")
     a1.delete()