(self, provider, credentials, target, image_id, template, parameters, my_image_id)
TODO: Docstring for snapshot_image
        
        @param template TODO
        @param target TODO
        @param provider TODO
        @param credentials TODO
        @param snapshot_params TODO

        @return TODO
TODO: Docstring for snapshot_image
        
        @param template TODO
        @param target TODO
        @param provider TODO
        @param credentials TODO
        @param snapshot_params TODO
TODO : Docstring for snapshot_image @param template TODO @param target TODO @param provider TODO @param credentials TODO @param snapshot_params TODO
def snapshot_image(self, provider, credentials, target, image_id, template, parameters, my_image_id):
        """
        TODO: Docstring for snapshot_image
        
        @param template TODO
        @param target TODO
        @param provider TODO
        @param credentials TODO
        @param snapshot_params TODO

        @return TODO
        """

        # If operating as a secondary we will have the provider_image ID dictated to us - otherwise it is None and it is created
        self.provider_image = ProviderImage(image_id = my_image_id)
        self.provider_image.provider = provider
        self.provider_image.credentials = credentials
        self.provider_image.target_image_id = image_id
        self.provider_image.template = template
        self.pim.add_image(self.provider_image)
        if parameters and ('callbacks' in parameters):
            # This ensures we have workers in place before any potential state changes
            self._init_callback_workers(self.provider_image, parameters['callbacks'], self._provider_image_cbws)

        if not template:
            raise ImageFactoryException("Must specify a template when requesting a snapshot-style build")

        thread_name = str(uuid.uuid4())[0:8]
        thread_kwargs = {'provider':provider, 'credentials':credentials, 'target':target, 'image_id':image_id, 'template':template, 'parameters':parameters}
        self.snapshot_thread = Thread(target=self._snapshot_image, name=thread_name, args=(), kwargs=thread_kwargs)
        self.snapshot_thread.start()
def snapshot_image ( self , provider , credentials , target , image_id , template , parameters , my_image_id ) : # If operating as a secondary we will have the provider_image ID dictated to us - otherwise it is None and it is created self . provider_image = ProviderImage ( image_id = my_image_id ) self . provider_image . provider = provider self . provider_image . credentials = credentials self . provider_image . target_image_id = image_id self . provider_image . template = template self . pim . add_image ( self . provider_image ) if parameters and ( 'callbacks' in parameters ) : # This ensures we have workers in place before any potential state changes self . _init_callback_workers ( self . provider_image , parameters [ 'callbacks' ] , self . _provider_image_cbws ) if not template : raise ImageFactoryException ( "Must specify a template when requesting a snapshot-style build" ) thread_name = str ( uuid . uuid4 ( ) ) [ 0 : 8 ] thread_kwargs = { 'provider' : provider , 'credentials' : credentials , 'target' : target , 'image_id' : image_id , 'template' : template , 'parameters' : parameters } self . snapshot_thread = Thread ( target = self . _snapshot_image , name = thread_name , args = ( ) , kwargs = thread_kwargs ) self . snapshot_thread . start ( )