示例#1
0
 def __init__(self):
     '''
     self.result为多快磁盘创建时记录创建状态
     {
         “name”:0|1|2   #0表示创建中,1为创建完成,2为创建失败
     }
     :return:
     '''
     self.token_dict = get_token()
     self.project_id_dict = get_proid()
     self.result = {}
示例#2
0
 def __init__(self):
     '''
     self.result为多快磁盘创建时记录创建状态
     {
         “name”:0|1|2   #0表示创建中,1为创建完成,2为创建失败
     }
     :return:
     '''
     self.token_dict = get_token()
     self.project_id_dict = get_proid()
     self.result = {}
示例#3
0
 def get_keypairs(cls):
     '''
     获取密钥对
     :return:
     '''
     token = get_token()
     project_id = get_proid()
     path = url_keypairs.format(project_id=project_id)
     method = "GET"
     head = {"Content-Type": "application/json", "X-Auth-Token": token}
     params = ""
     ret = send_request(method, IP_nova, PORT_nova, path, params, head)
     assert ret != 1, "send_request error"
     return ret
示例#4
0
 def __init__(self):
     '''
     result用来为多台虚拟机创建时存储状态,数据结构为:
     {
         “name_vm”:{
             "status_vm":0|1|2, #0表示创建中,1为创建完成,2为创建失败
             "status_disk":{
                 "name_disk":0|1|2  #0表示创建中,1为创建完成,2为创建失败
             }
         }
     }
     :return:
     '''
     self.token_dict = get_token()
     self.project_id_dict = get_proid()
     self.result = {}
示例#5
0
文件: vm.py 项目: baifendian/Sirius
 def __init__(self):
     '''
     result用来为多台虚拟机创建时存储状态,数据结构为:
     {
         “name_vm”:{
             "status_vm":0|1|2, #0表示创建中,1为创建完成,2为创建失败
             "status_disk":{
                 "name_disk":0|1|2  #0表示创建中,1为创建完成,2为创建失败
             }
         }
     }
     :return:
     '''
     self.token_dict = get_token()
     self.project_id_dict = get_proid()
     self.result = {}
示例#6
0
 def __init__(self):
     self.token_dict = get_token()
     self.project_id_dict = get_proid()
示例#7
0
 def __init__(self):
     self.token_dict = get_token()
     self.project_id_dict = get_proid()