~nttdata/nova/live-migration

« back to all changes in this revision

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

  • Committer: Kei Masumoto
  • Date: 2011-03-10 06:23:13 UTC
  • mfrom: (439.1.342 nova)
  • Revision ID: masumotok@nttdata.co.jp-20110310062313-4q06igbisscjy8nq
merged to trunk rev781

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
 
68
68
    def create(self, req):
69
69
        context = req.environ['nova.context']
70
 
        env = self._deserialize(req.body, req)
 
70
        env = self._deserialize(req.body, req.get_content_type())
71
71
        zone = db.zone_create(context, env["zone"])
72
72
        return dict(zone=_scrub_zone(zone))
73
73
 
74
74
    def update(self, req, id):
75
75
        context = req.environ['nova.context']
76
 
        env = self._deserialize(req.body, req)
 
76
        env = self._deserialize(req.body, req.get_content_type())
77
77
        zone_id = int(id)
78
78
        zone = db.zone_update(context, zone_id, env["zone"])
79
79
        return dict(zone=_scrub_zone(zone))