def create_snapshot(self, name, tag):
        """
        Create new instance of image with snaphot image (it is copied inside class constructuor)

        :param name: str - name of image - not used now
        :param tag: str - tag for image
        :return: NspawnImage instance
        """
        source = self.local_location
        logger.debug("Create Snapshot: %s -> %s" % (source, name))
        # FIXME: actually create the snapshot via clone command
        if name and tag:
            output_tag = "{}:{}".format(name, tag)
        else:
            output_tag = name or tag
        return self.__class__(repository=source, tag=output_tag)
def create_snapshot ( self , name , tag ) : source = self . local_location logger . debug ( "Create Snapshot: %s -> %s" % ( source , name ) ) if name and tag : output_tag = "{}:{}" . format ( name , tag ) else : output_tag = name or tag return self . __class__ ( repository = source , tag = output_tag )
Create new instance of image with snaphot image (it is copied inside class constructuor)

        :param name: str - name of image - not used now
        :param tag: str - tag for image
        :return: NspawnImage instance