Revision 15fd9fd5 lib/rapi/rlib2.py

b/lib/rapi/rlib2.py
24 24
"""
25 25

  
26 26
import ganeti.opcodes
27

  
27
from ganeti import http
28 28
from ganeti import luxi
29

  
29
from ganeti import constants
30 30
from ganeti.rapi import baserlib
31 31

  
32 32
from ganeti.rapi.rlib1 import I_FIELDS, N_FIELDS
......
223 223
    """
224 224
    return baserlib._Tags_POST(constants.TAG_INSTANCE,
225 225
                               self.post_data, name=self.items[0])
226

  
227
  def DELETE(self):
228
    """Delete a tag.
229

  
230
    In order to delete a set of tags from a instance, DELETE request should be
231
    addressed to URI like: /2/instances/[instance_name]/tags?tag=[tag]&tag=[tag]
232

  
233
    """
234
    if 'tag' not in self.queryargs:
235
      # no we not gonna delete all tags from an instance
236
      raise http.HTTPNotImplemented
237
    return baserlib._Tags_DELETE(constants.TAG_INSTANCE,
238
                                 self.queryargs['tag'],
239
                                 name=self.items[0])

Also available in: Unified diff