Exemplo n.º 1
0
    def validate(cls, config, non_hidden=False):
        super(UserCleanup, cls).validate(config, non_hidden)

        missing = set(config)
        missing -= manager.list_resource_names(admin_required=False)
        missing = ", ".join(missing)
        if missing:
            LOG.info(_("Couldn't find cleanup resource managers: %s")
                     % missing)
            raise NoSuchCleanupResources(missing)
Exemplo n.º 2
0
    def validate(cls, config, non_hidden=False):
        super(UserCleanup, cls).validate(config, non_hidden)

        missing = set(config)
        missing -= manager.list_resource_names(admin_required=False)
        missing = ", ".join(missing)
        if missing:
            LOG.info(
                _("Couldn't find cleanup resource managers: %s") % missing)
            raise NoSuchCleanupResources(missing)
Exemplo n.º 3
0
 def _list_res_names_helper(self, names, admin_required, mock_iter):
     self.assertEqual(set(names),
                      manager.list_resource_names(admin_required))
     mock_iter.assert_called_once_with(base.ResourceManager)
     mock_iter.reset_mock()
Exemplo n.º 4
0
 def _list_res_names_helper(self, names, admin_required, mock_iter):
     self.assertEqual(set(names),
                      manager.list_resource_names(admin_required))
     mock_iter.assert_called_once_with(base.ResourceManager)
     mock_iter.reset_mock()