def ex_edit_image(self, **kwargs):
        """Edit metadata of a server image.

        :keyword    image: image to be edited (required)
        :type       image: :class:`NodeImage`

        :keyword    public: should be the image public (required)
        :type       public: ``bool``

        :keyword    ex_description: description of the image (optional)
        :type       ex_description: ``str``

        :keyword    name: name of the image
        :type       name: ``str``

        :rtype: :class:`NodeImage`
        """

        image = kwargs['image']
        public = kwargs['public']

        params = {'id': image.id,
                  'isPublic': str(public).lower()}

        if 'ex_description' in kwargs:
            params['description'] = kwargs['ex_description']

        if 'name' in kwargs:
            params['friendlyName'] = kwargs['name']

        object = self.connection.request('/api/grid/image/edit',
                                         params=params).object

        return self._to_image(object['list'][0])
dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/gogrid.py/GoGridNodeDriver.ex_edit_image/original