Commit graph

75 commits

Author SHA1 Message Date
Nico Schottelius
99a18232aa VMs now properly set their pricing 2020-05-02 23:44:20 +02:00
Nico Schottelius
c835c874d5 [BREAKING] make Order a stand-alone version
I think that while the idea of an Orderrecord is good, we might get
away / have a simpler implementation if we only use orders and
reference them where needed.

I saved the previous Order model for easy rollback, if my assumption
is wrong.
2020-05-02 22:48:05 +02:00
Nico Schottelius
028f1ebe6e Entry point /beta/vm/ works for creating VM + order 2020-05-02 22:03:34 +02:00
Nico Schottelius
9ef5309b91 +db migrations for pay/vm
Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
2020-05-02 21:21:29 +02:00
Nico Schottelius
4097c2ce13 BillingAddress: make mget_preferred_address a classmethod 2020-05-02 21:20:14 +02:00
Nico Schottelius
7d708cfbb6 Fix empty vat number bug 2020-05-02 20:42:09 +02:00
Nico Schottelius
927fb20671 Versionise API and cleanups 2020-05-02 20:31:36 +02:00
Nico Schottelius
eea654a9f8 Phase in new beta/vm view for creating vms + orders + bills 2020-05-02 19:15:48 +02:00
Nico Schottelius
2cda6441f4 Refactor secret / local settings handling 2020-05-02 00:16:29 +02:00
Nico Schottelius
62d9ccbbef [vpn] begin to introduce save() method
The save() and delete() method will create/manage the orders
2020-04-27 18:25:44 +02:00
Nico Schottelius
1cf20a2cb6 Disable vat validator to get project back running 2020-04-27 18:25:27 +02:00
94932edebe Add user admin endpoint, import from LDAP 2020-04-18 15:11:52 +02:00
a15952862a Make VM order-able again 2020-04-18 15:11:46 +02:00
f61b91dab2 Catch any exception from VIES VAT check 2020-04-18 11:51:13 +02:00
b3afad5d5d Compute VAT rate and amount on bill generation 2020-04-18 11:43:55 +02:00
3a03717b12 Split bills between orders of the same billing address 2020-04-18 11:21:11 +02:00
db9ff5d18b Display allr elevant values on Bill serializer/page 2020-04-18 10:43:23 +02:00
a49fe6ff51 Properly wire billing addresses to uncloud_service 2020-04-18 10:40:11 +02:00
dd0c1cba94 Remove legacy ungleich_service migrations 2020-04-18 10:39:57 +02:00
c0e12884e1 Sync migrations - again! 2020-04-18 09:38:12 +02:00
9bbe3b3b56 Adapt uncloud_pay tests to support billing addresses 2020-04-18 09:26:34 +02:00
e6eba7542b Minor fixes, DB sync after rebase 2020-04-18 09:26:21 +02:00
0522927c50 Start wiring BillingAddresses to bills & orders 2020-04-18 09:13:52 +02:00
3fa1d5753e Minimal VAT validation on billing address registration 2020-04-18 09:13:04 +02:00
c6ca94800e Add BillingAddress structure to users 2020-04-18 09:13:04 +02:00
ad187c02da Import VAT rates "importer" from dynamicweb 2020-04-18 09:13:04 +02:00
86775af4c8 Fix product activation tests after rebase 2020-04-18 09:02:33 +02:00
83d2cd465d Sync migrations after rebase 2020-04-18 08:42:50 +02:00
b6c976b722 Commit autp-generated migrations (missing from master?) 2020-04-18 08:36:41 +02:00
d1e993140c Add simple product activation test 2020-04-18 08:36:41 +02:00
c57780fb4d Add naive GenericServiceProduct 2020-04-18 08:36:41 +02:00
83a0ca0e4e Adapt billing tests to product activation structure 2020-04-18 08:35:22 +02:00
5d5bf486b5 Initial product activation implementation 2020-04-18 08:34:41 +02:00
9a57153c4e Commit missing migrations 2020-04-13 12:02:49 +02:00
f5897ed4b1 Adapt recurring price of VM and Matrix to new scheme 2020-04-13 12:00:59 +02:00
14f59430bb Restore Order.add_record, used by uncloud_pay tests 2020-04-13 11:54:41 +02:00
1a58508f8b Rename ungleich_service into uncloud_service 2020-04-13 11:39:49 +02:00
e67bd03997 Migration fix after rebase 2020-04-13 11:19:18 +02:00
a4cc4304f9 Adapt managed service to create VMDiskProduct 2020-04-13 11:19:18 +02:00
d3b7470294 Wire disk images to VM creation/ordering 2020-04-13 11:19:18 +02:00
a7e9f3c09d Move Order.add_record to save hook in abstract Product 2020-04-13 10:42:44 +02:00
Nico Schottelius
ff133e81b7 [vpn] update to show reservations, create wireguard config 2020-04-12 22:55:22 +02:00
Nico Schottelius
85b4d70592 [vpn] make a vpn creat-able!
[15:40] line:~% http -a nicoschottelius:$(pass ungleich.ch/nico.schottelius@ungleich.ch)  http://localhost:8000/net/vpn/ network_size=48  wireguard_public_key=$(wg genkey | wg pubkey)
HTTP/1.1 201 Created
Allow: GET, POST, HEAD, OPTIONS
Content-Length: 206
Content-Type: application/json
Date: Sun, 12 Apr 2020 13:40:26 GMT
Server: WSGIServer/0.2 CPython/3.7.3
Vary: Accept
X-Content-Type-Options: nosniff
X-Frame-Options: DENY

{
    "extra_data": null,
    "network": "2a0a:e5c1:203::",
    "order": null,
    "owner": 30,
    "status": "PENDING",
    "uuid": "8f977a8f-e06a-4346-94ae-8f525df58b7b",
    "wireguard_public_key": "JvCuUTZHm9unasJkGsLKN0Bf/hu6ZSIv7dnIGPyJ6xA="
}
2020-04-12 15:40:39 +02:00
Nico Schottelius
b55254b9b1 Merge branch 'master' of code.ungleich.ch:uncloud/uncloud 2020-04-12 14:28:39 +02:00
Nico Schottelius
bc033a9087 Merge branch 'master' of code.ungleich.ch:uncloud/uncloud 2020-04-12 11:36:51 +02:00
Nico Schottelius
05f38d157e add a discounter function to the product model 2020-04-12 11:35:37 +02:00
Nico Schottelius
bab59b1879 Merge branch 'master' of code.ungleich.ch:uncloud/uncloud 2020-04-11 21:37:50 +02:00
Nico Schottelius
50b8b7a5f6 in-between commit 2020-04-11 21:37:36 +02:00
276c7e9901 Set VM order starting date on creation 2020-04-09 14:52:56 +02:00
3a37343a73 Set default value for vpnnetworkreservation, rebuild migrations 2020-04-09 14:28:46 +02:00