Roberto Berto 4 tahun lalu
induk
melakukan
44fe643b66
2 mengubah file dengan 1 tambahan dan 21 penghapusan
  1. 1 21
      vycontrol/vapilib.py
  2. 0 0
      vycontrol/vycontrol/settings/production_example.py

+ 1 - 21
vycontrol/vapilib.py

@@ -5,7 +5,6 @@ import sys
 import logging
 #logger = logging.getLogger(__name__)
 
-
 from config.models import Instance
 from django.contrib.auth.models import Group
 from django.contrib.auth.models import User
@@ -20,7 +19,6 @@ class vyapi:
     data =      None
     reason =    None
     def __init__(self, result, data = None, reason=None):
-
         if result == True:
             self.success = True
         else:
@@ -29,8 +27,6 @@ class vyapi:
         self.data = data
         self.reason = reason
 
-log("api " + " !!!!!!!!!!!!!! START NEW WEB PROCESS", end=False)
-
 API_LIST = {}
 API_LIST["get"] = {}
 API_LIST["get"]["description"]              = 'Show config'
@@ -97,10 +93,6 @@ def get_api_data(hostname, api, op, cmd):
     if api_exists == False:
         return False
     else:
-        #log("api_path ", api_path)
-        #log("protocol ", protocol)
-        #log("instance.hostname ", instance.hostname)
-        #log("instance.port ", instance.port)
         api_url = protocol + "://" + instance.hostname + ":" + str(instance.port) + "/" + api_path
         api_data = {
             'api_url':          api_url,
@@ -148,16 +140,11 @@ def api(hostname, api, op, cmd, description = ""):
 
         return v
 
-
-
     try:
         respjson = resp.json()
     except json.JSONDecodeError:
         respjson = {'success': False, 'error': None, 'data': None}
 
-    #log("api raw", respjson)
-
-
     v = vyapi(
         result =    respjson['success'],
         reason =    respjson['error'],
@@ -166,9 +153,6 @@ def api(hostname, api, op, cmd, description = ""):
 
     log("api resp", [v.result, v.reason, v.data])
 
-
-
-
     log_vars = {
         'api_url':      api_data['api_url'],
         'api_op':       api_data['api_op'],
@@ -182,8 +166,4 @@ def api(hostname, api, op, cmd, description = ""):
 
     log("api " + description, log_vars)
 
-    return v
-
-    
-
-
+    return v

+ 0 - 0
vycontrol/vycontrol/settings/production.py → vycontrol/vycontrol/settings/production_example.py