~billy-olsen/maas/lp1484696-proxypass-websockets-1.9

« back to all changes in this revision

Viewing changes to src/provisioningserver/import_images/tests/test_boot_resources.py

  • Committer: Gavin Panella
  • Date: 2015-12-11 09:27:36 UTC
  • mto: This revision was merged to the branch mainline in revision 4531.
  • Revision ID: gavin.panella@canonical.com-20151211092736-62hycuhaa4zqktxy
Backport of r4551 from lp:maas: By default, open configuration files read-only.

This eliminates the need for locking when using the YAML-based back-end.

Show diffs side-by-side

added added

removed removed

Lines of Context:
205
205
        self.storage = self.make_dir()
206
206
        current_dir = os.path.join(self.storage, 'current') + os.sep
207
207
        os.makedirs(current_dir)
208
 
        with ClusterConfiguration.open() as config:
 
208
        with ClusterConfiguration.open_for_update() as config:
209
209
            config.tftp_root = current_dir
210
210
        os.rmdir(current_dir)
211
211
        # Forcing arch to amd64 causes pxelinux.0 to be installed, giving more