Commit Graph

286 Commits

Author SHA1 Message Date
3wc
e1f2318273 Merge branch 'tests' into publicapi-tests 2021-07-17 13:37:43 +02:00
3wc
7b9e9debab Disable VM creation check for the moment 2021-07-17 13:37:28 +02:00
3wc
bef379273f Fix botched merge 2021-07-17 13:32:54 +02:00
3wc
82c0c63ff4 Add tests for public API 2021-07-17 13:29:16 +02:00
3wc
d5e0e069d1 Merge branch 'tests' into publicapi-tests 2021-07-17 13:28:50 +02:00
3wc
b8d149e862 Updates for upstream IP handling 2021-07-17 13:23:43 +02:00
3wc
cf42ac5e4d Add basic "create" API..
.. using server-side API tokens
2021-07-17 12:18:16 +02:00
3wc
9823bda4a2 Add SSH key tests 2021-07-17 12:10:28 +02:00
3wc
4c7caa1a38 Initial console tests
NB capsul create isn't working properly, see #83
2021-07-17 11:54:15 +02:00
3wc
665e087bd4 Basic testing using flask-testing
This commit makes it possible to override settings during tests, by
switching capsulflask/__init__.py to a "create_app" pattern, and using
`dotenv_values` instead of `load_dotenv`.

The create_app() method returns a Flask app instance, to give
more control over when to initialise the app. This allows setting
environment variables in test files.

Then, use dotenv_values to override loaded .env variables with ones from
the environment, so that tests can set `POSTGRES_CONNECTION_PARAMETERS`
and `SPOKE_MODEL` (possibly others in future..).

Inital tests for the "landing" pages, and login / activation, are
included.
2021-07-17 10:38:04 +02:00
908d02803f move hardcoding public3 to the right place 2021-07-12 16:10:28 -05:00
6e6bd2b143 fix syntax error 2021-07-12 16:00:37 -05:00
47fbaab403 hardcode network_name=public3 to sidestep phantom dhcp lease issues 2021-07-12 15:59:20 -05:00
06a2bd3a6f add public_ipv4_first_usable_ip, public_ipv4_last_usable_ip 2021-07-12 14:38:56 -05:00
fbe9c7fca4 fix last IP address hanging off the end of the display on admin page 2021-07-12 12:27:07 -05:00
6bdb133153 make admin display work better on phones 2021-07-12 12:23:27 -05:00
b459e56f3a use the provided network_name when creating a capsul 2021-07-12 12:19:56 -05:00
be54117736 migration 17: network_name -> virtual_bridge_name, add network_name col 2021-07-12 12:16:32 -05:00
aaf33a245b point capsul at new public3/virbr3 network 2021-07-12 11:29:37 -05:00
ad9c3476c7 simplify cidr block logic a little bit 2021-07-12 11:29:33 -05:00
fcbea1e29b fixing capsul creation after I broke it with the pre-allocated IP
address changes
2021-07-11 12:18:58 -05:00
a2f2e744e4 MAIL_USE_TLS=False, MAIL_USE_SSL=True defaults 2021-07-11 10:28:47 -05:00
79ef90c380 hub allocate capsul IP addr when the create operation is being claimed
create.sh will now be passed two extra arguments from the web app:

network_name and public_ipv4_address

network_name will be virbr1 or virbr2 or whatever the network is called
and public_ipv4_address will be an ipv4 from that network which is not
currently being used
2021-07-09 17:08:51 -05:00
c216c5b992 adjust admin display 2021-07-09 14:52:46 -05:00
47cdb0c7e6 hotfix support MAIL_USE_SSL 2021-07-09 14:44:48 -05:00
74d77224f7 finishing touches and fixes on managed IPs database migration 16 2021-07-09 14:35:23 -05:00
862b14545b more managed ips work: cli sql improvements, added admin panel 2021-07-09 14:13:28 -05:00
e685c8a773 start working on managed IPs 2021-07-08 14:10:14 -05:00
1e19902df1 fix syntax error and beeteeceepae2 warning formatting 2021-07-07 21:12:31 -05:00
a08edd870f add beeteeceepae2 message to btcpay launch page & cleanup 2021-07-07 21:04:23 -05:00
a42d35be51 more fixing default values for quick start 2021-07-07 15:17:00 -05:00
fdab832268 explain how to give yourself money when doing quickstart 2021-07-07 13:55:52 -05:00
bdabd61057 fix defaults for running locally and make email server not required. 2021-07-07 13:47:21 -05:00
3cb6992359 don't crash if btcpay key is invalid: log warning msg 2021-06-27 10:46:48 -05:00
ebf338eb12 don't crash if btcpay key is invalid 2021-06-27 10:41:46 -05:00
j3s
e6cba96d2d Correct default email settings 2021-06-27 10:40:34 -05:00
j3s
6f265f5c8a Move back to public1 for more availability 2021-06-24 14:18:55 -05:00
e23dd7f776 Move to public2, more free space 2021-05-15 14:49:36 +00:00
961bb4976b remove newlines and strip content first before parsing ssh key name 2021-05-12 12:21:26 -05:00
4590671984 improve invalid ssh key name error message 2021-05-12 12:18:39 -05:00
e3e1059ba1 allow colons in ssh key names 2021-05-12 12:14:55 -05:00
9d6fe075b0 Merge remote-tracking branch 'origin/master' 2021-05-12 11:49:25 -05:00
71db4b3333 allow colons in ssh key comments and adjust ssh key whitespace handling 2021-05-12 11:48:55 -05:00
525de7450e Correct ip detection logic, flip network to public1 (capacity issues) 2021-04-20 22:20:44 +00:00
46a691b876 temporarily disable serializable transactions
until this can get figured out better
2021-03-23 16:03:48 -05:00
c623c65fda Limit the utilization of serializable transactions
A user encountered this error when deleting a vm:

self.cursor.execute("UPDATE vms SET deleted = now() WHERE email = %s AND
id = %s", ( email, id))

psycopg2.errors.SerializationFailure: could not serialize access due to
read/write dependencies among transactions
2021-03-23 15:59:17 -05:00
107a5fc659 attempting to fix "can't look up exception for http status 200" 2021-03-23 15:57:07 -05:00
8717ad477e Revert "fix postgres serializable transaction"
This reverts commit 0a70ea8a95.
2021-03-21 12:28:19 -05:00
1136e2436b baikal memory upgrade and patchign to changelog 2021-03-21 12:25:24 -05:00
6eb959bd12 Revert "Add notice"
This reverts commit 7f5b431364.
2021-03-21 12:16:25 -05:00