Welcome to uncloud
- Welcome to uncloud, checkout the following locations:
+
+ Welcome to uncloud, the Open Source cloud management
+ system by
ungleich.
+ It is an
API driven system with
+ some convience views provided by
+ the
Django Rest
+ Framework. You can
+ freely
access
+ the source code of uncloud.
-
- - The uncloud API
-
- Register a credit card
- (this is required to be done via Javascript so that we never see
- your credit card, but it is sent directly to stripe)
- You can list your credit card via the API.
+
+
Credit cards
+
+ Credit cards are registered with stripe. We only save a the
+ last 4 digits and the expiry date of the card to make
+ identification for you easier.
+
+
+
+ - Register a credit card
+ (this is required to be done via Javascript so that we never see
+ your credit card, but it is sent directly to stripe)
+
- You can list your
+ credit cards
+ By default the first credit card is used for charging
+ ("active: true") and later added cards will not be
+ used. To change this, first disable the active flag and
+ then set it on another credit card.
+
+
+
+
Payments and Balance
+ To trigger a payment
+
+
+
+
+
Networking
+ With uncloud you can use a variety of network related services.
+
+
+
-
{% endblock %}
diff --git a/uncloud/urls.py b/uncloud/urls.py
index 15623bd..82bce86 100644
--- a/uncloud/urls.py
+++ b/uncloud/urls.py
@@ -26,38 +26,27 @@ router = routers.DefaultRouter()
router.register(r'beta/vm', vmviews.NicoVMProductViewSet, basename='nicovmproduct')
# VM
-router.register(r'v1/vm/snapshot', vmviews.VMSnapshotProductViewSet, basename='vmsnapshotproduct')
-router.register(r'v1/vm/diskimage', vmviews.VMDiskImageProductViewSet, basename='vmdiskimageproduct')
-router.register(r'v1/vm/disk', vmviews.VMDiskProductViewSet, basename='vmdiskproduct')
-router.register(r'v1/vm/vm', vmviews.VMProductViewSet, basename='vmproduct')
-
-
-# creates VM from os image
-#router.register(r'vm/ipv6onlyvm', vmviews.VMProductViewSet, basename='vmproduct')
-# ... AND adds IPv4 mapping
-#router.register(r'vm/dualstackvm', vmviews.VMProductViewSet, basename='vmproduct')
+# router.register(r'v1/vm/snapshot', vmviews.VMSnapshotProductViewSet, basename='vmsnapshotproduct')
+# router.register(r'v1/vm/diskimage', vmviews.VMDiskImageProductViewSet, basename='vmdiskimageproduct')
+# router.register(r'v1/vm/disk', vmviews.VMDiskProductViewSet, basename='vmdiskproduct')
+# router.register(r'v1/vm/vm', vmviews.VMProductViewSet, basename='vmproduct')
# Services
-router.register(r'v1/service/matrix', serviceviews.MatrixServiceProductViewSet, basename='matrixserviceproduct')
-router.register(r'v1/service/generic', serviceviews.GenericServiceProductViewSet, basename='genericserviceproduct')
-
+# router.register(r'v1/service/matrix', serviceviews.MatrixServiceProductViewSet, basename='matrixserviceproduct')
+# router.register(r'v1/service/generic', serviceviews.GenericServiceProductViewSet, basename='genericserviceproduct')
# Pay
-router.register(r'v1/my/address', payviews.BillingAddressViewSet, basename='billingaddress')
-router.register(r'v1/my/bill', payviews.BillViewSet, basename='bill')
-router.register(r'v1/my/order', payviews.OrderViewSet, basename='order')
-#router.register(r'v1/my/payment', payviews.PaymentViewSet, basename='payment')
-router.register(r'v1/my/payment-method', payviews.PaymentMethodViewSet, basename='payment-method')
+# router.register(r'v1/my/address', payviews.BillingAddressViewSet, basename='billingaddress')
+# router.register(r'v1/my/bill', payviews.BillViewSet, basename='bill')
+# router.register(r'v1/my/order', payviews.OrderViewSet, basename='order')
+# router.register(r'v1/my/payment-method', payviews.PaymentMethodViewSet, basename='payment-method')
# admin/staff urls
-router.register(r'v1/admin/bill', payviews.AdminBillViewSet, basename='admin/bill')
-#router.register(r'v1/admin/payment', payviews.AdminPaymentViewSet, basename='admin/payment')
-router.register(r'v1/admin/order', payviews.AdminOrderViewSet, basename='admin/order')
-router.register(r'v1/admin/vmhost', vmviews.VMHostViewSet)
-router.register(r'v1/admin/vmcluster', vmviews.VMClusterViewSet)
-#router.register(r'v1/admin/vpnpool', netviews.VPNPoolViewSet)
-#router.register(r'v1/admin/opennebula', oneviews.VMViewSet, basename='opennebula')
+# router.register(r'v1/admin/bill', payviews.AdminBillViewSet, basename='admin/bill')
+# router.register(r'v1/admin/order', payviews.AdminOrderViewSet, basename='admin/order')
+# router.register(r'v1/admin/vmhost', vmviews.VMHostViewSet)
+# router.register(r'v1/admin/vmcluster', vmviews.VMClusterViewSet)
# User/Account
router.register(r'v1/my/user', authviews.UserViewSet, basename='user')
@@ -73,7 +62,7 @@ router.register(r'v2/net/wireguardvpn', netviews.WireGuardVPNViewSet, basename='
router.register(r'v2/net/wireguardvpnsizes', netviews.WireGuardVPNSizes, basename='wireguardvpnnetworksizes')
# Payment related
-router.register(r'v2/payment/credit-card', payviews.CreditCardViewSet, basename='credit-card')
+router.register(r'v2/payment/credit-card', payviews.CreditCardViewSet, basename='stripecreditcard')
router.register(r'v2/payment/payment', payviews.PaymentViewSet, basename='payment')
router.register(r'v2/payment/balance', payviews.BalanceViewSet, basename='payment-balance')
diff --git a/uncloud_pay/serializers.py b/uncloud_pay/serializers.py
index 361ff1c..00e969b 100644
--- a/uncloud_pay/serializers.py
+++ b/uncloud_pay/serializers.py
@@ -10,7 +10,7 @@ from uncloud import AMOUNT_DECIMALS, AMOUNT_MAX_DIGITS
###
# 2020-12 Checked code
-class StripeCreditCardSerializer(serializers.ModelSerializer):
+class StripeCreditCardSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = StripeCreditCard
exclude = [ "card_id", "owner" ]
diff --git a/uncloud_pay/templates/uncloud_pay/register_stripe.html b/uncloud_pay/templates/uncloud_pay/register_stripe.html
index eaf1da4..7bb0110 100644
--- a/uncloud_pay/templates/uncloud_pay/register_stripe.html
+++ b/uncloud_pay/templates/uncloud_pay/register_stripe.html
@@ -2,13 +2,6 @@
{% block header %}
-
-
{% endblock %}
{% block body %}