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
Exemplo n.º 2
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
 def test_dir_size(self, _, __, ___):
     path = '/path/dir'
     self.assertEqual(utils.dir_size(path), 2)
Exemplo n.º 4
0
 def test_dir_size(self, _, __, ___):
     path = '/path/dir'
     self.assertEqual(utils.dir_size(path), 2)