Joshua Boniface
c776aba8b3
Standardize fuzzy matching and use fullmatch
...
Solves two problems:
1. How match fuzziness was used was very inconsistent; make them all the
same, i.e. "if is_fuzzy and limit, apply .* to both sides".
2. Use re.fullmatch instead of re.match to ensure exact matching of the
regex to the value. Without fuzziness, this would sometimes cause
inconsistent behavior, for instance if a limit was non-fuzzy "vm",
expecting to match the actual "vm", but also matching "vm1" too.
2021-12-06 16:35:29 -05:00
Joshua Boniface
2083fd824a
Reformat code with Black code formatter
...
Unify the code style along PEP and Black principles using the tool.
2021-11-06 03:02:43 -04:00
Joshua Boniface
40e7e04aad
Fix invalid schema key
...
Addresses #144
2021-10-09 18:42:33 -04:00
Joshua Boniface
89f62318bd
Add MTU to network creation/modification
...
Addresses #144
2021-10-09 17:51:32 -04:00
Joshua Boniface
e623909a43
Store PHY MAC for VFs and restore after free
2021-06-22 00:56:47 -04:00
Joshua Boniface
eeb83da97d
Add support for SR-IOV NICs to VMs
2021-06-21 23:18:22 -04:00
Joshua Boniface
64d1a37b3c
Add PCIe device paths to SR-IOV VF information
...
This will be used when adding VM network interfaces of type hostdev.
2021-06-21 21:08:46 -04:00
Joshua Boniface
13cc0f986f
Implement SR-IOV VF config set
...
Also fixes some random bugs, adds proper interface sorting, and assorted
tweaks.
2021-06-21 18:40:11 -04:00
Joshua Boniface
33195c3c29
Ensure VF list is sorted
2021-06-21 17:11:48 -04:00
Joshua Boniface
a697c2db2e
Add SRIOV PF and VF listing to API
2021-06-21 01:42:55 -04:00
Joshua Boniface
30a160d5ff
Fix invalid type_key
2021-06-13 21:20:10 -04:00
Joshua Boniface
1cbc66dccf
Fix bugs in lease listing
2021-06-13 21:10:42 -04:00
Joshua Boniface
bbd903e568
Fix bad schema name
2021-06-13 21:02:44 -04:00
Joshua Boniface
9511dc9864
Correct issue with invalid ACL ordering
2021-06-13 20:55:28 -04:00
Joshua Boniface
8269930d40
Fix bad entry in network add
2021-06-13 18:22:13 -04:00
Joshua Boniface
0a162b304a
Convert network.py to new ZK schema handler
2021-06-12 18:40:25 -04:00
Joshua Boniface
62cb72b62f
Rework network library for new zkhandler
2021-05-29 20:53:42 -04:00
Joshua Boniface
0bf276fd51
Update copyright year in headers
2021-03-25 17:01:55 -04:00
Joshua Boniface
f4ec161aa2
Update file copyright header.
...
Remove the option to select a later version of the GPL.
2021-03-25 16:58:02 -04:00
Joshua Boniface
f58e95e4c1
Fix bugs in modifying networks
...
1. Use a consistent "is not None" to verify records are changing.
2. Fix bug where IPv6 network had no remove setter (it is now a blank
string, the first thing I would expect).
3. 1 fixes a bug whereby it was impossible to unset DHCPv4 status.
2020-12-04 04:15:04 -05:00
Joshua Boniface
0bf130077c
Lint: W605 invalid escape sequence '<char>'
...
The previous attempt to correct these with character classes failed.
Instead, use the proper `r'blah'` regex formatting.
2020-11-07 17:41:09 -05:00
Joshua Boniface
3ed97d209f
Revert "Lint: W605 invalid escape sequence '\^'"
...
This reverts commit 639937f9c2
.
2020-11-07 17:39:34 -05:00
Joshua Boniface
f33398458e
Revert "Lint: W605 invalid escape sequence '\$'"
...
This reverts commit 76b1cafdcc
.
2020-11-07 17:38:03 -05:00
Joshua Boniface
260b39ebf2
Lint: E302 expected 2 blank lines, found X
2020-11-07 14:45:24 -05:00
Joshua Boniface
e9643651f7
Lint: F401 'daemon_lib.ansiprint' imported but unused
...
Removing further obsolete code from daemon-lib
2020-11-07 13:50:27 -05:00
Joshua Boniface
449f766a2c
Lint: F821 undefined name 'zk_conn'
...
Actually removes these entire sections of dead code; the daemon-common
library does no formatting at all since it is no longer used by the CLI.
2020-11-07 13:45:26 -05:00
Joshua Boniface
d2e5ede399
Lint: E202 whitespace before ')'
2020-11-07 12:58:54 -05:00
Joshua Boniface
c88965e898
Lint: E201 whitespace after '('
2020-11-07 12:39:27 -05:00
Joshua Boniface
fad27a7f4d
Lint: E131 continuation line unaligned for hanging indent
2020-11-06 22:29:49 -05:00
Joshua Boniface
69858788c1
Lint: E227 missing whitespace around bitwise or shift operator
2020-11-06 21:41:10 -05:00
Joshua Boniface
2eef6a1c21
Lint: E265 block comment should start with '# '
2020-11-06 21:32:17 -05:00
Joshua Boniface
4b47a2424c
Lint: E303 too many blank lines (2)
2020-11-06 21:16:52 -05:00
Joshua Boniface
cb2defbde9
Lint: W391 blank line at end of file
2020-11-06 21:14:19 -05:00
Joshua Boniface
5da314902f
Lint: F841 local variable '<variable>' is assigned to but never used
2020-11-06 21:13:13 -05:00
Joshua Boniface
fb4aafcea9
Lint: E111 indentation is not a multiple of four
2020-11-06 19:26:22 -05:00
Joshua Boniface
2d8f684fc8
Lint: E722 do not use bare 'except' (2)
2020-11-06 19:24:10 -05:00
Joshua Boniface
d9e7b7ec15
Lint: F401 <library> imported but unused
2020-11-06 19:22:49 -05:00
Joshua Boniface
ebf254f62d
Lint: W293 blank line contains whitespace
2020-11-06 19:11:07 -05:00
Joshua Boniface
76b1cafdcc
Lint: W605 invalid escape sequence '\$'
2020-11-06 19:01:22 -05:00
Joshua Boniface
639937f9c2
Lint: W605 invalid escape sequence '\^'
2020-11-06 18:59:30 -05:00
Joshua Boniface
3cf90c46ad
Correct bad handling of static reservations
2020-05-09 10:20:06 -04:00
Joshua Boniface
7b2180b626
Get both reservations in leases by default
2020-05-09 10:05:55 -04:00
Joshua Boniface
4505b239eb
Rename API and common Debian packages
...
Closes #79
2020-02-08 18:50:38 -05:00