X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=python%2Freinstall_vps_server.py;h=9f535cc10634132c68001974a524c5b6e6cc70cc;hb=refs%2Fheads%2Fdns;hp=2eea203bac8df250767badffa3361c3512772aaa;hpb=ec1096d8c0d897ebd1ea445d9c5404a13c33ce2e;p=perso%2FImmae%2FProjets%2FPuppet.git diff --git a/python/reinstall_vps_server.py b/python/reinstall_vps_server.py index 2eea203..9f535cc 100644 --- a/python/reinstall_vps_server.py +++ b/python/reinstall_vps_server.py @@ -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"