Exemplo n.º 1
0
 def attach_new_storage_to_current_instance(self):
     inst = self.get_instance_object_by_instance_id(self.__current_instance_name)
     vol = self.__conn.create_volume(1,self.__conn.region)
     time.sleep(30)
     curr_vol = self.__conn.get_all_volumes([vol.id])[0]
     while curr_vol.status != 'available':
         time.sleep(10)
         Logger.logger("info", "pending to make volume available")
     self.__conn.attach_volume (vol.id, inst.id, "/dev/sdf")
     Logger.log("info", "The volume {} attached to this instance".format(vol.id))