~ubuntu-branches/ubuntu/quantal/nova/quantal-proposed

« back to all changes in this revision

Viewing changes to nova/virt/configdrive.py

  • Committer: Package Import Robot
  • Author(s): Adam Gandelman, Adam Gandelman, Chuck Short
  • Date: 2012-08-27 15:37:18 UTC
  • mfrom: (1.1.60)
  • Revision ID: package-import@ubuntu.com-20120827153718-lj8er44eqqz1gsrj
Tags: 2012.2~rc1~20120827.15815-0ubuntu1
[ Adam Gandelman ]
* New upstream release.

[ Chuck Short ]
* debian/patches/0001-Update-tools-hacking-for-pep8-1.2-and-
  beyond.patch: Dropped we dont run pep8 tests anymore.
* debian/control: Drop pep8 build depends
* debian/*.upstart.in: Make sure we transition correctly from runlevel
  1 to 2. (LP: #820694)

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
"""Config Drive v2 helper."""
19
19
 
20
 
import base64
21
 
import json
22
20
import os
23
21
import shutil
24
22
import tempfile
25
23
 
26
 
from nova.api.metadata import base as instance_metadata
27
24
from nova import exception
28
25
from nova import flags
29
26
from nova.openstack.common import cfg
64
61
    def _add_file(self, path, data):
65
62
        filepath = os.path.join(self.tempdir, path)
66
63
        dirname = os.path.dirname(filepath)
67
 
        virtutils.ensure_tree(dirname)
 
64
        utils.ensure_tree(dirname)
68
65
        with open(filepath, 'w') as f:
69
66
            f.write(data)
70
67