~soren/nova/iptables-security-groups

« back to all changes in this revision

Viewing changes to nova/api/openstack/backup_schedules.py

  • Committer: Soren Hansen
  • Date: 2011-01-03 09:56:21 UTC
  • mfrom: (430.2.79 nova)
  • Revision ID: soren@linux2go.dk-20110103095621-qy398qk1uk8o7cy3
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
import nova.image.service
24
24
 
25
25
 
 
26
def _translate_keys(inst):
 
27
    """ Coerces the backup schedule into proper dictionary format """
 
28
    return dict(backupSchedule=inst)
 
29
 
 
30
 
26
31
class Controller(wsgi.Controller):
 
32
    """ The backup schedule API controller for the Openstack API """
 
33
 
 
34
    _serialization_metadata = {
 
35
        'application/xml': {
 
36
            'attributes': {
 
37
                'backupSchedule': []}}}
 
38
 
27
39
    def __init__(self):
28
40
        pass
29
41
 
30
42
    def index(self, req, server_id):
31
 
        return faults.Fault(exc.HTTPNotFound())
 
43
        """ Returns the list of backup schedules for a given instance """
 
44
        return _translate_keys({})
32
45
 
33
46
    def create(self, req, server_id):
34
47
        """ No actual update method required, since the existing API allows
36
49
        return faults.Fault(exc.HTTPNotFound())
37
50
 
38
51
    def delete(self, req, server_id, id):
 
52
        """ Deletes an existing backup schedule """
39
53
        return faults.Fault(exc.HTTPNotFound())