Revision e99f9efb kamaki/clients/image/__init__.py

b/kamaki/clients/image/__init__.py
103 103

  
104 104
        :param name: (str)
105 105

  
106
        :param location: (str) pithos://<account>/<container>/<path>
106
        :param location: (str or iterable) if iterable, then
107
            (user_uuid, container, image_path) else if string
108
            pithos://<user_uuid>/<container>/<image object>
107 109

  
108 110
        :param params: (dict) image metadata (X-Image-Meta) can be id, store,
109 111
            disc_format, container_format, size, checksum, is_public, owner
......
114 116
        """
115 117
        path = path4url('images') + '/'
116 118
        self.set_header('X-Image-Meta-Name', name)
119
        location = location if (
120
            isinstance(location, str) or isinstance(location, unicode)) else (
121
                'pithos://%s' % '/'.join(location))
117 122
        self.set_header('X-Image-Meta-Location', location)
118 123

  
119 124
        async_headers = {}

Also available in: Unified diff