32

Python操作腾讯云CVM-KaliArch

 5 years ago
source link: http://blog.51cto.com/kaliarch/2165000
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
一、背景客户有需求在非工作时间将腾讯云CVM停机,工作时间又开起来,停止可以在系统内写定时任务来,但启动需要在腾讯云平台,就需要使用腾讯云的API来进行操作,还好腾讯云SDKforPython,简单记录下。二、代码git地址核心代码,进行cvm操作及记录日志classCvmOper():def__init__(self,logger):config=configparser.ConfigParse

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK