コード例 #1
0
    def required_free_space(self):
        spaces = {
            self.config.openstack['puppets']['dst']:
            glob.glob(self.config.openstack['puppets']['src']), }

        for dst, srcs in six.iteritems(spaces):
            size = 0
            for src in srcs:
                size += utils.dir_size(src)
            spaces[dst] = size

        return spaces
コード例 #2
0
ファイル: openstack.py プロジェクト: nebril/fuel-web
    def required_free_space(self):
        spaces = {
            self.config.openstack['puppets']['dst']:
            glob.glob(self.config.openstack['puppets']['src']), }

        for dst, srcs in six.iteritems(spaces):
            size = 0
            for src in srcs:
                size += utils.dir_size(src)
            spaces[dst] = size

        return spaces
コード例 #3
0
 def test_dir_size(self, _, __, ___):
     path = '/path/dir'
     self.assertEqual(utils.dir_size(path), 2)
コード例 #4
0
ファイル: test_utils.py プロジェクト: koder-ua/nailgun-fcert
 def test_dir_size(self, _, __, ___):
     path = '/path/dir'
     self.assertEqual(utils.dir_size(path), 2)