15 | 15 |
faraday/server/commands/status_check.py | 124 ++++++++++++++++----------------
|
16 | 16 |
3 files changed, 90 insertions(+), 90 deletions(-)
|
17 | 17 |
|
18 | |
diff --git a/faraday/client/start_client.py b/faraday/client/start_client.py
|
19 | |
index eade808..8a06ea3 100755
|
20 | 18 |
--- a/faraday/client/start_client.py
|
21 | 19 |
+++ b/faraday/client/start_client.py
|
22 | |
@@ -170,9 +170,9 @@ def getParserArgs():
|
|
20 |
@@ -180,9 +180,9 @@ def getParserArgs():
|
23 | 21 |
default=None,
|
24 | 22 |
help="File containing user's credentials to be used in CLI mode")
|
25 | 23 |
|
|
32 | 30 |
parser.add_argument('--keep-old', action='store_true', help='Keep old object in CLI mode if Faraday find a conflict')
|
33 | 31 |
parser.add_argument('--keep-new', action='store_true', help='Keep new object in CLI mode if Faraday find a conflict (DEFAULT ACTION)')
|
34 | 32 |
|
35 | |
@@ -182,33 +182,33 @@ def getParserArgs():
|
|
33 |
@@ -192,33 +192,33 @@ def getParserArgs():
|
36 | 34 |
return parser.parse_args()
|
37 | 35 |
|
38 | 36 |
|
|
86 | 84 |
|
87 | 85 |
def setConf():
|
88 | 86 |
"""
|
89 | |
diff --git a/faraday/manage.py b/faraday/manage.py
|
90 | |
index e1fefca..17662c7 100755
|
91 | 87 |
--- a/faraday/manage.py
|
92 | 88 |
+++ b/faraday/manage.py
|
93 | |
@@ -141,9 +141,9 @@ def sql_shell():
|
|
89 |
@@ -100,9 +100,9 @@ def sql_shell():
|
94 | 90 |
@click.command(help='Checks configuration and faraday status.')
|
95 | 91 |
@click.option('--check_postgresql', default=False, is_flag=True)
|
96 | 92 |
@click.option('--check_faraday', default=False, is_flag=True)
|
|
102 | 98 |
|
103 | 99 |
selected = False
|
104 | 100 |
exit_code = 0
|
105 | |
@@ -157,9 +157,9 @@ def status_check(check_postgresql, check_faraday, check_dependencies, check_conf
|
|
101 |
@@ -116,9 +116,9 @@ def status_check(check_postgresql, check
|
106 | 102 |
status_check_functions.print_faraday_status()
|
107 | 103 |
selected = True
|
108 | 104 |
|
|
115 | 111 |
|
116 | 112 |
if check_config:
|
117 | 113 |
status_check_functions.print_config_status()
|
118 | |
diff --git a/faraday/server/commands/status_check.py b/faraday/server/commands/status_check.py
|
119 | |
index 40c6fd1..56bc971 100644
|
120 | 114 |
--- a/faraday/server/commands/status_check.py
|
121 | 115 |
+++ b/faraday/server/commands/status_check.py
|
122 | 116 |
@@ -20,7 +20,7 @@ from faraday.server.web import app
|
|
201 | 195 |
|
202 | 196 |
|
203 | 197 |
def check_credentials():
|
204 | |
@@ -255,34 +255,34 @@ def print_faraday_status():
|
|
198 |
@@ -256,31 +256,31 @@ def print_faraday_status():
|
205 | 199 |
.format(yellow=Fore.YELLOW, white=Fore.WHITE))
|
206 | 200 |
|
207 | 201 |
|
|
209 | 203 |
- """Prints Status of the dependencies using check_server_dependencies() and check_client_dependencies()"""
|
210 | 204 |
-
|
211 | 205 |
- status, server_dep = check_server_dependencies()
|
|
206 |
- red = Fore.RED
|
|
207 |
- white = Fore.WHITE
|
|
208 |
- green = Fore.GREEN
|
212 | 209 |
- if status == True:
|
213 | |
- print('[{red}-{white}] Some server dependencies are old: [' + ', '.join(server_dep) + ']. Update them with \"pip install -r requirements_server.txt -U\"') \
|
214 | |
- .format(red=Fore.RED, white=Fore.WHITE)
|
|
210 |
- print(f"[{red}-{white}] Some server dependencies are old: [{', '.join(server_dep)}']. Update them with \"pip install -r requirements_server.txt -U\"")
|
215 | 211 |
-
|
216 | 212 |
- elif status == 0:
|
217 | |
- print('[{red}-{white}] Client dependencies not met: [' + ', '.join(server_dep) + '] Install them with \"pip install -r requirements_server.txt -U\"')\
|
218 | |
- .format(red=Fore.RED, white=Fore.WHITE)
|
|
213 |
- print(f"[{red}-{white}] Client dependencies not met: [{', '.join(server_dep)}'] Install them with \"pip install -r requirements_server.txt -U\"")
|
219 | 214 |
-
|
220 | 215 |
- else:
|
221 | |
- print('[{green}+{white}] Server dependencies met' \
|
222 | |
- .format(green=Fore.GREEN, white=Fore.WHITE))
|
|
216 |
- print(f'[{green}+{white}] Server dependencies met')
|
223 | 217 |
-
|
224 | 218 |
- status, client_dep = check_client_dependencies()
|
225 | 219 |
- if status == True:
|
226 | |
- print('[{red}-{white}] Some client dependencies are old: [' + ', '.join(client_dep) + ']. Update them with \"pip install -r requirements.txt -U\"') \
|
227 | |
- .format(red=Fore.RED, white=Fore.WHITE)
|
|
220 |
- print(f"[{red}-{white}] Some client dependencies are old: [{', '.join(client_dep)}]. Update them with \"pip install -r requirements.txt -U\"")
|
228 | 221 |
-
|
229 | 222 |
- elif status == 0:
|
230 | |
- print('[{red}-{white}] Client dependencies not met: [' + ', '.join(client_dep) + ']. Install them with \"pip install -r requirements.txt -U\"')\
|
231 | |
- .format(red=Fore.RED, white=Fore.WHITE)
|
|
223 |
- print(f"[{red}-{white}] Client dependencies not met: [{', '.join(client_dep)}]. Install them with \"pip install -r requirements.txt -U\"")
|
232 | 224 |
-
|
233 | 225 |
- else:
|
234 | |
- print('[{green}+{white}] Client dependencies met'\
|
235 | |
- .format(green=Fore.GREEN, white=Fore.WHITE))
|
|
226 |
- print(f'[{green}+{white}] Client dependencies met')
|
236 | 227 |
+#def print_depencencies_status():
|
237 | 228 |
+# """Prints Status of the dependencies using check_server_dependencies() and check_client_dependencies()"""
|
238 | 229 |
+#
|
239 | 230 |
+# status, server_dep = check_server_dependencies()
|
|
231 |
+# red = Fore.RED
|
|
232 |
+# white = Fore.WHITE
|
|
233 |
+# green = Fore.GREEN
|
240 | 234 |
+# if status == True:
|
241 | |
+# print('[{red}-{white}] Some server dependencies are old: [' + ', '.join(server_dep) + ']. Update them with \"pip install -r requirements_server.txt -U\"') \
|
242 | |
+# .format(red=Fore.RED, white=Fore.WHITE)
|
|
235 |
+# print(f"[{red}-{white}] Some server dependencies are old: [{', '.join(server_dep)}']. Update them with \"pip install -r requirements_server.txt -U\"")
|
243 | 236 |
+#
|
244 | 237 |
+# elif status == 0:
|
245 | |
+# print('[{red}-{white}] Client dependencies not met: [' + ', '.join(server_dep) + '] Install them with \"pip install -r requirements_server.txt -U\"')\
|
246 | |
+# .format(red=Fore.RED, white=Fore.WHITE)
|
|
238 |
+# print(f"[{red}-{white}] Client dependencies not met: [{', '.join(server_dep)}'] Install them with \"pip install -r requirements_server.txt -U\"")
|
247 | 239 |
+#
|
248 | 240 |
+# else:
|
249 | |
+# print('[{green}+{white}] Server dependencies met' \
|
250 | |
+# .format(green=Fore.GREEN, white=Fore.WHITE))
|
|
241 |
+# print(f'[{green}+{white}] Server dependencies met')
|
251 | 242 |
+#
|
252 | 243 |
+# status, client_dep = check_client_dependencies()
|
253 | 244 |
+# if status == True:
|
254 | |
+# print('[{red}-{white}] Some client dependencies are old: [' + ', '.join(client_dep) + ']. Update them with \"pip install -r requirements.txt -U\"') \
|
255 | |
+# .format(red=Fore.RED, white=Fore.WHITE)
|
|
245 |
+# print(f"[{red}-{white}] Some client dependencies are old: [{', '.join(client_dep)}]. Update them with \"pip install -r requirements.txt -U\"")
|
256 | 246 |
+#
|
257 | 247 |
+# elif status == 0:
|
258 | |
+# print('[{red}-{white}] Client dependencies not met: [' + ', '.join(client_dep) + ']. Install them with \"pip install -r requirements.txt -U\"')\
|
259 | |
+# .format(red=Fore.RED, white=Fore.WHITE)
|
|
248 |
+# print(f"[{red}-{white}] Client dependencies not met: [{', '.join(client_dep)}]. Install them with \"pip install -r requirements.txt -U\"")
|
260 | 249 |
+#
|
261 | 250 |
+# else:
|
262 | |
+# print('[{green}+{white}] Client dependencies met'\
|
263 | |
+# .format(green=Fore.GREEN, white=Fore.WHITE))
|
|
251 |
+# print(f'[{green}+{white}] Client dependencies met')
|
264 | 252 |
|
265 | 253 |
|
266 | 254 |
def print_config_status():
|
|
255 |
@@ -326,4 +326,4 @@ def full_status_check():
|
|
256 |
|
|
257 |
print('\n{white}Checking Faraday config...{white}'.format(white=Fore.WHITE))
|
|
258 |
print_config_status()
|
|
259 |
-# I'm Py3
|
|
260 |
\ No newline at end of file
|
|
261 |
+# I'm Py3
|