Exemplo n.º 1
0
 def test_1(self):
     """
     Tests simple application create and delete
     """
     a1 = Application("testapp")
     a1.create()
     a1.delete()
Exemplo n.º 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()
Exemplo n.º 3
0
Arquivo: rest.py Projeto: nuaays/argo
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")
Exemplo n.º 4
0
 def test_3(self):
     """
     Test deletion of app that does not exists
     """
     a1 = Application("testappdoesnotexist")
     a1.delete()