Ejemplo n.º 1
0
    def run(self, images_info=None, **kwargs):
        dst_image = self.dst_cloud.resources[utl.IMAGE_RESOURCE]

        if not images_info:
            action_get_im = get_info_images.GetInfoImages(self.init, cloud='src_cloud')
            images_info = action_get_im.run()

        new_info = dst_image.deploy(images_info, callback=self.callback)
        return {'images_info': new_info}
Ejemplo n.º 2
0
    def test_run(self):
        expected_result = {'images_info': self.fake_info}

        fake_action = get_info_images.GetInfoImages(self.fake_init,
                                                    'src_cloud')
        image_info = fake_action.run()

        self.assertEqual(expected_result, image_info)
        self.fake_image.read_info.assert_called_once_with()
Ejemplo n.º 3
0
 def check_cloud(self, cloud):
     read_instances = get_info_instances.GetInfoInstances(self.init,
                                                          cloud=cloud)
     read_images = get_info_images.GetInfoImages(self.init, cloud=cloud)
     read_objects = get_info_objects.GetInfoObjects(self.init, cloud=cloud)
     read_volumes = get_info_volumes.GetInfoVolumes(self.init, cloud=cloud)
     check_ssh_access = check_ssh.CheckSSH(self.init, cloud=cloud)
     sql_check = check_sql.CheckSQL(self.init, cloud=cloud)
     rabbit_check = check_rabbitmq.CheckRabbitMQ(self.init, cloud=cloud)
     bandwidh_check = check_bandwidth.CheckBandwidth(self.init, cloud=cloud)
     return (read_instances >>
             read_images >>
             read_objects >>
             read_volumes >>
             check_ssh_access >>
             sql_check >>
             rabbit_check >>
             bandwidh_check)
Ejemplo n.º 4
0
 def migration_images(self):
     act_get_info_images = get_info_images.GetInfoImages(self.init,
                                                         cloud='src_cloud')
     act_deploy_images = copy_g2g.CopyFromGlanceToGlance(self.init)
     return act_get_info_images >> act_deploy_images