]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - python/reinstall_vps_server.py
Add scripts for ovh cloud
[perso/Immae/Projets/Puppet.git] / python / reinstall_vps_server.py
index 2eea203bac8df250767badffa3361c3512772aaa..9f535cc10634132c68001974a524c5b6e6cc70cc 100644 (file)
@@ -1,6 +1,10 @@
 # -*- encoding: utf-8 -*-
 import json
-from ovh import ovh
+try:
+    from ovh import ovh
+except ImportError:
+    # In case it's installed globally
+    import ovh
 import sys
 import ovh_helper
 
@@ -47,34 +51,6 @@ else:
     print("Chosen template not available. Chose among:")
     print_templates(client, vps, available_templates)
 
-# Buy new:
-# POST /order/cart
-#    ovhSubsidiary FR
-# POST /order/cart/{cartId}/assign
-# GET /vps/datacenter?country=FR
-# Get list of vps: 
-# GET /order/cart/{cartId}/vps
-# POST /order/cart/{cartId}/vps
-#    duration "P1M"
-#    planCode "vps_ssd_model1"
-#    pricingMode "default"
-#    quantity 1
-# POST /order/cart/{cartId}/item/{item}/configuration
-#    label: "vps_ssd_datacenter"
-#    value: "gra"
-# POST /order/cart/{cartId}/item/{item}/configuration
-#    label: "vps_ssd_os"
-#    value: "linux--archlinux--64--en"
-# POST /order/cart/{cartId}/item/{item}/configuration
-#    label: "AUTO_RENEW_VPS"
-#    value: false
-# GET /order/cart/{carId}/summary
-# GET /order/cart/{cartId}/checkout
-# POST /order/cart/{cartId}/checkout
-#    waiveRetractationPeriod
-
-# /me/paymentMean ? /me/order/{orderId}/debt/pay ?
-
 # Reboot in rescue:
 # PUT /vps/{serviceName}
 #   netbootMode "rescue" / "local"