Matthew Stidham
f9b3347138
LFRequest: Fix whitespace
...
Signed-off-by: Matthew Stidham <stidmatt@gmail.com >
2021-12-06 11:24:18 -08:00
Matthew Stidham
8a2a466edf
LFRequest: Remove invalid comparisons
...
Signed-off-by: Matthew Stidham <stidmatt@gmail.com >
2021-11-16 11:06:19 -08:00
Matthew Stidham
12da46d6fb
Remove == True error in LFRequest
...
Signed-off-by: Matthew Stidham <stidmatt@gmail.com >
2021-11-15 13:36:27 -08:00
Jed Reynolds
ec76d13ba5
LFRequest.py: json_post debug message more readable
...
Signed-off-by: Jed Reynolds <jed@bitratchet.com >
2021-11-08 22:28:54 -08:00
Matthew Stidham
c4511ad39a
Fix LFRequest.get so it inherits debug commands from the class
...
Signed-off-by: Matthew Stidham <stidmatt@gmail.com >
2021-11-08 18:52:26 -08:00
Jed Reynolds
8a0b5c22f0
LFRequest.py: converting if(debug):print() to self.logger.debug() statements
...
This change hooks into the global python logging instance and exercises level based logging
without more advanced logic like "digest/json/http/gui" as documented elsewhere. Need to
establish the correctness of this usage before moving forward.
Signed-off-by: Jed Reynolds <jed@bitratchet.com >
2021-11-03 19:53:30 -07:00
Jed Reynolds
e446aaed39
LFRequest.py: error message prints out called URL
...
Signed-off-by: Jed Reynolds <jed@candelatech.com >
2021-09-28 01:14:15 -07:00
Matthew Stidham
65808d21fa
1. Fix circular import error in LFRequest
...
2. add import re to lfcli_base
3. add debug output to l3_cxprofile, so it is how it used to be
4. add help options to regression_test so we can test how the help flags are working
5. Make test_ip_variable_time work better when it is imported directly by moving most of the logic to a function under IPVariableTime
6. Add init.py file to the LANforge directory and fix archiving in the to_pip.py script
Signed-off-by: Matthew Stidham <stidmatt@gmail.com >
2021-09-23 14:37:53 -07:00
Matthew Stidham
e6cf6b9337
1. Create pandas_extensions.py
...
2. Remove unused imports
Signed-off-by: Matthew Stidham <stidmatt@gmail.com >
2021-09-21 11:11:04 -07:00
Matthew Stidham
36400e003d
Making it so that lanforge-scripts can work if the repository isn't named exactly the same way
...
Signed-off-by: Matthew Stidham <stidmatt@gmail.com >
2021-09-17 15:29:15 -07:00
erinnerim
1d7578251c
Updates to import statements:
...
- Import importlib, os, and sys to each python script.
- Append "lanforge-scripts" root directory to the system path, allowing each script to be called from an antecedent directory. e.g.
if 'lanforge-scripts' not in sys.path:
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../../")))
- All statements of the form 'from <module> import <class>' replace with:
<module> = importlib.import_module("lanforge-scripts.<directory>.<module>")
<class> = <module>.<class>
2021-09-15 16:17:16 -07:00
erinnerim
136cd01fa0
Revert "importlib refactor LFRequest.py"
...
This reverts commit 0642ea475d .
2021-09-10 17:57:08 -07:00
erinnerim
0642ea475d
importlib refactor LFRequest.py
2021-09-10 17:05:58 -07:00
Jed Reynolds
9e116bd950
LFRequest.py: adds todo comments
...
Signed-off-by: Jed Reynolds <jed@candelatech.com >
2021-09-09 15:47:46 -07:00
Jed Reynolds
c0f02b7945
LFRequest.py: corrects import reference
...
Signed-off-by: Jed Reynolds <jed@candelatech.com >
2021-08-16 14:10:57 -07:00
Jed Reynolds
aa1476a518
LFRequest.py: fixes confusion between urllib.request module name and request instance myrequest
...
Signed-off-by: Jed Reynolds <jed@candelatech.com >
2021-07-29 16:53:21 -07:00
Jed Reynolds
f60f0055be
LFRequest error printing is now more centralized:
...
print_diagnostics extracts X-Error headers first
LFRequest can track errors in self.error_list
LFReuqest can print errors
Classes lf lfcli_base calling lfrequest.get_as_json() can expose 404 or other errors using lfrequest.print_errors()
Signed-off-by: Jed Reynolds <jed@candelatech.com >
2021-07-29 16:53:21 -07:00
Jed Reynolds
9a5f15ec9b
LFRequest.py: reduces volume of debug output
...
- headers not shown on 200 or 404
- headers not shown unless die_on_error_
- short 404 message now used
Signed-off-by: Jed Reynolds <jed@candelatech.com >
2021-03-09 01:07:48 -08:00
Jed Reynolds
6fb5313a6c
LFRequest.py: do not die when attempting a port that is already deleted
...
Signed-off-by: Jed Reynolds <jed@candelatech.com >
2021-03-05 16:06:41 -08:00
Matthew Stidham
9308f1df87
Fix die_on_error command so it doesn't trigger on a 404 error
...
Signed-off-by: Matthew Stidham <stidmatt@protonmail.com >
2021-03-03 12:09:37 -08:00
Jed Reynolds
6c9d1e484d
LFRequest.py: adds stacktrace output to errors that exit
...
Signed-off-by: Jed Reynolds <jed@candelatech.com >
2021-03-02 00:08:00 -08:00
Jed Reynolds
062cf04d9b
lfcli_base.py: adds proxy construction logic
2020-12-18 12:36:26 -08:00
Jed Reynolds
8538698072
GUI: LFRequest: WIP: adding places for proxy assignments
2020-12-10 20:26:34 -08:00
Jed Reynolds
b43cb65ea0
LFRequest: fixes broken url encoding by doing str replace only on # and ' '
2020-12-03 22:04:56 -08:00
Jed Reynolds
69985d88bf
LFRequest.py: fixes busted test for space in URL
2020-12-03 21:43:09 -08:00
Jed Reynolds
7c097935ce
LFRequest: tests for # and space in and does URL encoding
2020-12-03 18:11:49 -08:00
Jed Reynolds
484e0e329e
LFRequest.py: corrects parameter name
2020-11-25 14:52:57 -08:00
Jed Reynolds
6d550da900
LFRequest: adds put and delete methods
2020-11-25 10:46:06 -08:00
Logan Lipke
24e510a848
Updated methods to fit PEP8 standards
2020-10-15 15:36:10 -07:00
Jed Reynolds
88a60f3bda
LFRequest.py: whitespace
2020-08-07 16:24:25 -07:00
Ben Greear
db4a5b7728
json: Add methods to wait for cx, endp to be found.
...
This lets scripts wait until we are sure the system can handle
further work.
Ensure we print out error in case the URL processing logic
detects and error and plans to exit.
2020-08-05 15:25:22 -07:00
Jed Reynolds
730ad7ecdf
LFRequest.py: adds plain_get()
2020-07-31 17:44:23 -07:00
Jed Reynolds
1ed694a155
LFRequest.py: improves self.die_on_error logic to absolutely die on conditions that are !404
2020-07-29 22:20:25 -07:00
Jed Reynolds
b9bcba58b0
JSON: simplifies die_on_error logic
2020-07-28 23:42:42 -07:00
Jed Reynolds
89b8dd7aef
LFRequest.py: updates debug line refs
2020-06-30 15:34:05 -07:00
Jed Reynolds
ebf6737edb
JSON: replace show_error with debug
2020-06-29 23:21:06 -07:00
Jed Reynolds
67ad3fa412
LFRequest.py: introduces return parameter for fetching resulting JSON data
2020-06-29 19:38:02 -07:00
Jed Reynolds
131880366f
Json: fixes debugging and die_on_error logic
2020-06-25 12:32:28 -07:00
Jed Reynolds
0e0c8444ca
LFRequest.py: fixes single-arg LFRequest() call
2020-06-09 13:09:42 -07:00
Jed Reynolds
83304a1c30
LFRequest.py: enabling more debugging
2020-06-05 15:13:01 -07:00
Jed Reynolds
a9d69aa681
LFRequest.py fixes check
2020-06-05 14:45:41 -07:00
Logan Lipke
4445c0f696
Moved leading/trailing slash check to prevent NoneType Errors
2020-06-05 14:14:26 -07:00
Logan Lipke
55a7ff3116
Moved leading/trailing slash check to prevent NoneType Errors
2020-06-05 14:03:58 -07:00
Logan Lipke
bc6499e213
Added check for valid url format for LFRequest init
2020-06-05 13:07:06 -07:00
Jed Reynolds
29c6c7c7b8
LFRequest.py: tidies up lint errors like redundant parens
2020-06-01 21:45:47 -07:00
Jed Reynolds
72a2af3e5c
LFRequest.py: quiets logging on 404 error, fixes renamed ref
2020-05-26 17:11:03 -07:00
Jed Reynolds
49adca8eba
corrects locations found in comments
2020-04-10 15:26:03 -07:00
Jed Reynolds
ab4c7fd120
LFRequest: uses decode(utf-8) to be compatible with python3.5
2020-04-10 12:20:47 -07:00
Logan Lipke
f189fe5f13
LFRequest: updates get() error expression
2020-04-10 11:43:53 -07:00
Jed Reynolds
7f6b5d5e1e
LFRequest updated to show HTTPMessage errors via headers
2020-04-09 14:43:58 -07:00